Ask Your Question

dguerra's profile - activity

2016-03-12 02:31:36 -0600 asked a question Weird behaviour loading double value from array

Hi all, I've found this really weird behaviour when loading a double value from array into a cv::Mat object. I do the following:

double foo_array[] = { -0.837231 };                     
cv::Mat foo(1, 1, cv::DataType<double>::type, foo_array);
std::cout << "foo: " << foo << std::endl;

and I got the output below:

foo: [-0.8372309999999999]

Why do I not get the exact value I entered? For any other numeric value it seems to behave properly. Any help would be greatly appreciated, thanks

2016-01-29 05:58:49 -0600 asked a question mulSpectrums when one or the inputs is SparseMat

Is there a method equivalent to mulSpectrums, when one of the input matrices (or the two) is sparse?