Problem using 1394 cam with OF

I have just got myself a Firewire Cam which was lying around the lab and no one was using it. It’s a Wavecrest WCFFM-03MTM-CS. It’s model number is similar to a Point Grey Firefly MV cam. Dunno why, but anyway I plugged it in and installed the drivers that came with it. It’s not using PointGrey Drivers but a 1394CMU Driver. The 1394CMUDemo works but when I run the OF moviegrabber example, nothing plops up. Do I have to change the OF code in any way?

hi progen,

does AMCAP recognize your camera ?

thanks!
zach

nope apparently it does not

that’s what I thought – if amcap doesn’t see it, we wont either.

I’d search for a driver for the cam (not CMU) that is from the manufacturer. OF uses VI which uses directshow, which most all camera drivers support. CMU is a low level 1394 driver (which is a whole protocol for image acquisition).

There is some code from CMU to capture, note that 1394 is blocking though. I have some old code around I can post if needed. I will try to dig it up.

hope that info helps –

take care!
zach

VideoInput which OF uses for video capture on windows can only capture from directshow devices. Almost all windows cameras come with directshow (direct-x) drivers, so you might find that pointgray has them on their site.

Some machine vision cameras have their own api though - so you have to use a provided driver and dll to capture from them. In this case you would have to integrate this code into your OF app bypassing the ofVideoGrabber class.

Hopefully pointgray has directshow drivers - but if they don’t it shouldn’t be too hard to get the video into your OF app - zach and I have had to use manufactures APIs in the past and they are usually pretty straightforward.

Theo

Hi Zach,

It seems I have to take you up on your offer. I contacted PointGrey and it seems that their drivers for DirectShow is not supported on Vista which is what I am running. :frowning:

its a long shot but you could try the XP drivers - sometimes they work but are not officially supported.

theo

just a quick question. Which cameras do you guys use? PtGrey? Unibrain? etc?

Was thinking if it was better to use VideoWrapper to capture the PtGrey FireflyMV cam or use the SDK direct? Which would you recommend?

about cameras, I typically used security cameras and capture cards, not firewire cameras but I can see this changing.

usually, manufacturers sdks are not hard to get up and running… typically though DShow stuff shouldn’t be hard. you can always roll back to XP :slight_smile:

about the 1394 / CMU code, I will have to ping my partner golan, because I believe he has the code around. I’m searching around myself and when I find something good I’ll post it up…

take care,
zach

hi all,

just discovered this thread since i have some difficulties connection my firewire cam to openframework as well.

i use the AVT-Guppy-f033b-bw and the camera works with firewire drivers and with directshow drivers. of course i switched to directshow in order to work with it in my openframeworks application (btw, is there any disadvantage of directshow over firewire?!?).
i tried the following applications to proof that directshow works:

WORKS:
*) AmCap v1.00 + v8.10
*) GraphEdit v9.04.78.0000, Build:041201 (graph: AVT 1394 camera -> Color Space Converter -> VMR9)
*) Virtual Dub v1.80 (capture via directshow)
*) AVT ActiveCam Viewer (vendor tool)

DOES NOT WORK:
*) AmCap v9.11.109.4 (launches debugger on startup)
*) everything using videoInput Lib v0.1991 TFW 07, like my OF application or the OF moviegrabber example :frowning:

-> i got the following console output (in spy mode):

SETUP: Setting up device
SETUP: AVT 1394 camera
SETUP: Couldn’t find preview pin using SmartTee
SETUP: by not supported closest supported size is 9999999 9999999
SETUP: Media Type is RGB24 no conversion needed

and then it fires off a std::bad_alloc exception at videoInput::setupDevice() -> videoDevice::setSize(). most likely because of the high value of 9999999.

so why do you think videoInput Lib is not working? it seems to work with every other direct show application? should i try an older version?
i mean i could use the vendor provided API and implement a firewire-based framegrabber really easy and fast.
but right now i don’t like changing this part of the project and we want to keep the flexibility of using different cameras.

zach, regarding your last post - did you find any old cmu1394 capture code? or theo? still interested in that one if there is no other solution.

note to myself: maybe i should think about a cameracontrol and framegrabbing software abstraction layer as well … (videowrapper, etc)

any ideas?
thx
didi

p.s.:
i personally vote for a better (but still simple) testapplication that uses videoinputlib and OF for testing all connected capture devices.
i.e. you could see the output (of course), change the device at runtime, show the configuration dialog, shows device info on screen, enumerate all devices, see the frames per second and when a new image arrives … !!!
any volunteers?

hi didi,

I just uploaded the CMU stuff I could find here:

openFrameworks.cc/files/firewire_1394_OLD.zip

it’s not ready for OF 0.05 but could be made ready without too much issues I think – it uses glfw for threading (since OF used to be based on glfw) and that would have to be rewritten. Threading is important because otherwise your app will block when it grabs frames.

also this code is including this good wrapper for cmu from ipl – included in the zip:

http://www.mip.sdu.dk/ipl98/cameras/doc-…-ource.html

hope that helps – if there are questions, I think my partner golan might have more up to date stuff. It’s been a while since I’ve used the cmu driver.

take care!
zach

Hey!

Thanks for the clear info - would you mind testing some things for me?

Run the demo app from the 0.1991 videoInput download
http://muonics.net/school/spring05/videoInput/

The demo app should be in a folder called CW Demo or something like that.
Could you post the console output of it.

Also could you do a screen grab of the graph-edit graph and post that too!

Thanks
Theo

hi zach!

thanks for the code! i will give it a shot if i can’t progress otherwise…


hi theo!

thx for your reply. here is the output of your application (ignore device 0, this haupauge capture card works fine):

videoInput Debug.exe

***** VIDEOINPUT LIBRARY - 0.1991 - TFW07 *****

VIDEOINPUT SPY MODE!

SETUP: Looking For Capture Devices
SETUP: 0) Hauppauge WinTV Capture
SETUP: 1) AVT 1394 camera
SETUP: 2 Device(s) found

SETUP: Setting up device 0
SETUP: Hauppauge WinTV Capture
SETUP: Checking crossbar
SETUP: You are not a webcam! Setting Crossbar
SETUP: Found Physical Interface - Composite
SETUP: Setting capture size to 320 by 240
SETUP: Media Type is RGB24 no conversion needed
SETUP: Device is setup and ready to capture.

SETUP: Setting up device 1
SETUP: AVT 1394 camera
SETUP: Couldn’t find preview pin using SmartTee
SETUP: Checking crossbar
SETUP: You are a webcam or snazzy firewire cam! No Crossbar needed
SETUP: 320 by 240 not supported closest supported size is 9999999 9999999
SETUP: Setting capture size to 9999999 by 9999999
SETUP: Media Type is RGB24 no conversion needed

SETUP: Disconnecting device 0
SETUP: freeing Grabber Callback
SETUP: freeing Grabber
SETUP: freeing Control
SETUP: freeing Media Type
SETUP: removing filter NullRenderer…
SETUP: filter removed NullRenderer
SETUP: removing filter Sample Grabber…
SETUP: filter removed Sample Grabber
SETUP: removing filter Hauppauge WinTV Capture…
SETUP: filter removed Hauppauge WinTV Capture
SETUP: removing filter Hauppauge WinTV Crossbar…
SETUP: filter removed Hauppauge WinTV Crossbar
SETUP: removing filter Hauppauge WinTV TvAudio…
SETUP: filter removed Hauppauge WinTV TvAudio
SETUP: removing filter Hauppauge WinTV TvTuner…
SETUP: filter removed Hauppauge WinTV TvTuner
SETUP: freeing Capture Graph
SETUP: freeing Main Graph
SETUP: Device 0 disconnected and freed

SETUP: Disconnecting device 1
SETUP: freeing Capture Source
SETUP: freeing Control
SETUP: freeing Stream
SETUP: freeing Media Type
SETUP: removing filter AVT 1394 camera…
SETUP: filter removed AVT 1394 camera
SETUP: freeing Capture Graph
SETUP: freeing Main Graph
SETUP: Device 1 disconnected and freed

You are a webcam or snazzy firewire cam

hehe, nice logging message :slight_smile:

and here is the link-to-the-filtergraph

i can also provide some directshow code from the manual if it helps you to debug. the capture filter name is “AVT 1394 camera”.

thx and take care!
didi


skype: ghostd0g_

hi didi -

np ! sorry the 1394 isn’t OF specific yet – currently we are in the middle of the interactivos workshop in new york / eyebeam so there isn’t alot of time to work on OF stuff, mostly helping people make projects here…

some pics as we go here

good luck with direct show and if you do get into the 1394 I’m happy to offer some pointers about threading. It think it’s possible to make it ofxThread or with a simple windows thread / mutex since glfw is just wrapping that.

take care!
zach

Hey!

Thanks for the debug info - I uploaded another exe which prints out more info.
Would you mind running it and pasting the results

Its the one called VIDEOINPUT_1991_TestSize
In: http://www.openframeworks.cc/files/VI-1991-DEBUG.zip

Thanks!
Theo

hi zach,

cool pics. i would like to be there now! time for me to go to interactivos one time …
say hello to fiezi + hannah from me :slight_smile:

thanks for the offer. i will let you know if i am struggling.

adios!

hej theo!

for sure i can. here is the output of VIDEOINPUT_1991_TestSize.exe:

***** VIDEOINPUT LIBRARY - 0.1991 - TFW07 *****

VIDEOINPUT SPY MODE!

SETUP: Looking For Capture Devices
SETUP: 0) Hauppauge WinTV Capture
SETUP: 1) AVT 1394 camera
SETUP: 2 Device(s) found

SETUP: Setting up device 0
SETUP: Hauppauge WinTV Capture
SETUP: Checking crossbar
SETUP: You are not a webcam! Setting Crossbar
SETUP: Found Physical Interface - Composite
EXTRA DEBUG: currentSize is 320 by 240

–YUY2
closest width is 48
<…>
found exact x 640
closest height is 32
<…>
closest height is 479
found exact y 480
found exact match!!

SETUP: Setting capture size to 640 by 480
SETUP: Media Type is RGB24 no conversion needed
SETUP: Device is setup and ready to capture.

SETUP: Setting up device 1
SETUP: AVT 1394 camera
SETUP: Couldn’t find preview pin using SmartTee
SETUP: Checking crossbar
SETUP: You are a webcam or snazzy firewire cam! No Crossbar needed
EXTRA DEBUG: currentSize is 640 by 480

–RGB24 no conversion needed.

–RGB24 no conversion needed.
SETUP: 640 by 480 not supported closest supported size is 9999999 9999999
SETUP: Setting capture size to 9999999 by 9999999
SETUP: Media Type is RGB24 no conversion needed

SETUP: Disconnecting device 0
SETUP: freeing Grabber Callback
SETUP: freeing Grabber
SETUP: freeing Control
SETUP: freeing Media Type
SETUP: removing filter NullRenderer…
SETUP: filter removed NullRenderer
SETUP: removing filter Sample Grabber…
SETUP: filter removed Sample Grabber
SETUP: removing filter Hauppauge WinTV Capture…
SETUP: filter removed Hauppauge WinTV Capture
SETUP: removing filter Hauppauge WinTV Crossbar…
SETUP: filter removed Hauppauge WinTV Crossbar
SETUP: removing filter Hauppauge WinTV TvAudio…
SETUP: filter removed Hauppauge WinTV TvAudio
SETUP: removing filter Hauppauge WinTV TvTuner…
SETUP: filter removed Hauppauge WinTV TvTuner
SETUP: freeing Capture Graph
SETUP: freeing Main Graph
SETUP: Device 0 disconnected and freed

SETUP: Disconnecting device 1
SETUP: freeing Capture Source
SETUP: freeing Control
SETUP: freeing Stream
SETUP: freeing Media Type
SETUP: removing filter AVT 1394 camera…
SETUP: filter removed AVT 1394 camera
SETUP: freeing Capture Graph
SETUP: freeing Main Graph
SETUP: Device 1 disconnected and freed


in the meanwhile i tried a library called directshowvideolib (=DSVL, also used by friends in the reacTIVision framework)and its demos (glutsample.exe).
after setting up directx-sdk, directshow
and converting to visual studio 2005 i could try the sample and it worked right away.
the filtergraph gets built properly (with the device name or friendly name AVT 1394 camera)!
and when i remotely connect graphedit to this existing graph i get the following filtergraph.

so far, i’ll keep you posted, thx!
didi

Hey thanks! Looks like there is an issue with the code that finds the closest matching size.

If this exe works then I think I can make a fix - but I would def be able to send you the videoInputLib that would work for your camera and OF in the meantime.

http://www.openframeworks.cc/files/vide-…-Resize.zip

What IDE are you using?

Theo

hi theo,

sorry, i was unavailable the whole weekend and didn’t have access to the camera anyway.

your NO-RESIZE version works! yessss! just out of curiousity - why didn’t the closest matching size algorithm not work for this camera / filter? something special about it?

i tried a lot of different IDEs (codeblocks, codewarrior, eclipse, devcpp) but i keep on using visual studio 2005 SP1.

didi