Ask Your Question
0

Look up table

asked Jun 17 '13

Nimlad gravatar image

what is the best possible way of using look up table for two channels image

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Jun 17 '13

wuling gravatar image

updated Jun 17 '13

This code i use colormap , you can marker ones channels or one channel remain the same. I think it can work.

Mat temp;
Mat M1=Mat(256,1,CV_8U);
Mat M2=Mat(256,1,CV_8U);
Mat M3=Mat(256,1,CV_8U);
cv::cvtColor(src,temp,CV_BGR2GRAY);
Mat r1,r2,r3;

cv::LUT(temp,M1,r1);
cv::LUT(temp,M2,r2);
cv::LUT(temp,M3,r3);
std::vector<cv::Mat> planes;
planes.push_back(r1);
planes.push_back(r2);
planes.push_back(r3);

cv::merge(planes,dst);
Preview: (hide)

Question Tools

Stats

Asked: Jun 17 '13

Seen: 430 times

Last updated: Jun 17 '13