Original Image 有关如何减少过滤图像上的噪音的任何建议。我们在android studio中使用opencv的canny edge。
inputStream = getContentResolver().openInputStream(imageUri);
Bitmap image = BitmapFactory.decodeStream(inputStream);
Mat matImage = new Mat ( image.getHeight(), image.getWidth(), CvType.CV_8UC3);
Bitmap myBitmap32 = image.copy(Bitmap.Config.ARGB_8888, true);
Utils.bitmapToMat(myBitmap32, matImage);
Mat gray = new Mat(matImage.size(), CvType.CV_8UC1);
Imgproc.cvtColor(matImage, gray, Imgproc.COLOR_RGB2GRAY,4);
Mat edge = new Mat();
Mat dst = new Mat();
Imgproc.Canny(gray, edge, 60, 80);
Imgproc.cvtColor(edge, dst, Imgproc.COLOR_GRAY2RGBA,4);
final Bitmap resultBitmap = Bitmap.createBitmap(dst.cols(), dst.rows(),Bitmap.Config.ARGB_8888);
Utils.matToBitmap(dst, resultBitmap);