Hi all, I'm trying to write a simple application to capture images from 
my uvc supported camera (an Imaging Source DFK-21BU04), but I've run 
into some problems with the images tearing.  I need to capture an image, 
do some processing on that image, and then repeat that process after a 
delay of around 1 second.  I tried to do this using the capture.c 
example from the V4L2 documentation, but noticed that sometimes the 
image I got back was torn horizontally.  Due to these issues I thought 
that I should try to use some other example code so I downloaded the 
guvcview application source code.  This viewer seemed to run fine out of 
the box, but it was running much faster than my application is going 
to.  To emulate some of the delays in my system I added a sleep(2) 
command on line 526 of v4l2uvc.c in guvcview.  Sure enough, adding this 
delay caused the image tearing to happen on almost every frame.  Usually 
the image was torn horizontally, but sometimes it was torn vertically or 
colored neon green/pink.  After playing around with some sleeps it seems 
that once streaming is turned on, the larger the delay between calls to 
DQBUF the more likely it is that the image will be corrupted.  Is this a 
function of my camera or is this something common across all UVC 
cameras?  Also, is there a different way I should be capturing images 
since I'm not really looking for a stream just individual frames?  I 
really need to find a way to get good images reliably from my camera so 
if anyone has any other ideas I'd really appreciate it.  Thanks

-- 
Bryan Murawski

Senior Software Systems Engineer
The MITRE Corporation

_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to