a和b轴上的实验室图像值都超出了范围



我将一张彩色图像转换为Lab-color空间,当我显示Lab-image的值时,我发现a轴和b轴上的像素值都大于128!!而a轴和b轴上的值应该-128 ~ +128

请告诉我为什么a轴和b轴上的值超出了范围?

:

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]);

:

[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

8位图像的L*a*b*转换结果自动缩放:

  • RGB & lt;→CIE Lab* (CV_BGR2Lab, CV_RGB2Lab, CV_Lab2BGR, CV_Lab2RGB)。
    ...
    输出0 <= L <= 100, -127 <= a <= 127, -127 <= b <= 127。然后将值转换为目标数据类型:

  • 8位图像
    L & lt; - L * 255/100, & lt; - + 128, b & lt; - b + 128

http://docs.opencv.org/java/2.4.9/org/opencv/imgproc/Imgproc.html cvtColor (% 20 org.opencv.core.Mat org.opencv.core.Mat, % 20 int)

相关内容

  • 没有找到相关文章

最新更新