What will do this code?
Hi all! I have following code on C++:
Mat planes[] = {Mat_<double>(img), Mat::zeros(img.size(),CV_32FC1)};
Where is img is original gray scale image converted to CV_32FC1, then multiplied by 1/255(but I think it's not critical) and resized to 128x128 pixels(this might be important). So my question is what will contains in planes and what dims it will has. When I make std::cout << planes
it's gives me an address(I think it's object's address). Also my goal is translate this code in to the Python.
what is the context ?
also note, if img is of type CV_32FC1, then
Mat_<double>(img)
is plain wrong.I didn't understand your question about context) And thanks, I will know :-)
what are you trying to do with it / next ?
above is just an array of 2 Mat's
Oh, sorry. planes will be used for Fourier transformation function, not by it self, dft function output will be separated in to the planes. The whole function compute third salience for an image
wait, this is the input for a complex dft, right ? (left Mat s the real part, the right Mat (all zeros) the imaginary one ?)
you probably need to merge() the array (make it interleaved, CV_32FC2) before feeding it into dft()
and you don't have to pre-allocate the output as opencv will do that already
I think will be better, if I will add this: