Image interpolation with a sample image
31 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying out image interpolation on Matlab, with the following sample image.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166407/image.png)
I'm not exactly sure why my code isn't working.
%Interpolation
figure
imagesc(V);
colormap gray;
axis image;
axis off;
title("Original");
grayImage = rgb2gray(V);
Vn = interp2(grayImage,3);
imagesc(Vn);
title("Modified");
0 Commenti
Risposte (2)
Image Analyst
il 28 Lug 2017
Try using imresize() instead of interp2().
2 Commenti
nika mong
il 28 Mag 2020
Hello, dear ser, I have problems writing code, which method can increase the resolution of a sub-pixel offset image, can you help please
Image Analyst
il 28 Mag 2020
nika, I don't know what that is. To learn MATLAB, try MATLAB Academy - free 2 hour training.
Vipresh Gangwal
il 28 Lug 2017
Modificato: Vipresh Gangwal
il 28 Lug 2017
what do you mean it is not working? Also there seems to be a lot of salt and pepper noise in your image . That might be impacting the interpolation.
There is an example on the interp2 doc page. Try replicating same steps for your data.
https://www.mathworks.com/help/matlab/ref/interp2.html
2 Commenti
Image Analyst
il 31 Lug 2017
cdata is a color image, which is a 3-D image. You can't use interp2() on a color image.
Any reason why you didn't like my solution?
Vedere anche
Categorie
Scopri di più su Red in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!