1. FACULTAD DE INGENIERA ELECTRONICA Y MECATRONICA
INGENIERIA MECATRONICA
Prof. Ing. José C. Benítez P.
PROCESAMIENTO DE IMÁGENES Y VIVISON ARTIFICIAL(PS02)
Ejercicio 3 del Laboratorio 5
Ejercicio 3: Graficar en 3D los valores de grises de una imagen a color.
>> i=imread('frutas.jpg');
>> imshow(i)
>> g=rgb2gray(i);
>> imshow(g)
>> tam=size(g)
tam =
427 640
>> [x,y]=meshgrid(1:640,1:427);
3. Gráfico de imágenes 3D
Ejercicio: Graficar la función z = 1/(1+x2+y2)
>>[x,y]=meshgrid(1:20,1:30);
>>z=1./(1.+x.^2+y.^2);
>>plot3(x,y,z);
>>surf(x,y,z);