Change resolution Prosilica Camera OpenCV [closed]

asked 2014-10-28 09:40:19 -0500

RiSaMa gravatar image

Hello, I need our wisdom another time!

I have Prosilica GC1020C Camera (Gethernet) working in my project VS2010 with OpenCV but I want CHANGE resolution frame for example to 360x240 or 480x320.

How can I do this!? I don't find documentation about CPP OpenCV y prosilica camera :(


edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-27 07:12:03.540495


You can only do this in one of the following ways

  1. Use the PvAPI functionality itself, directly from the library
  2. Use the tool provided by AVT to configure the webcams

OpenCV doesn't wrap the functionality to change the resolution of the frame for the moment. If you think your up to supplying those wrappers, feel free to make a PR!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-28 09:50:55 -0500 )edit

Of course. Currently the camera is working with #include <VimbaCPP/Include/VimbaCPP.h> (Vimba), no PvAPI. Do you know how can change resolution with vimba in CPP? THANKS YOU!

RiSaMa gravatar imageRiSaMa ( 2014-10-28 09:55:57 -0500 )edit

No i do not, you should check the header file to see which function calls are supported.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-28 10:02:41 -0500 )edit

What about (might not be what you are looking for though):

    VideoCapture cap(0); // open the default camera
if(!cap.isOpened())  // check if we succeeded
    return -1;
cap.set(cv::CAP_PROP_FRAME_WIDTH, 1920);
cap.set(cv::CAP_PROP_FRAME_HEIGHT, 1080);
Doombot gravatar imageDoombot ( 2014-10-28 10:15:07 -0500 )edit

@Doombot, that won't work. As indicated already above, the VimbaCPP interface is NOT supported or builtin in the openCV repository and the existing PvAPI (which is the old interface for those camera's) doesn't wrap that setter. You will be able to call it through the upper level VideoCapture interface but it will just hit a brick wall at the cap_pvapi.cpp file!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-29 02:53:39 -0500 )edit

If I try change the resolution in "AVT Vimba Viewer" and change the actual resolution (the max: 1024 x 768) to another, for example 640x480 the software dont resize the image... the software CROP the image!! Is it normal? :S

I will want know how affect each parameter to the algorithm:

hog.detectMultiScale(image, found, -0.4, cv::Size(8,8), cv::Size(32,32), 1.05, 2);
  • image: is the image found: the detections
  • -0.4: threshold
  • Size(8,8) --> win_stride, what is it? How affect?
  • Size(32,32) --> padding , what is it? How affect?
  • 1.05 --> rescale for image pyramid
  • 2 --> group_threshold , what is it? How affect?


RiSaMa gravatar imageRiSaMa ( 2014-10-29 04:37:25 -0500 )edit