Image resolution pixel reduction
显示 更早的评论
I have an image with a width of 875 pixels and height of 656 pixels.
The figure is a plot of a matrix of dimension 70x2048 , I want to reduce the resolution of the image but keep it the same size. So if we take a ratio R = 70/2048 = 0.0342 and if I want to change the 2048 to 512, I want to keep R the same by changing the 70, so instead of having the data over 2048 columns I want it over 512.
I am not familiar with this kind of work, so does anyone knows what I can do?
1 个评论
DGM
2021-4-29
I'm confused by your explanation. If I understand this correctly, you have a 656x875px image that essentially contains a reduced copy of a 70x2048 image, and you want to reduce the resolution of the 70x2048 sub-image without changing the geometry of the 656x875 image. Is that right?
If so, your 70x2048 image already has reduced resolution in order to even fit in the parent image. The reduction factor is unknown, since margins, etc are unknown.
If you just want to reduce the current resolution by a factor of four, why not just do something like:
outpict = imresize(imresize(inpict,0.25),4,'nearest');
That will retain image size and aspect ratio.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!