2015-03-23 03:05:46 -0600 | answered a question | Exception in cvConvertScale in OpenCV calling solvePnP Well I think I found the issue so I'll post it here in case anyone stumble upon this... It seems my camera matrix was not properly initialized. I don't know why but I dont get a 3x3 matrix from my double[3,3]. So I initialized it using the OpenCV Mat constructor like this: And now it's working... if anyone know why my double[3,3] was not producing the corresponding Mat(3,3) feel free to share ! |
2015-03-19 06:54:19 -0600 | asked a question | Exception in cvConvertScale in OpenCV calling solvePnP I'm trying to use solvePnP from OpenCV (through OpenCvSharp) but I get an exception that I don't understand. After some searching, I found that it comes from cvConvertScale in convert.cpp Here is how I use it: If I understand this exception right, it means there is a conversion of sort happening and the source and destination matrixes don't have the same size or the same number of channels. But both my list of points are of the same size. My camera matrix is 3x3 which should be fine. I don't get it. Could someone shed some light on this ? |