How to perform Cubic interpolation on images?
4 次查看(过去 30 天)
显示 更早的评论
Hi , I have a series of 180 images, I want to apply cubic interpolation on them. How can I do that? Thank you
0 个评论
回答(2 个)
Image Analyst
2013-11-26
Can't you simply use imresize()?
6 个评论
ANKUSH JAMTHIKAR
2018-3-28
Hey, Can anyone suggest how can I interpolate image using cubic spline interpolation (For any general images)?
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)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!