Hi.
I'm working for my project about image processing with opencv on
BeagleBoard.
I installed angstrom image from online build on the board, and then
set some packages needed
for working opencv with opkg install.
I connected webcam(Quickcam 3500 compliant with UVC) on the board, and
wrote simple code
for showing image from webcam on the monitor.
But when I excuted the code, I saw the error message like this.
Camera decode error (-1): Corrupt JPEG data: premature end of data
segment
Program seems to work. But there's no image output on the LCD monitor.
Please tell me what I have to do to solve the problem.
Hi.
I'm working for my project about image processing with opencv on
BeagleBoard.
I installed angstrom image from online build on the board, and then
set some packages needed
for working opencv with opkg install.
I connected webcam(Quickcam 3500 compliant with UVC) on the board, and
wrote simple code
for showing image from webcam on the monitor.
But when I excuted the code, I saw the error message like this.
Camera decode error (-1): Corrupt JPEG data: premature end of data
segment
Program seems to work. But there's no image output on the LCD monitor.
Please tell me what I have to do to solve the problem.
Does it works on your desktop?
If not, then it is probably the problem of UVC driver or OpenCV.
Thank you for the answer.
I also guess it should be the matter of between Angstrom and OpenCV.
Because when I tried it with my colleague' s cam(for GSCPA), it didn't
work either.
But I downloaded OpenCV with opkg install, they are just compiled
library and header files,
not source code. I believed it should work in all cases
Then, do I have to compile OpenCV source for Angstrom? If so, is there
anything to modify in the source?
Well, you actually did not answer whether it works on the desktop (PC
or notebook) or not.
If it works, then the problem is specific for BB or Angstrom.
In any case I would suggest to try to split one problem in two: a)
figure out whether your camera is properly supported by UVC driver and
b) whether OpenCV can deal with it. To achieve this you can first try
other program (probably starting on PC) like for example luvcview [1],
ekiga, skype or whatever else program which can capture image from the
camera. In the same time, if you have other camera which is known to
work, you can try it with your OpenCV program. If everything works on
your desktop computer, then you can try the same experiments on BB. I
think it will give you better understanding of what is failing.
I agree with Andrey,
You should verify your webcams work with the BB before complicating
things with openCV interface. If you are using a desktop image there
is mplayer and possibly ekiga installed. launching mplayer at a
terminal
prompt on the GUI will offer all sorts of information.
Use lsusb and lsmod to see if your camera drivers are loading.
Try these lines with Desktop fs on BB:
mplayer tv:// -tv driver=v4l2:width=320:height=240:noaudio:device=/dev/
video0 -fps 15 -vo xv
OR
DISPLAY=:0.0 mplayer -tv width=320:height=240:driver=v4l2 -fps 15 tv://
note: there may be a different driver= arg for UVC cameras.
I haven't used a console image webcam yet.