ftCommunity / ftcommunity-TXT

Fischertechnik ROBOTICS TXT firmware, community edition
http://cfw.ftcommunity.de/
GNU General Public License v3.0
46 stars 31 forks source link

Video device is not working properly #2

Closed harbaum closed 8 years ago

harbaum commented 8 years ago

The camera is working well under Ubuntu an a PC with opencv and pyqt.

On the TXT the same program results in the first few lines of the image repeating over and over again:

camera

This happens with opencv2 and opencv3. The repeating lines differ if the image changes. So these lines are not from the same image. It seems like the frame data is updated while the frame is being read.

harbaum commented 8 years ago

Camera info:

Driver Info:
        Driver name   : uvcvideo
        Card type     : USB 2.0 Camera
        Bus info      : usb-musb-hdrc.2.auto-1
        Driver version: 4.1.18
        Capabilities  : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format

A similar camera from a different vendor with the same chipset shows the same symptoms. Unfortunately i don't have a webcam with a different chipset.

harbaum commented 8 years ago

v4l2grab shows the same problem.

v4l2grab

harbaum commented 8 years ago

Seems to be a common problem on Sitara based systems: https://groups.google.com/forum/#!topic/beagleboard/G5Xs2JuwD_4

The soluition seems to be to limit the resolution and framerate. v4l2grab works at 320x240@15fps and so does the TXT camera app.

harbaum commented 8 years ago

The root cause seems to be a problem with the Sitara USB DMA: https://e2e.ti.com/support/arm/sitara_arm/f/791/t/155414

harbaum commented 8 years ago

I just changed the kernel config "Device Drivers"-->"USB support"--->"Inventra Hightspeed...."/"MUSB DMA mode" from "TI CPPI 4.1" to "Disable DMA". But this doesn't seem to solve the issue.