Point Grey FlyCapture2 (FireFlyMV)

Hei Guys.
I wrote this addon for capturing from a FireFly MV camera.
Is ussing multithread intell library, so is OF 6, it wont compile in OF5

Instructions:

  1. Unrar and copy ftp://juliolucio.com/ofxFFMV.rar to your addons folder.

user: openframeworks
pass: thed00d

  1. Copy FlyCapture2.dll to your application bin directory.

  2. In your project settings, add the path **…\addons\ofxFFMV\src
    ** to the Aditional Include Directories, for debug and release configurations.

  3. In your project settings too, add the path **…\addons\ofxFFMV\lib
    ** to the Aditional Library Directories, for debug and release configurations.

  4. Again, in your project settings too, add to the** Aditional Dependencies** the library path** …\addons\ofxFFMV\lib\FlyCapture2.lib**, for debug and release configurations.

  5. Download and **install **FlyCapture2 **drivers **from Point Gray.

  6. Usse **format7 **settings to adjust the cameras resolution, and save the configs. ( In **multiple **camera capturing, all have to be the same).

  7. If u are ussing **multiple **cameras, you should download and install the Point Gray FlyCapture2, syncronitation patch application. Application that must be runed before all tha cameras have the same sattings.

  8. Include the addon “.h”:

  
  
#include "ofxFFMV.h"  

to your application header.

  1. Add the grabber pointer to the private applications variables.
  
	//video grabbers for cameras Fire Fly MV  
	ofxffmv* 					vidGrabberFFMV01;	  

  1. In the aplication setup method, initialize the object. Use the resolution that u setted in the camera configuration Format7.
  
	vidGrabberFFMV01 = new ofxffmv( );  
	//allocating pixels for camera images  
	pixelsCamera0 = NULL;  
  

  1. In your application update method, add the frame grabing. (The isNewFrame needs some more work and will always be returned true)
  
vidGrabberFFMV01->grabFrame( pixelsCamera0 , 0 , isNewFrame );  
  
if( isNewFrame){  
		grayImg01.setFromPixels( pixelsCamera0 , camImagWidth , camImagHeight );  
  

  1. correct my spelling.

Enjoy guys.

Julio.

cool, many thanks.
i’ll try it and report

i’m getting this error

  
1>error C2228: left of '.setFromPixels' must have class/struct/union  

on

  
    
grayImg01.setFromPixels( pixelsCamera0 , camImagWidth , camImagHeight );  
  

This is probably because u are declaring in your header grayImg01 like a pointer
The error will dessapear if u use this sintasis:

grayImg01->setFromPixels( pixelsCamera0 , camImagWidth , camImagHeight );

I hope that works

Regards and sorry for my awefull english

great addon Julio!
That camera is really nice, 752x480 at 60 FPS, 1328x1048 at 23 FPS (FireWire and USB 2.0)
Thanks

Hi,
I am using latest release of Code::Blocks under Win32 XP/Sp2,
I add the path to the libs, as well as the DLL file in the BIN.
I checked all teh steps. I am using OF_precompiled.
ALso I checked the lib , it exports all stuff that I need.
but the linker says:

  
  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xdb)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x104)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x199)||undefined reference to `FlyCapture2::BusManager::~BusManager()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x1ab)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x1e2)||undefined reference to `FlyCapture2::BusManager::~BusManager()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x1f4)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x2cb)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x2f4)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x389)||undefined reference to `FlyCapture2::BusManager::~BusManager()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x39b)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x3d2)||undefined reference to `FlyCapture2::BusManager::~BusManager()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x3e4)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x44d)||undefined reference to `FlyCapture2::Error::GetDescription() const'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x4ce)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1Ev'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x4f0)||undefined reference to `__imp___ZN11FlyCapture210BusManagerC1Ev'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x51f)||undefined reference to `FlyCapture2::BusManager::GetNumOfCameras(unsigned int*)'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x55a)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x594)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x5ca)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x6bf)||undefined reference to `__imp___ZN11FlyCapture26CameraC1Ev'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x726)||undefined reference to `FlyCapture2::BusManager::GetCameraFromIndex(unsigned int, FlyCapture2::PGRGuid*)'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x761)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x7a1)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x7d7)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x859)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x893)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x8c9)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xad0)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xb0a)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xb40)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xbdd)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xc17)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xc4d)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xce6)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xd20)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xd56)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xd8f)||undefined reference to `__imp___ZN11FlyCapture25ImageC1Ev'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xe82)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xeaf)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xec8)||undefined reference to `FlyCapture2::BusManager::~BusManager()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xf5e)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1Ev'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xf80)||undefined reference to `__imp___ZN11FlyCapture210BusManagerC1Ev'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xfaf)||undefined reference to `FlyCapture2::BusManager::GetNumOfCameras(unsigned int*)'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xfea)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x1024)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x105a)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x114f)||undefined reference to `__imp___ZN11FlyCapture26CameraC1Ev'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x11b6)||undefined reference to `FlyCapture2::BusManager::GetCameraFromIndex(unsigned int, FlyCapture2::PGRGuid*)'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x11f1)||undefined reference to `FlyCapture2::Error::~Error()'|  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0x1231)||undefined reference to `__imp___ZN11FlyCapture25ErrorC1ERKS0_'|  
||More errors follow but not being shown.|  
||Edit the max errors limit in compiler options...|  
||=== Build finished: 50 errors, 17 warnings ===|  
  
  

i’m using this camera in osx with libdc1394. if anyone needs a hand in osx then drop me a message and i’ll bung an example together.
it’s no so hard once you’ve got libdc1394 anyhow

Hi, I contact PTGrey support team
and they told me that with GCC I have to use the C lib (FlyCapture2_C),
because the VCC has a different notation (naming convention or something) about the classes
and methods? Weird.
so this code, does not work for me ;(
due to lib-what-ever-incompatibility, any ideas how to “convert” the libs to GCC/LD,
I mean to be able to link them?

best
regads

zeos

Hi all ! Hi Julio!
I’ve adquired one of this wonderfull camera FFMV-03M2M/C BW (fireWire a) and right now I’m trying to get it linked in my Visual Studio (v006) or CodeBlocks project (v0061) on Windows XP SP2, and them gives links fails with the libs. I’ve installed the FlyCapture2 driver as you comment and linked also the FlyCapture2.lib and dll instaled to the addon and bin folders.

I’ve added also the files from the SRC to the project and I got the same errors as ZEOS

  
  
obj\release\addons\ofxFFMV\src\ofxffmv.o:ofxffmv.cpp:(.text+0xdb)||undefined reference to `FlyCapture2::Error::~Error()'|  
etc..  

Julio, What about the settings you used to run the camera…I mean about SO (windows or Linux) , IDE (CodeBlocks or VS) and camera protocol (firewire or USB port).
Also Im tlooking to use the FlyCapture_C version, but Im still looking how, Im getting compile errors using the Image library inside FlyCapture2_C functions.

Regards

Hey ! :smiley:
I’ve got the fireFlyMV running in windows and firewire port, using the C mode ( this is similar FlyCapture2Test_C from fireCap examples… not multiple camera implemented.

to use this addon:
Use dll and lib -> FlyCapture2_C.dll (bin folder) & FlyCapture2_C.lib (project settings)
Use src\C folder -> Search Directories

TestApp.h

  
 #include "ofxFFMV_C.h"  
		  ofxffmv_C *       vidGrabberFFMV01;  
		  unsigned char *  pixelsCamera0;  
		  bool isNewFrame;  
  

TestApp.cpp

Setup

  
  
        // use FireFly -> format 7 for camera resolution & properties  
        vidGrabberFFMV01 = new ofxffmv_C( );  
        pixelsCamera0 = NULL;  
  

Update

  
  
       // use the first flireFly camera founded  
       vidGrabberFFMV01->grabFrame( pixelsCamera0 , isNewFrame );  
   

Enjoy it!

ofxFFMV.rar

[quote author=“charli_e”]Hey ! :smiley:
I’ve got the fireFlyMV running in windows and firewire port, using the C mode ( this is similar FlyCapture2Test_C from fireCap examples… not multiple camera implemented.

to use this addon:
Use dll and lib -> FlyCapture2_C.dll (bin folder) & FlyCapture2_C.lib (project settings)
Use src\C folder -> Search Directories

TestApp.h

  
 #include "ofxFFMV_C.h"  
		  ofxffmv_C *       vidGrabberFFMV01;  
		  unsigned char *  pixelsCamera0;  
		  bool isNewFrame;  
  

TestApp.cpp

Setup

  
  
        // use FireFly -> format 7 for camera resolution & properties  
        vidGrabberFFMV01 = new ofxffmv_C( );  
        pixelsCamera0 = NULL;  
  

Update

  
  
       // use the first flireFly camera founded  
       vidGrabberFFMV01->grabFrame( pixelsCamera0 , isNewFrame );  
   

Enjoy it![/quote]

Icompilein 0061 with visual 2008

OMP abort: Initializing libguide40.dll, but found libiomp5mt.lib already initial
ized.
This may cause performance degradation and correctness issues.
Set environment variable KMP_DUPLICATE_LIB_OK=TRUE to ignore
this problem and force the program to continue anyway.
Please note that the use of KMP_DUPLICATE_LIB_OK is unsupported
and using it may cause undefined behavior.
For more information, please contact Intel® Premier Support.

???¿¿¿¿¿ HELP Please!

FlyCapture2 library version: 2.0.1.6
Application build date: Apr 30 2010 00:48:53

Numcam detecteds 1

*** CAMERA INFORMATION ***
Serial number - 10130985
Camera model - Firefly MV FFMV-03M2M
Camera vendor - Point Grey Research
Sensor - Unknown
Resolution - Unknown
Firmware version - 1.2.2.3

Ok i put the var envairoment in true run but the program exit when run this is his output

That looks like some problem with the FlyCapture2 library. Try contacting the Point Grey support people. Otherwise have you tried the ofxVideoGrabber addon? It should work with this camera although may not offer as many features as the Point Grey library.

Hey,

Did you setup the camera resolution and options as JulioLucio explains? Use format 7 for it.
Can u see the camera from there?

Hope that helps

Hi folks, I am new to the openFrameworks community. I have a Point Grey FireFly MV USB 2.0 camera that I want to integrate to oF. Is julio’s ofxFFMV a good way to go for this USB camera?

I know this discussion thread was started way back a couple years ago. Just want to see if other solutions have been proposed and used. Thanks.

–Oze

hey Oze,

I hope you already got them running!? I had some hard time to set them up - in the end it ripped of some parts of FireFlyMV. It’s some dirty bit of code as most stuff I didn’t need is not implemented but if you want I can send you the files - just PM me.

m9dfukc

No luck yet. Thanks for the example offer, m9dfukc. I will email you.

-Oze

Hey, will send you the code later today when I’m in the office where the my windows system resides.

cheers
m9d

@oze

I will reply here as the email I send you came back as undeliverable.

https://github.com/m9dfukc/ofxFireFlyMv

The example code is untested as I don’t have a windows computer by hand right now.
This ofxFireFlyMv addon is mixture of some other FireFly ofx addons floating around (sorry for not give credits - but this was not really ment to made public … and now I forgot where all the code came from - reveal that later). It’s in it’s current state it’s only working in Format7 mode and grayscale. To get it grabbing color images the PIXEL_FORMAT_MONO8 constant (ofxFireFlyMv.cpp line 14) needs to be changed into a corresponding color one.

cheers
Andreas

Hi @m9dfukc
I would like to talk to you about OpenCV detecting features in rotating faces.
I have seen the thread you commented and i was wondering if we could have a more in depth discussion.
Please do let me know if i can send you a mail.