Display pallete
This commit is contained in:
parent
dd1e559581
commit
2a6fc4147b
|
@ -13,6 +13,21 @@ class ComparisonComparison:
|
|||
comp_colors = [red, green, blue]
|
||||
|
||||
pallete = PalleteSchema('./palletes/printed_pallete.json')
|
||||
|
||||
i = 0
|
||||
row = []
|
||||
rows = []
|
||||
for color in pallete.colors :
|
||||
cell = create_colored_image(60, 40, color['color'])
|
||||
row.append(cell)
|
||||
i += 1
|
||||
if i == 10 :
|
||||
i = 0
|
||||
rows.append(np.hstack(row))
|
||||
row = []
|
||||
show = np.vstack(rows)
|
||||
cv2.imshow('image', show)
|
||||
cv2.waitKey(0)
|
||||
|
||||
color_spaces = ['RGB', 'BGR', 'LAB', 'HSV']
|
||||
for space in color_spaces :
|
||||
|
@ -40,7 +55,7 @@ class ComparisonComparison:
|
|||
show.append(combined)
|
||||
|
||||
show = np.vstack(show)
|
||||
cv2.imshow("image", show)
|
||||
cv2.imshow('image', show)
|
||||
cv2.waitKey(0)
|
||||
|
||||
def get_colors (self, pallete, space) :
|
||||
|
|
Loading…
Reference in New Issue