correccion de imagenes en matlab clase1
%% by luis carlos
load mri;
D(:,:,:,1);
x=ind2gray(D(:,:,:,1),map);
x= mat2gray(x);
correccion = input('1 lineal; 2 gamma ; 3 sigmoidal ');
if ( correccion == 1 )
%%%%% ecuacion lineal
m= input('ingrese valor m ');
b= input('ingrese valor b ');
gx= m*x+b;
end
if ( correccion == 2 )
%%%%% correcion gamma
gamma= input('ingrese valor gamma ');
gx= x.^gamma;
end
if ( correccion == 3 )
%%%%% sigmoidal
gamma= input('ingrese valor gamma ');
beta= input('ingrese valor beta ');
gx= 1./ ( 1 + exp(-gamma*x+beta));
end
subplot(2,1,1), Imshow(x,[]), title('luis carlos');
subplot(2,1,2), Imshow(gx,[]);
load mri;
D(:,:,:,1);
x=ind2gray(D(:,:,:,1),map);
x= mat2gray(x);
correccion = input('1 lineal; 2 gamma ; 3 sigmoidal ');
if ( correccion == 1 )
%%%%% ecuacion lineal
m= input('ingrese valor m ');
b= input('ingrese valor b ');
gx= m*x+b;
end
if ( correccion == 2 )
%%%%% correcion gamma
gamma= input('ingrese valor gamma ');
gx= x.^gamma;
end
if ( correccion == 3 )
%%%%% sigmoidal
gamma= input('ingrese valor gamma ');
beta= input('ingrese valor beta ');
gx= 1./ ( 1 + exp(-gamma*x+beta));
end
subplot(2,1,1), Imshow(x,[]), title('luis carlos');
subplot(2,1,2), Imshow(gx,[]);
correccion de imagenes en matlab clase1
Reviewed by libros google
on
abril 11, 2012
Rating:
funciona a la perfeccion
ResponderEliminar