I am developing an android text recognition app in java with Opencv 4.0.1 and tests-two(tesseract). I am doing with downloaded source code. they have used OpenCV version 3.2.0 But the Issue is when I was trying to import FeatureDetector for MSER unable to import that but they did it on version 3.2.0
My Android Studio version is 4.0.1
Is there any alternative way?? How can I replace
Here is the code
FeatureDetector detector = FeatureDetector.create(FeatureDetector.MSER);
detector.detect(mGray, keyPoint);
this is the import I could not call
import org.opencv.features2d.FeatureDetector;
This link says it is deprecated and suggests to directly instantiate Feature2D classes.
https://docs.opencv.org/3.4/javadoc/org/opencv/features2d/FeatureDetector.html
In this link below there is no
FeatureDetectorinfeatures2dpackage for4.0.1. It has aFastFeatureDetectorclass in this package.https://docs.opencv.org/4.0.1/javadoc/org/opencv/features2d/package-summary.html https://docs.opencv.org/4.0.1/javadoc/org/opencv/features2d/FastFeatureDetector.html
You can try import with,
org.opencv.features2d.MSERand follow something like this. Another option is to downgrade.https://docs.opencv.org/4.0.1/javadoc/org/opencv/features2d/MSER.html