Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ELSE runs even after IF runs!

Hey Guys & Gals! I have an odd problem with OpenCV. I am trying to implement a calibration program based on calibration example of opencv but with more features. the problem is, when in class "Settings" the program reaches the following line in Debug mode, it runs perfectly: Mat nextImage() { Mat result; if( inputCapture.isOpened() ) { Mat view0; inputCapture >> view0; view0.copyTo(result); } else if( atImageList < (int)imageList.size() ) result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR); return result; }

Assumin I am taking images from my WebCam, when I am trying to trace the code in Release mode, after IF validates (isOpened()==true) and filling the Result with view0, OpenCV runs the ELSE part too!!!, and thus destoying the result and creating an empty view!. As far as I know if IF validates, ELSE shouldn't validate! :)) but I've no idea why this happens! Remember that my code runs perfectly in Debug mode! OpenCV:2.4.6 Visual Studio 2012 Windows 7 SP1 64bit Active Configuration: 64bit

ELSE runs even after IF runs!

Hey Guys & Gals! I have an odd problem with OpenCV. I am trying to implement a calibration program based on calibration example of opencv but with more features. the problem is, when in class "Settings" the program reaches the following line in Debug mode, it runs perfectly:
Mat nextImage()
{
Mat result;
if( inputCapture.isOpened() )
{
Mat view0;
inputCapture >> view0;
view0.copyTo(result);
}
else if( atImageList < (int)imageList.size() )
result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
return result;
}

Assumin } Assuming I am taking images from my WebCam, when I am trying to trace the code in Release mode, after IF validates (isOpened()==true) and filling the Result with view0, OpenCV runs the ELSE part too!!!, and thus destoying the result and creating an empty view!. As far as I know if IF validates, ELSE shouldn't validate! :)) but I've no idea why this happens! Remember that my code runs perfectly in Debug mode! OpenCV:2.4.6 Visual Studio 2012 Windows 7 SP1 64bit Active Configuration: 64bit

64bit

ELSE runs even after IF runs!

Hey Guys & Gals! I have an odd problem with OpenCV. OpenCV.

I am trying to implement a calibration program based on calibration example of opencv but with more features. the features. The problem is, when in class "Settings" the program reaches the following line in Debug Debug mode, it runs perfectly: perfectly:

Mat nextImage()
{
Mat result;
if( inputCapture.isOpened() )
{
   Mat view0;
   inputCapture >> view0;
   view0.copyTo(result);
}
else if( atImageList < (int)imageList.size() )
   result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
        return result;
}

Assuming I am taking images from my WebCam, WebCam,

when I am trying to trace the code in Release mode, after IF validates (isOpened()==true) and filling the Result with view0, view0, OpenCV runs the ELSE part too!!!, and thus destoying the result and creating an empty view!. As far as I know if IF validates, ELSE shouldn't validate! :)) :)) but I've no idea why this happens! Remember that my code runs perfectly in Debug mode! OpenCV:2.4.6 Visual Studio 2012 Windows 7 SP1 64bit Active Configuration: 64bit 64bit

ELSE runs even after IF runs!

Hey Guys & Gals! I have an odd problem with OpenCV.

I am trying to implement a calibration program based on calibration example of opencv but with more features. The problem is, when in class "Settings" the program reaches the following line in Debug mode, it runs perfectly:

Mat nextImage()
{
Mat result;
if( inputCapture.isOpened() )
{
   Mat view0;
   inputCapture >> view0;
   view0.copyTo(result);
}
else if( atImageList < (int)imageList.size() )
   result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
        return result;
}

Assuming I am taking images from my WebCam,

when I am trying to trace the code in Release mode, after IF validates (isOpened()==true) and filling the Result with view0, OpenCV runs the ELSE part too!!!, and thus destoying the result and creating an empty view!. As far as I know if IF validates, ELSE shouldn't validate! :)) but I've no idea why this happens! Remember that my code runs perfectly in Debug mode! OpenCV:2.4.6 Visual Studio 2012 Windows 7 SP1 64bit Active Configuration: 64bit

ELSE runs even after IF runs!

Hey Guys & Gals! I have an odd problem with OpenCV.

OpenCV.

I am trying to implement a calibration program based on calibration example of opencv but with more features. The problem is, when in class "Settings" the program reaches the following line in Debug mode, it runs perfectly:

Mat nextImage()
{
Mat result;
if( inputCapture.isOpened() )
{
   Mat view0;
   inputCapture >> view0;
   view0.copyTo(result);
}
else if( atImageList < (int)imageList.size() )
   result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
        return result;
}
 

Assuming I am taking images from my WebCam,

WebCam, when I am trying to trace the code in Release mode, after IF validates (isOpened()==true) and filling the Result with view0, OpenCV runs the ELSE part too!!!, and thus destoying the result and creating an empty view!. As far as I know if IF validates, ELSE shouldn't validate! :)) but I've no idea why this happens! Remember that my code runs perfectly in Debug mode! OpenCV:2.4.6

OpenCV:2.4.6 / Visual Studio 2012 2012 / Windows 7 SP1 64bit 64bit / Active Configuration: 64bit

ELSE runs even after IF runs!

Hey Guys & Gals! I have an odd problem with OpenCV.

I am trying to implement a calibration program based on calibration example of opencv but with more features. The problem is, when in class "Settings" the program reaches the following line in Debug mode, it runs perfectly:

Mat nextImage()
{
Mat result;
if( inputCapture.isOpened() )
{
   Mat view0;
   inputCapture >> view0;
   view0.copyTo(result);
}
else if( atImageList < (int)imageList.size() )
   result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
        return result;
}

Assuming I am taking images from my WebCam, when I am trying to trace the code in Release mode, after IF validates (isOpened()==true) and filling the Result with view0, OpenCV runs the ELSE part too!!!, and thus destoying the result and creating an empty view!. As far as I know if IF validates, ELSE shouldn't validate! :)) but I've no idea why this happens! Remember that my code runs perfectly in Debug mode!

OpenCV:2.4.6 / Visual Studio 2012 / Windows 7 SP1 64bit / Active Configuration: 64bit