Ask Your Question

jnj11's profile - activity

2015-07-31 15:28:20 -0600 commented question Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Yes, I've seen this and it doesn't work either. I've spent the last few days trying everything I can think of. I may have to 1) go back and try everything again 2) try something other than opencv

2015-07-28 07:53:10 -0600 received badge  Enthusiast
2015-07-27 11:48:12 -0600 commented question Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

An update from the vendor: The V034 camera outputs RAW data encapsulated in YUY2 format. Since UVC standard has no RAW image format, we use YUY2 as the wrapper.

2015-07-27 09:44:14 -0600 commented question Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

To correct the previous comment: When I cut down all of that code and just use cv::cvtColor(data, changed, CV_BayerGB2BGR); I get the Assertion failed error..Thanks for your help BTW

2015-07-27 09:41:30 -0600 commented question Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Data has 3 channels

2015-07-27 08:44:34 -0600 commented answer Debayering / demosaicing BGR image?

I am having this exact same issue. Can you give more detail about how you solved this?

2015-07-27 08:18:54 -0600 commented question Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

No, I am not sure that this is correct. I found an example where I need to convert from a Bayer image to an RGB or BGR image. With no processing, the images coming from the camera look like this. When I cut down all of that code and just use cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
I get an error that says: OpenCV Error: Asserion failed (scn == 1 && (dcn == 3 || dcn ==4))
I need to convert that image to BGR. Do you have any suggestions about how to do that?

2015-07-24 12:36:46 -0600 commented question read camera image incorrect

Hi, I'm having the same problem. I've used cvtColor but, my image is still not displaying correctly. I've pasted my code below and have included a link to the resulting image. Can you see what I'm doing wrong? 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_8UC3, 0.0625);


cv::cvtColor(bayer8, changed, CV_BayerGB2BGR);
imshow("", changed);
Resulting image

2015-07-24 10:23:51 -0600 commented answer Convert BayerBG12Packed (12-Bit packed) into RGB

I am having a similar problem. What do you mean by "scale the color value"?

2015-07-24 10:16:02 -0600 commented question Result of cvtColor not displaying correctly for Lepoard Imaging USB 3.0 camera

Yes, there is some gray but, the colors look more washed out. I added a link to the image so that you can see what I mean Image

2015-07-23 13:52:42 -0600 asked a question 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

2015-07-23 11:02:21 -0600 commented question VideoCapture: Can I override the frame type given by my camera

I am having this exact same problem with the same camera. Did you ever solve this issue?

2015-07-10 14:39:37 -0600 received badge  Editor (source)
2015-07-08 23:01:26 -0600 asked a question OpenCL Errors in the Console when using Stitcher OpenGL 3

I am trying to use the code below to create a panorama. img1 and img2 are coming from 2 cameras and I know that they both contain data (that they're not NULL). The code compiles and runs. However, when I run the code, I get the error in the attached image. I have no clue what's going on. Does anyone have any ideas? I'd appreciate the help!

vector<<Mat>Mat> imgs;
imgs.push_back(img1);
imgs.push_back(img2);

Mat pano;  
Stitcher stitcher = Stitcher::createDefault(true);
Stitcher::Status status = stitcher.stitch(imgs, pano);


 if (status != Stitcher::OK) 
 { 
         cout << "Can't stitch images, error code = " << int(status) << endl; 
      return -1; 
    }

The error that appears in the console

I have no idea why my image is not showing up...but the error says "OpenCL program build lop: -D depth=0 -D PIX_PER_WI_Y=4 ....Error, line 14118: compile failed."