changed returned value of unsupported property

This commit is contained in:
Maria Dimashova 2011-01-27 07:33:34 +00:00
parent b7b21966c3
commit d70d2edc9f

View File

@ -265,7 +265,7 @@ void CvCapture_OpenNI::readCamerasParams()
double CvCapture_OpenNI::getProperty( int propIdx ) double CvCapture_OpenNI::getProperty( int propIdx )
{ {
double propValue = -1; double propValue = 0;
if( isOpened() ) if( isOpened() )
{ {
@ -304,7 +304,7 @@ double CvCapture_OpenNI::getDepthGeneratorProperty( int propIdx )
{ {
CV_Assert( depthGenerator.IsValid() ); CV_Assert( depthGenerator.IsValid() );
double res = -1; double res = 0;
switch( propIdx ) switch( propIdx )
{ {
case CV_CAP_PROP_FRAME_WIDTH : case CV_CAP_PROP_FRAME_WIDTH :
@ -342,7 +342,7 @@ double CvCapture_OpenNI::getImageGeneratorProperty( int propIdx )
{ {
CV_Assert( imageGenerator.IsValid() ); CV_Assert( imageGenerator.IsValid() );
double res = -1; double res = 0;
switch( propIdx ) switch( propIdx )
{ {
case CV_CAP_PROP_FRAME_WIDTH : case CV_CAP_PROP_FRAME_WIDTH :