OpenCV颜色查找表

OpenCV颜色查找表_第1张图片

    Mat color = imread("flover.jpeg");
    Mat lut = Mat::zeros(256, 1, CV_8UC3);
    for (int i = 0; i < 256; ++i) {
        lut.at(i, 0) = color.at(30, i);
    }
    imshow("color", color);
    Mat dist;
    LUT(color, lut, dist);
    imshow("dist", dist);
    applyColorMap(color, dist, COLORMAP_SUMMER);

    imshow("dist2", dist);
    waitKey(0);

你可能感兴趣的:(OpenCV,opencv,人工智能,计算机视觉)