Virtual Camera Support for Matlab Image Acquisition Toolbox

17 views (last 30 days)
Dear Matlab Support:
I would like to ask if there is any easy way to have virtual cameras working with the Image Acquisition Toolbox.
I'm seeking to stream MJPEG videos from IP Cameras to Matlab. After searching all Matlab Central and reading documentation, I know such a feature is currently not directly supported. Whilst alternatives such as capturing only a single JPEG snapshot or using mexopencv do exist, they are not desirable in my case.
I was trying to create virtual cameras using two alternatives: one is to use Axis Streaming Assistant (my IP cameras are Axis), and the other is to use IP Camera Adaptor (<http://ip-webcam.appspot.com)>. In both cases, I was able to create a virtual camera forwarding MJPEG stream from the real IP camera. I have verified that the virtual camera works in instant messaging applications (such as Skype).
However, Matlab Image Acquisition Toolbox does not detect these virtual cameras. I have installed all possible specific and generic camera packages. The Image Acquisition Toolbox only detects the built-in physical camera on my laptop ('winvideo'). I have Matlab 64 bit R2014a on my laptop.
Therefore, I would like to know if there is any easy way to get virtual cameras detected by Matlab? Or is it a current limitation and it would require writing a specific driver for the virtual camera? Once again, I note that other instant messaging applications can detect both the physical and virtual cameras on my laptop.
Thank you,
Sonny

Answers (2)

Bruno Pop-Stefanov
Bruno Pop-Stefanov on 22 Oct 2014
Hi Sonny,
I read that Axis Streaming Assistant creates a DirectShow device. Can you confirm that this is the case for the virtual camera that you are creating?
If the virtual camera is indeed a DirectShow compliant device, please try to run the detectDevices utility to check whether it is compatible with Image Acquisition Toolbox. The utility can be downloaded from the following page:
Note that there can be an incompatibility even if the virtual camera is DirectShow compliant. For example, the DirectShow driver and MATLAB must use the same bitness -- either both 32-bit or both 64-bit. If they are not, then you won't be able to use the Axis IP camera with Image Acquisition Toolbox.
  1 Comment
Sonny Pham
Sonny Pham on 5 Dec 2014
Thank you for your answer. Unfortunately, the utility did not detect the virtual camera either, despite it is DirectShow-compliant.

Sign in to comment.


Andrei
Andrei on 19 Mar 2018
IP Cameras are directly supported in MATLAB as of MATLAB R2015a https://www.mathworks.com/hardware-support/ip-camera.html

Categories

Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!