Ask Your Question
0

Position of a Roi in a mat

asked 2015-04-13 16:28:37 -0600

MalcolmMaya gravatar image

Is it possible to know the position of a ROI made from a Mat if you pass both of them as argument of a function ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-04-14 03:58:28 -0600

Guanta gravatar image

If you have created the ROI using cv::Rect() or cv::Range(), you can use locateROI, see http://docs.opencv.org/modules/core/d... . If you want to find a subimage not steming from the same Matrix (i.e. not created by cv::Rect() or cv::Range()) in a Matrix, then you would need to use matchTemplate(http://docs.opencv.org/modules/imgpro...).

edit flag offensive delete link more

Comments

1

locateROI is the function I missed in the docs. Thanks a lot

MalcolmMaya gravatar imageMalcolmMaya ( 2015-04-14 04:01:17 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-04-13 16:28:37 -0600

Seen: 398 times

Last updated: Apr 14 '15