This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Linux Video Hardware

Troubleshooting Linux Video Devices

If you have trouble using the Image Acquisition Toolbox™ software with a supported Linux® Video acquisition device, follow these recommended troubleshooting steps:

  1. Verify that your image acquisition hardware functions properly and that you have permission to access it.

    Be sure that your system and login have the proper permissions to access the hardware. See your system administrator if you need help.

    You can verify that your hardware functions properly by running the WebCam application that came with your Linux distribution, for example, Cheese or Camorama.

    If you can start the utility, run the utility, and close it without encountering any errors, the toolbox should be able to operate with your image acquisition device. If you encounter errors, resolve them before attempting to use the toolbox with the device.

  2. With previous versions of the Image Acquisition Toolbox, the files for all of the adaptors were included in your installation. Starting with version R2014a, each adaptor is available separately through MATLAB® Add-Ons. In order to use the Image Acquisition Toolbox, you must install the adaptor that your camera uses, in this case, the OS Generic Video Interface support package. See Image Acquisition Support Packages for Hardware Adaptors for information about installing the adaptors.

  3. If your hardware is functioning properly, verify that you are using hardware device drivers that are compatible with the toolbox.

    • Determine the driver version you are using on your system. The Image Acquisition Toolbox software is only compatible with Video4Linux version 2 drivers. It is not supported for Video4Linux version 1. (You may be able to get it to work – see the next step.) Contact the hardware manufacturer to determine if the driver provided with your hardware conforms to these driver classes.

    • Verify that the version is compatible with the Image Acquisition Toolbox software. For the correct driver information, check the list of supported drivers on the Image Acquisition Toolbox product page at the MathWorks Web site (

  4. The Linux Video adaptor only supports Video4Linux version 2 compatible devices. However, there is a library that might make Video4Linux version 1 devices work with the toolbox. The libv4l package provides a library that provides compatibility between the different versions of Video4Linux. To try this, start MATLAB with the following command:

    LD_PRELOAD=/usr/lib/libv4l/ matlab

    then the Linux Video adaptor may be able to detect your V4L1 hardware. The path to the library might vary depending on the Linux distribution. If the above command works, you can add a command similar to:

    export LD_PRELOAD=/usr/lib/libv4l/

    to /etc/profile or another persistent configuration file.


The Linux Video driver is a generic interface and you should only use it if you do not have a more specific driver to use with your device. If your device is a DCAM or FireWire device, use the DCAM driver. Only use the Linux Video driver if there is no more specific option for your device.

Was this topic helpful?