linux - Grabbing Images from a Webcam to be used with OpenCV -
this follow previous question,
can suggest library allow me grab frames camera without fuss (like video videoinput lib windows) , pass them opencv within application?
i had parallel problem using different webcam: worked in cheese/etc, v4l-info
showed proper setup, opencv fail with:
highgui error: v4l2: pixel format of incoming image unsupported opencv unable stop stream.: bad file descriptor
after flailing found at least 1 guy had similar problems webcams in various applications.
in blind faith promptly punched in export ld_preload=/usr/lib/libv4l/v4l1compat.so
, «poof» worked.
the opencv v4l2 interface not robust v4l implementation , export quick workaround (opencv appears revert v4l).
with quick browse of opencv/modules/highgui/src/cap_v4l.cpp
appear though opencv use v4l2.
i'm running ubuntu lucid 2.6.32-28-generic x86_64, libv4l-0 v0.6.4-1ubuntu1 opencv pulled head of repo few days ago.
in course of explaining i've resolved issue. turns out opencv forces resolution on v4l2 device 640x480 default - , device had max 320x240 resolution caused fault when testing format type in opencv::highgui::cap_v41::try_palette_v4l2
. changed default_v4l_width and, default_v4l_height.
Comments
Post a Comment