I read an image in android and detect the keypoints using sift algorithm, then I want to create Object of Interest (OOI) around these keypoints by creating a convex hull of the corresponding points How can I create this convexhull and draw it using findcontours ??? this is my code:
inputImage = BitmapFactory.decodeResource(getResources(), R.drawable.test);
Mat rgba = new Mat();
Mat rgbagray = new Mat(rgba.width(),rgba.height(),CV_8UC1);
Utils.bitmapToMat(inputImage, rgba);
Imgproc.cvtColor(rgba, rgbagray, Imgproc.COLOR_RGBA2GRAY);
MatOfKeyPoint keyPoints = new MatOfKeyPoint();
detector.detect(rgbagray, keyPoints);
List<MatOfPoint> contours = new ArrayList<>();
Mat hierarchy = new Mat();
List<KeyPoint> listpoint = new ArrayList<KeyPoint>();
listpoint = keyPoints.toList();
//
for (int ind = 0; ind < listpoint.size(); ind++) {
// find region of interest
}