Professional Documents
Culture Documents
end
function P_2_NORMALIZACION(imagen)
end
function P_3_GRISES_SIMPLE(imagen)
end
function P_4_GRISES_PONDERADO(imagen)
img=imread(imagen);
imshow(GRISES_P)
end
function P_5_BINARIZACION(imagen)
subplot(2,4,1)
img=imread(imagen);
BIN=img_gris<=100; %binariza la imagen con un umbral que toma pixeles menores que 100
subplot(2,4,2)
img=imread(imagen);
img_gris=rgb2gray(img);
BIN=img_gris<=120;
imshow(BIN)
subplot(2,4,3)
img=imread(imagen);
img_gris=rgb2gray(img);
BIN=img_gris<=140;
imshow(BIN)
subplot(2,4,4)
img=imread(imagen);
img_gris=rgb2gray(img);
BIN=img_gris<=160;
imshow(BIN)
subplot(2,4,5)
img=imread(imagen);
img_gris=rgb2gray(img);
BIN=img_gris<=180;
imshow(BIN)
subplot(2,4,6)
img=imread(imagen);
img_gris=rgb2gray(img);
BIN=img_gris<=200;
imshow(BIN)
subplot(2,4,7)
img=imread(imagen);
img_gris=rgb2gray(img);
BIN=img_gris<=220;
imshow(BIN)
subplot(2,4,8)
img=imread(imagen);
img_gris=rgb2gray(img);
BIN=img_gris<=240;
imshow(BIN)
end
function P_6_COMPARAR_2IMG
end
function P_7_GRISES_FOR(imagen)
img_GRIS_P(f,c,i)=img(f,c,1)*0.2126+img(f,c,2)*0.7152+img(f,c,3)*0.0722;%usando el
metodo de promedio ponderado convierte la imagen a escala de grises
end
end
end
imshow(img_GRIS_P)
end
function P_10_ROTACION(imagen)
end
end
end
imshow(img_rot)
end
function P_11_SEPIA(imagen)
R=[0.393, 0.769, 0.189]; %vector que conviertira los componentes rojo a tono sepia
G=[0.349, 0.686, 0.168]; %vector que conviertira los componentes verde a tono sepia
B=[0.272, 0.534, 0.131]; %vector que conviertira los componentes azul a tono sepia
imshow(SEPIA)
end