Assume an image A and an image B, where B is a modified copy of A with overall higher HSV-value and lower saturation. How can I report these differences using OpenCV?
Ex. output: hue 0, saturation -25, HSV-value +25.
I have already been able to convert the bgr-images to hsv-images and split these into the 3 channels. Would it be a good/correct idea to take the average of each channel of both images, and just output the difference of these averages? Or is there perhaps a better or already-included-in-opencv way? Thanks!
Mat3b diff; absdiff(A,B, diff); Scalar mean_diff = mean(diff);
will give you the differences of the mean in the 3 channels separately. – Mikiabsdiff
is exactly what should be used here. You lose the sign of the differences by doing that. Maybe just writingMat diff = A - B;
is enough (if you are using C++ andCV_8U
matrices, you should convert them to CV_32F before to be able to store negative values) – Sunreef