Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You did

Mat x = mplane[0];

This is a shallow copy, so a few lines down when you do

magnitude(mplane[0], mplane[1], mplane[0]);

you overwrite the values in x.

Use the .clone() method to get a deep copy.