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