Mat::convertto() not working in javacv, tutorial 2 mixed
I am developing an android opencv apps. Based on Opencv4android SDK tutorial 2- mixed process.
in the frame processing functionpublic Mat onCameraFrame(CvCameraViewFrame inputFrame) {}
since the Frame is RGBA and I want to make RGB by doing show
mRgba = inputFrame.rgba();
mGray = inputFrame.gray();
Mat mRgb=new Mat(640,480,CvType.CV_8UC3);
mRgba.convertTo(mRgb, CvType.CV_8UC3);
PinkImage(mRgba.dataAddr());
I debug and log the things I passed to jni part, and I find it's not working at all. mRgb is CV_8UC4 even after the converto();
any idea for this?
point me out please, I write C++ opencv for a while and remember just a bit of java.