Ask Your Question
1

How do I get Allied Vision Camera (GC2450C) working with OpenCV 2.4?

asked 2013-12-16 04:57:08 -0600

kaushal gravatar image

I start exploring OpenCV few days back, and successfully able to grab video/image from iBall webCam.

I have GC2450C Allied Vision Camera and my OS is windows-7, how do i read this GigE Camera Image/Video Through OpenCV.

my OpenCV directory structure show that i have cap_pvapi.cpp file is available (dono what is this but every time i start googling these key word CV_CAP_PVAPI visible on monitor)

c:\OpenCV\opencv\source\modules\highgui\cap_pvapi.cpp

edit retag flag offensive close merge delete

Comments

1

cerr << getBuildInformation() << endl;

should give you some information about pvapi/gige availability.

if you're using the prebuilt libs, it's kinda unlikely, that it's compiled in already. GigE seems to be dependant on some sdk being installed when building the opencv libs .

(get the sdk, rebuild opencv in short)

berak gravatar imageberak ( 2013-12-16 06:27:51 -0600 )edit

after getting sdk http://www.alliedvisiontec.com/apac/products/legacy.html, how do i connect this SDK during opencv rebuild process

kaushal gravatar imagekaushal ( 2013-12-17 01:09:14 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-12-16 07:58:34 -0600

updated 2014-10-06 07:38:04 -0600

Simply said, if you want your OpenCV version to work with the AVT camera's you need to do the following steps, which are in line with the remark of @berak:

  1. Download the AVT SDK for GigE camera's here
  2. Install the complete SDK so that your system contains the pvapi drivers.
  3. Download the sourcecode from the GitHub repository.
  4. Build openCV from source, enabling the WITH_PVAPI functionality. This will require you to link the sdk lib and bin folder.

After this, the videocapture device will be able to detect your AVT GigE camera's.

Another way of doing so, is to manually install the GigE pvapi SDK and use the following template.

edit flag offensive delete link more

Comments

Hello There, Thanking you for your reply.

  1. I have download and install the AVT PvAPI http://www.alliedvisiontec.com/apac/products/legacy.html

  2. I have already compiled and installed OpenCV 2.4.7, and currently using it with VS2010

  3. I have got the sample Code from allied Vision "http://www.alliedvisiontec.com/emea/support/knowledge-base.html?tx_nawavtknowledgebase_piList[uid]=119&tx_nawavtknowledgebase_piList[mode]=single" but it was written in VS6 and i have convert it in VS10 and then compiled it generate an error saying

error LNK 1104:cannot open file 'cv210d.lib'

kaushal gravatar imagekaushal ( 2013-12-17 01:01:25 -0600 )edit

That is because you are trying to link versus old libraries of openCV. You have to replace the includes with the correct C/C++ header files of the new structure, and adapt the dependencies for the correct libs.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-12-17 02:19:24 -0600 )edit

As you have suggest, the error is because i am trying to link old version of opencv, now i have remove this file along with other file have "210d.lib", and also configure C/C++ and Linker as mentioned below 1. C/C++ --> Additional Include Directories: "C:\Program Files \Allied Vision Technologies\GigESDK\lib-pc" 2. C/C++ --> Additional Include Directories: "C:\Program Files \Allied Vision Technologies\GigESDK\inc-pc"

3.Linker->Additional Library Directories "C:\Program Files \Allied Vision Technologies\GigESDK\lib-pc" then all error gone and new error come Like:

Error 2 error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj) C:\Program Files\Allied Vision Technologies\GigESDK\examples\App5 - Snap O

kaushal gravatar imagekaushal ( 2013-12-17 03:44:42 -0600 )edit

I am able to compile my GigE code along with openCV libraries without any error.

but it ask for PvAPI.dll though i have PvAPI.dll but I just wanted to know where to put "PvAPI.dll",

as each time i run my code it ask about PvAPI.dll saying that

PvAPI.dll is missing from your computer, try reinstalling the program to fixm this problem

if i put this dll in my OpnCV dll's,during run time it says

"The application was unable to start correctly (0XC000007b.)"

Regards

kaushal gravatar imagekaushal ( 2013-12-17 22:03:51 -0600 )edit

Hello Friends,

Finally some Positive signal start coming. probably i am using corrupt PvAPI.dll, now code start working and saying //----------------------------------------------------------

Frame capturing configured, starting the actual capture

numcams = 1 Camera ID = 137937 Frame Size = 50184000 Frame Width = 2448 Frame Height = 2050

Start the acquisition 0

It Stuck at PvCaptureQueueFrame(myCamera.Handle,&(myCamera.Frame),NULL)

Line No:128

if(!PvCaptureQueueFrame(myCamera.Handle, &(myCamera.Frame), NULL))

Please guide me

regards

kaushal gravatar imagekaushal ( 2013-12-17 22:28:35 -0600 )edit
1

Hello Friends,

So my GigE Camera GC2450C along with OpenCV2.4.7 is start capturing mon Video.

Thanking you for your kind support.

now working on How to make it color video format...?

Regards

kaushal

kaushal gravatar imagekaushal ( 2013-12-19 22:50:45 -0600 )edit

@kaushal can you share how did you do to get camera working. thanks

phdstudent2012 gravatar imagephdstudent2012 ( 2014-02-07 12:41:28 -0600 )edit

Actually follow the links above, go to the gige camera website and do like he did :) the code is all there!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-02-10 02:38:20 -0600 )edit

@kaushal thank you for your questions and the answers from @StevenPuttemans i run the program for a camera manta125b i had your same troubles but i can fix and correct them, but can you tell me what can ido because when a run the program ii display me (in a blank screen) "This script will capture and save images derived from a MANTA GigE camera \n""This script uses some required and some adaptable parameters: \n""manta_GigE_2.exe\n"" <output folder> \n"" <nr of frames = 100> \n"" <output format = '.pgm'> \n" and when i open some key the program breaks, what information i need for it run correctly, this seems only run the first part of the program, thank you friends.

paulser gravatar imagepaulser ( 2014-03-27 02:07:59 -0600 )edit

I would suggest reopening a new question. Specify your configuration, your source, ... and people will help you find a solution. Opening old questions is not a good approach!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-03-27 04:06:30 -0600 )edit
1

answered 2014-10-03 16:15:52 -0600

PedroPadua gravatar image

@kaushal

To make it coloured, simple convert it using:

Mat color; cvtColor(image,color,CV_BayerBG2RGB);

edit flag offensive delete link more

Comments

Actually not responded to your mail yet but this seems wrong to me. You are basically reading a grayscale 8 bit image as a bayer pattern to then apply color transformation. Are you sure this records true colors?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-04 16:01:48 -0600 )edit

Question Tools

Stats

Asked: 2013-12-16 04:57:08 -0600

Seen: 18,207 times

Last updated: Oct 06 '14