1. Plug-in the USB stick. Check if it is properly connected:
lsusb
Check for 'Afatech'. Example: 'Bus 001 Device 005: ID 1b80:e34e Afatech'.
2. The next steps need to be done as root (sudo su). Insert the em28xx module, with configuration card 9, or 13. The first is the configuration for the 'Pinnacle Dazzle DVC 90', which works well for the Conceptronics USB stick and mplayer to record frames, but does not work for OpenCV interfacing. The last is the 'Terratec Prodigy XS', and can be used to interface both with mplayer and OpenCV.
4. Now /dev/video0 is created, and can be used by video capture applications. An example is given below:
mplayer tv://-tv driver=v4l2:width=640:height=480
If you have multiple devices (for example a webcam), the USB device will not be the default /dev/video0 and you have to explicitly mention the device path when opening the video stream. For example:
Interfacing to OpenCV requires the following steps:
1. Plug-in the USB stick. Check if it is properly connected:
lsusb
Check for 'Afatech'. Example: 'Bus 001 Device 005: ID 1b80:e34e Afatech'.
2. The next steps need to be done as root (sudo su). Insert the em28xx module, with configuration card 13. This is an important difference to the steps above!
6. Start the OpenCV program! Make sure you set the resolution to 640x480. An example file is attached here, which just interfaces to the camera and displays the frame.
Installation
1. Plug-in the USB stick. Check if it is properly connected:
Check for 'Afatech'. Example: 'Bus 001 Device 005: ID 1b80:e34e Afatech'.
2. The next steps need to be done as root (sudo su). Insert the em28xx module, with configuration card 9, or 13. The first is the configuration for the 'Pinnacle Dazzle DVC 90', which works well for the Conceptronics USB stick and mplayer to record frames, but does not work for OpenCV interfacing. The last is the 'Terratec Prodigy XS', and can be used to interface both with mplayer and OpenCV.
3. Insert the device type:
4. Now /dev/video0 is created, and can be used by video capture applications. An example is given below:
If you have multiple devices (for example a webcam), the USB device will not be the default /dev/video0 and you have to explicitly mention the device path when opening the video stream. For example:
Note that if you use the NTSC standard, you will get a green overlay over the image. The composite video must be PAL standard to work properly.
5. Video can be recorded uncompressed by adding the following option:
The individual frames are then saved as *.pnm files. Deinterlacing options can be viewed by typing:
An example of a deinterlacing filter when recording raw video:
Interfacing the USB module with OpenCV
Interfacing to OpenCV requires the following steps:
1. Plug-in the USB stick. Check if it is properly connected:
Check for 'Afatech'. Example: 'Bus 001 Device 005: ID 1b80:e34e Afatech'.
2. The next steps need to be done as root (sudo su). Insert the em28xx module, with configuration card 13. This is an important difference to the steps above!
3. Insert the device type:
4. Now /dev/video0 is created, and can be used by video capture applications. Check if it is working:
5. To interface with OpenCV you need to load an additional library:
6. Start the OpenCV program! Make sure you set the resolution to 640x480. An example file is attached here, which just interfaces to the camera and displays the frame.