Lord of Shadows
2[H]4U
- Joined
- Mar 9, 2004
- Messages
- 3,322
Hello, I'm posting this in hopes that you guys will be able to figure this out for me as I dont have lot's of free time to do so. I bought a logitech c310 camera and am using the video for linux 2 api to capture images.
Despite being a decent camera the data I'm getting out is 176x144 in V4L2_PIX_FMT_YUYV format. The output from the capture program is a block of 50688 bytes in this format. I've tried a bunch of different conversion formulas, but nothing looks right. I can get a black / white image if I just output one of the color values, which makes me think that I might have the luminance and chrominance backwards.
Code to capture images: http://pastebin.com/Yu1fxgbF
Code to convert images to bmp: http://pastebin.com/qFBM60M5
Sample Image: http://home.swbell.net/aw2001/frame0
Despite being a decent camera the data I'm getting out is 176x144 in V4L2_PIX_FMT_YUYV format. The output from the capture program is a block of 50688 bytes in this format. I've tried a bunch of different conversion formulas, but nothing looks right. I can get a black / white image if I just output one of the color values, which makes me think that I might have the luminance and chrominance backwards.
Code to capture images: http://pastebin.com/Yu1fxgbF
Code to convert images to bmp: http://pastebin.com/qFBM60M5
Sample Image: http://home.swbell.net/aw2001/frame0
Last edited: