getting RGB image while dividing 2 gray image

asked 2014-11-13 03:51:43 -0600

Deepak Kumar gravatar image

hi, i have two grayscale image. when i am dividing it I am getting RGB image. what wrong i am doing here. while, the same image input i m giving in c++ opencv i am getting gray image but not in andorid.

here is my Android code :-

 Mat contrast = new Mat();
 Core.divide(deviation, imfilter, contrast);
 contrast.convertTo(contrast,CvType.CV_8U,255);

Here is my c++ code :-

Mat mean = cv::imread("C:\\Users\\Intern-3\\Desktop\\total\\imfilter.jpg",0);
Mat dev = cv::imread("C:\\Users\\Intern-3\\Desktop\\total\\stdfilt.jpg",0);

Mat contrast;
divide(dev,mean,contrast,255);

thanks!!

edit retag flag offensive close merge delete

Comments

Naively, this could be an (un)intended consequence of the "divide" implementation in OpenCV Android. I don't know for sure, look at the doc specifically for Android or even at the source code.

Doombot gravatar imageDoombot ( 2014-11-13 08:48:28 -0600 )edit