I’ve made some modifications to the unicap video grabbing module. The one in 0.05 waits for a new frame every time you call grabFrame(), so an application using it will only run at the same fps as the device’s speed.
This new version uses dma if the capture device is capable of, so it should be faster, also as there’s no wait in the main thread your app should run now without the device speed limitation.
I’ve tested it and it works ok, but it would be great if you can give it a try and give some feedback before considering it a definitive change.
Hi Arturo,
Tried your new files, without a good result I’m afraid.
No errors and stuff, but no result on the screen
This is the output while executing:
Unicap : Using device /dev/video0
Unicap : Using module
choosing device 0: UVC Camera (046d:0990) (/dev/video0)
Unicap : Available formats for this device:
Unicap : 0: MJPEG ( MJPG ), min size: 160x120, max size:960x720, default size: 320x240
Unicap : 1: YUV 4:2:2 (YUYV) ( YUYV ), min size: 160x120, max size:1600x1200, default size: 320x240
Unicap : Selected format: YUV 4:2:2 (YUYV) ( YUYV ), with size 320x240
Converting to RGB24
And the debug dump (of which I don’t understand anything at all):
i’m wondering if there has been any change or progress on this front. I have a v4l2 webcam. works in cheese but am having a hard time with openframeworks. I have placed your new unicap files, and although i do not get segfaults, there is no image being returned. This is consistent with both the openCV example and the movie grabber one.
here’s the output from cmd line:
enumerate: 8000000
Total count method 1: 4
v4l2ctrl.name: Brightness
v4l2ctrl.name: Contrast
v4l2ctrl.name: Gamma
v4l2ctrl.name: Auto Gain
v4l2ctrl.name: Sharpness
Total count method 2: 5
Unicap : Using device /dev/video0
Unicap : Using module v4l2
choosing device 0: USB Camera (046d:08d7) (0000:00:1d.0)
Unicap : Available formats for this device:
Unicap : 0: JPEG ( JPEG ), min size: 320x240, max size:640x480, default size: 640x480
Unicap : Can't set video format , with size 640x480
Unicap : Failed to set alternative video format!
there were some problems in 0.05 with v4l2 and yuv devices. this should be corrected in 0.06, although it’s not already released, you can try with this pre-release:
there were some problems in 0.05 with v4l2 and yuv devices. this should be corrected in 0.06, although it’s not already released, you can try with this pre-release:
About your camera, if ucview doesn’t support it, it won’t work under oF. Anyway, i’ll upload a debug version of the latest unicap release later so you can debug your problem and post here and in the unicap forums.
About your camera, if ucview doesn’t support it, it won’t work under oF. Anyway, i’ll upload a debug version of the latest unicap release later so you can debug your problem and post here and in the unicap forums.[/quote]
Have been looking the unicap forum, (couldn’t yesterday as it was failing), it seems it has to do with a colorspace conversion not supported in ucview. In oF I’ve used the ffmpeg routines for color conversion so if your camera supports some yuv or rgb format it should be working. can you post the output of the videoGrabber example with the 0.06 prerelease?
has been trying with libv4l as said in the unicap forums and it seems to work. It’s kind of an abstraction layer over v4l and v4l2 devices so every device reports the same colorspaces.
I’ve uploaded a file with a substitution for unicap compiled with libv4l support + the last libv4l version. if you want to give it a try…