gocv icon indicating copy to clipboard operation
gocv copied to clipboard

How to draw features from GoodFeaturesToTrack?

Open therishidesai opened this issue 5 years ago • 4 comments

I am using the GoodFeaturesToTrack function and am wondering how I would draw the features on an image. From what I understand GoodFeaturesToTrack writes the corners detected to a Mat given to the function. How would I then use this mat to find the coordinates of the features? In C++ I would just pass goodFeaturesToTrack a reference to a vector of OpenCV points and then loop through that vector. Is there some sort of equivalent in gocv?

therishidesai avatar May 18 '19 20:05 therishidesai

So it seems that GoodFeaturesToTrack is setting the map to a 1 x MaxFeatures map. I can loop through this map but the values in the maps are OpenCV points so how would I draw those on to an image?

therishidesai avatar May 25 '19 23:05 therishidesai

+1

semihs avatar Jun 13 '19 13:06 semihs

any help?

hariangr avatar Sep 17 '21 12:09 hariangr

You could use https://pkg.go.dev/gocv.io/x/gocv#Circle to draw circles on the image? I suppose that depends on your application needs.

deadprogram avatar Sep 19 '21 19:09 deadprogram