crop (cv.Rect) - MATLAB File Help |
Extract region-of-interest from image
roi = cv.Rect.crop(img, r)
img = cv.Rect.crop(img, r, roi)
[x,y,w,h]
.[h,w]
, and same type
and channels as input image img
.In the first variant, the function gets ROI region from image,
i.e: roi = img(r(2)+1:r(2)+r(4), r(1)+1:r(1)+r(3), :)
.
In the second variant, the function sets ROI region inside image,
i.e: img(r(2)+1:r(2)+r(4), r(1)+1:r(1)+r(3), :) = roi
Access | public |
Sealed | false |
Static | true |