Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

something weird about `findChessboardCorners()`

$
0
0
these days I was re-writing my opencv code on qt framework. the code runs well on the virtual studio 2013, but when I run it on the qt, something weird happened. the code is as follow cv::Mat view, viewGray; for(int i = 0; i < nImages; i++) { vector pointBuf; int q = pointBuf.size(); view = cv::imread(fileList.at(i).toStdString(), 1); cv::cvtColor(view, viewGray, cv::COLOR_BGR2GRAY); bool found = cv::findChessboardCorners(view, boardSize, pointBuf, \ CV_CALIB_CB_ADAPTIVE_THRESH | \ CV_CALIB_CB_FAST_CHECK | \ CV_CALIB_CB_NORMALIZE_IMAGE); int p = pointBuf.size(); if(found) { cv::cornerSubPix(viewGray, pointBuf, cv::Size(11, 11), cv::Size(-1, -1), \ cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1)); imagePoints.push_back(pointBuf); } } I set two variables `p` and `q` to see the size change of `pointBuf`. which I get `q = 0, p = -10728254`, but with the `findChessboardCorners()` return value is `true`. my debegger infomation is as follow, ![image description](/upfiles/14612979663453333.png) and the image for calibration is as follow, ![image description](/upfiles/1461298314792185.jpg) update: I set the debugger point at `imagePoints.push_back(pointBuf);` , as you can see in the following picture. ![image description](/upfiles/1461313312503616.png)

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>