We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Select video source in OpenCV? (Read 2644 times)
Select video source in OpenCV?
Jan 16th, 2010, 8:34am
 
Hello,

Is there a way to select a video source in OpenCV? It always defaults to my built-in iSight, and I'd like it to use an external firewire-based camera. Since I can't unplug the iSight, I don't know how to proceed.

Any clues gratefully received.

Thanks in advance,
m
Re: Select video source in OpenCV?
Reply #1 - Jan 17th, 2010, 7:25am
 
Further to this, I found in the javadoc bit of the openCV documentation a reference to
Code:
capture(int width, int height, int index) 

but having tried integers from 0 to 10 as the index, I think the issue is more to do with java's access to my video library. QuickTime has no problem finding my firewire camera, but none of the processing video libraries seem to be able to.

I'd be very grateful for any advice that could help me out. It seems ridiculous that openCV's usefulness is limited by only being able to use the onboard webcam.
Re: Select video source in OpenCV?
Reply #2 - Jan 17th, 2010, 10:19pm
 
hi m,

I have also had this problem and have found that one way to solve this is to run either an additional processing sketch (that captures video) or a mac application like image capture before you initialise the processing sketch that is to use your external cam. In this way the first sketch/app utilises the isight cam and then your processing app will default to the other available external camera.
Hope this helps.

tega
Re: Select video source in OpenCV?
Reply #3 - Jan 18th, 2010, 11:21am
 
Hi tega,

Thanks for the advice. I already tried this, using both QuickTime Player to tie up the iSight, and then PhotoBooth. Neither worked - openCV just duplicated the iSight image in processing.

I also made an attempt to set the source using the cam.settings() method from the processing.video library before using openCV - also didn't work.

Still thinking, still hoping.
m
Re: Select video source in OpenCV?
Reply #4 - Jan 18th, 2010, 11:30am
 
I just found this thread http://processing.org/discourse/yabb2/num_1237253804__Don.html't ask me why I didn't find it last time I searched.

I'm wondering now why the processing.video library doesn't let me find the camera.list(). I think this might be the source of the problem.

As always, grateful for any advice.
Page Index Toggle Pages: 1