Downsampling with Imresize (Satellite Imagery)

9 次查看(过去 30 天)
Hi,
I am downsampling my satellite images (.png format) with Imresize bicubic function. I would like to decrease the resolution of my images from 2m to 10m. What should I write to scale? Scale of 2 is 0.50. Should I write 0.20 since my scale factor is 5?
Thanks in advance.

采纳的回答

Vinayak Agrawal
Vinayak Agrawal 2023-6-13
编辑:Vinayak Agrawal 2023-6-15
Hi cemre,
Yes, to downsample your satellite images from 2m to 10m resolution using the `imresize` function in MATLAB, you should set the scale factor to 0.20. This is because the scale factor represents the ratio of the output image size to the input image size, where a scale factor of 0.5 results in an output image that is half the size of the input image.
In your case, you want to reduce the resolution by a factor of 5 (from 2m to 10m), so the scale factor should be 0.2 (1/5). This means that the output image will be 20% the size of the input image, or 5 times smaller in both dimensions.
Here is an example MATLAB code to downsample an image from 2m to 10m resolution using `imresize`:
% Load the original image
origImage = imread('original-image.png');
% Set the desired scale factor to achieve 10m resolution
scaleFactor = 0.2;
% Resize the image using bicubic interpolation
downsampledImage = imresize(origImage, scaleFactor, 'bicubic');
% Save the downsampled image to a new file
imwrite(downsampledImage, 'downsampled-image.png');
This code will load the original image, set the scale factor to 0.2, downsample the image using bicubic interpolation, and save the downsampled image to a new file named "downsampled-image.png".
Hope it helps!
Please accept the answer in the case it is correct so that it can help others as well
  4 个评论
Cemre
Cemre 2023-6-13
编辑:Cemre 2023-6-13
Thanks for your answer. Best regards.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by