Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV Error: Bad argument (Unknown array type) in cvarrToMat

Hello everyone!

I am trying to run camera calibration code on my Desktop(Ubuntu 14.04) : http://docs.opencv.org/2.4/doc/tutorials/calib3d/camera_calibration/camera_calibration.html

I tried to adapt solutions but it didn't work....: http://answers.opencv.org/question/53932/opencv-error-bad-argument-unknown-array-type-in-cvarrtomat/

Here is the result of terminal. I set right file path and checked board sizes. image description

Here is part of main code caused error. image description

I will be waiting for your answers. Thanks!

OpenCV Error: Bad argument (Unknown array type) in cvarrToMat

Hello everyone!

I am trying to run camera calibration code on my Desktop(Ubuntu 14.04) : http://docs.opencv.org/2.4/doc/tutorials/calib3d/camera_calibration/camera_calibration.html

I tried to adapt solutions but it didn't work....: http://answers.opencv.org/question/53932/opencv-error-bad-argument-unknown-array-type-in-cvarrtomat/

Here is the result of terminal. I set right file path and checked board sizes. image description

Here is part of main code in above site caused error. image description

error.

for (int i = 0;; ++i)
{
    Mat view;
    bool blinkOutput = false;

    view = s.nextImage();

    if (mode == CAPTURING && imagePoints.size() >= (unsigned)s.nrFrames)
    {
        if (runCalibrationAndSave(s, imageSize, cameraMatrix, distCoeffs, imagePoints))
            mode = CALIBRATED;
        else
            mode = DETECTION;
    }
    if (view.empty())          
    {
        if (imagePoints.size() > 0)//This part!!
            runCalibrationAndSave(s, imageSize, cameraMatrix, distCoeffs, imagePoints);
        break;
    }

I will be waiting for your answers. Thanks!