Trying ofxVideoGrabberProsilica addon

Hi all,

I just got a Prosilica GE680 and i wanted to make it work with ofxVideoGrabberProsilica addon done by Stefanix.

Here is the post where i saw it:—libdc1394-grabber-with-plugin-sdks/2487/0

and here the link to get it:

i was trying to just link it and compile but i got this error:
/PROGRAM_09b/OF/of_preRelease_v0.05_xcode_FAT/apps/addonsExamples/allTestExample 2/…/…/…/addons/ofxVideoGrabberProsilica/libs/PvAPI/include/PvApi.h:103:26: error: #error Define PVDECL to be your compiler keyword for “standard call”
/PROGRAM_09b/OF/of_preRelease_v0.05_xcode_FAT/apps/addonsExamples/allTestExample 2/…/…/…/addons/ofxVideoGrabberProsilica/libs/PvAPI/include/PvApi.h:368:2: error: #error Define specific data types for your platform.

I might be doing an extremely beginner mistake … i did not use addons many times, and my OF knowledge is kind of… beginning :stuck_out_tongue:

Here is what i did:

  1. copy ofxVideoGrabberProsilica folder to my addons folder
  2. open allTestExample (to compile the addon)
  3. drag ofxVideoGrabberProsilica folder to addons tree on Xcode (and accept without looking much)
  4. add this:

on the testApp.h
5. add this:

//-------------------------------------------- Prosilica  
	#include "ofxVideoGrabberProsilica.h"  

on ofAddons.h
6. cmd+b

What am i doing wrong?
Thanks so much!!


Upgrading to of061 solved the build… now i will try to get some frames.

(thanks for this addon Stefanix!)

HI Jordi.

do you think you can share your project folder with me?

i am trying to get my prosilica to work but get too many error messages.

it would be so nice to actually give this camera a try.

i am on snow leopard.

thanks a bunch,


Of Course! It’s been a while i don’t use it, and i don’t have the camera here to try if i’m sending the right project. Please try it and let me know if it works for you.

you will have to add PvAPI inside src/ofxVideoGrabberProscilica/libs

Good to have this great addon!

HI Jordi.

Thanks for posting the file.

I am on Mac OX 10.6 (snow leopard) and i am trying to compile your project files but i get at lot of errors like this. see below.
i am using OF 0061.

i have the whole ofxvideograbberprosilica folder included, with all the libs and stuff.

do i have to add some extra linking?


include/PvApi.h:103:26: error: #error Define PVDECL to be your compiler keyword for "standard call"  
include/PvApi.h:368:2: error: #error Define specific data types for your platform.  
include/PvApi.h:259: error: expected `)' before '*' token  
include/PvApi.h:353: error: expected `)' before '*' token  
include/PvApi.h:443: error: expected initializer before 'PvVersion'  
include/PvApi.h:463: error: expected initializer before 'PvInitialize'  
include/PvApi.h:476: error: expected initializer before 'PvUnInitialize'  
include/PvApi.h:510: error: expected initializer before 'PvLinkCallbackRegister'  
include/PvApi.h:533: error: expected initializer before 'PvLinkCallbackUnRegister'  

hi there.

i am currently trying out the prosilica again.
but i am still not able to ge this compiled on snow leopard. (see errors in last post)

any ideas?



I’m sorry I don’t know what this errors are…
here is the whole thing it should work just placing it in examples folder.

this is running under:
MacOS 10.6.6
Xcode 3.2.5
Project settings:
base SDK 10.6
Compiler version GCC 4.2

Let me know if this works,

thanks for the fast reply.

it compiles fine now and starts but the camera image does not show up.

here is the console print out:

OF_VERBOSE: PvAPI initialized
OF_ERROR: error: no camera found
myFrameRate: 0
myTime: 0
myFrame: 0

the camera works fine when i use the AVT GigE SDK x86
i do though have to give the the prosilica’s IP

maybe somewhere in the ofxvideograpperprosilica i have to do that too?

thank again,

ok i figured it out

1st i had to turn off my airport.
2nd make sure my ethernet is set to use DHCP
3rd since my prosilica model is gc650c i need to set Prosilica.initGrabber(659,493, true); not 640x480

did you ever try to debayer the image?

thanks so much,


I wanted to share this code.

I managed to get the deBayer for the GC650C prosilica working.

here is my sample xcode project.

I had to add the libPvAPI.dylib to the core framework list.
I think i am using the x86 version that i got from the AVT GigE SDK download.

In addition i noticed that before I always had to turn off my airport in order for the proslicia to be detected on my ethernet connection. Now I can leave my airport on.


Thanks Stefan,

I get it to work with a GC750 (debayer=false, and 752x480).

Actually it was reaaly difficult as AVT has fixed the ip of the camera to something not in the subnet 169.254 (which is the one they pretend to use) and without a pc with windows I can’t manage to run the little piece of software that helps to change the ip of the camera.

The curious thing is I got :
30 fps with a macbookpro late 2008 2,4 Ghz and
60 fps with a macbookpro 2011.

This camera is due to give 60 fps at 752x480 and cpu is running at 50% with the macbookpro 2008

I try to make a release.
When I compile the release from Xcode it runs as expected.

But When I run it from the finder it crashes. The report is

Process: Oeil [1060]
Path: /Applications/of_preRelease_v0061_osx_FAT/apps/devel OF/Oeil/bin/
Identifier: com.yourcompany.openFrameworks
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: launchd [115]

Interval Since Last Report: 428 sec
Crashes Since Last Report: 1
Per-App Interval Since Last Report: 0 sec
Per-App Crashes Since Last Report: 1

Date/Time: 2011-05-21 16:49:37.240 +0200
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: 2640A426-577C-4B0C-ABAA-000B7ED30859

Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0

Dyld Error Message:
Library not loaded: libPvAPI.dylib
Referenced from: /Applications/of_preRelease_v0061_osx_FAT/apps/devel OF/Oeil/bin/
Reason: image not found

I go to Target/myApp/run script, ask the informations and add

cp -f ./bin/libPvAPI.dylib “$TARGET_BUILD_DIR/$”
install_name_tool -change ./libPvAPI.dylib @executable_path/libPvAPI.dylib “$TARGET_BUILD_DIR/$$PRODUCT_NAME”

When I compile, the dylib is at the right place inside the application but I get the same crash.

I don’t know where to place this dylib.
Any ideas ?

I’ve copy the file to /usr/local/lib and it works as expected now

i know this an old thread but hey.

i am try to get my prosilica working with OF 0.9.0 (OS X 10.10) but i get a whole bunch of PvAPI compile errors.
i am wondering if the PvAPI is only good for 32 bit apps?
but even if i switch to compile in 32bit mode i get similar errors.

i think it might be something about the C++ standard libraries. but not sure.


PvAPI also works for 64bit (but is deprecated now and marked legacy, Allied Vision uses new Vimba SDK)

The errors in your post all seem to be related to the PvAPI library built for the wrong architecture (32bit). Try to clean an rebuild, also rebuild the specific lib if possible.

Best, V

Thanks for the reply.

I tried a clean rebuild of my Xcode project but this did not help.
I looked around the net for a 64 bit version. I found the PVAPI SDK but simply placing their .a files did not help.

i made some progress in getting the PvAPI working on OF 0.9.0 with OS X 10.10

i got he 64bit version of the api from here:

put libImagelib.a and libPvAPI.dylib in to ofxMyAddonName/libs/PvAPI/lib/osx/x64
made a clean build via shift command k and command b

i also had to copy libPvAPI.dylib in to
otherwise i would get this error:
dyld: Library not loaded: @loader_path/libPvAPI.dylib
pvapi Reason: image not found

now the app starts, the avt prosilica is found and the cam image looks good too.

@stephanschulz - here is some code we made for OF 0.8.0 for the allied vision cameras.
We used this code for running 3 allied vision cameras over GigE - but it should work with any PvAPI supported camera.

Let me know if you have any questions.
At the very least the libs for PvAPI are static so should be easier to link than the ones from Cinder.


thanks @theo

tried a couple of things so far with your files.

in my current setup i replaced the files i got from cinder (.a and .dylib) with yours but got lots of compile errors. similar to the ones i got when using my old OF 0.8.4 PvAPI files

i also tried pressing your files in to a standard ofxaddon structure but this file is not found tiffio.h when compiling

@stephanschulz for A: did you try building your project as a 32bit project instead of 64bit?

For B: I realize I didn’t add the modules folder to the Xcode project. I only include the inc-pc and lib-pc/x86 ( 32bit lib )