Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mat teste = new Mat();
- Mat mRgba = teste.clone();
- Mat outputMat = new Mat();
- BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable();
- Bitmap bitmap = drawable.getBitmap();
- Utils.bitmapToMat(bitmap, teste);
- MatOfKeyPoint myKeyPoints = new MatOfKeyPoint();
- FeatureDetector orb = FeatureDetector.create(FeatureDetector.ORB);
- orb.detect(teste, myKeyPoints);
- List<KeyPoint> referenceKeypointsList =
- myKeyPoints.toList();
- Imgproc.cvtColor(teste, mRgba, Imgproc.COLOR_RGBA2RGB,4);
- Features2d.drawKeypoints(mRgba, myKeyPoints, mRgba, new Scalar(2,254,255), Features2d.DRAW_RICH_KEYPOINTS);
- Imgproc.cvtColor(mRgba, outputMat, Imgproc.COLOR_RGB2RGBA);
- Utils.matToBitmap(outputMat, bitmap);
- imageView.setImageBitmap(bitmap);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement