Non-UVC camera (video grabber)

407 views
Skip to first unread message

sebastien....@gmail.com

unread,
Nov 14, 2016, 9:50:09 AM11/14/16
to pupil-discuss
Hi,

Here is my use-case: I want to use Pupil Capture with an FMRI-compatible camera (for the eye, to measure the pupil diameter). The FMRI-compatible camera is connected to the PC with a USB video grabber. Fushicai USBTV007 Audio-Video Grabber, more precisely. But it is not a UVC device.

On Linux, I can see the image of the camera with the Cheese application.

But not Pupil. I've modified the sources to add the new device to the list, but it still shows the message:
No accessible device found that matched ['Pupil Cam1 ID0', ...].

So my guess is that Pupil Capture supports only UVC devices. Is that correct?

Here is the dmesg output:
[ 4165.009790] usb 2-1.8: new high-speed USB device number 5 using ehci-pci
[ 4165.092571] usb 2-1.8: config 1 interface 0 altsetting 1 bulk endpoint 0x83 has invalid maxpacket 256
[ 4165.095881] usb 2-1.8: New USB device found, idVendor=1b71, idProduct=3002
[ 4165.095885] usb 2-1.8: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[ 4165.095887] usb 2-1.8: Product: usbtv007
[ 4165.095890] usb 2-1.8: Manufacturer: fushicai
[ 4165.095892] usb 2-1.8: SerialNumber: 300000000002
[ 4166.353720] media: Linux media interface: v0.10
[ 4166.369079] Linux video capture interface: v2.00
[ 4166.429189] usbtv 2-1.8:1.0: Fushicai USBTV007 Audio-Video Grabber
[ 4166.429253] usbcore: registered new interface driver usbtv

With the LifeCam HD-6000, I see that the uvcvideo driver is used. But here the video grabber apparently uses the usbtv driver.

I think a library like GStreamer can support both uvcvideo and usbtv. But maybe Pupil Capture uses UVC-only to have low-level control?

Thanks,
Sébastien

Pupil Labs Info

unread,
Nov 14, 2016, 10:22:11 AM11/14/16
to pupil-...@googlegroups.com
Hi,

in this case you would have to add a custom backend. Its fairly straightforward. 

You just need to implement a backend like the ones here: https://github.com/pupil-labs/pupil/tree/master/pupil_src/shared_modules/video_capture

You can use opencv as to get the image inside you custom backend.

Send us some code if you have questions during implementation!

best,

Moritz





--
You received this message because you are subscribed to the Google Groups "pupil-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pupil-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pupil-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pupil-discuss/a2982c17-38aa-4663-9ff5-c6501f2ba107%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Pupil Labs
research + development + design

sebastien....@gmail.com

unread,
Nov 15, 2016, 11:27:32 AM11/15/16
to pupil-discuss
Ok thanks for your quick reply. Since you say it is not too hard, I think I'll be able to do it. I'll post the code or even do a pull request if I think it's generally useful.

sebastien....@gmail.com

unread,
Jan 24, 2017, 5:19:55 AM1/24/17
to pupil-discuss, sebastien....@gmail.com
On Monday, November 14, 2016 at 3:50:09 PM UTC+1, sebastien....@gmail.com wrote:
> Here is my use-case: I want to use Pupil Capture with an FMRI-compatible camera (for the eye, to measure the pupil diameter). The FMRI-compatible camera is connected to the PC with a USB video grabber. Fushicai USBTV007 Audio-Video Grabber, more precisely. But it is not a UVC device.
>
> On Linux, I can see the image of the camera with the Cheese application.

So I've tried to use GStreamer to capture the video from the camera, and it works well. GStreamer works well with any camera that I've tried: the webcams that come from the default Pupil headset, the above video grabber, another video grabber but in UVC [1], other webcams, etc.

But the program I wrote is outside Pupil, it's just a small program that records a video and save it to a file. With start/stop ZeroMQ requests. See this git repo:
https://github.com/UCL-CATL/cosy-camera-recorder

It would be nice if Pupil uses GStreamer, it means that your software could be used with a wide range of cameras, not just those that you ship with the default Pupil headset.

[1] the UVC video grabber doesn't work well with Pupil Capture, I have lots of errors like this:
eye0 - [WARNING] uvc : Turbojpeg jpeg2yuv: Corrupt JPEG data: premature end of data segment

Pupil Labs Info

unread,
Jan 25, 2017, 11:28:16 PM1/25/17
to pupil-...@googlegroups.com, sebastien....@gmail.com
Hi Sebastian, 

Thanks for sharing your work - Cosy Camera Recorder looks like a nice project! 

It would be great to be able to support a wider range of cameras. 

I would love to see a PR for a video capture backend plugin - https://github.com/pupil-labs/pupil/tree/master/pupil_src/shared_modules/video_capture - using GStreamer that runs cross platform. 

Best, 
Will

--
You received this message because you are subscribed to the Google Groups "pupil-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pupil-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pupil-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages