Re: OpenCV solve equation
If you have the source code, why not debug into the solve() function to see what it's doing?
Regards,
Paul McKenzie
Re: OpenCV solve equation
You are instructing the matrix to create itself as if it contains floats (CV_32F), but when you access the data pointer directly, its type is unsigned char*. Therefore, your assignments are not doing what you think they are doing.
You have two options. Either you can use the setTo() or at<float>() method instead, which will do the type conversion, or you can use the Mat_<float> template rather than the Mat class, so that it knows its type at compile time and its operator() will do the write thing.