亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? snaxel.tex

?? 圖像中非剛性曲線的蛇形檢測算法
?? TEX
字號:
\rhead{Class SNAXEL}

\section{SNAXEL : The contour model unit} 

{\tt SNAXEL} is a class for calculating tangent and normal vectors, internal, external and total energies of a snaxel. A series of SNAXEL objects can form a complete contour. It is defined as below :

\begin{verbatim}
class SNAXEL {

    protected :
        double row, col ;       /* snaxel coordinate */
        double alpha, beta ;    /* shape coefficients */
        double lambda ;         /* local regularization parameters */
        double Eint, Eext ;     /* internal/external energy */
        double Esnaxel;         /* snaxel energy */
        SNAXEL *next;           /* next snaxel */
        SNAXEL *prev;           /* previous snaxel */
};
\end{verbatim}

Each SNAXEL object is internally connected with its two neighbouring snaxels so as to form a complete chain of contour. Besides, it consists of shape coefficients and local regularization parameter for the ease of energy calculation.

%
\subsection{Computing mean position}

\subsubsection*{Synopsis}
\begin{verbatim}
void meanPosition( SNAKEMODE mode, double cg_row,
                   double cg_col, SNAXEL *head, SNAXEL *tail, 
                   double *meanrow, double *meancol )	
\end{verbatim}

\subsubsection*{Arguments} 
\tb
	{\tt mode} & Snake mode of a contour - open or closed. \\
	{\tt cg\_row, cg\_col} & Coordinate of the centre of gravity of
			         a contour.\\
	{\tt avglen} & Average length of snaxels. \\ 
	{\tt head} & Pointer to the head of a contour. \\
	{\tt tail} & Pointer to the tail of a contour. \\	
	{\tt meanrow, meancol} &  Coordinate of the mean position.
\te

\subsubsection*{Description}
{\tt meanposition} calculates the mean position of snaxels and stores the coordinates in the locations pointed to by {\tt meanrow} and {\tt meancol}. The mean position can be referred to as the position of zero internal energy and calulated as following :
\eq
	\alpha_{i} u_{i_{\alpha}} + \beta_{i} u_{i_{\beta}}
\en
where $u_{i_{\alpha}}$ and $u_{i_{\beta}}$ are the neighbouring snaxels in the contour-centered coordinate formed. $\alpha_{i}$ and $\beta_{i}$ are the shape coefficients.


%
\subsection{Computing tangent vector}

\subsubsection*{Synopsis}
\begin{verbatim}
void    getDirectionVec( SNAKEMODE mode,
                         SNAXEL *head, SNAXEL *tail, 
                         double *Uv0_x, double *Uv0_y,
                         double *Uv1_x, double *Uv1_y)
\end{verbatim}

\subsubsection*{Arguments}
\tb		
	{\tt mode } & Snake mode of a contour - open or closed.  \\
	{\tt head} & Pointer to the head of a contour. \\
	{\tt tail} & Pointer to the tail of a contour. \\	
	{\tt Uv0\_x, Uv0\_y} & Unit vector of neighbouring snaxel (alpha).\\ 
	{\tt Uv1\_x, Uv1\_y} & Unit vector of neighbouring snaxel (beta).
\te

\subsubsection*{Description}
{\tt getDirectionVec} calculates two unit vectors $uv0=(uv0\_x, uv0\_y)$ and $uv1=(uv1\_x, uv1\_y)$, which can be used to compute the tangent vector. The tangent vector, ${\bf t}_{i}$, is given as follows :
\eq
	{\bf t}_{i} = \frac{u_{i} - u_{i-1}}{\|u_{i} - u_{i-1}\|} +
		\frac{u_{i+1} - u_{i}}{\|u_{i+1} - u_{i}\|}
\en
where $u$ is the snaxel in contour-centered coordinate formed, $\frac{u_{i} - u_{i-1}}{\|u_{i} - u_{i-1}\|}$ is $uv0$ and $\frac{u_{i+1} - u_{i}}{\|u_{i+1} - u_{i}\|}$ is $uv1$.

%	
\subsection{Computing normal vector}

\subsubsection*{Synopsis}
\begin{verbatim}
void    getNormalVec( SNAKEMODE mode,
                      SNAXEL *head, SNAXEL *tail,
                      double *nv_x, double *nv_y )
\end{verbatim}

\subsubsection*{Arguments}
\tb
	{\tt mode} & Snake mode of a contour - open or closed. \\ 
	{\tt head} & Pointer to the head of a contour. \\
	{\tt tail} & Pointer to the tail of a contour.\\
	{\tt nv\_x, nv\_y} & Coordinate of normal vector. \\
\te

\subsubsection*{Description}
{\tt getNormalVec} calculates the unit vector which is normal to the tangent vector of snaxel and stores the result in the locations pointed to by {\tt nv\_x} and {\tt nv\_y}.


%
\subsection{Calculating the {\tt SNAXEL} angle}

\subsubsection*{Synopsis}
\begin{verbatim}
	double	getNormalAng( SNAKEMODE mode, SNAXEL *head, SNAXEL *tail)
\end{verbatim}

\subsubsection*{Arguments}
\tb
	{\tt mode} & Snake mode of a contour - open or closed. \\ 
	{\tt head} & Pointer to the head of a contour. \\
	{\tt tail} & Pointer to the tail of a contour.	
\te

\subsubsection*{Returns}
Angle of snaxel in radians.

\subsubsection*{Description}
{\tt getNormalAng} computes the angle which is normal to the tangent vector of a snaxel.


%
\subsection{Showing snaxel}

\subsubsection*{Synopsis}
\begin{verbatim}
void show( IMAGE *img, short Old_Row, short Old_Col, 
           int pt_Xoffset = 0, int pt_Yoffset = 0 ) 
\end{verbatim}

\subsubsection*{Arguments}
\tb
	{\tt *img} & Background image on which the SNAKEL is to be shown. \\
	{\tt Old\_Col, Old\_Row} & Coordinate of a snaxel before deformation. \\
	{\tt pt\_Xoffset, pt\_Yoffset} & Offset position of a snaxel. \\
\te

\subsubsection*{Description}
{\tt show} displays a snaxel on top of the background image. This is done by resetting the dot at [{\tt Old\_col, Old\_Row}] to the background image data, and then placing a dot at the current snaxel position. The offset position need to be specified if the background image occupies only certain portion of an X window. The user should ensure that the background image have been displayed before calling {\tt show}.

%
\subsection{Interface row and column information}

\subsubsection*{Synopsis}
\begin{verbatim}
	double getRow(void) 
	double getCol(void)
	void putRow(double _row)
	void putCol(double _col) 
\end{verbatim}

\subsubsection*{Returns}
Snaxel coordinate.

\subsubsection*{Description}
These methods facilitate the retrieval and accessing of snaxel co-ordinate.


%
\subsection{Interface snaxel energy information}

\subsubsection*{Synopsis}
\begin{verbatim}
	double  getEint(void)
	double  getEext(void)
	double  getEsnaxel(void)
	void  putEsnaxel( double _Esnaxel )
	void  putEint( double _Eint )
	void  putEext( double _Eext ) 
\end{verbatim}

\subsubsection*{Returns}
Internal, external or total snaxel energy.

\subsubsection*{Description}
These methods facilitate the retrieval and accessing of snaxel energy information.


%
\subsection{Interface parameter information}

\subsubsection*{Synopsis}
\begin{verbatim}
	double  getAlpha(void)
	double  getBeta(void) 
	double  getLambda(void)
	void  putAlpha( double _alpha )
	void  putBeta( double _beta )
	void  putLambda( double _lambda )
\end{verbatim}

\subsubsection*{Returns}
Alpha ($\alpha$), beta ($\beta$) or lambda ($\lambda$).

\subsubsection*{Description}
These methods facilitate the retrieval and accessing of snaxel parameters.


%
\subsection{Interface pointers to neighbouring snaxels}

\subsubsection*{Synopsis}
\begin{verbatim}		
	SNAXEL	*getNext(void) 
	SNAXEL	*getPrev(void) 
	SNAXEL	*getNext(SNAKEMODE mode, SNAXEL *head)
	SNAXEL	*getPrev(SNAKEMODE mode, SNAXEL *tail)
	void  putPrev( SNAXEL *_prev ) 
	void  putNext( SNAXEL *_next )	 

\end{verbatim}

\subsubsection*{Arguments}
\tb
	{\tt mode} & Snake mode of a contour - opened or closed. \\
	{\tt head} & Pointer to the head of a contour. \\
	{\tt tail} & Pointer to the tail of a contour.\\
	{\tt \_prev} & Pointer to the previous snaxel. \\
	{\tt \_next} & Pointer to the next snaxel.
\te

\subsubsection*{Returns}
Pointer to previous or next snaxel.

\subsubsection*{Description}
These methods facilitate the retrieval and accessing of the neighbouring snaxels. If snake mode is specified, the following will be done :

\begin{enumerate}
	\item For an open snake
	\begin{itemize}
		\item {\tt getPrev} retrieves or accesses the previous snaxel if
			it is not the head of a contour. Otherwise, the third
			snaxel will be retrieved or accessed.
		\item {\tt getNext} retrieves or accesses the next snaxel if it 
			is not the tail of a contour. Otherwise, the snaxel
			retrieved or accessed is that of two snaxels before.
	\end{itemize}
	
	\item for a closed snake
	\begin{itemize}
		\item {\tt getPrev} retrieves or accesses the previous snaxel if
			it is not the head of a contour. Otherwise, the tail of
			a contour will be retrieved or accessed.
		\item {\tt getNext} retrieves or accessed the next snaxel if it
			is not the tail of a contour. Otherwise, the head of a
			contour will be retrieve or accessed.
	\end{itemize}
\end{enumerate}
	

%
\subsection{Example : Using mean position to calculate Internal energy}
		
This example demonstrates how the internal energy of a snaxel is calculated. The internal energy measures the deviation of a snaxel from its mean position after deformation.

\begin{verbatim}
void testmain( char *confile,   /* standard contour file */
               int mag )        /* magnification factor */
{
        SNAXEL *sptr;           /* SNAXEL object */
        CONTOUR mycontour;      /* CONTOUR object */
        double l_inf;           /* infinity norm */
        double meanrow,         /* mean position of snaxel */
               meancol;
        double avglen;          /* average length of snaxel */
        double Eint;            /* Internal energy */
        double cg_row,          /* center of gravity (CG) */
               cg_col;
        register short i;

        /* Read and show the contour */
        if ( mycontour.read( confile ) )        exit( -1 );

        mycontour.display(mag);

        /* Compute the average distance between snaxels and CG*/
        mycontour.computeCG();
        avglen = mycontour.computeAvgLength();
        cg_row = mycontour.getCgRow();
        cg_col = mycontour.getCgCol();
        printf("\nCentre of gravity at row %d col %d\n",
                                ROUNDOFF( cg_row ), ROUNDOFF( cg_col ));

        mycontour.imageCentered();

        /* Calculating the internal energy for each snaxel */
        for (i=0, sptr=mycontour.getHead(); sptr; sptr=sptr->getNext(),i++) {
                if ( fabs(sptr->getAlpha() ) < VERY_SMALL &&
                        fabs(sptr->getBeta() )  < VERY_SMALL )
                        Eint = 1.0;

                /* compute shape coeff. (alpha & beta) with infinity norm */
                sptr->meanPosition( mycontour.getMode(), cg_row, cg_col,
                                  mycontour.getHead(), mycontour.getTail(),
                                  &meanrow, &meancol);
                l_inf = MAX( fabs( meanrow - sptr->getRow() ),
                             fabs( meancol - sptr->getCol() ) );
                Eint =  SQR( l_inf / avglen );
                printf("\nSnaxel %d energy = %f",i,Eint);
        }

        printf("\nEnd of test.");
        printf("\nPress enter to continue.");
        getchar();
        xwin_close();
}
\end{verbatim}

{\tt meanPosition} measure the mean position of current snaxel, while infinity norm measures the deviation of a snaxel.

%
\subsection{Example : Verifying vector calculations}
 
\begin{verbatim}
void testmain( char *confile,   /* standard contour file */
               int mag )        /* magnification factor */
{
        SNAXEL *sptr;           /* SNAXEL object */
        CONTOUR mycontour;      /* CONTOUR object */
        double uv_x, uv_y,      /* tangent vector */
               uv0_x, uv0_y,
               uv1_x, uv1_y;
        double nv_x, nv_y;      /* normal vector */
        double Amodel,          /* tangent angle */
               Anorm;           /* normal angle */
        register short i;

        /* Read and show the contour */
        if ( mycontour.read( confile ) ) exit(-1);

        /* Compute the average distance between snaxels and CG*/
        mycontour.computeCG();
        mycontour.imageCentered();

        /* Calculating the internal energy for each snaxel */
        for (i=0, sptr=mycontour.getHead(); sptr;sptr=sptr->getNext(), i++) {

                sptr->getDirectionVec(mycontour.getMode(),
                                      mycontour.getHead(),
                                      mycontour.getTail(),
                                      &uv0_x,&uv0_y,&uv1_x,&uv1_y);

                /* tangent vector at current snaxel */
                uv_x = uv0_x + uv1_x;
                uv_y = uv0_y + uv1_y;

                Amodel = ATAN2( uv_x, uv_y );

                sptr->getNormalVec(mycontour.getMode(),mycontour.getHead(),
                                   mycontour.getTail(),&nv_x,&nv_y);
                Anorm = ATAN2(nv_x,nv_y);

                /* for verification, angle should be 90 degree apart */
                printf("\nAngle : %3.6f\t Normal : %3.6f",
                          ANGLE(Amodel), ANGLE(Anorm));
        }

        mycontour.display(mag);
        printf("Press enter to continue ");
        getchar();
        printf("\nEnd of test.\n\n");
        xwin_close();
}

\end{verbatim} 	 
		 
This program calculates the tangent and normal angle of each snaxel. {\tt getDirectionVec} calculates the tangent vector at each snaxel, while {\tt getNormalVec} rotates the tangent direction by 90 degree so as to compute the normal vector.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂av在线一区| 色综合视频在线观看| 国产天堂亚洲国产碰碰| 欧美日韩一级二级| 99视频在线精品| 中文字幕欧美三区| 欧美一区二区美女| 欧美情侣在线播放| 欧美一区二区三区免费视频 | 国产毛片精品一区| 日韩av中文在线观看| 久久婷婷成人综合色| 91免费观看国产| 九九九久久久精品| 亚洲欧美日韩国产另类专区| 日韩精品最新网址| 99久久国产综合精品色伊| 一区二区三区四区蜜桃| 欧美成人高清电影在线| 亚洲人成网站色在线观看| 精品第一国产综合精品aⅴ| 国产三级精品视频| 亚洲成人免费在线观看| 美女看a上一区| 91香蕉视频mp4| 国产精品三级视频| 久久99精品久久只有精品| 国产剧情一区在线| 欧洲av一区二区嗯嗯嗯啊| 欧美一区二区播放| 亚洲丝袜另类动漫二区| 久久久久久97三级| 一本色道久久加勒比精品| 中文字幕在线播放不卡一区| 久久精品夜色噜噜亚洲aⅴ| 一区二区三国产精华液| 一区二区三区在线免费播放| 亚洲女性喷水在线观看一区| 一区二区中文视频| 亚洲欧洲日本在线| 一区二区成人在线| 国产精品久久久久久久久免费相片| 精品国产在天天线2019| 欧美三级视频在线| 洋洋成人永久网站入口| 国产激情91久久精品导航| 91激情在线视频| 国产免费观看久久| 福利电影一区二区| 成人精品视频一区二区三区| 欧美一区二区三区四区久久 | 91精品中文字幕一区二区三区| 亚洲欧洲三级电影| 4hu四虎永久在线影院成人| 欧美精品1区2区| 中文字幕一区二区三区在线观看| 成人免费在线观看入口| 日本亚洲三级在线| 成人app下载| 欧美日韩精品一区二区| 国产片一区二区| 婷婷开心激情综合| 日韩成人精品视频| 久草在线在线精品观看| 在线精品视频免费播放| 精品国产一区a| 中文字幕五月欧美| 一区二区三区日韩欧美| 欧美日韩午夜在线| 成人性色生活片免费看爆迷你毛片| 中文一区一区三区高中清不卡| 欧美日韩一区在线观看| 国产伦精品一区二区三区在线观看| 国产精品欧美一区二区三区| 日韩免费视频一区二区| 色综合天天综合狠狠| 国产不卡在线播放| 日韩毛片精品高清免费| 国产精品亚洲一区二区三区妖精 | 91精品国产色综合久久不卡电影| 日本一区二区三区四区在线视频| 亚洲成av人片在www色猫咪| 91在线视频官网| 国产喷白浆一区二区三区| 黄色小说综合网站| 久久综合丝袜日本网| 51久久夜色精品国产麻豆| 亚洲一区二区四区蜜桃| 欧美老年两性高潮| 麻豆一区二区三| www国产成人| 成人性视频网站| 中文字幕av一区二区三区免费看 | 麻豆专区一区二区三区四区五区| 国产成人免费在线| 久久精品国产99国产精品| 日韩**一区毛片| 亚洲欧美日韩在线| 麻豆视频一区二区| 久久99深爱久久99精品| 国产精品欧美一级免费| 国产成人精品免费一区二区| 久久只精品国产| 风间由美一区二区三区在线观看| 日本一区二区免费在线观看视频 | 精品日本一线二线三线不卡| 毛片av一区二区| 成人免费一区二区三区视频 | 成人黄色小视频在线观看| 91精品国产一区二区三区香蕉| 久久一留热品黄| 久久精品一区二区三区不卡牛牛| 国产精品视频看| 亚洲精品写真福利| 精品卡一卡二卡三卡四在线| 2020国产精品自拍| 亚洲精品水蜜桃| 亚洲午夜在线电影| 无码av免费一区二区三区试看| 亚洲国产日韩精品| 久久成人久久鬼色| 欧美性欧美巨大黑白大战| 久久综合网色—综合色88| 一区二区成人在线| 亚洲一区二区三区四区五区黄| 欧美日韩久久一区| 欧美中文字幕一区二区三区亚洲| 美女脱光内衣内裤视频久久网站| 中文字幕日韩一区| 久久久精品2019中文字幕之3| 在线不卡一区二区| 欧美性生活久久| 欧美在线free| 色欧美片视频在线观看| 色诱亚洲精品久久久久久| 国产成人av资源| 日本视频中文字幕一区二区三区| 国产精品久线在线观看| 欧美日韩国产小视频| 三级久久三级久久| 日韩免费看网站| 日本系列欧美系列| 欧美一区二区三区视频免费播放| 一区二区三区欧美亚洲| 欧美伦理视频网站| 亚洲风情在线资源站| 欧美一区二区三级| 国产99一区视频免费| 久久久久久亚洲综合| 国产成人免费在线观看不卡| 国产精品久久久久久福利一牛影视| 成人深夜福利app| 在线91免费看| 欧美色欧美亚洲另类二区| 国产精品乱码妇女bbbb| 亚洲一二三区不卡| 亚洲国产成人av好男人在线观看| 麻豆国产精品视频| 成人午夜av在线| 欧美日韩一区久久| 日韩免费在线观看| www.在线欧美| 在线电影一区二区三区| 国产日本亚洲高清| 天天综合天天综合色| 国产成人免费视| 欧美三级视频在线观看| 国产精品美女视频| 九色综合国产一区二区三区| 日韩欧美国产wwwww| 欧美xxx久久| 极品美女销魂一区二区三区| 亚洲欧美色一区| 国产日韩在线不卡| 日韩无一区二区| 制服丝袜成人动漫| 国产精品麻豆视频| 欧美一区二区免费| 在线不卡一区二区| 欧美色手机在线观看| 国内精品国产成人国产三级粉色| 久久久久久久久免费| 3atv在线一区二区三区| 欧美日韩亚洲另类| 美女网站一区二区| 中文字幕制服丝袜成人av| 免费一区二区视频| 欧美一区二区视频网站| 日韩国产欧美一区二区三区| 在线影视一区二区三区| 国产精品久久午夜| 99麻豆久久久国产精品免费 | 日日夜夜免费精品视频| 在线观看av不卡| 亚洲精品伦理在线| 亚洲精品国产高清久久伦理二区| 96av麻豆蜜桃一区二区| 成人免费在线观看入口| 欧美色爱综合网| 亚洲高清久久久|