Download - Imagen e histograma
![Page 1: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/1.jpg)
Transformaciones e Histograma
![Page 2: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/2.jpg)
1 123
M
2 3 N)3,2(g)3,2(f
1 123
M
2 3 N
Transformaciones básicas
La transformación de intensidades puede expresarse por:
)],([),( yxfTyxg = )(rTs =ó
donde:r = Valor del píxel antes del procesamientos = Valor del píxel después del procesamiento T = Operador aplicado sobre r
![Page 3: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/3.jpg)
Transformación umbral
Convierte niveles de gris a blanco y negro
>>BW = im2bw(I,magen, nivel)
>>BW = im2bw(I,magen, 128)
![Page 4: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/4.jpg)
Transformación complemento
rLs −−= )1(
L-1 : Máximo nivel de gris con que se representa la imagen
![Page 5: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/5.jpg)
Complemento
Original Complemento
Original%Complemento
g=imcomplement(f);
![Page 6: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/6.jpg)
Definición del constraste (contrast-stretching)
)],([),( yxfTyxg =
Niveles de gris de entrada (f(x,y))
Niv
eles
de
gris
de
salid
a (g
(x,y
))
e1 e2
s1
s2
12
12
sss
eee
−=∆−=∆
≥+−−
<≤+∆∆
<
=
22
2
21
11
1
),(),(255
255
),(),(
),(),(
),(
eyxfsicyxfe
s
eyxfesibyxfe
s
eyxfsiyxfe
s
yxg
bee
ss +
∆∆= 11
cee
ss +
−−= 2
2
22 255
255
![Page 7: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/7.jpg)
Función imadjust
)],__[],__[,( gammaouthighoutlowinhighinlowfimadjustg =
]1,0[]255,0[uint8
]1,0[]__[],__[
≡⇒∈outhighoutlowinhighinlow
Niveles de gris de entrada (f(x,y))Niv
eles
de
gris
de
salid
a (g
(x,y
))
e1 e2
s1
s2
![Page 8: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/8.jpg)
Complemento con imadjustOriginal Negativo imadjust
Original% Complemento o negativog1=imadjust(f, [0 1], [1 0]);
![Page 9: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/9.jpg)
Corrección de intervalos (I)
>> b=imadjust(a, [0 .2], []);
f(x,y)
g(x,
y)
![Page 10: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/10.jpg)
Corrección de intervalos (II)
f(x,y)
g(x,
y)
>> b=imadjust(a, [0.8 1], []);
![Page 11: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/11.jpg)
Corrección de intervalos (III)
f(x,y)
g(x,
y)
>> b=imadjust(a, [], [0 0.2]);
![Page 12: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/12.jpg)
Corrección de intervalos (IV)
f(x,y)
g(x,
y)
>> b=imadjust(a, [], [0.8 1]);
![Page 13: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/13.jpg)
Definición del contraste
f(x,y)
g(x,
y)
b=imadjust(a, [.4 .6], [0.1 .9]);
![Page 14: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/14.jpg)
Función de transformación por interpolación
x=[0, 121, 141, 161, 255]y=[0, 25, 255/2, 230, 255]modelo = interp1(x,y,'linear','pp');III=uint8(ppval(modelo, double(II)));
f(x,y)
g(x,
y)
![Page 15: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/15.jpg)
Transformación logarítmica
>>II=im2grey(I);; >> III=im2double(II); >> V=2.*log(1+III);>> IV=0.5.*log(1+III);
)),(1log(),( yxfcyxg +=
![Page 16: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/16.jpg)
Transformación gamma
gcrs =
g<1
g=1g>1
>> a=[0.1:0.2:1]>> b=[1:1:5]>> g=[a, b]r=uint8(0:1:255);for i=1:10 d(i,:)=imadjust(r, [0 1], [0 1], g(1,i)); plot(r,d(i,:)); hold onend
![Page 17: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/17.jpg)
Corrección de gamma
)[],[],,( gammafimadjustg =
OscureceAclara
b=imadjust(a, [ ], [ ], 3); b=imadjust(a, [ ], [ ], 0.3);Original
![Page 18: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/18.jpg)
Definición de contraste
Eyxfmyxg
)),(/(1
1),(
+=
r=0:1:255;E=10:10:1000;for i=1:9d(i,:)=255*(1./(1+(128./r).^E(1,i)));plot(r,d(i,:));hold onend
![Page 19: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/19.jpg)
Definición de contraste (II)
Eyxfmyxg
)),(/(1
1),(
+=
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
E=10
E=50E=1000
m=0.5
m=0.5 ≡ L=128(uint8); E=0.8
Original
![Page 20: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/20.jpg)
Definición de contraste utilizando lógica borrosa
Si Píxel es Oscuro Entonces Píxel Resultante es Oscurecer
Desarrollo
![Page 21: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/21.jpg)
Definición de contraste utilizando lógica borrosa (II)
Si Píxel es Oscuro Entonces Píxel Resultante es OscurecerSi Píxel es Claro Entonces Píxel Resultante es AclararSi Píxel es Gris Entonces Píxel Resultante es MantenerSi Píxel es Menos oscuro Entonces Píxel Resultante es OscurecerSi Píxel es Menos claro Entonces Píxel Resultante es Aclarar
)],([),( yxfTyxg =
![Page 22: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/22.jpg)
Definición de contraste utilizando lógica borrosa (III)
for i=1:M for j=1:N% Se aplica sistema borroso a cada píxel IV(i,j)=evalfis(III(i,j),MejoraC);end end
Original
![Page 23: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/23.jpg)
Interpolación de imágenes(I)
Interpolación: Proceso a través del cual se utilizan datos conocidos para estimar valores en otras ubicaciones no conocidas
Ejemplo: x = 0:1:10; y = sin(x); xi = 0:.1:10; ylin = interp1(x,y,xi); % Interpolación lineal ycub = spline(x,y,xi); % Interpolación Splineplot(x,y,'o',xi,ylin,'r',xi,ycub,'g')
![Page 24: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/24.jpg)
Interpolación de imágenes(II)
![Page 25: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/25.jpg)
Interpolación de imágenes(III)
![Page 26: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/26.jpg)
Interpolación de imágenes(IV)
Vecino próximo
Bilineal
Bicúbico
![Page 27: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/27.jpg)
Transformaciones geométricas (I)
Las transformaciones geométricas se aplican en:
I.- Registro o fusión de imágenes que se han tomado en diferentes intervalos de tiempo o diferentes sensores.
II.- Corregir la distorsión de una lente.
III.- Corregir los efectos de la orientación de una cámara.
IV.- Incorporar efectos artísticos en las imágenes.
![Page 28: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/28.jpg)
Transformaciones geométricas (II)
� ©ǡǡǡ
![Page 29: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/29.jpg)
Transformaciones geométricas (III)
Transformación afín
•Preserva la colinealidad : todos los puntos pertenecientes a una línea original, permanecen en esa línea después de la transformación)
•Razón de distancias : El punto medio de una línea permanece como punto medio de la línea después de la transformación
![Page 30: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/30.jpg)
Transformaciones geométricas (IV)
Rotación de una imagen
![Page 31: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/31.jpg)
Transformaciones geométricas (V)
Otras transformaciones
Traslación
Original Empuje horizontal
Empuje vertical
![Page 32: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/32.jpg)
Transformaciones geométricas (VI)
ProgramaI = imread('tabla.jpg'); % Empuje horizontal (cambio en b)a=1; b=.2; c=0; d=0; e=1; f=0;tform = maketform('affine',[a d 0; b e 0; c f 1]);II = imtransform(I,tform);
% Empuje vertical (cambio en d)a=1; b=0; c=0; d=-.2; e=1; f=0;tform = maketform('affine',[a d 0; b e 0; c f 1]);IV = imtransform(I,tform); % Ampliación (cambio en a y e)a=5; b=0; c=0; d=0; e=5; f=0;tform = maketform('affine',[a d 0; b e 0; c f 1]);VII = imtransform(I,tform);
![Page 33: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/33.jpg)
Transformaciones geométricas (VII)
Secuencia de transformaciones afines
![Page 34: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/34.jpg)
Transformaciones geométricas (VIII)
I=imread('edificio.jpg'); II=rgb2gray(I);
% Rotaciónt=45/(2*pi); % ángulo de rotacióna=cos(t); b=-sin(t); c=0; d=sin(t); e=cos(t); f=0;t1=[a d 0; b e 0; c f 1];
% Empuje vertical (cambio en d)a=1; b=0; c=0; d=-.2; e=1; f=0;t2=[a d 0; b e 0; c f 1];
% Ampliación (cambio en a y e)a=5; b=0; c=0; d=0; e=5; f=0;t3=[a d 0; b e 0; c f 1];% Como producto matricialtr=t3*t2*t1;tform = maketform('affine',tr);VI = imtransform(II,tform);figure, imshow(II), figure, imshow(VI)
![Page 35: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/35.jpg)
Transformaciones geométricas (IX)
Transformación geométrica inversa
� � ǡǡǡ
% Obtiene la inversa (imagen original)[x,y] = tforminv(tform, xy90(:,1), xy90(:,2));
% A partir de la imagen original, la rotada[u,v] = tformfwd(tform,x,y);
xy xy90
![Page 36: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/36.jpg)
Transformaciones geométricas (X)
Transformaciones geométrica con Simulink
![Page 37: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/37.jpg)
Registro de las imágenes (I)
Registro de las imágenes: Proceso a través del cual se alinean dos o más imágenes de una misma escena
Pasos fundamentales 1.- Seleccionar puntos de control, significativos de las imágenes base y de entrada.
2.- Obtener la matriz de transformación basado en los puntos de control.
3.- Realizar la transformación espacial.
![Page 38: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/38.jpg)
Registro de las imágenes (II)
Selección de puntos de control (cpselect)
![Page 39: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/39.jpg)
Registro de las imágenes (III)
Selección de puntos de control (cpselect)
% Se crea la matriz de transformacióntform = cp2tform(input_points, base_points, 'projective'); % Se alinea la imagen de entrada[alineada xdata ydata] = imtransform(II45, tform,... 'FillValues', 255);% Se superponen ambas imágenesfigure; imshow(alineada, 'XData', xdata, 'YData', ydata)hold onimshow(II);
![Page 40: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/40.jpg)
Región de interés
>> size(k)ans = 494 600
>> l=k(192:453,166:453);
>> l(49:262, 1:193)=255;
Distancia (píxels)
![Page 41: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/41.jpg)
Otras opciones imtool
Ampliar zonaValor de píxelesAjuste de contraste
![Page 42: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/42.jpg)
Histograma
][ kk rhn =Número de píxelesrk ∈ [0, L-1]
>> imhist(a)
Niveles de gris
kr
kn
![Page 43: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/43.jpg)
Histograma (II)
>> I=imread('fig1.jpg');>> II=rgb2gray(I); >> [nk, rk]=imhist(II);>> bar(rk, nk, 1);
![Page 44: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/44.jpg)
Histograma normalizado
n
rhn kk
][=Número de píxeles rk ∈ [0, L-1]
>> imhist(I)/numel(I)
Niveles de gris
Número total de píxeles
![Page 45: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/45.jpg)
Selección de umbral utilizando el histograma
[0, 1,..,254,255] [0, 255]
),( yxg),( yxf
T
Crestas
ValleT
![Page 46: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/46.jpg)
Selección de umbral utilizando el histograma (II)
Selección visual del umbral
![Page 47: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/47.jpg)
Selección de umbral utilizando histograma (III)
Media entre grupos (Clustering)
y=imhist(II);x=[0:1:255]';datos=[x, y];[U, v, sumd, D]=kmeans(datos,2);plot(datos(:,1),datos(:,2),'*')hold onplot(v(:,1),v(:,2),'rs')
uint8(mean(v(:,1)))99
Método de Otsu
graythresh(II)*255117
![Page 48: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/48.jpg)
Selección de umbral utilizando histograma (IV)
Método de Otsu
Para los k=[0, L-1] niveles de grises, se selecciona la menor
varianza entre clases
![Page 49: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/49.jpg)
Selección de umbral utilizando histograma (V)
Método de Otsu
![Page 50: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/50.jpg)
Selección de umbral utilizando histograma (VI)
Método de Otsu
k=0 k=1 k=2 k=3 k=4 k=5
3.11 1.52 0.55 0.49 0.97 2.242wσ
Menor varianza entre clases
![Page 51: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/51.jpg)
Selección de umbral utilizando histograma (VII)
Otsu Kmedias
![Page 52: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/52.jpg)
Selección de umbral utilizando histograma (VIII)
Otsu KmediasImagen original
![Page 53: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/53.jpg)
Reducción a colores fundamentales
Color Combinación RGB
Negro [0 0 0]
Azul [0 0 1]
Verde [0 1 0]
Cian [0 1 1]
Rojo [1 0 0]
Magenta [1 0 1]
Amarillo [1 1 0]
Blanco [1 1 1]
Selección de umbral de cada matriz RGB
(28)3=16,777,216 23=8
![Page 54: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/54.jpg)
Ecualización del histograma
][ kk rhn = ∑=
=k
jjk n
ns
0
1 k = 0…L-1n = Número total de píxeles
Función de probabilidad de ocurrencia de cada nivel de intensidad
Ecualización o linealización del histograma:b) Se obtiene el histogramac) Calcular nuevos valores de intensidades
g) Reemplazar intensidades
píxeles de No.
intensidaddenivelMáximo
0
×
= ∑
=
k
jjk ns
![Page 55: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/55.jpg)
Ejemplo de ecualización
A = 255 250 255 200 200 250 180 180 150
150
1
255250200180
2
píxeles de No.
intensidaddenivelMáximo
0
×
= ∑
=
k
jjk ns
>>.5* 255/9 14.1667
>> 2*255/9 56.6667
>> A=uint8(A)A = 255 250 255 200 200 197 180 180 150
>> B=histeq(A,256)B = 255 184 255 142 142 99 56 56 14>> 5*255/9
141.6667
k=0…255
![Page 56: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/56.jpg)
Algoritmo de ecualizaciónb=imhist(I);c=b./numel(a);d=cumsum(c);e=d.*255;plot(0:1:255, e);
Función de transformación
I
>> II=histeq(I,256);
II
![Page 57: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/57.jpg)
Histograma ecualizado
I II
![Page 58: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/58.jpg)
Corrección de intervalo vs ecualización
>> I=imread('lincoln.jpg');>> II=rgb2gray(I);>> maximo=max(II(:))189>> minimo=min(II(:)) 13
>> imhist(II)
![Page 59: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/59.jpg)
Corrección de intervalo
% Se extiende rango>> III=imadjust(II,[13/255 189/255],[0 1]);>> maximo=max(III(:)) 255>> minimo=min(III(:)) 0
Corrige intervalo
III
II
![Page 60: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/60.jpg)
Ecualización
>> IV=histeq(II);>> imhist(IV)
II
IV
III
![Page 61: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/61.jpg)
Resultado
EcualizaciónCorrección de
intervalo
![Page 62: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/62.jpg)
Resultado (II)
EcualizaciónCorrección de
intervalo
![Page 63: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/63.jpg)
Uso de imtool (I)
![Page 64: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/64.jpg)
Uso de imtool (II)
![Page 65: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/65.jpg)
Especificación del histograma
Funciones de transformación
Función gausiana
Función campana
Función sigmoide
Función sigmoide invertida
Combinación de funciones
][ kk rhn = ∑=
=k
jjk n
ns
0
1 [ ]kk sTr 1−=
![Page 66: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/66.jpg)
Utilizando función de ecualización
% Programa de ecualización basado en Gauss% Centro de la campanacg=128;% Ancho de la campanaac=50;% Se crea campanaa=exp(-((([1:1:256]-cg)./ac)).^2)';plot(a); % Figura a convertirfigure;b=imread(‘imagen.tif');imshow(b); % Se ecualizac=histeq(b, a);figure;imshow(c)imhist(c)
![Page 67: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/67.jpg)
Ecualización
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000
50 100 150 200 2500
200
400
600
800
1000
1200
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000
![Page 68: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/68.jpg)
Especificación del histograma
50 100 150 200 2500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000
c=histeq(b, a);Combinación de funciones
![Page 69: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/69.jpg)
Especificación del histograma (II)
50 100 150 200 2500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000
![Page 70: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/70.jpg)
Especificación del histograma(III)
50 100 150 200 2500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000
![Page 71: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/71.jpg)
Especificación del histograma(IV)
50 100 150 200 2500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000
![Page 72: Imagen e histograma](https://reader035.vdocuments.pub/reader035/viewer/2022062216/55a243e91a28abe2448b4798/html5/thumbnails/72.jpg)
Especificación del histograma(V)
50 100 150 200 2500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 50 100 150 200 250
0
1000
2000
3000
4000
5000
6000