i converted a color image to Lab-color space, and when i displayed the values of the Lab-image, i found that the values of the pixels on the a-axis and b-axis are greater than 128!! while the values on the a-axis and b-axis should range from -128 to +128
please let me know why the values on the a-axis and b-axis exceeds the range?
Code:
Log.D(TAG, "main", "labImg.size(): " + labImg.size());
Log.D(TAG, "main", "dst.dump() \n" + labImg.dump());
Log.D(TAG, "main", "Luminance:dst.get(0, 9)[0]: " + labImg.get(0, 9)[0]);
Log.D(TAG, "main", "a-axis:dst.get(0, 9)[1]: " + labImg.get(0, 9)[1]);
Log.D(TAG, "main", "b-axis:dst.get(0, 9)[2]: " + labImg.get(0, 9)[2]);
output:
[82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20;
82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20, 82, 207, 20]
3: Debug: MainClass -> main: Luminance:dst.get(0, 9)[0]: 82.0
4: Debug: MainClass -> main: a-axis:dst.get(0, 9)[1]: 207.0
5: Debug: MainClass -> main: b-axis:dst.get(0, 9)[2]: 20.0
Results for
L*a*b*
conversion on 8-bit images is automatically scaled:http://docs.opencv.org/java/2.4.9/org/opencv/imgproc/Imgproc.html#cvtColor(org.opencv.core.Mat,%20org.opencv.core.Mat,%20int)