How to perform Cubic interpolation on images?

조회 수: 5 (최근 30일)
Yazan Awwad
Yazan Awwad 2013년 11월 26일
편집: Walter Roberson 2018년 3월 28일
Hi , I have a series of 180 images, I want to apply cubic interpolation on them. How can I do that? Thank you

답변 (2개)

Matt J
Matt J 2013년 11월 26일
편집: Matt J 2013년 11월 26일
F=griddedInterpolant(...,'cubic');
interpolatedData=F(...);
  댓글 수: 1
Yazan Awwad
Yazan Awwad 2013년 11월 26일
편집: Yazan Awwad 2013년 11월 26일
Can you please give me more details. For examples, if one of the images is : A=imread('Translated frame_120 with respect to frame_1.png'); the size of A is 448 by 901. How can I apply the function u mentioned on these data. Thank you

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


Image Analyst
Image Analyst 2013년 11월 26일
Can't you simply use imresize()?
  댓글 수: 6
ANKUSH JAMTHIKAR
ANKUSH JAMTHIKAR 2018년 3월 28일
Hey, Can anyone suggest how can I interpolate image using cubic spline interpolation (For any general images)?
Walter Roberson
Walter Roberson 2018년 3월 28일
편집: Walter Roberson 2018년 3월 28일
scale = 1/10;
r = size(YourImage,1);
c = size(YourImage,2);
[R, C] = ndgrid(1:r, 1:c);
newrv = linspace(1, r, floor(r*scale));
newcv = linspace(1, c, floor(r*scale));
[NewR, NewC] = ndgrid(newrv, newcv);
for channel = size(YourImage,3) : -1 : 1
  newImage(:,:,channel) = interp2(R, C, YourImage(:,:,channel), NewR, NewC, 'spline');
end
newImage = cast(newImage, class(YourImage));
imshow(newImage)

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by