marker_separation/py/comparison_comparison.py

12 lines
283 B
Python
Raw Normal View History

2023-10-23 14:32:35 +00:00
import cv2
import numpy as np
class ComparisonComparison:
def convert_color (self, color, color_space) :
pixel = np.zeros([1, 1, 3], dtype=np.uint8)
pixel[:] = color
cvt = cv2.cvtColor(pixel, color_space)
return cvt[0, 0]
if __name__ == "__main__":
ComparisonComparison()