Está en la página 1de 6

UNIVERSIDAD NACIONAL DE INGIENERÍA

FACULTAD DE INGENIERÍA MECÁNICA

SENSORES Y ACONDICIONAMIENTO DE SEÑALES - (MT247)


SEPTIMO INFORME “PROCESAMIENTO DE IMAGENES”

APELLIDOS Y NOMBRES:

Geronimo Riveros, Gelmer Keyti 20161062B

Gonzales Inca, Johann Gustavo 20161029E

Tello Arroyo, Sergio Leonardo 20164501G

DOCENTE: Freddy Sotelo

FECHA DE ENTREGA:05 – 07 – 19.

2019-1
Objetivos
 Obtener la cantidad de colores que utiliza una imagen.
 Conocer la cantidad de pixeles que contiene cada parte de la acción que usaremos.
 Hacer funciones de los diferentes cambios en la cantidad de imágenes.
 Mantener un conocimiento ordenado de las características de las funciones en una
imagen y como editarla.

IMAGEN ORIGINAL
Colocamos el factor de zoom:

Resultado:
Comprobación de dimensiones:
Rotación:

Código Usado:
clc,clear all,close all
x = imread('descarga.jpg');
whos x;
figure
imshow(x)
title('Imagen Original')
%ZOOM
b = x;
[m,n,colormap]=size(b);
%If RGB Image is given at Input
if colormap==3
x=b(:,:,1);
y=b(:,:,2);
z=b(:,:,3);
end
k=1; %Counter for Row and
l=1; %Column replication
f=input('Factor de Zoom: ');
for i=1:m %Loop for reading row and
for t=1:f %Row replication

for j=1:n %Loop for reading column and


for t=1:f %Column replication
if colormap==3 %If Image is RGB
c1(k,l)= x(i,j);
c2(k,l)= y(i,j);
c3(k,l)= z(i,j);
else %If Image is grayscale
c(k,l)=b(i,j);
end
l=l+1;
end
end
l=1;
k=k+1;

end
end
if colormap==3 %If Image is RGB
c(:,:,1)=c1;
c(:,:,2)=c2;
c(:,:,3)=c3;
end
figure
imshow(c)
title('Zoom')
%ROTAR
angle = input('Ingrese ángulo: ')
r = imrotate(c,angle,'loose', 'bilinear');%LOOSE, SE VE TODA LA FIGURA
SIN RECORTAR..CROP, SE RECORTA
figure
imshow(r)
title('Imagen rotada')

También podría gustarte