简体   繁体   中英

OpenCV Python and a webcam

I'm working with OpenCV on a BeagleBoard with Ubuntu and OpenCV 1.1 interfaced via Python . I'm trying to set something up to capture a feed from a UVC compatible webcam (Logitech C250). I have tested the webcam with luvcview, and it works, but only if I set the input format to YUV. If I run it in 'normal' mode I am getting back JPEG frames and something - somewhere is not happy!

I'm trying to connect with the webcam in OpenCV as I want to get the image back from the webcam and run some analysis on it. As I have a limited device this seems to be the most efficient way of doing it - however I need to instruct the capturing system to capture in YUV and not JPEG. Is there a way of doing this (for example luvcview allow me to enter luvcview -f YUVY)?

I've cracked this partly. If you compile OpenCV with the flag WITH_JPEG=OFF then the camera will not try to use MJPEG.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM