我使用Matlab工具来查找图像中特定颜色的HSV值。
该工具的输出为:
libname
结果正是我需要的颜色。
但是,我尝试使用OpenCV来实现相同的颜色检测,并且即使传输% Define thresholds for channel 1 based on histogram settings
channel1Min = 0.039;
channel1Max = 0.063;
% Define thresholds for channel 2 based on histogram settings
channel2Min = 0.538;
channel2Max = 0.654;
% Define thresholds for channel 3 based on histogram settings
channel3Min = 0.102;
channel3Max = 0.247;
之后,该值的范围也非常不同。
有任何想法如何在OpenCV中使用从Matlab获得的值?
谢谢