Cropping the image with boundary condition
Show older comments
I am tracking an object in an image. Once the object is located i am cropping the image of size 120*60 using
crop1=imcrop(image,[x1-30,y1-50,60,120])
The issue is when its near the boundary, the cropped image size get reduced and i am shorter(y axis) or thinner (x axis)cropped images.
Accepted Answer
More Answers (1)
Elizabeth Reese
on 5 Dec 2017
0 votes
If any of these values are outside of the range of pixels that the image actually inhabits, than the resulting image will looked more cropped than expected. So if the xmin or ymin are negative, then the resulting image will not be the whole 60x120 size.
Categories
Find more on Image Category Classification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!