我的英语不好)我正在使用 opencv v2.4.2
Bitmap bitmap = BitmapFactory.decodeFile(mDefaultPath + name_s + type);
Bitmap mBitmap = bitmap.copy(Bitmap.Config.ARGB_8888, false);
Mat s_image = new Mat();
Utils.bitmapToMat(mBitmap,s_image);
Mat rgb0 = new Mat();
Mat o_image = new Mat();
MatOfKeyPoint points = new MatOfKeyPoint();
FeatureDetector surf0 = FeatureDetector.create(FeatureDetector.ORB);
surf0.detect(s_image, points);
Log.d(TAG, "Sum of keypoints "+points.toList().size());
Imgproc.cvtColor(s_image, rgb0, Imgproc.COLOR_RGBA2RGB);
Features2d.drawKeypoints(rgb0, points, rgb0);
Imgproc.cvtColor(rgb0, o_image, Imgproc.COLOR_RGB2RGBA);
Utils.matToBitmap(o_image, mBitmap);
Highgui.imwrite(mDefaultPath + name_o + type, o_image);
进行此操作后,我在屏幕上(在 ImageView 上)获得了正常图像,但是在 sdcard 上的文件中,我获得了具有蓝色效果的图像,我认为将位图转换为地图或将 rgba 转换为 rgb 并返回
你能帮助我吗?