|
|
|
@ -300,12 +300,26 @@ double CvCaptureCAM_PvAPI::getProperty( int property_id ) |
|
|
|
|
return 4.0; |
|
|
|
|
else |
|
|
|
|
return -1.0; |
|
|
|
|
case CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL: |
|
|
|
|
PvAttrUint32Get(Camera.Handle, "DecimationHorizontal", &nTemp); |
|
|
|
|
return (double)nTemp; |
|
|
|
|
case CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL: |
|
|
|
|
PvAttrUint32Get(Camera.Handle, "DecimationVertical", &nTemp); |
|
|
|
|
return (double)nTemp; |
|
|
|
|
case CV_CAP_PROP_PVAPI_BINNINGX: |
|
|
|
|
PvAttrUint32Get(Camera.Handle,"BinningX",&nTemp); |
|
|
|
|
return (double)nTemp; |
|
|
|
|
case CV_CAP_PROP_PVAPI_BINNINGY: |
|
|
|
|
PvAttrUint32Get(Camera.Handle,"BinningY",&nTemp); |
|
|
|
|
return (double)nTemp; |
|
|
|
|
} |
|
|
|
|
return -1.0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value ) |
|
|
|
|
{ |
|
|
|
|
tPvErr error; |
|
|
|
|
|
|
|
|
|
switch ( property_id ) |
|
|
|
|
{ |
|
|
|
|
case CV_CAP_PROP_FRAME_WIDTH: |
|
|
|
@ -389,7 +403,6 @@ bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value ) |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case CV_CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE: |
|
|
|
|
tPvErr error; |
|
|
|
|
if (value==0) |
|
|
|
|
error = PvAttrEnumSet(Camera.Handle, "FrameStartTriggerMode", "Freerun"); |
|
|
|
|
else if (value==1) |
|
|
|
@ -406,6 +419,36 @@ bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value ) |
|
|
|
|
break; |
|
|
|
|
else |
|
|
|
|
return false; |
|
|
|
|
case CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL: |
|
|
|
|
if (value >= 1 && value <= 8) |
|
|
|
|
error = PvAttrUint32Set(Camera.Handle, "DecimationHorizontal", value); |
|
|
|
|
else |
|
|
|
|
error = ePvErrOutOfRange; |
|
|
|
|
if(error==ePvErrSuccess) |
|
|
|
|
break; |
|
|
|
|
else |
|
|
|
|
return false; |
|
|
|
|
case CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL: |
|
|
|
|
if (value >= 1 && value <= 8) |
|
|
|
|
error = PvAttrUint32Set(Camera.Handle, "DecimationVertical", value); |
|
|
|
|
else |
|
|
|
|
error = ePvErrOutOfRange; |
|
|
|
|
if(error==ePvErrSuccess) |
|
|
|
|
break; |
|
|
|
|
else |
|
|
|
|
return false; |
|
|
|
|
case CV_CAP_PROP_PVAPI_BINNINGX: |
|
|
|
|
error = PvAttrUint32Set(Camera.Handle, "BinningX", value); |
|
|
|
|
if(error==ePvErrSuccess) |
|
|
|
|
break; |
|
|
|
|
else |
|
|
|
|
return false; |
|
|
|
|
case CV_CAP_PROP_PVAPI_BINNINGY: |
|
|
|
|
error = PvAttrUint32Set(Camera.Handle, "BinningY", value); |
|
|
|
|
if(error==ePvErrSuccess) |
|
|
|
|
break; |
|
|
|
|
else |
|
|
|
|
return false; |
|
|
|
|
default: |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|