How do i find points of interest (keypoints) in a specific region of image

asked 2019-09-04 05:20:29 -0600

I am using color detection to find all objects with the color red (for example).

If i find more then one, i want to take each of them, put them in an array and then use SURF or ORB to do feature matching on each of them.

So instead of doing feature matching on the entire image, i want to do feature matching only on lets say 3 regions of that image and then see which one had most matches and then use that one.

The first part i have - extracting the coordinates (x y, x1 y, x y1, x1 y1). Now i need to get the data of the image in those coordinates and store it, then perform the surf feature matching on that data.

edit retag flag offensive close merge delete

Comments

Maybe like this?

Rect roiRegion=Rect(x,y,x1-x,y1-y);
Mat myRoiMat=src(roiRegion);
DoSomethingToGetFeature(myRoiMat);
gino0717 gravatar imagegino0717 ( 2019-09-04 06:46:15 -0600 )edit

or may be read documentation

LBerger gravatar imageLBerger ( 2019-09-04 07:07:58 -0600 )edit