Skip to content

Unintuitive exception message in C++ (calibrateCamera: assertion failed, ni == ni1) #16095

@sabtorres

Description

@sabtorres

OpenCV version 4.1.1
on Linux openSUSE Tumbleweed
Compiler is g++

Detailed description

I get this error message when trying to call calibrateCamera. I searched on it in some foruns and found out that it can mean that either:

  • my vectors of object points and image points are not the same size (in my case, they are, I did check that)

  • the type is wrong (in this case, I have no idea what to do).

Anyway, this message is really not intuitive and aside from some help with my situation I'd appreciate if this exception could have a better error message.

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.1.1) /home/abuild/rpmbuild/BUILD/opencv-4.1.1/modules/calib3d/src/calibration.cpp:3349: error: (-215:Assertion failed) ni == ni1 in function 'collectCalibrationData'
Steps to reproduce

My module can be seen here: https://github.com/torresguilherme/bakeneko/blob/master/src/calibration/calibration.cpp

thanks in advance for your work and the assistance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions