Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

Maybe the image sizes do not match - any help is welcome.

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

Maybe image description

BayerBG12 works fine, so maybe the image sizes do not match - any help is welcome.

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

image descriptionimage myimage

BayerBG12 works fine, so maybe the image sizes do not match - any help is welcome.

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

image myimageImage:!(c:\xtemp\myimage.jpg "MyImage")

BayerBG12 works fine, so maybe the image sizes do not match - any help is welcome.

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

Image:!(c:\xtemp\myimage.jpg "MyImage")Image:MyImage

BayerBG12 works fine, so maybe the image sizes do not match - any help is welcome.

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

Image:MyImageImage:!(c:\xtemp\myimage.jpg "MyImage")

BayerBG12 works fine, so maybe the image sizes do not match - any help is welcome.

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

Image:!(c:\xtemp\myimage.jpg "MyImage")image:MyImage

BayerBG12 works fine, so maybe the image sizes do not match - any help is welcome.

Convert BayerBG12Packed (12-Bit packed) into RGB

Hello,

can anyone tell me, what code inside cvtColor has to be used, when converting 12 bit packed BayerBG12Packed into RGB. The following code does not work:

cv::Mat Mat16Bit(SizeY, SizeX, CV_16UC1, ImageData);
cv::Mat Mat8Bit = Mat16Bit.clone();
Mat8Bit.convertTo(Mat8Bit, CV_8UC3, 0.0625);
cv::Mat MatRgb(SizeY, SizeX, CV_8UC3);
cv::cvtColor(Mat8Bit, MatRgb, CV_BayerBG2RGB);

image:MyImageimage MyImage

BayerBG12 works fine, so maybe the image sizes do not match - any help is welcome.