⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utildoc.tex

📁 图像中非刚性曲线的蛇形检测算法
💻 TEX
字号:
\rhead{GSNAKE API Utilities}

These are some programs that we found ourselves reusing very often. They are not meant to be a complete suite of utilities. However, they are a good place to start if you plan to write any application using GSNAKE API. 

\section{Image Processing utilities} 


\subsection{Image generation: {\tt imggen} }
\subsubsection*{Synopsis}
\begin{verbatim}
imggen -[option]<value>
\end{verbatim}

\subsubsection*{Optional switches}

\tb
	H & Print help screen. \\
	V & Verbose mode.
\te

Contour specifications :

\tb
      C   & Contour type switch \\
	  & Circle : Use a circle contour. Default.\\
	  & Rect : Use a rectangular contour. \\
	  & Manual : Use mouse to generate contour shape. \\
	  & Filename : Use contour file. \\
       Mx & Magnification factor in X dimension. Default is 1.\\
       My & magnification factor in Y dimension. Default is 1.\\
       dx & Displacement in X dimension. Default is 0.\\
       dy & Displacement in Y dimension. Default is 0.\\
       R  & Rotation angle in degrees. Default is 0.\\
      Dx  & Dilation in X dimension. Default is 0.\\
      Dy  & Dilation in Y dimension. Default is 0.\\
       N  & Number of snaxels (for circles and rectangles). Default is 8.\\
       X  & Standard deviation of local deformation. Default is 0.
\te

Image specifications :

\tb
    F     & Output image name. Default is {\tt test}.\\
    r     & Number of image rows. Default is 129.\\
    c     & Number of image columns. Default is 129.\\
    B     & Black pixel value. Default is 50.\\
    W     & White pixel value. Default is 150.\\
    S     & Standard deviation of image gaussian noise. Default is 0.
\te

\subsubsection*{Function}
{\tt imggen} generates images based on a {\tt \_CLOSED} contour. The contour can be read from a given file, generated manually by mouse or automatically by the program itself. The image file generated will be of SUN raster file type.

\subsubsection*{Example}

{\tt imggen -S10 -X0.1} generates an image, {\tt test.rs}, consists of a circle with the standard variation of the image noise set at {\tt 10}, and the standard deviation deformation set at {\tt 0.1}.

\subsection{Image viewing: {\tt imgshow} }
	
\subsubsection*{Synopsis}
\begin{verbatim}
 imgshow <image file1> <image file2> .. -[option]<value>
\end{verbatim}

\subsubsection*{Optional switches}
\tb 
	M  & Magnification factor. \\
	    & Default value is 1.
\te

\subsubsection*{Function}
{\tt imgshow} views images at a specified magnification factor. The file can be of either \_bin or SUN raster type. 

\subsubsection*{Example}
{\tt imgshow rect.rs.*} shows the sequence of images with root name {\tt rect.rs}.


\subsubsection*{Error messages}
\tb  
   	File error   & Cannot read or open an image file. \\
	Memory error & Memory allocation failure due to incorrect file type. 
\te


\subsection{Gaussian pyramid images generation: {\tt imgpyramid}}

\subsubsection*{Synopsis} 
\begin{verbatim}
 imgpyramid <image file> -[option]<value>
\end{verbatim}

\subsubsection*{Switches} 
\tb 	  
      L  & Number of levels of pyramid to be generated. Default 2. \\ 
      M  & Magnification factor. Default 1. \\ 
      Pl,Ph & Percentage range for histogram specification. Default 0.9-0.95.\\
      Vl,Vh & Intensity range for histogram specification. Default 0.2-0.9. \\ 
      E  & Exponential value for transformation function. Default 1. \\
\te

\subsubsection*{Function}

{\tt imgpyramid} displays a pyramid of Gaussian images and edge maps. To increase robustness, we condition edge maps using default histogram specification parameters. Histogram equalization can also be done by setting the percentage range from 0 to 1, and the intensity range from 0 to 1. 

\subsubsection*{Example}

{\tt imgpyramid rect.rs.1} generates image pyramid for the image {\tt rect.rs.1} up to level 2. The gaussian images, edge magnitudes and directions are shown on the screen.

\subsubsection*{Error messages}
\tb
	Memory error & Memory allocation failure.\\ 
	File error & Cannot read or open an image file. \\
\te


\subsection{Image conditioning : {\tt imgcond} }

\subsubsection*{Synopsis}
\begin{verbatim}
 imgcond <file> -[option]<value>
\end{verbatim}

\subsubsection*{Switches} 
\tb 
     M  & Magnification factor. Default 1.  \\
     Pl,Ph & Percentage range for histogram conditioning. Default 0.9-0.95. \\
     Vl,Vh & Intensity range for histogram conditioning. Default 0.2-0.9. \\
     E  & Exponential value for transformation function. Default 1. \\
     O  & Output filename, writes image file of SUN raster type if option 
	  '/' is \\
	& available. Otherwise, write file of \_bin type.
\te

\subsubsection*{Function}  
{\tt imgcond} performs histogram conditioning of image.

\subsubsection*{Example}

{\tt imgcond akina.rs} performs histogram equalization on the image {\tt akina.rs}.

\subsubsection*{Error messages}
\tb
	Memory error & Memory allocation failure.\\ 
	File error & Cannot read or open an image file. \\
\te


\subsection{Image learning : {\tt imglearn} }

\subsubsection*{Synopsis}
\begin{verbatim}
 imglearn <contour> <image samples>
\end{verbatim}

\subsubsection*{Function}  
With sufficient training samples, {\tt imglearn} generate a template with specific prior knowledge of shape matrix and deformation varaince.

\subsubsection*{Example}

{\tt imglearn test.con rect.rs.*} uses the series of images with root {\tt rect.rs} to learn an contour named {\tt test.con}. For the first image, the user will first use the mouse to initialise the snaxel positions. The program will then deform the snaxels to fit the image using minimax regularisation. The users will be asked to confirm or move the final positions of the snaxels using the mouse.

\subsubsection*{Error messages}
\tb
	Memory error & Memory allocation failure.\\ 
	File error & Cannot read or open an image file. \\
\te


\section{GSNAKE utilities}	

\subsection{Template generation : {\tt gsinit} } 

\subsubsection*{Synopsis}
\begin{verbatim}
 gsinit <file> -[option]<value>
\end{verbatim}

\subsubsection*{Switches} 
\begin{tabular}{lll}
   -I  &   & Initialization mode. Default mode is automatic.  \\
       &   & Submodes :  \\
       & d & Drag. Use mouse to drag a contour of desired shape. \\
       & c & Click. Use mouse to click a number of points over the \\
       &   & image. Snaxels will be joined in sequential order. \\
       & a & Automatic. Generate a template based on the image dimension.\\
   -S  &   & Contour mode.\\
       & o & Opened contour.\\
       & c & Closed contour. \\
   -M  &   & Magnification factor. Default 1. \\
   -N  &   & Number of snaxels.  Default 16. \\
   -O  &  & Output file. Default filename <contour>
\end{tabular}

\subsubsection*{Function}
{\tt gsinit} generates a template of desired shape.

\subsubsection*{Error messages}
\tb  
    Unable to read file & File specified is non existent. \\
    Wrong file format   & File specified is not an image file.        
\te
				

\subsection{Contour viewing: {\tt gsshow} }
			 				
\subsubsection*{Synopsis}		
\begin{verbatim}
gsshow <contour file1> <contour file2> .. -[option]<value>
\end{verbatim}		

	 
\subsubsection*{Switches}
\tb 
	M  & Magnification factor. Default value is 1.
\te

\subsubsection*{Function}
{\tt gsshow} views contours at a specified magnification factor. Since the contour shown will be at the center of a window, it is difficult to visualize translation of a contour.

\subsubsection*{Error messages}
\tb  
    Unable to read file & File specified is non existent. \\
    Wrong file format   & File specified is not a contour file.        
\te


\subsection{Contour matching: {\tt gsfit} }
			 				
\subsubsection*{Synopsis}		
\begin{verbatim}
gsfit <image file> <contour file> -[option]<value>
\end{verbatim}		

	 
\subsubsection*{Switches}
\tb 
	L & Level of pyramid to build to, default 2.\\
	M & Magnification factor, default 1.\\
 	E & External energy input type, default e.\\
          & i - Intensity  e - Edge Data.\\
          & m - Edge Magnitude only.\\
	S & Stratified Search spacing.\\
          & s - snaxel spacing, default 5.\\
          & d - search segment spacing, default 2.\\
          & n - number of search segment, default 2.\\
 	R & Regularization parameter, defaut \_LOCAL\_MINMAX.\\
	Pl,Ph & Percentage range for histogram specification, default
		0.9-0.95.\\
	Vl,Vh & Intensity range for histogram specification, default 0.2-0.9.\\
 	e & Exponential Factor, default 1.\\
 	/ & Activate verbose, default 0.
\te

\subsubsection*{Function}
{\tt gsfit} performs the match of a deformable contour with the underlying image.

\subsubsection*{Example}

{\tt gsfit ellip.rs.1 ellip.con}.

\subsubsection*{Error messages}
\tb
	Memory error & Memory allocation failure.\\ 
	File error & Cannot read or open an image file. \\
\te

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -