Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed); camera output

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed); changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right.
camera output

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. camera outputcamera output

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. camera output image

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. camera output image image

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. camera output

image image

image from camera

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. right. It looks like static on an old TV. camera output

image from camera

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. It looks like static on an old TV. camera output

image from cameraimage

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. It looks like static on an old TV. camera outputcamera output

image from cameraimage

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Can someone tell me how to get my An image to show here? Just incase it doesn't show, the image is "grainy" and none of the colors are right. It looks like static on an old TV. camera output

what gets displayed image from cameraimage

Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Using the code below, I am getting images from a Leopard Imaging USB 3.0 camera. When I first tested the camera, the images were green. I looked on several forums and found that I needed to convert from Bayer images to BGR images. Now, I get what is in the attached image. Does anyone know what I can do to fix this?

cv::VideoCapture (cam1);
cam1.grab();
cam1.read(data);

....
cv::Mat changed;
cv::Mat bayer16(data.rows, data.cols, CV_16UC1,data.data,data.step);
cv::Mat bayer8 = bayer16.clone();
bayer8.convertTo(bayer8, CV_8UC1, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
An image of what gets displayed image from cameraimage