Ask Your Question

Prosilica and OpenCV

asked 2014-10-21 09:06:51 -0600

RiSaMa gravatar image

updated 2014-10-22 03:50:46 -0600

Good morning, after many days of reading information, documents and I still think a lot where I was a few days ago ... I hope you can help me.

I have a Prosilica (GigaEthernet GC1020C) camera and I need is to show the video with OpenCV in C ++ (Visual Studio, Windows).

I tried with AVT SDK and get it detects a camera but open to capture frames and gives me error. I've tried VideoCapture cap(CV_CAP_PVAPI) but I did not find anything camera...

I hope you can help me. thank you very much

UPDATE: getBuildInformation return:

Here is the problem... PvAPI NO... How can I install properly??


edit retag flag offensive close merge delete


the prebuild windows libs come without PVAPI support.

you will have to get the Prosilica sdk, and rebuild opencv , cmake -D WITH_PVAPI=ON

berak gravatar imageberak ( 2014-10-22 02:40:44 -0600 )edit

I've already done that: Is it ok?

My code is (C++ / OpenCV):

Later the the line: CvCapture* capture = cvCaptureFromCAM( CV_CAP_PVAPI ); The variable capture is NULL...

Thanks for your help!! What can I do?

Thanks you PS: the camera work fine (I can see video stream with AVT viewer)

RiSaMa gravatar imageRiSaMa ( 2014-10-22 03:21:29 -0600 )edit

cerr << cv::getBuildInformation(); will tell you, if you really have the PVAPI support compiled in.

berak gravatar imageberak ( 2014-10-22 03:24:33 -0600 )edit

@StevenPuttemans, we need your help here. ;)

berak gravatar imageberak ( 2014-10-22 03:25:27 -0600 )edit

The PVAPI builtin OpenCV was broke - see my answer for the solution :)

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-22 05:20:25 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-22 05:17:38 -0600

updated 2014-10-22 05:18:29 -0600

Okay lets sum it up again ;)


For this you need to perform the following steps

  • Download the sample code from here. It has instructions on how to configure your system and allows you to read the guppy, manta and prosilica series cameras.
  • Do not forget to link the PvAPI header file and follow the instructions.
  • Then use the inner loop for your OpenCV processing.


Last weeks I have been rebuilding the PvAPI builtin interface. Steps to complete for this:

  • Run CMAKE-gui instead of CMAKE itself
  • Manually link the PvAPI include and header file until no configure errors appear anymore
  • Update your sourcecode before building with this pull request to fix all errors of the API interface.
  • Use the sample to capture data.

Happy trying!

edit flag offensive delete link more


THANKS YOU FOR YOUR ANSWER!! I want to use with OpenCV... then Case 2.

1) I've done the changes in the cap_pvapi.cpp in the path D:\opencv\sources\modules\highgui\src

2) I've run CMAKE-gui

3) I've linked ->

4) I've pushed configure -> Log:

5) I've pushed generate -> Log:

6) I've executed my program ->

Result: PvAPI NO and the program no detect any camera...

I'm sending you something? Thank you very much for the help ... tomorrow I have to show the camera working for my boss. I hope we can fix it.

Thank you

RiSaMa gravatar imageRiSaMa ( 2014-10-22 06:35:04 -0600 )edit

Why did you link the GigE API with the PVAPI interface? Please do not do so, you do not need that built! And then you missed some steps. After the generate you need to do

  • sudo make -j 5
  • sudo make install

Then it should work perfectly fine! You have not built opencv yet by just running the cmake gui, that is only the configure step.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-22 06:55:21 -0600 )edit

Excuse for my english... it is very poor and I cant understand you very well... (no hablaras espan~ol?)

** Then I erase all references in GIGEAPI and PVAPI in CMAKE? -> -> so right?

** I'm working in windows... How can I do these steps with sudo...??


RiSaMa gravatar imageRiSaMa ( 2014-10-22 07:16:13 -0600 )edit

O Windows! Add references for PVAPI ONLY! Then open the OpenCV.sln in Visual Studio and built it! I do not speak Spanish, I am sorry :P

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-22 07:24:57 -0600 )edit

Finally it's working with VimbaSDK but no work PVAPI...

Now I have the first frame and I want processed (apply HOG person detector). But when I execute HOG detector the camera CRASH... Do you know if there are some problem??

The normal process is: get frame 1 -> process frame 1 -> get frame 2 -> process frame 2.......

Is it true?

Thanks you

RiSaMa gravatar imageRiSaMa ( 2014-10-23 03:21:10 -0600 )edit


PLEASE... Someone could send me a Visual Studio Project (working). I only need show the camera video using OpenCV!

PLEASE... I'm desperate and It's very important in my life...

THANKS YOU!!!! rsm89(aaatt)icloud(.)com

RiSaMa gravatar imageRiSaMa ( 2014-10-23 06:39:30 -0600 )edit

I am sorry but I am deliberately not using the VimbaSDK since it is not supported on Linux. So I can not help you out here.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-23 06:47:37 -0600 )edit

Steven... It NO necessary that use VimbaSDK.

If you could create the project with PVAPI and it will work (only show the video image) it;s PERFECT!!! Please, I hope your help!! THANKS YOU

RiSaMa gravatar imageRiSaMa ( 2014-10-23 07:15:33 -0600 )edit

I do not have a Windows machine here. I am very sorry. Linux projects in codeblocks I can create for you.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-23 07:20:40 -0600 )edit

Ok, everything you could send me workin (capture image and show) it's very useful for me!!

If you can... I need the most easier code... Only show image.

Thanks you a lot!

RiSaMa gravatar imageRiSaMa ( 2014-10-23 08:09:48 -0600 )edit

Question Tools


Asked: 2014-10-21 09:06:51 -0600

Seen: 2,342 times

Last updated: Oct 22 '14