• Martin Ueding's avatar
    Add example data types for calibrateCamera call · 5ffb53f2
    Martin Ueding authored
    It took me a while to figure out what was meant with
    
        OpenCV Error: Assertion failed (i < 0) in getMat
    
    While searching for this error message I found [a list of error
    messages](https://adventuresandwhathaveyou.wordpress.com/2014/03/14/opencv-error-messages-suck/)
    which also explained what the problem was: The data type for `rvecs` was
    not a simple `cv::Mat` but a `std::vector<cv::Mat>`.
    
    After I fixed that, I got the next error message:
    
        OpenCV Error: Assertion failed (ni > 0 && ni == ni1) in
        collectCalibrationData, file
        /build/buildd/opencv-2.4.9+dfsg/modules/calib3d/src/calibration.cpp,
        line 3193
    
    The problem here was that my data type for the `objectPoints` was just
    `vector<Vec3f>` and not `vector<vector<Vec3f>>`.
    
    In order to save other people the time looking for this, I added
    explicit examples of the needed data types into the documentation of the
    function. I had to re-read the current version a couple of times until I
    can read the needed levels of `vector<>`. Having this example would have
    really helped me there.
    5ffb53f2
Name
Last commit
Last update
..
androidcamera Loading commit data...
calib3d Loading commit data...
core Loading commit data...
cudaarithm Loading commit data...
cudabgsegm Loading commit data...
cudacodec Loading commit data...
cudafeatures2d Loading commit data...
cudafilters Loading commit data...
cudaimgproc Loading commit data...
cudalegacy Loading commit data...
cudaobjdetect Loading commit data...
cudaoptflow Loading commit data...
cudastereo Loading commit data...
cudawarping Loading commit data...
cudev Loading commit data...
features2d Loading commit data...
flann Loading commit data...
hal Loading commit data...
highgui Loading commit data...
imgcodecs Loading commit data...
imgproc Loading commit data...
java Loading commit data...
ml Loading commit data...
objdetect Loading commit data...
photo Loading commit data...
python Loading commit data...
shape Loading commit data...
stitching Loading commit data...
superres Loading commit data...
ts Loading commit data...
video Loading commit data...
videoio Loading commit data...
videostab Loading commit data...
viz Loading commit data...
world Loading commit data...
CMakeLists.txt Loading commit data...