Position of a Roi in a mat
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 ?
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 ?
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...).
locateROI is the function I missed in the docs. Thanks a lot
Asked: 2015-04-13 16:28:37 -0600
Seen: 410 times
Last updated: Apr 14 '15
Copying parts of image to new images?
How to perform changes in both sub-image and original image ?
Fill an image with the content of RotatedRect
copy part of a image Mat to another one
What is the most effective way to access cv::Mat elements in a loop?
Is there penalty for reference counting in Mat?