Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
NearestNeighbour.m
Package: Code.zip [view]
Upload User: gykyjs
Upload Date: 2008-01-13
Package Size: 18k
Code Size: 1k
Category:
Mathimatics-Numerical algorithms
Development Platform:
Matlab
- %Funzione per l'interpolazione Nearest Neighbor di un'immagine.
- %In input prende la matrice dell'immagine, ed il fattore di zoom.
- %In output restituisce la matrice interpolata
- function Interpolata=NearestNeighbour(Interpolata,ImmagineOriginale,Z)
- [NumRighe NumColonne]=size(Interpolata);
- [NumRigheOriginali NumColonneOriginali]=size(ImmagineOriginale);
- RapportoRighe=NumRigheOriginali/NumRighe;
- RapportoColonne=NumColonneOriginali/NumColonne;
- H=waitbar(0,'Interpolazione in corso');
- for y1=1:NumRighe
- y=floor(y1*RapportoRighe);
- if y==0
- y=1;
- end
- for x1=1:NumColonne
- x=floor(x1*RapportoColonne);
- if x==0
- x=1;
- end
- Interpolata(y1,x1)=ImmagineOriginale(y,x);
- end
- waitbar(y1/NumRighe,H);
- end
- close(H);