简体   繁体   中英

DSLR Canon Videocapture in OpenCV

I need to capture frame from a DSLR camera. I know that i can use Videocapture cap(0); for capture from default webcam. If i connect with usb the camera and run the code, It seems like he cant find the camera. What should i do for capture from the DSLR?

In general, I have found getting OpenCV to work with anything besides a basic webcam almost impossible. In theory, I think it uses the UVC driver, but I have had almost 0 luck getting it to read. One thing you can try is using VLC and see if you can capture a video stream from your camera with it. If you can you might get lucky and figure which camera or video device the DSLR actually is.

If your DSLR has a development SDK maybe you can capture frame using their interface and then use OpenCV for processing. I do this for a project. I have a 3rd party SDK that I use to find and control the camera and them I move the video data into OpenCV (EmguCV) for processing.

Doug

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