Matlab

Páginas: 9 (2026 palabras) Publicado: 18 de octubre de 2012
TALLER Nº1

HEIDY LISETH CRUZ RUIZ
LUCIA FERNANDA VILLAMIZAR SIERRA

UNIVERSIDAD PEDAGOGICA Y TECNOLOGICA DE COLOMBIA
FACULTA DE INGENIERIA
ESCUELA DE INGENIERIA AMBIENTAL
GEOMATICA
TUJA 2012
TALLER Nº1

HEIDY LISETH CRUZ RUIZ
LUCIA FERNANDA VILLAMIZAR SIERRA

APLICACIÓN DE FILTROS Y COMANDO PARA IMÁGENES MEDIANTE MATLAB.

Docente: Ing. JAVIER CUERVO

UNIVERSIDAD PEDAGOGICA YTECNOLOGICA DE COLOMBIA
FACULTA DE INGENIERIA
ESCUELA DE INGENIERIA AMBIENTAL
GEOMATICA
TUJA 2012

1. Tenemos las tres imágenes, abrimos im01 como archivo jpg en matlab, aplicamos el filtro quitar ruido con los siguientes comandos:

L=imread('im01.jpg');
>>imshow(L)
Warning: Image is too big to fit on screen; displaying at 42% scale.
> InC:\MATLAB6p1\toolbox\images\images\truesize.m (Resize1) at line 302
In C:\MATLAB6p1\toolbox\images\images\truesize.m at line 40
In C:\MATLAB6p1\toolbox\images\images\imshow.m at line 167
>>figure(1)
>> K=medfilt2(L);
>>figure(2)
>>imshow(K)
> In C:\MATLAB6p1\toolbox\images\images\truesize.m (Resize1) at line 302
In C:\MATLAB6p1\toolbox\images\images\truesize.m at line 40
InC:\MATLAB6p1\toolbox\images\images\imshow.m at line 167
Imagen1: muestra imágenes con y sin ruido
2. Ahora a la segunda imagen obtenida de im01 le creamos el histograma y se le aplica el filtro ecualizar para un mejor contraste:

Ie=histeq(K);
>>figure(3)
>>imshow(Ie)
> In C:\MATLAB6p1\toolbox\images\images\truesize.m (Resize1) at line 302
InC:\MATLAB6p1\toolbox\images\images\truesize.m at line 40
In C:\MATLAB6p1\toolbox\images\images\imshow.m at line 167
>>imhist(K);
>>figure(4)
>>imhist(Ie);

Imagen 2:

Muestra la comparación de la imagen ecualizada
Imagen 3: histogramas, a la izquierda histograma de la imagen si modificaciones del filtro ecualizar, a la derecha histograma de la imagen ecualizada.
3. Luego aplicamos la máscara pasabajospara atenuar el color de la imagen con los siguientes comandos utilizando la máscara M para atenuar el color de la imagen 2 de im01:
M=[1,1,1;1,1,1;1,1,1]/9
M =
0.1111 0.1111 0.1111
0.1111 0.1111 0.1111
0.1111 0.1111 0.1111
>>Kf=filter2(M,K);
Kfi=uint8(Kf);
>>figure()
>>imshow(Kfi);
Imagen4:

El cambio no se nota mucho pero al acercar laimagen se pueden apreciar ciertas zonas un poco mas disminuidas las zonas oscuras.
4. A la imagen de im01 se le aplica el filtro imadjust para resaltar el contorno de la imagen con los siguientes comandos:
J=imadjust(K,[0.3 0.7],[]);
>>figure(6)
>>imshow(J)
Imagen 5:

5. filtro espacial, mascara de filtro promedio ponderado me1=[1 1 1;1 2 1;1 1 1]/10
ME1 =
0.10000.1000 0.1000
0.1000 0.2000 0.1000
0.1000 0.1000 0.1000
LME1=filter2(ME1,LM2);
>>figure(9);
>>imshow(LME1);
Imagen 6:

Como se puede apreciar la máscara aclara demasiado la imagen, por tanto en este caso no funciona.
6. Mascara para acentuar con transiciones horizontales, prewitt
M2=[1 1 1;0 0 0;-1 -1 -1]
M2 =
1 1 1
0 00
-1 -1 -1
L12=filter2(M2,LM2);
>>figure(12);
>>imshow(L12);
Warning: Image is too big to fit on screen; displaying at 31% scale.
> In C:\MATLAB6p1\toolbox\images\images\truesize.m (Resize1) at line 302
In C:\MATLAB6p1\toolbox\images\images\truesize.m at line 40
In C:\MATLAB6p1\toolbox\images\images\imshow.m at line 167
Imagen 7:

7. Con un cambio deltipo de imagen a uint8:
>> L12i=uint8(L12);
>>imshow(L12i);
Warning: Image is too big to fit on screen; displaying at 31% scale.
> In C:\MATLAB6p1\toolbox\images\images\truesize.m (Resize1) at line 302
In C:\MATLAB6p1\toolbox\images\images\truesize.m at line 40
In C:\MATLAB6p1\toolbox\images\images\imshow.m at line 167
>> LME2i=uint8(LM2);
>>figure(13)...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • matlab
  • Matlab
  • Matlab
  • matlab
  • MATLAB
  • MATLAB
  • Matlab
  • Matlab

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS