Can OPENCV access a analog camera using a video capture device - c++

I have been trying to access my analog camera via a EasyCap video capture device. Any code I try only picks the usb webcam or internal webcam. I guess that since video capture device is a video controller, opencv doesnt recognize it as a imaging device.
Can anyone conform if you cannot access analog cameras with opencv via a video capture device.
If so, then what other method can be used.

i struggled with the same problem (in my case within python instead of C++, although I am certain it will be the same root cause) and hope it helps!
the original thread + ANSWER
also relevant XKCD

Even for digital devices, OpenCV isn't good at reading them, it is good at processing them. The library has supply for generic webcams, of course; however it does not supply most of the commercial or industrial cameras.
In short, to decode, you should try using "video for linux" or "video for windows" libraries; or the device SDK itself. Since you are using a video2usb converter, you shouldn't have any problem accessing the analog camera through these software.

Related

How to use external HD video camera as input for a Visual Studio, OpenCV project?

I am doing a project regarding image processing and multiple person counting and was wondering, how exactly can I plug my ION AIR PRO PLUS video recording device (similar to a goPro), and use it as my 'webcam'? Basically, I want to plug it in and then access it via a live feed using Microsoft Visual Studio 2010 and OpenCV, and then do real time tracking of people walking.
What I am struggling with is accessing the external camera from my program. Anyone know how to do this?
The video camera has no wifi, only an hdmi output, RGB cable output and a USB.
Attach the USB cable and instantiate cv::VideoCaputre(0). In Linux local cameras have number indices I think in Windows should be the same.
Peter, In the past I have worked on camera products on Windows XP & 7. On windows usb cameras can be accessed using directshow.
You can implement a directshow filter for people tracking algorithm and fit it in the direct show pipeline soon after your camera plugin.
Here is a link to an application stack that may suit your use case(to give you an idea):
http://www.e-consystems.com/blog/camera/?p=1302
The recent windows operating systems that run WinRT, use a latest framework called MediaFoundation. As its very new there are some limitations we found when we tried to build similar applications.
To quickly see a preview out of your camera, pls google for "graphedit" and install it on a Windows 7 pc. Its a fairly simple tool. You can drag and drop your camera, if directshow is supported, then render its output pin and play for preview.
I do not think this is a standard webcam, it appears to work only as a mass storage device. One thing you can try is removing the micro sd card and connect it to the computer. This works on some cameras.
Assuming this does not work, one option would be to purchase an HDMI capture card. The YK762H PCI-E card costs around $40, and will allow you to use the camera with OpenCV, the videoInput library, or DirectShow.
The other option is to use the WiFi live preview. You would have to figure out the commands sent to the camera. This has already been done with the SJCam wifi cameras, the GoPro models, and Sony cameras such as the QX-10 and HDR-AS100V.

OpenCV: what makes a device recognisable by OpenCV?

I would like to know how OpenCV does to find devices that it can read from?
Can OpenCV only read from usb devices?
I have a video acquisition card (BlackMagic Intensity) and I until now used the blackMagic's SDK to retrieve the stream coming from the input port on the card, and converted it to a cv::Mat that I then use in my code.
But can't I not develop some kind of C++ plugin for OpenCV so that I can use VideoCapture to access my blackMagic stream? wouldn't it be a cleaner way of doing this?
Hope you can help

c++ OpenCV capture easycap usb cam

I am trying to get video stream from analog camera connected to usb easycap - in OpenCV C++.
using MATLAB, I can get stream the same approach like for laptop webcam (with changing the index from 1 to 2).
with OpenCV, I can get stream from laptop webcam with index 0.
but when I am trying to get with the camera connected to the easycap (using index 1) , the laptop crashes and get blue screen.
Anyone have done this before?
Thanks
I work on the same device and I also have some BSOD with it.
Do you plug it with the USB extension provided ? If yes, try don't use it.
If your problem is still hapening, it's probably because like me, you use a low quality chinese fake EasyCap. I bought a real one and I haven't problems anymore
If you want to keep your device, you can use it with VideoCapture in python, it works very well and there is no more BSOD
Try using Linux. I tested my code with a fake EasyCAP in windows and I got many BSOD then I built and executed the same code in Linux and it worked.
Linux is driver friendly.

Firewire camera with OpenCv 2.4. not working

I am using OpenCV 2.4 with C++ for image processing and video streaming . I would like to know how we can use fire-wire camera like pixilink to capture frames? I tried the VideoCapture class but it seems to work with only usb cameras unlike firewire one. If some one has done same thing with firewire camera then kindly give some guidance how to do that?
You can capture images using firewire SDK or you can also libdc1394 API. I found libdc1394 to more reliable and easy to use and there are couple of examples available to get start.

Select which Webcam to use in OpenCV

I have a built in webcam (HP) and an USB webcam. Whenever I use webcams in OpenCV, the built in webcam is used. However I want use the USB webcam. I tried disabling the built in webcam and even uninstalling the drivers, but after doing that, I get a message saying that no webcams were detected, even though the USB webcam is connected. How can I use the USB webcam instead of the built in webcam? I have searched the net top to bottom and have found no fix.
Thanks
The command CaptureFromCAM accepts an integer as its only argument which specifies the device number to use. Change this number and it will use a different device.