www.pudn.com > gsnake.rar > manual.toc
\protect \contentsline {chapter}{\protect \numberline {1}Introduction}{8}
\protect \contentsline {section}{\protect \numberline {1.1}About this manual}{8}
\protect \contentsline {section}{\protect \numberline {1.2}How to Avoid Reading this Manual}{8}
\protect \contentsline {section}{\protect \numberline {1.3}Design of the GSNAKE API}{8}
\protect \contentsline {section}{\protect \numberline {1.4}Class Design and Implementation}{9}
\protect \contentsline {chapter}{\protect \numberline {2}Class Library Reference}{11}
\protect \contentsline {section}{\protect \numberline {2.1}IMAGE : The raw image object}{11}
\protect \contentsline {subsection}{\protect \numberline {2.1.1}IMAGE Constructor}{11}
\protect \contentsline {subsection}{\protect \numberline {2.1.2}IMAGE Destructor}{11}
\protect \contentsline {subsection}{\protect \numberline {2.1.3}Resetting an IMAGE}{12}
\protect \contentsline {subsection}{\protect \numberline {2.1.4}Initializing image matrix}{12}
\protect \contentsline {subsection}{\protect \numberline {2.1.5}Initializing Gaussian template}{12}
\protect \contentsline {subsection}{\protect \numberline {2.1.6}Putting data into image matrix}{13}
\protect \contentsline {subsection}{\protect \numberline {2.1.7}Getting data from image matrix}{13}
\protect \contentsline {subsection}{\protect \numberline {2.1.8}Getting IMAGE row and col}{14}
\protect \contentsline {subsection}{\protect \numberline {2.1.9}Printing image data}{14}
\protect \contentsline {subsection}{\protect \numberline {2.1.10}Displaying image}{14}
\protect \contentsline {subsection}{\protect \numberline {2.1.11}Reading image data from file}{15}
\protect \contentsline {subsection}{\protect \numberline {2.1.12}Writing image data to file}{16}
\protect \contentsline {subsection}{\protect \numberline {2.1.13}Histogram conditioning of image}{16}
\protect \contentsline {subsection}{\protect \numberline {2.1.14}Image correlation}{17}
\protect \contentsline {subsection}{\protect \numberline {2.1.15}X window image generation}{18}
\protect \contentsline {subsection}{\protect \numberline {2.1.16}Cutting an image segment}{18}
\protect \contentsline {subsection}{\protect \numberline {2.1.17}Copying an image}{18}
\protect \contentsline {subsection}{\protect \numberline {2.1.18}Filling of an area of image}{19}
\protect \contentsline {subsection}{\protect \numberline {2.1.19}Example : Reading, writing and correlation of images}{19}
\protect \contentsline {subsection}{\protect \numberline {2.1.20}Example : Histogram specification of an image}{21}
\protect \contentsline {subsection}{\protect \numberline {2.1.21}Example : Cutting and copying of image segments}{21}
\protect \contentsline {section}{\protect \numberline {2.2}EDGE : Edge Gradient}{22}
\protect \contentsline {subsection}{\protect \numberline {2.2.1}EDGE constructor}{23}
\protect \contentsline {subsection}{\protect \numberline {2.2.2}EDGE destructor}{23}
\protect \contentsline {subsection}{\protect \numberline {2.2.3}Resetting an {\protect \tt EDGE} object}{23}
\protect \contentsline {subsection}{\protect \numberline {2.2.4}Retrieving magnitude and angle of an edge point}{24}
\protect \contentsline {subsection}{\protect \numberline {2.2.5}Storing magnitude and angle of an edge point}{24}
\protect \contentsline {subsection}{\protect \numberline {2.2.6}Displaying edge map}{25}
\protect \contentsline {subsection}{\protect \numberline {2.2.7}Calculating the edge map}{25}
\protect \contentsline {subsection}{\protect \numberline {2.2.8}Getting row and column of {\protect \tt EDGE}}{26}
\protect \contentsline {subsection}{\protect \numberline {2.2.9}Example : Edge computation}{26}
\protect \contentsline {section}{\protect \numberline {2.3}PYRAMID : Pyramid of Images}{27}
\protect \contentsline {subsection}{\protect \numberline {2.3.1}PYRAMID Constructor}{28}
\protect \contentsline {subsection}{\protect \numberline {2.3.2}PYRAMID Destructor}{28}
\protect \contentsline {subsection}{\protect \numberline {2.3.3}Resetting PYRAMID object}{28}
\protect \contentsline {subsection}{\protect \numberline {2.3.4}Generating pyramid images}{29}
\protect \contentsline {subsection}{\protect \numberline {2.3.5}Accessing edge map}{29}
\protect \contentsline {subsection}{\protect \numberline {2.3.6}Accessing Gaussian image}{30}
\protect \contentsline {subsection}{\protect \numberline {2.3.7}Getting pyramid level}{30}
\protect \contentsline {subsection}{\protect \numberline {2.3.8}Print Gaussian pyramid data}{31}
\protect \contentsline {subsection}{\protect \numberline {2.3.9}Displaying the pyramid of images}{31}
\protect \contentsline {subsection}{\protect \numberline {2.3.10}Duplicating a pyramid}{31}
\protect \contentsline {subsection}{\protect \numberline {2.3.11}Putting root image into PYRAMID}{32}
\protect \contentsline {subsection}{\protect \numberline {2.3.12}Example:Building of pyramid from image}{32}
\protect \contentsline {subsection}{\protect \numberline {2.3.13}Example:Accessing a particular level image}{33}
\protect \contentsline {section}{\protect \numberline {2.4}MATRIX : Simple matrix calculation}{34}
\protect \contentsline {subsection}{\protect \numberline {2.4.1}Print matrix data}{34}
\protect \contentsline {subsection}{\protect \numberline {2.4.2}Initializing matrix}{35}
\protect \contentsline {subsection}{\protect \numberline {2.4.3}Matrix transpose}{35}
\protect \contentsline {subsection}{\protect \numberline {2.4.4}Matrix addition}{36}
\protect \contentsline {subsection}{\protect \numberline {2.4.5}Matrix substraction}{36}
\protect \contentsline {subsection}{\protect \numberline {2.4.6}Matrix multiplication}{37}
\protect \contentsline {subsection}{\protect \numberline {2.4.7}Swapping rows of matrix}{37}
\protect \contentsline {subsection}{\protect \numberline {2.4.8}Matrix inversion}{38}
\protect \contentsline {section}{\protect \numberline {2.5}SNAXEL : The contour model unit}{38}
\protect \contentsline {subsection}{\protect \numberline {2.5.1}Computing mean position}{38}
\protect \contentsline {subsection}{\protect \numberline {2.5.2}Computing tangent vector}{39}
\protect \contentsline {subsection}{\protect \numberline {2.5.3}Computing normal vector}{40}
\protect \contentsline {subsection}{\protect \numberline {2.5.4}Calculating the {\protect \tt SNAXEL} angle}{40}
\protect \contentsline {subsection}{\protect \numberline {2.5.5}Showing snaxel}{41}
\protect \contentsline {subsection}{\protect \numberline {2.5.6}Interface row and column information}{41}
\protect \contentsline {subsection}{\protect \numberline {2.5.7}Interface snaxel energy information}{42}
\protect \contentsline {subsection}{\protect \numberline {2.5.8}Interface parameter information}{42}
\protect \contentsline {subsection}{\protect \numberline {2.5.9}Interface pointers to neighbouring snaxels}{43}
\protect \contentsline {subsection}{\protect \numberline {2.5.10}Example : Using mean position to calculate Internal energy}{44}
\protect \contentsline {subsection}{\protect \numberline {2.5.11}Example : Verifying vector calculations}{45}
\protect \contentsline {section}{\protect \numberline {2.6}CONTOUR : A deformable template object}{46}
\protect \contentsline {subsection}{\protect \numberline {2.6.1}{\protect \tt CONTOUR} constructor}{47}
\protect \contentsline {subsection}{\protect \numberline {2.6.2}{\protect \tt CONTOUR} destructor}{47}
\protect \contentsline {subsection}{\protect \numberline {2.6.3}Resetting a {\protect \tt CONTOUR} }{47}
\protect \contentsline {subsection}{\protect \numberline {2.6.4}Automatic initialization of closed contour}{47}
\protect \contentsline {subsection}{\protect \numberline {2.6.5}Automatic initialization of open contour}{48}
\protect \contentsline {subsection}{\protect \numberline {2.6.6}Manual initialization of a contour }{49}
\protect \contentsline {subsection}{\protect \numberline {2.6.7}File interface methods}{49}
\protect \contentsline {subsection}{\protect \numberline {2.6.8}Learning shape matrix}{50}
\protect \contentsline {subsection}{\protect \numberline {2.6.9}Computing normalizing constant for classification purpose}{50}
\protect \contentsline {subsection}{\protect \numberline {2.6.10}Computing the average vector distance l(U) between snaxels}{51}
\protect \contentsline {subsection}{\protect \numberline {2.6.11}Regenerating shape matrix}{51}
\protect \contentsline {subsection}{\protect \numberline {2.6.12}Conversion of Coordinates}{52}
\protect \contentsline {subsection}{\protect \numberline {2.6.13}Calculating the internal energy of an individual snaxel}{52}
\protect \contentsline {subsection}{\protect \numberline {2.6.14}Affine transformations of contour}{52}
\protect \contentsline {subsection}{\protect \numberline {2.6.15}Computing the centre of gravity of contour}{53}
\protect \contentsline {subsection}{\protect \numberline {2.6.16}Duplicating a contour}{53}
\protect \contentsline {subsection}{\protect \numberline {2.6.17}Retrieving and accessing of a contour content}{54}
\protect \contentsline {subsection}{\protect \numberline {2.6.18}Displaying contour shape}{55}
\protect \contentsline {subsection}{\protect \numberline {2.6.19}Showing a contour on another image}{55}
\protect \contentsline {subsection}{\protect \numberline {2.6.20}Example : Initialization of contours }{55}
\protect \contentsline {subsection}{\protect \numberline {2.6.21}Example : Affine transformations of contour}{56}
\protect \contentsline {subsection}{\protect \numberline {2.6.22}Example : Coordinate conversion of contour}{58}
\protect \contentsline {subsection}{\protect \numberline {2.6.23}Example : Duplication of contour}{59}
\protect \contentsline {section}{\protect \numberline {2.7}GHOUGH : Generalised Hough Transform Object}{60}
\protect \contentsline {subsection}{\protect \numberline {2.7.1}GHOUGH constructor}{61}
\protect \contentsline {subsection}{\protect \numberline {2.7.2}GHOUGH destructor}{62}
\protect \contentsline {subsection}{\protect \numberline {2.7.3}Resetting GHOUGH object}{62}
\protect \contentsline {subsection}{\protect \numberline {2.7.4}Finding one contour}{62}
\protect \contentsline {subsection}{\protect \numberline {2.7.5}Finding multiple contours}{63}
\protect \contentsline {subsection}{\protect \numberline {2.7.6}Example : Localization of a contour}{63}
\protect \contentsline {subsection}{\protect \numberline {2.7.7}Example : Localization of multiple contours}{64}
\protect \contentsline {section}{\protect \numberline {2.8}GSNAKE : Generalized Active Contour Model}{66}
\protect \contentsline {subsection}{\protect \numberline {2.8.1}GSNAKE constructor}{67}
\protect \contentsline {subsection}{\protect \numberline {2.8.2}GSNAKE destructor}{68}
\protect \contentsline {subsection}{\protect \numberline {2.8.3}GSNAKE destructor}{68}
\protect \contentsline {subsection}{\protect \numberline {2.8.4}Generating pyramid images}{68}
\protect \contentsline {subsection}{\protect \numberline {2.8.5}Localization of contour}{69}
\protect \contentsline {subsection}{\protect \numberline {2.8.6}Fine localization of GSNAKE template}{69}
\protect \contentsline {subsection}{\protect \numberline {2.8.7}Minimization of GSNAKE}{70}
\protect \contentsline {subsection}{\protect \numberline {2.8.8}Marginalizing gsnake to get probablity}{71}
\protect \contentsline {subsection}{\protect \numberline {2.8.9}Calculating total energy of a gsnake}{71}
\protect \contentsline {subsection}{\protect \numberline {2.8.10}Calculating total energy of a snaxel}{72}
\protect \contentsline {subsection}{\protect \numberline {2.8.11}Calculating internal energy of a snaxel}{72}
\protect \contentsline {subsection}{\protect \numberline {2.8.12}Caluclating Internal energy at snaxel co-ordinates}{72}
\protect \contentsline {subsection}{\protect \numberline {2.8.13}Calculating external energy of a snaxel}{73}
\protect \contentsline {subsection}{\protect \numberline {2.8.14}Showing GSNAKE}{73}
\protect \contentsline {subsection}{\protect \numberline {2.8.15}Displaying gsnake and image}{73}
\protect \contentsline {subsection}{\protect \numberline {2.8.16}Manual deformation of a contour}{74}
\protect \contentsline {subsection}{\protect \numberline {2.8.17}Duplicating a GSNAKE}{74}
\protect \contentsline {subsection}{\protect \numberline {2.8.18}Getting external energy input type}{75}
\protect \contentsline {subsection}{\protect \numberline {2.8.19}Getting and writing the regularization parameter}{75}
\protect \contentsline {subsection}{\protect \numberline {2.8.20}Retrieving internal and external energy}{76}
\protect \contentsline {subsection}{\protect \numberline {2.8.21}Example : Localization and minimization of GSNAKE }{76}
\protect \contentsline {subsection}{\protect \numberline {2.8.22}Example : Energy calculation I}{77}
\protect \contentsline {subsection}{\protect \numberline {2.8.23}Example : Energy calculation II}{79}
\protect \contentsline {section}{\protect \numberline {2.9}MODEL : Shape Learning Class}{80}
\protect \contentsline {subsection}{\protect \numberline {2.9.1}MODEL constructor}{81}
\protect \contentsline {subsection}{\protect \numberline {2.9.2}Learning shape matrix}{81}
\protect \contentsline {subsection}{\protect \numberline {2.9.3}Learning local deformation variances}{81}
\protect \contentsline {subsection}{\protect \numberline {2.9.4}Accessing the trained model}{82}
\protect \contentsline {subsection}{\protect \numberline {2.9.5}Example : Learning of shape matrix from different samples}{82}
\protect \contentsline {section}{\protect \numberline {2.10}CLASSIFY : Contour Classification}{84}
\protect \contentsline {subsection}{\protect \numberline {2.10.1}CLASSIFY constructor}{85}
\protect \contentsline {subsection}{\protect \numberline {2.10.2}CLASSIFY destructor}{85}
\protect \contentsline {subsection}{\protect \numberline {2.10.3}Loading a template into CLASSIFY}{85}
\protect \contentsline {subsection}{\protect \numberline {2.10.4}Classifying templates}{86}
\protect \contentsline {subsection}{\protect \numberline {2.10.5}Selecting the best matching contour}{86}
\protect \contentsline {subsection}{\protect \numberline {2.10.6}Getting the number of templates read}{87}
\protect \contentsline {subsection}{\protect \numberline {2.10.7}Getting the matching score}{87}
\protect \contentsline {subsection}{\protect \numberline {2.10.8}Printing templates score}{88}
\protect \contentsline {subsection}{\protect \numberline {2.10.9}Getting label of template}{88}
\protect \contentsline {subsection}{\protect \numberline {2.10.10}Example : Classifying various templates}{88}
\protect \contentsline {chapter}{\protect \numberline {3}GSNAKE API Command Line Utilities}{90}
\protect \contentsline {section}{\protect \numberline {3.1}Image Processing utilities}{90}
\protect \contentsline {subsection}{\protect \numberline {3.1.1}Image generation: {\protect \tt imggen} }{90}
\protect \contentsline {subsection}{\protect \numberline {3.1.2}Image viewing: {\protect \tt imgshow} }{91}
\protect \contentsline {subsection}{\protect \numberline {3.1.3}Gaussian pyramid images generation: {\protect \tt imgpyramid}}{92}
\protect \contentsline {subsection}{\protect \numberline {3.1.4}Image conditioning : {\protect \tt imgcond} }{92}
\protect \contentsline {subsection}{\protect \numberline {3.1.5}Image learning : {\protect \tt imglearn} }{93}
\protect \contentsline {section}{\protect \numberline {3.2}GSNAKE utilities}{94}
\protect \contentsline {subsection}{\protect \numberline {3.2.1}Template generation : {\protect \tt gsinit} }{94}
\protect \contentsline {subsection}{\protect \numberline {3.2.2}Contour viewing: {\protect \tt gsshow} }{94}
\protect \contentsline {subsection}{\protect \numberline {3.2.3}Contour matching: {\protect \tt gsfit} }{95}