Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 353

create convexhull around detected keypoints

$
0
0
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 contours = new ArrayList<>(); Mat hierarchy = new Mat(); List listpoint = new ArrayList(); listpoint = keyPoints.toList(); // for (int ind = 0; ind < listpoint.size(); ind++) { // find region of interest }

Viewing all articles
Browse latest Browse all 353

Latest Images

Trending Articles



Latest Images