Why images dimensions goes up when cropping it
3 次查看(过去 30 天)
显示 更早的评论
I enclose two images. Both are the same image.
The original ('A1b.jpg') has the beggining point of the imaging window at [136,120] and end point at [548,120].
The ('A1b(al).jpg') is the same image cropped but the imaging window length is outrageous enlarged with starting point at [180,96] and end point at [1237,96].
Why this difference? I only cropped the image under certain dimensions. Why it took that scaling and stretching?
0 个评论
采纳的回答
Image Analyst
2019-1-21
Looks like you're saving the figure window itself instead of the image in the axes. When you save the figure window, you get all that white padding, and the image is screen pixels, which may not be the same as the underlying image pixels because the image may have been zoomed or subsampled to fit your figure window.
15 个评论
Image Analyst
2019-1-28
If you did something to the image, like drew things into the overlay above it, then you'll need to use getframe() to get the image "as you see it".
Jan
2019-1-28
What a pity that evolution_LGD does not contain a useful help text, which explains, what the output is. Using getframe has the drawback, that you work with screen resolution. If the processed image is displayed with a scaling, the data are resampled. Therefore it might be more useful to obtain the output of the contour as a matrix with the original dimensions as the image and use it as overlay to join it with the image.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!