필터 지우기
필터 지우기

Downsampling with Imresize (Satellite Imagery)

조회 수: 9 (최근 30일)
Cemre
Cemre 2023년 6월 13일
댓글: Vinayak Agrawal 2023년 6월 15일
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.
Vinayak Agrawal
Vinayak Agrawal 2023년 6월 15일
Anytime

댓글을 달려면 로그인하십시오.

추가 답변 (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