11.07.2015 Views

Download document (10.35 MB) - Escuela Superior de Informática ...

Download document (10.35 MB) - Escuela Superior de Informática ...

Download document (10.35 MB) - Escuela Superior de Informática ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

24 Capítulo 3. Antece<strong>de</strong>ntes, Estado <strong>de</strong> la Cuestión}CvMati n t c o l s ; / ∗ número <strong>de</strong> columnas ∗ /CvMatType t y p e ; / ∗ t i p o <strong>de</strong> m a t r i z ∗ /i n t s t e p ; / ∗ no se u t i l i z a ∗ /union {f l o a t ∗ f l ; / ∗ p u n t e r o a l o s d a t o s <strong>de</strong> t i p o f l o a t ∗ /double ∗ db ; / ∗ p u n t e r o a d a t o s <strong>de</strong> d o b l e p r e c i s i ó n ∗ /} d a t a ;OpenCV: IplImageComponentewidhtStepnChannels*imageDatawidht,height<strong>de</strong>pthDescripciónnúmero <strong>de</strong> bytes entre puntos <strong>de</strong> la misma columna y filas sucesivasindica el número <strong>de</strong> canales <strong>de</strong> color <strong>de</strong> la imagenpuntero a la primera columna <strong>de</strong> los datos <strong>de</strong> la imagenanchura y altura <strong>de</strong> la imagen en píxelesinformación sobre el tipo <strong>de</strong> valor <strong>de</strong> los píxelesLos posibles valores <strong>de</strong>l campo <strong>de</strong>pth son los siguientes:- IPL DEPTH 8U: Enteros sin signo <strong>de</strong> 8 bits (unsigned char)- IPL DEPTH 8S: Enteros con signo <strong>de</strong> 8 bits (signed char o char)- IPL DEPTH 16S: Enteros <strong>de</strong> 16 bits con signo (short int)- IPL DEPTH 32S: Enteros con signo <strong>de</strong> 32 bits (int)- IPL DEPTH 32F: Punto flotante con precisión simple <strong>de</strong> 32 bits (float)Tabla 3.1: Descripción <strong>de</strong> los componentes principales <strong>de</strong> IplImage.En todo programa implementado con OpenCV, este tipo <strong>de</strong> datos siempre irá asociadocon la función cvCreateMat que permitirá configurar la estructura matricial <strong>de</strong> maneramuy sencilla. Esta función se encarga <strong>de</strong> crear el encabezado <strong>de</strong> la imagen y <strong>de</strong> ubicarsus datos. Su estructura es:CvMat∗ cvCreateMat ( i n t rows , i n t c o l s , i n t t y p e ) ;rows : número <strong>de</strong> f i l a s <strong>de</strong> l a m a t r i zc o l s : número <strong>de</strong> columnas <strong>de</strong> l a m a t r i zt y p e : t i p o <strong>de</strong> l o s e l e m e n t o s <strong>de</strong> l a s m a t r i c e s .Se e s p e c i f i c a <strong>de</strong> l a forma :CV (S |U| F )C.Siendo :

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!