필터 지우기
필터 지우기

scale two images without imresize

조회 수: 2 (최근 30일)
tala
tala 2017년 6월 16일
댓글: tala 2017년 6월 16일
hello i have two images and i want to scale them to each other. when i use imresize, the interior elements are degraded and skew which makes the image wrong. i mean i want to resize one image to match to another image without degradation of the relation between interior parts. thanks a lot here are my to images ( one of them is a segmentation part of the other)

채택된 답변

KSSV
KSSV 2017년 6월 16일
How about padding zeros to the image to make size equal? Check the below approach.
I1 = imread('4-chamber view5 croped.jpg') ;
I2 = imread('echo from water 2.jpg') ;
D = round((size(I2)-size(I1))/2) ;
I1_1 = padarray(I1,D(1:2),'both');
imshow(I1_1)
%%Remove one extra row and column
I1_1(1,:,:) = [] ;
I1_1(:,1,:) = [] ;
  댓글 수: 1
tala
tala 2017년 6월 16일
thanks a million sir, it worked :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by