Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why do i getting this OpenCV error Assertion Failed?

Here is the code :

Mat _orange = imread("orange.jpg");
Mat_<Vec3f> orange;
_orange.convertTo(orange, orange.type(), 1.0/255.0);

The _orange.convertTo(orange, orange.type(), 1.0/255.0); part causes the error.

Here is the error message:

OpenCV Error: Assertion failed (!fixedType() || ((Mat*)obj)->type() == mtype) in unknown function.

PS: I am using Visual Studio 2012 and OpenCV 2.4.4

Why do am i getting this OpenCV error Assertion Failed?

Here is the code :

Mat _orange = imread("orange.jpg");
Mat_<Vec3f> orange;
_orange.convertTo(orange, orange.type(), 1.0/255.0);

The _orange.convertTo(orange, orange.type(), 1.0/255.0); part causes the error.

Here is the error message:

OpenCV Error: Assertion failed (!fixedType() || ((Mat*)obj)->type() == mtype) in unknown function.

PS: I am using Visual Studio 2012 and OpenCV 2.4.4