Open oor001 opened 5 years ago
@oor001 ,
https://docs.opencv.org/trunk/df/d6c/group__ximgproc__superpixel.html
CieLAB should be linear in perception (better than RGB), SLIC class superpixel use euclid distance on some sort of color features (or derived features like in case of LSC).
Well, allowing any input format its a feature but can turn out as a "bug" if missunderstood :-)
System information (version)
Detailed description
When using the SuperPixelSLIC class to generate superpixels for an RGB image I have encountered the following phenomenon:
Code:
Using the above code, I get two different results based on the format of the input image:
a) If 'rgb' is a CV8UC3 (0-255) then I get a desired result. Superpixels conforming to the shapes within the image. b) If 'rgb' is a CV32FC3 (0-1) then I get a slightly perturbed grid as a result.
This leads me to believe that whatever code is weighting the image structure vs compactness within the function is not taking into account the scale of the image. It is fine if this is the case, but possibly enforcing/documenting the incoming image format would reduce confusion here.