Ask Your Question
0

Look up table

asked 2013-06-17 06:25:04 -0600

Nimlad gravatar image

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-06-17 07:19:12 -0600

wuling gravatar image

updated 2013-06-17 07:24:28 -0600

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);
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-06-17 06:25:04 -0600

Seen: 428 times

Last updated: Jun 17 '13