The FValuePixels from the TemplateMatcher will give the X,Y coordinates of the center of a match, but is there a way to get the bounding box? Apologies if this is obvious.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good question! At present, you'll need to write your own code to do that I'm afraid. I guess the simplest way would be to get the bounds rectangle of the template and translate it so the centre is at the x,y coordinates given by the template matcher:
Is the bounds rectangle of the template exposed somehow? Or are you saying template.getBounds is the method that needs to be added? Thanks for the quick response on this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was assuming that template referred to the FImage instance reresenting the template; the above code should work as is under that assumption without the need for ant methods to be added,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2017-10-19
Post awaiting moderation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
The FValuePixels from the TemplateMatcher will give the X,Y coordinates of the center of a match, but is there a way to get the bounding box? Apologies if this is obvious.
Good question! At present, you'll need to write your own code to do that I'm afraid. I guess the simplest way would be to get the bounds rectangle of the template and translate it so the centre is at the x,y coordinates given by the template matcher:
If this is something you'd like to see added to the library in the future, feel free to file a feature request at https://github.com/openimaj/openimaj/issues
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Is the bounds rectangle of the template exposed somehow? Or are you saying template.getBounds is the method that needs to be added? Thanks for the quick response on this.
I was assuming that
template
referred to theFImage
instance reresenting the template; the above code should work as is under that assumption without the need for ant methods to be added,