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.

3.1. Visión por Computador 23t y p e d e f s t r u c t I p l I m a g e {i n t n S i z e ; / ∗ tamaño <strong>de</strong> l a e s t r u c t u r a i p l I m a g e ∗ /i n t ID ; / ∗ v e r s i ó n <strong>de</strong> l a c a b e c e r a <strong>de</strong> l a imagen ∗ /i n t nChannels ;i n t a l p h a C h a n n e l ;i n t d e p t h ; / ∗ p r o f u n d i d a d <strong>de</strong> l a imagen en p í x e l e s ∗ /char colorMo<strong>de</strong>l [ 4 ] ;char c h a n n e l S e q [ 4 ] ;i n t d a t a O r d e r ;i n t o r i g i n ;i n t a l i g n ; / ∗ a l i n e a m i e n t o <strong>de</strong> 4 o 8 b y t e s ∗ /i n t width ;i n t h e i g h t ;s t r u c t I p l R O I ∗ r o i ; / ∗ p u n t e r o a l a ROI s i e x i s t e ∗ /s t r u c t I p l I m a g e ∗maskROI ; / ∗ p u n t e r o a l a máscara ROI ( s i e x i s t e ) ∗ /void ∗ imageId ; / ∗ uso <strong>de</strong> l a a p l i c a c i ó n ∗ /s t r u c t I p l T i l e I n f o ∗ t i l e I n f o ;i n t imageSize ; / ∗ tamaño ú t i l en b y t e s ∗ /char ∗ imageData ; / ∗ p u n t e r o a l a imagen a l i n e a d a ∗ /i n t w i d t h S t e p ; / ∗ tamaño <strong>de</strong> a l i n e a m i e n t o <strong>de</strong> l i n e a en b y t e s ∗ /i n t Bor<strong>de</strong>rMo<strong>de</strong> [ 4 ] ; / ∗ modo <strong>de</strong> bor<strong>de</strong> ( sup , i n f , drch e i z d a ) ∗ /i n t Bor<strong>de</strong>rConst [ 4 ] ; / ∗ c o n s t e s . p a r a bor<strong>de</strong> sup , i n f , drch e i z d a . ∗ /char ∗ i m a g e D a t a O r i g i n ; / ∗ p u n t e r o a l a imagen s i n a l i n e a r ∗ /} I p l I m a g e ;En la Tabla 3.1 se pue<strong>de</strong> ver los componentes principales que forman esta estructura.Es posible seleccionar algunas partes rectangulares <strong>de</strong> la imagen, lo que se conocecomo regiones <strong>de</strong> interés (ROI). La estructura IplImage contiene el campo roi, que sino es nulo (NULL), apunta a la estructura IplROI, que contiene parámetros <strong>de</strong> la regiónseleccionada.CvArr: Es lo que se <strong>de</strong>nomina un metatype, es <strong>de</strong>cir, un tipo <strong>de</strong> dato ficticio que seutiliza <strong>de</strong> forma genérica a la hora <strong>de</strong> <strong>de</strong>scribir los parámetros <strong>de</strong> las funciones. CvArr*se utiliza para indicar que la función acepta arrays <strong>de</strong> más <strong>de</strong> un tipo.CvMat: Estructura empleada para operar con imágenes. Es una matriz que se caracterizaporque aparte <strong>de</strong> almacenar los elementos como cualquier matriz, ofrece la posibilidad<strong>de</strong> acce<strong>de</strong>r a información adicional que pue<strong>de</strong> resultar <strong>de</strong> gran utilidad.t y p e d e f s t r u c t CvMat {i n t rows ; / ∗ número <strong>de</strong> f i l a s ∗ /

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

Saved successfully!

Ooh no, something went wrong!