From 7523ca887852948017c79c1ddbfbbd4dac59a6f4 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 23 Oct 2023 10:32:35 -0400 Subject: [PATCH] Save comparison script --- py/comparison_comparison.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 py/comparison_comparison.py diff --git a/py/comparison_comparison.py b/py/comparison_comparison.py new file mode 100644 index 0000000..e0e4d15 --- /dev/null +++ b/py/comparison_comparison.py @@ -0,0 +1,12 @@ +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() \ No newline at end of file