unable to find sqrt of mat
hi, I am getting error in finding square root of a mat variable. can any one help me to find out the solution,
here is the code :-
Mat sigma = new Mat (height, width, CvType.CV_32F);
Mat x = new Mat (height, width, CvType.CV_32F);
Mat y = new Mat (height, width, CvType.CV_32F);
Core.multiply(mu, mu, x);
Core.subtract(mu2, x, y);
Core.pow(y, 0.5, sigma);
//Core.sqrt(y, sigma);
i tried both pow and sqrt in both error is coming.
here is logcat :-
E/org.opencv.core(2837): core::sqrt_10() caught cv::Exception: /home/reports/ci/slave_desktop/50-SDK/opencv/modules/core/src/mathfuncs.cpp:1931: error: (-215) depth == CV_32F || depth == CV_64F in function void cv::pow(cv::InputArray, double, cv::OutputArray)
thanks
How are mu2 and mu defined? What is y.type() just before you call pow? It looks as if it's no float or double matrix.
also, mu and mu2 must have same shape as x and y