Ask Your Question
0

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: http://imageshack.com/a/img540/1013/Gt40TH.jpg http://imageshack.com/a/img912/1487/8HxWHJ.jpg

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

THANKS YOU VERY MUCH!

edit retag flag offensive close merge delete

Comments

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: http://imageshack.com/a/img913/1435/aWQXMk.png Is it ok?

My code is (C++ / OpenCV): http://imageshack.com/a/img537/1953/fQTvit.png

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
1

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
1

@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
0

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

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

Okay lets sum it up again ;)

CASE 1: YOU USE THE PVAPI INTERFACE WITHOUT BUILTIN SUPPORT IN OPENCV

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.

CASE 2: USE THE BUILTIN OPENCV SUPPORT

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

Comments

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 -> http://imageshack.com/a/img673/3340/fIZidb.jpg

4) I've pushed configure -> Log: https://www.dropbox.com/s/dglyyrryg5ufoeu/log.txt?dl=0

5) I've pushed generate -> Log: https://www.dropbox.com/s/d2tk4ikfdi6w5yl/log2.txt?dl=0

6) I've executed my program -> http://imageshack.com/a/img540/2281/Bj6EZV.jpg

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? ->https://www.dropbox.com/s/0ze5gh599wxlg6d/A.jpg?dl=0 -> so right?

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

THANKS YOU:)

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

I NEED YOUR HELP!!!!

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

Stats

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

Seen: 2,570 times

Last updated: Oct 22 '14