Change decimation enum values so they can be used in resolution calculations.
authorNick D'Ademo <nickdademo@gmail.com>
Tue, 12 Aug 2014 13:18:11 +0000 (15:18 +0200)
committerNick D'Ademo <nickdademo@gmail.com>
Tue, 12 Aug 2014 13:18:11 +0000 (15:18 +0200)
BUGFIX: Fixed bugged when setting PVAPI property CV_CAP_PROP_FRAME_HEIGHT.

modules/videoio/include/opencv2/videoio.hpp
modules/videoio/src/cap_pvapi.cpp

index a601b8e..b0a371a 100644 (file)
@@ -210,8 +210,8 @@ enum { CAP_PVAPI_FSTRIGMODE_FREERUN     = 0,    // Freerun
 // PVAPI: DecimationHorizontal, DecimationVertical
 enum { CAP_PVAPI_DECIMATION_OFF       = 1,    // Off
        CAP_PVAPI_DECIMATION_2OUTOF4   = 2,    // 2 out of 4 decimation
-       CAP_PVAPI_DECIMATION_2OUTOF8   = 3,    // 2 out of 8 decimation
-       CAP_PVAPI_DECIMATION_2OUTOF16  = 5     // 2 out of 16 decimation
+       CAP_PVAPI_DECIMATION_2OUTOF8   = 4,    // 2 out of 8 decimation
+       CAP_PVAPI_DECIMATION_2OUTOF16  = 8     // 2 out of 16 decimation
      };
 
 // Properties of cameras available through XIMEA SDK interface
index 66b9f9f..355ddc0 100644 (file)
@@ -349,7 +349,7 @@ bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value )
         stopCapture();
 
         // Reallocate Frames
-        if (!resizeCaptureFrame(value, currWidth))
+        if (!resizeCaptureFrame(currWidth, value))
         {
             startCapture();
             return false;