Match the resolution of images in the x and y directions

1 回表示 (過去 30 日間)
T.K
T.K 2020 年 10 月 30 日
回答済み: drummer 2020 年 10 月 30 日
I want to match the x-direction resolution of input images with different vertical and horizontal resolutions in the y-direction using spline interpolation.
I don't know if it can be communicated in poor English, but I would like to know how to do it.

回答 (1 件)

drummer
drummer 2020 年 10 月 30 日
Do you want to make a square image out of a rectangular image?
An example could help.
If your image is [128, 256]
You can resize it by:
[originalX orignalY] = size(yourImage); % Thinking that this is your rectangular image.
% And as my example, originalX = 128 and originalY = 256.
You can match your dimensions by:
newImage = imresize(yourImage, [256, 256], 'Method', 'bicubic');
You can check other methods with the auto-completion... I remember there're cubic, linear, nearest... I think... not sure.
Let us know if that's what you want... If it is not, provide your purpose with some examples... Would be even better if you show what you have tried so far.
Cheers.

カテゴリ

Help Center および File ExchangeUltrasound Imaging についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by