Chaitan
2013-05-14 11:22:39 UTC
I am not able to convert the raw bayer (RGGB..) image (from the ccd sensor) to 8-bit BGR.
Using the following code:
cv::Mat bayer16BitMat(image.height, image.width, CV_16UC1, image.bp);
cv::Mat bayer8BitMat = bayer16BitMat.clone();
bayer8BitMat.convertTo(bayer8BitMat, CV_8UC1, 0.0625);
cv::Mat rgb8BitMat(image.height, image.width, CV_8UC3);
cv::cvtColor(bayer16BitMat, rgb8BitMat, CV_BayerRG2BGR);
after running this code, i am getting image like this --> http://groups.yahoo.com/group/OpenCV/photos/album/1312742517/pic/1793350267/view?picmode=&mode=tn&order=ordinal&start=1&count=20&dir=asc
------------------------------------
Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com
Using the following code:
cv::Mat bayer16BitMat(image.height, image.width, CV_16UC1, image.bp);
cv::Mat bayer8BitMat = bayer16BitMat.clone();
bayer8BitMat.convertTo(bayer8BitMat, CV_8UC1, 0.0625);
cv::Mat rgb8BitMat(image.height, image.width, CV_8UC3);
cv::cvtColor(bayer16BitMat, rgb8BitMat, CV_BayerRG2BGR);
after running this code, i am getting image like this --> http://groups.yahoo.com/group/OpenCV/photos/album/1312742517/pic/1793350267/view?picmode=&mode=tn&order=ordinal&start=1&count=20&dir=asc
------------------------------------
Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com