/ *   
 
   *   P R O J E C T :   N y A R T o o l k i t C S 
 
   *   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
   *   T h i s   w o r k   i s   b a s e d   o n   t h e   o r i g i n a l   A R T o o l K i t   d e v e l o p e d   b y 
 
   *       H i r o k a z u   K a t o 
 
   *       M a r k   B i l l i n g h u r s t 
 
   *       H I T L a b ,   U n i v e r s i t y   o f   W a s h i n g t o n ,   S e a t t l e 
 
   *   h t t p : / / w w w . h i t l . w a s h i n g t o n . e d u / a r t o o l k i t / 
 
   * 
 
   *   T h e   N y A R T o o l k i t C S   i s   J a v a   e d i t i o n   A R T o o l K i t   c l a s s   l i b r a r y . 
 
   *   C o p y r i g h t   ( C ) 2 0 0 8 - 2 0 0 9   R y o   I i z u k a 
 
   * 
 
   *   T h i s   p r o g r a m   i s   f r e e   s o f t w a r e :   y o u   c a n   r e d i s t r i b u t e   i t   a n d / o r   m o d i f y 
 
   *   i t   u n d e r   t h e   t e r m s   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e   a s   p u b l i s h e d   b y 
 
   *   t h e   F r e e   S o f t w a r e   F o u n d a t i o n ,   e i t h e r   v e r s i o n   3   o f   t h e   L i c e n s e ,   o r 
 
   *   ( a t   y o u r   o p t i o n )   a n y   l a t e r   v e r s i o n . 
 
   *   
 
   *   T h i s   p r o g r a m   i s   d i s t r i b u t e d   i n   t h e   h o p e   t h a t   i t   w i l l   b e   u s e f u l , 
 
   *   b u t   W I T H O U T   A N Y   W A R R A N T Y ;   w i t h o u t   e v e n   t h e   i m p l i e d   w a r r a n t y   o f 
 
   *   M E R C H A N T A B I L I T Y   o r   F I T N E S S   F O R   A   P A R T I C U L A R   P U R P O S E .     S e e   t h e 
 
   *   G N U   G e n e r a l   P u b l i c   L i c e n s e   f o r   m o r e   d e t a i l s . 
 
   * 
 
   *   Y o u   s h o u l d   h a v e   r e c e i v e d   a   c o p y   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e 
 
   *   a l o n g   w i t h   t h i s   p r o g r a m .     I f   n o t ,   s e e   < h t t p : / / w w w . g n u . o r g / l i c e n s e s / > . 
 
   *   
 
   *   F o r   f u r t h e r   i n f o r m a t i o n   p l e a s e   c o n t a c t . 
 
   * 	 h t t p : / / n y a t l a . j p / n y a t o o l k i t / 
 
   * 	 < a i r m a i l ( a t ) e b o n y . p l a l a . o r . j p >   o r   < n y a t l a ( a t ) n y a t l a . j p > 
 
   *   
 
   * / 
 
 u s i n g   j p . n y a t l a . n y a r t o o l k i t . c s . c o r e ; 
 
 u s i n g   S y s t e m . D i a g n o s t i c s ; 
 
 
 
 n a m e s p a c e   j p . n y a t l a . n y a r t o o l k i t . c s . d e t e c t o r 
 
 { 
 
 
 
 
 
         / * * 
 
           *   S0n0000o00pen00000S0qbF0000iQhVg0Y00
 
           *   {v2W0_0n Pn0A R 000k0[_Y000000eQR;uPK00iQW00]0n0	YcLRh0 N^0ԏW0~0Y00
 
           *   S0n0peo00;uP-Nn0m Pn0000k00{v2W0_0n Pn0000n0-NK000 g0 NW0_00n0n0juS0rR0S_f00R\O0W0~0Y00
 
           *   ]0n0_000T Nj0.z^0000	n0000L0peX[(WY004XT0d0n00000:S%RY00S0h0L0g0M0~0[000
 
           *   ~0_00T Nj000000000pe{v2Y00h00aVW0j0D0R\O0W0~0Y00
 
           *   < p > !|XSj0OD0e
 
           *   < o l > 
 
           *   < l i > 0000000\ObW0~0Y0000000k0o00{000000h0eQR;uPb__0000000000iQY0000000000000L0B00~0Y00
 
           *   < l i > { @ l i n k   # d e t e c t M a r k e r L i t e } pek0;uPh0weE\$P0eQRW0f000000iQW0~0Y00
 
           *   < l i > iQpeL0_000n0g00{ @ l i n k   # g e t A R C o d e I n d e x } pe0Oc0f00iQjuS0000n000000juSk0	YcW0~0Y00
 
           *   < l i > 00000juS0CQk00{ @ l i n k   # g e t C o n f i d e n c e } I{n0pe0Oc0f00S_W0_0000n0rKa0_~0Y00
 
           *   < l i > NMo00S0n0Qt0p~0ԏW0f0000n0000000feW0~0Y00
 
           *   < / o l > 
 
           *   < / p > 
 
           * / 
 
         p u b l i c   c l a s s   N y A R D e t e c t M a r k e r 
 
         { 
 
                 / * *   wb_iQhVn00000* / 
 
   	         p r i v a t e   c l a s s   R l e D e t e c t o r   :   N y A R S q u a r e C o n t o u r D e t e c t o r _ R l e ,   N y A R S q u a r e C o n t o u r D e t e c t o r . C b H a n d l e r 
 
                 { 
 
                         / / lQ00000
 
                         p u b l i c   N y A R D e t e c t M a r k e r R e s u l t S t a c k   r e s u l t _ s t a c k   =   n e w   N y A R D e t e c t M a r k e r R e s u l t S t a c k ( N y A R D e t e c t M a r k e r . A R _ S Q U A R E _ M A X ) ; 
 
                         / / Sgq000000
 
                         p u b l i c   I N y A R R g b R a s t e r   _ r e f _ r a s t e r ; 
 
                         / / @b	g000000
 
                         p r i v a t e   I N y A R C o l o r P a t t   _ i n s t _ p a t t ; 
 
                         p r i v a t e   N y A R M a t c h P a t t D e v i a t i o n C o l o r D a t a   _ d e v i a t i o n _ d a t a ; 
 
                         p r i v a t e   N y A R M a t c h P a t t _ C o l o r _ W I T H O U T _ P C A [ ]   _ m a t c h _ p a t t ; 
 
                         p r i v a t e   r e a d o n l y   N y A R M a t c h P a t t R e s u l t   _ _ d e t e c t M a r k e r L i t e _ m r   =   n e w   N y A R M a t c h P a t t R e s u l t ( ) ; 
 
                         p r i v a t e   N y A R C o o r d 2 L i n e a r   _ c o o r d l i n e ; 
 
 
 
                         p u b l i c   R l e D e t e c t o r ( I N y A R C o l o r P a t t   i _ i n s t _ p a t t ,   N y A R C o d e [ ]   i _ r e f _ c o d e ,   i n t   i _ n u m _ o f _ c o d e ,   N y A R P a r a m   i _ p a r a m ) : b a s e ( i _ p a r a m . g e t S c r e e n S i z e ( ) ) 
 
                         { 
 
                                 i n t   c w   =   i _ r e f _ c o d e [ 0 ] . g e t W i d t h ( ) ; 
 
                                 i n t   c h   =   i _ r e f _ c o d e [ 0 ] . g e t H e i g h t ( ) ; 
 
                                 / / N y A R M a t c h P a t t _ C o l o r _ W I T H O U T _ P C A [ ] n0\Ob
 
                                 t h i s . _ m a t c h _ p a t t   =   n e w   N y A R M a t c h P a t t _ C o l o r _ W I T H O U T _ P C A [ i _ n u m _ o f _ c o d e ] ; 
 
                                 t h i s . _ m a t c h _ p a t t [ 0 ]   =   n e w   N y A R M a t c h P a t t _ C o l o r _ W I T H O U T _ P C A ( i _ r e f _ c o d e [ 0 ] ) ; 
 
                                 f o r   ( i n t   i   =   1 ;   i   <   i _ n u m _ o f _ c o d e ;   i + + ) 
 
                                 { 
 
                                         / / P^0000
 
                                         i f   ( c w   ! =   i _ r e f _ c o d e [ i ] . g e t W i d t h ( )   | |   c h   ! =   i _ r e f _ c o d e [ i ] . g e t H e i g h t ( ) ) 
 
                                         { 
 
                                                 t h r o w   n e w   N y A R E x c e p t i o n ( ) ; 
 
                                         } 
 
                                         t h i s . _ m a t c h _ p a t t [ i ]   =   n e w   N y A R M a t c h P a t t _ C o l o r _ W I T H O U T _ P C A ( i _ r e f _ c o d e [ i ] ) ; 
 
                                 } 
 
                                 t h i s . _ i n s t _ p a t t   =   i _ i n s t _ p a t t ; 
 
                                 t h i s . _ c o o r d l i n e   =   n e w   N y A R C o o r d 2 L i n e a r ( i _ p a r a m . g e t S c r e e n S i z e ( ) ,   i _ p a r a m . g e t D i s t o r t i o n F a c t o r ( ) ) ; 
 
                                 t h i s . _ d e v i a t i o n _ d a t a   =   n e w   N y A R M a t c h P a t t D e v i a t i o n C o l o r D a t a ( c w ,   c h ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         p r i v a t e   N y A R I n t P o i n t 2 d [ ]   _ _ r e f _ v e r t e x   =   n e w   N y A R I n t P o i n t 2 d [ 4 ] ; 
 
                         / * * 
 
                           *   wb_L0NK00_0s0k0|Ts0QU00~0Y00
 
                           *   zvW0_0wb_n000000igW0f00eMO0naW0_0p0000xOW0~0Y00
 
                           * / 
 
                         p u b l i c   v o i d   d e t e c t M a r k e r C a l l b a c k ( N y A R I n t C o o r d i n a t e s   i _ c o o r d ,   i n t [ ]   i _ v e r t e x _ i n d e x ) 
 
                         { 
 
                                 N y A R M a t c h P a t t R e s u l t   m r   =   t h i s . _ _ d e t e c t M a r k e r L i t e _ m r ; 
 
                                 / / *퐧^jK00p000k0	Yc
 
                                 N y A R I n t P o i n t 2 d [ ]   v e r t e x   =   t h i s . _ _ r e f _ v e r t e x ; 
 
                                 v e r t e x [ 0 ]   =   i _ c o o r d . i t e m s [ i _ v e r t e x _ i n d e x [ 0 ] ] ; 
 
                                 v e r t e x [ 1 ]   =   i _ c o o r d . i t e m s [ i _ v e r t e x _ i n d e x [ 1 ] ] ; 
 
                                 v e r t e x [ 2 ]   =   i _ c o o r d . i t e m s [ i _ v e r t e x _ i n d e x [ 2 ] ] ; 
 
                                 v e r t e x [ 3 ]   =   i _ c o o r d . i t e m s [ i _ v e r t e x _ i n d e x [ 3 ] ] ; 
 
 
 
                                 / / ;uP0S_
 
                                 i f   ( ! t h i s . _ i n s t _ p a t t . p i c k F r o m R a s t e r ( t h i s . _ r e f _ r a s t e r ,   v e r t e x ) ) 
 
                                 { 
 
                                         r e t u r n ; 
 
                                 } 
 
                                 / / S_00000000]R000k0	YcW0f0UOY000
 
                                 t h i s . _ d e v i a t i o n _ d a t a . s e t R a s t e r ( t h i s . _ i n s t _ p a t t ) ; 
 
 
 
                                 / /  g0 NY0000000rR0S_f000
 
                                 i n t   s q u a r e _ i n d e x ,   d i r e c t i o n ; 
 
                                 d o u b l e   c o n f i d e n c e ; 
 
                                 t h i s . _ m a t c h _ p a t t [ 0 ] . e v a l u a t e ( t h i s . _ d e v i a t i o n _ d a t a ,   m r ) ; 
 
                                 s q u a r e _ i n d e x   =   0 ; 
 
                                 d i r e c t i o n   =   m r . d i r e c t i o n ; 
 
                                 c o n f i d e n c e   =   m r . c o n f i d e n c e ; 
 
                                 / / 2 juvNM
 
                                 f o r   ( i n t   i   =   1 ;   i   <   t h i s . _ m a t c h _ p a t t . L e n g t h ;   i + + ) 
 
                                 { 
 
                                         t h i s . _ m a t c h _ p a t t [ i ] . e v a l u a t e ( t h i s . _ d e v i a t i o n _ d a t a ,   m r ) ; 
 
                                         i f   ( c o n f i d e n c e   >   m r . c o n f i d e n c e ) 
 
                                         { 
 
                                                 c o n t i n u e ; 
 
                                         } 
 
                                         / /   0c0h0 NY000000L0B0c0_0}0D0
 
                                         s q u a r e _ i n d e x   =   i ; 
 
                                         d i r e c t i o n   =   m r . d i r e c t i o n ; 
 
                                         c o n f i d e n c e   =   m r . c o n f i d e n c e ; 
 
                                 } 
 
                                 / /  g0 NW0_0000`1X00S0n0wb_n0`1Xh0W0f02Y000
 
                                 N y A R D e t e c t M a r k e r R e s u l t   r e s u l t   =   t h i s . r e s u l t _ s t a c k . p r e P u s h ( ) ; 
 
                                 r e s u l t . a r c o d e _ i d   =   s q u a r e _ i n d e x ; 
 
                                 r e s u l t . c o n f i d e n c e   =   c o n f i d e n c e ; 
 
 
 
                                 N y A R S q u a r e   s q   =   r e s u l t . s q u a r e ; 
 
                                 / / d i r e c t i o n 0naW0f00s q u a r e 0feY000
 
                                 f o r   ( i n t   i   =   0 ;   i   <   4 ;   i + + ) 
 
                                 { 
 
                                         i n t   i d x   =   ( i   +   4   -   d i r e c t i o n )   %   4 ; 
 
                                         t h i s . _ c o o r d l i n e . c o o r d 2 L i n e ( i _ v e r t e x _ i n d e x [ i d x ] ,   i _ v e r t e x _ i n d e x [ ( i d x   +   1 )   %   4 ] ,   i _ c o o r d ,   s q . l i n e [ i ] ) ; 
 
                                 } 
 
                                 f o r   ( i n t   i   =   0 ;   i   <   4 ;   i + + ) 
 
                                 { 
 
                                         / / v}TXn0Np{
 
                                         i f   ( ! s q . l i n e [ i ] . c r o s s P o s ( s q . l i n e [ ( i   +   3 )   %   4 ] ,   s q . s q v e r t e x [ i ] ) ) 
 
                                         { 
 
                                                 t h r o w   n e w   N y A R E x c e p t i o n ( ) ; / / S0S0n0000_0^Y00j000000000k0Y00p0O K 
 
                                         } 
 
                                 } 
 
                         } 
 
                         p u b l i c   v o i d   i n i t ( I N y A R R g b R a s t e r   i _ r a s t e r ) 
 
                         { 
 
                                 t h i s . _ r e f _ r a s t e r   =   i _ r a s t e r ; 
 
                                 t h i s . r e s u l t _ s t a c k . c l e a r ( ) ; 
 
 
 
                         } 
 
                 } 
 
                 / * *   	YcLR{hVn0000000* / 
 
                 p r i v a t e   I N y A R T r a n s M a t   _ t r a n s m a t ; 
 
                 p r i v a t e   c o n s t   i n t   A R _ S Q U A R E _ M A X   =   3 0 0 ; 
 
                 p r i v a t e   b o o l   _ i s _ c o n t i n u e   =   f a l s e ; 
 
                 p r i v a t e   R l e D e t e c t o r   _ s q u a r e _ d e t e c t ; 
 
                 p r i v a t e   N y A R R e c t O f f s e t [ ]   _ o f f s e t ; 
 
 
 
                 / * * 
 
                   *   0000000g0Y00
 
                   *   T Ng0j0D0pen00000iQY00iQhV0\ObW0~0Y00
 
                   *   @ p a r a m   i _ p a r a m 
 
                   *   000000000c[W0~0Y00S0n0000o00{ @ l i n k   # d e t e c t M a r k e r L i t e } k0eQRY00;uPh0TX0g0B00_L0B00~0Y00
 
                   *   @ p a r a m   i _ c o d e 
 
                   *   iQY00000000000<h
}W0_00{ @ l i n k   N y A R C o d e } n0MR0c[W0~0Y00MRk0o00HQ-K0000 K00Y~00I D juSL0rR0S_f000~0Y00
 
                   *   S0n0I D o00{ @ l i n k   # g e t A R C o d e I n d e x } g0S_g0M00I D $Pg0B0000000000n0X%Rk0OD0~0Y00
 
                   *   MR }n0{ @ l i n k   N y A R C o d e } o00hQf0TX0P^k0W0f0O0`0U0D00
 
                   *   @ p a r a m   i _ m a r k e r _ w i d t h 
 
                   *   ckeb_000n0irt0000m m XSMOg0c[W0~0Y00
 
                   *   @ p a r a m   i _ n u m b e r _ o f _ c o d e 
 
                   *   i _ c o d e n0	gRj0Ppe0c[W0~0Y00
 
                   *   @ 
 
                   * / 
 
                 p u b l i c   N y A R D e t e c t M a r k e r ( N y A R P a r a m   i _ p a r a m ,   N y A R C o d e [ ]   i _ c o d e ,   d o u b l e [ ]   i _ m a r k e r _ w i d t h ,   i n t   i _ n u m b e r _ o f _ c o d e ) 
 
                 { 
 
                         i n i t I n s t a n c e ( i _ p a r a m ,   i _ c o d e ,   i _ m a r k e r _ w i d t h ,   i _ n u m b e r _ o f _ c o d e ) ; 
 
                         r e t u r n ; 
 
                 } 
 
                 / * * 
 
                   *   S0n0peo000000000RgSW0~0Y00
 
                   *   0000000K00|Ts0QW0~0Y00
 
                   *   @ s e e   N y A R D e t e c t M a r k e r # N y A R D e t e c t M a r k e r ( N y A R P a r a m ,   N y A R C o d e [ ] ,   d o u b l e [ ] ,   i n t ,   i n t ) 
 
                   *   @ p a r a m   i _ r e f _ p a r a m 
 
                   *   C h e c k   s e e   a l s o 
 
                   *   @ p a r a m   i _ r e f _ c o d e 
 
                   *   C h e c k   s e e   a l s o 
 
                   *   @ p a r a m   i _ m a r k e r _ w i d t h 
 
                   *   C h e c k   s e e   a l s o 
 
                   *   @ p a r a m   i _ n u m b e r _ o f _ c o d e 
 
                   *   C h e c k   s e e   a l s o 
 
                   *   @ p a r a m   i _ i n p u t _ r a s t e r _ t y p e 
 
                   *   C h e c k   s e e   a l s o 
 
                   *   @ 
 
                   * / 
 
                 p r o t e c t e d   v o i d   i n i t I n s t a n c e ( 
 
                         N y A R P a r a m   i _ r e f _ p a r a m , 
 
                         N y A R C o d e [ ]   i _ r e f _ c o d e , 
 
                         d o u b l e [ ]   i _ m a r k e r _ w i d t h , 
 
                         i n t   i _ n u m b e r _ o f _ c o d e ) 
 
                 { 
 
 
 
                         N y A R I n t S i z e   s c r _ s i z e   =   i _ r e f _ p a r a m . g e t S c r e e n S i z e ( ) ; 
 
                         / /   ㉐g0000000\O0
 
                         i n t   c w   =   i _ r e f _ c o d e [ 0 ] . g e t W i d t h ( ) ; 
 
                         i n t   c h   =   i _ r e f _ c o d e [ 0 ] . g e t H e i g h t ( ) ; 
 
 
 
                         t h i s . _ t r a n s m a t   =   n e w   N y A R T r a n s M a t ( i _ r e f _ p a r a m ) ; 
 
                         / / N y A R T o o l k i t 000000
 
                         t h i s . _ s q u a r e _ d e t e c t   =   n e w   R l e D e t e c t o r ( n e w   N y A R C o l o r P a t t _ P e r s p e c t i v e ( c w ,   c h ,   4 ,   2 5 ) ,   i _ r e f _ c o d e ,   i _ n u m b e r _ o f _ c o d e ,   i _ r e f _ p a r a m ) ; 
 
 
 
                         / / [000OX[
 
                         t h i s . _ o f f s e t   =   N y A R R e c t O f f s e t . c r e a t e A r r a y ( i _ n u m b e r _ o f _ c o d e ) ; 
 
                         f o r   ( i n t   i   =   0 ;   i   <   i _ n u m b e r _ o f _ c o d e ;   i + + ) 
 
                         { 
 
                                 t h i s . _ o f f s e t [ i ] . s e t S q u a r e ( i _ m a r k e r _ w i d t h [ i ] ) ; 
 
                         } 
 
                         / / $P;uP00000\O0
 
                         t h i s . _ b i n _ r a s t e r   =   n e w   N y A R B i n R a s t e r ( s c r _ s i z e . w ,   s c r _ s i z e . h ) ; 
 
                         r e t u r n ; 
 
                 } 
 
 
 
                 p r i v a t e   N y A R B i n R a s t e r   _ b i n _ r a s t e r ; 
 
 
 
                 p r i v a t e   I N y A R R g b 2 G s F i l t e r A r t k T h   _ t o b i n _ f i l t e r ; 
 
                 p r i v a t e   I N y A R R g b R a s t e r   _ l a s t _ i n p u t _ r a s t e r   =   n u l l ; 
 
 
 
                 / * * 
 
                   *   S0n0peo00;uPK000000iQW0~0Y00
 
                   *   peo00{v2U00f0D000000000]00^00k0[W00iQW0_0000K00 g0 NW0_0ir0cW00]0n0 Nsh0MOn0{W0~0Y00
 
                   *   @ p a r a m   i _ r a s t e r 
 
                   *   00000iQY0000000c[W0~0Y00
 
                   *   @ p a r a m   i _ t h r e s h o l d 
 
                   *   iQ$P0c[W0~0Y000 ^2 5 5 n0{Vg0c[W0f0O0`0U0D00  8^o01 0 0 ^1 3 0 O00D00c[W0~0Y00
 
                   *   @ r e t u r n 
 
                   *   iQW0_00000n0pe0ԏW0~0Y00  0000L0d0K00j0D04XTo00 0ԏW0~0Y00
 
                   *   @ 
 
                   * / 
 
                 p u b l i c   i n t   d e t e c t M a r k e r L i t e ( I N y A R R g b R a s t e r   i _ r a s t e r ,   i n t   i _ t h r e s h o l d ) 
 
                 { 
 
                         / /   0000000
 
                         i f   ( ! t h i s . _ b i n _ r a s t e r . g e t S i z e ( ) . i s E q u a l S i z e ( i _ r a s t e r . g e t S i z e ( ) ) ) 
 
                         { 
 
                                 t h r o w   n e w   N y A R E x c e p t i o n ( ) ; 
 
                         } 
 
                         i f   ( t h i s . _ l a s t _ i n p u t _ r a s t e r   ! =   i _ r a s t e r ) 
 
                         { 
 
                                 t h i s . _ t o b i n _ f i l t e r   =   ( I N y A R R g b 2 G s F i l t e r A r t k T h ) i _ r a s t e r . c r e a t e I n t e r f a c e ( t y p e o f ( I N y A R R g b 2 G s F i l t e r A r t k T h ) ) ; 
 
                                 t h i s . _ l a s t _ i n p u t _ r a s t e r   =   i _ r a s t e r ; 
 
                         } 
 
                         t h i s . _ t o b i n _ f i l t e r . d o F i l t e r ( i _ t h r e s h o l d ,   t h i s . _ b i n _ r a s t e r ) ; 
 
                         / / d e t e c t 
 
                         t h i s . _ s q u a r e _ d e t e c t . i n i t ( i _ r a s t e r ) ; 
 
                         t h i s . _ s q u a r e _ d e t e c t . d e t e c t M a r k e r ( t h i s . _ b i n _ r a s t e r ,   0 ,   t h i s . _ s q u a r e _ d e t e c t ) ; 
 
 
 
                         / / NK0c0_0pe0ԏY00
 
                         r e t u r n   t h i s . _ s q u a r e _ d e t e c t . r e s u l t _ s t a c k . g e t L e n g t h ( ) ; 
 
                 } 
 
 
 
                 / * * 
 
                   *   S0n0peo00i _ i n d e x juvk0iQW0_0000n00	YcLR0{W0~0Y00
 
                   *   vMRk0[LW0_0{ @ l i n k   # d e t e c t M a r k e r L i t e } L0bRW0f0D0j0D0h0OH0~0[000
 
                   *   @ p a r a m   i _ i n d e x 
 
                   *   iQP}gn0000000juS0c[W0~0Y00  
 
                   *   S0n0$Po000 K00{ @ l i n k   # d e t e c t M a r k e r L i t e } pen0;b0$P- 1 n0peg0Y00
 
                   *   @ p a r a m   o _ r e s u l t 
 
                   *   P}g$P0SQ0S0000000
 
                   *   @ 
 
                   * / 
 
 	         p u b l i c   v o i d   g e t T r a n s m a t i o n M a t r i x ( i n t   i _ i n d e x ,   N y A R D o u b l e M a t r i x 4 4   o _ r e s u l t ) 
 
 	         { 
 
 	 	         D e b u g . A s s e r t ( o _ r e s u l t ! = n u l l ) ; 
 
 	 	         N y A R D e t e c t M a r k e r R e s u l t   r e s u l t   =   t h i s . _ s q u a r e _ d e t e c t . r e s u l t _ s t a c k . g e t I t e m ( i _ i n d e x ) ; 
 
 	 	         / /    Nju NW0_00000n0MOnh0K0]0n00{
 
 	 	         i f   ( t h i s . _ i s _ c o n t i n u e ) { 
 
 	 	 	         / / e\tkL0OH0]0F0K0$R[
 
 	 	 	         i f ( r e s u l t . r e f _ l a s t _ i n p u t _ m a t r i x = = o _ r e s u l t ) { 
 
 	 	 	 	         i f ( t h i s . _ t r a n s m a t . t r a n s M a t C o n t i n u e ( r e s u l t . s q u a r e ,   t h i s . _ o f f s e t [ r e s u l t . a r c o d e _ i d ] , o _ r e s u l t ,   r e s u l t . l a s t _ r e s u l t _ p a r a m . l a s t _ e r r o r , o _ r e s u l t ,   r e s u l t . l a s t _ r e s u l t _ p a r a m ) ) { 
 
 	 	 	 	 	         r e t u r n ; 
 
 	 	 	 	         } 
 
 	 	 	         } 
 
 	 	         } 
 
 	 	         / / e\tkOH0j0D0o r }}X1YWe
 
 	 	         t h i s . _ t r a n s m a t . t r a n s M a t ( r e s u l t . s q u a r e ,   t h i s . _ o f f s e t [ r e s u l t . a r c o d e _ i d ] , o _ r e s u l t , r e s u l t . l a s t _ r e s u l t _ p a r a m ) ; 
 
 	 	         r e s u l t . r e f _ l a s t _ i n p u t _ m a t r i x = o _ r e s u l t ; 
 
 	 	         r e t u r n ; 
 
 	         } 
 
 
 
                 / * * 
 
                   *   S0n0peo00i _ i n d e x juvk0iQW0_0000n00 N^0ԏW0~0Y00
 
                   *   vMRk0[LW0_0{ @ l i n k   # d e t e c t M a r k e r L i t e } L0bRW0f0D0j0D0h0OH0~0[000
 
                   *   @ p a r a m   i _ i n d e x 
 
                   *   iQP}gn0000000juS0c[W0~0Y00  
 
                   *   S0n0$Po000 K00{ @ l i n k   # d e t e c t M a r k e r L i t e } pen0;b0$P- 1 n0peg0Y00
 
                   *   @ r e t u r n 
 
                   *   0000n0 N^0ԏW0~0Y000 ^1 ~0g0n0$P0h00~0Y00   N^L0NOD04XTk0o00Xn0S'`L0ؚO0j00~0Y00
 
                   *   @ 
 
                   * / 
 
                 p u b l i c   d o u b l e   g e t C o n f i d e n c e ( i n t   i _ i n d e x ) 
 
                 { 
 
                         r e t u r n   t h i s . _ s q u a r e _ d e t e c t . r e s u l t _ s t a c k . g e t I t e m ( i _ i n d e x ) . c o n f i d e n c e ; 
 
                 } 
 
                 / * * 
 
                   *   S0n0peo00i _ i n d e x juvk0iQW0_0000n00I D juS0ԏW0~0Y00
 
                   *   vMRk0[LW0_0{ @ l i n k   # d e t e c t M a r k e r L i t e } L0bRW0f0D0j0D0h0OH0~0[000
 
                   *   @ p a r a m   i _ i n d e x 
 
                   *   iQP}gn0000000juS0c[W0~0Y00  
 
                   *   S0n0$Po000 K00{ @ l i n k   # d e t e c t M a r k e r L i t e } pen0;b0$P- 1 n0peg0Y00
 
                   *   @ r e t u r n 
 
                   *   I D juSg0Y00S0n0$Po000000000g000000000{v2W0_0h0M0k0zl~0000000juSg0Y00
 
                   *   @ 
 
                   * / 
 
                 p u b l i c   i n t   g e t A R C o d e I n d e x ( i n t   i _ i n d e x ) 
 
                 { 
 
                         r e t u r n   t h i s . _ s q u a r e _ d e t e c t . r e s u l t _ s t a c k . g e t I t e m ( i _ i n d e x ) . a r c o d e _ i d ; 
 
                 } 
 
 
 
                 / * * 
 
                   *   S0n0peo00	YcLRn0{0000R0fH0~0Y00
 
                   *   8^o0t r u e 0O(uW0~0Y00
 
                   *   t r a n s M a t Ncn0{o00YRn0Rg$P0kVN!kCQ^jK00{Y00_000wL0[[W0~0Y00
 
                   *   t r a n s M a t C o n t Ncn0{o00YRn0Rg$Pk0MRVn0P}g0Am(uW0~0Y00S0n0000o00YRn0[[W0_0000k0[W0f0o0
 
                   *   000n0n\0wn\j0i0n0RgL0B00~0Y0L00YRn0[[W0j0D00000pen00000O(uY00tXg0o00
 
                   *   \ϑn0w	YRL0B00~0Y00
 
                   *   @ p a r a m   i _ i s _ c o n t i n u e 
 
                   *   T R U E j000t r a n s M a t C o n t Ncn0{0W0~0Y00  F A L S E j000t r a n s M a t Ncn0{0W0~0Y00
 
                   * / 
 
                 p u b l i c   v o i d   s e t C o n t i n u e M o d e ( b o o l   i _ i s _ c o n t i n u e ) 
 
                 { 
 
                         t h i s . _ i s _ c o n t i n u e   =   i _ i s _ c o n t i n u e ; 
 
                 } 
 
         } 
 
 
 
         / * *   Q萯000g0Y00000L0O(uY00S0h0o0B00~0[00* / 
 
         c l a s s   N y A R D e t e c t M a r k e r R e s u l t 
 
         { 
 
                 p u b l i c   i n t   a r c o d e _ i d ; 
 
                 p u b l i c   d o u b l e   c o n f i d e n c e ; 
 
                 p u b l i c   N y A R D o u b l e M a t r i x 4 4   r e f _ l a s t _ i n p u t _ m a t r i x ; 
 
                 p u b l i c   N y A R T r a n s M a t R e s u l t P a r a m   l a s t _ r e s u l t _ p a r a m   =   n e w   N y A R T r a n s M a t R e s u l t P a r a m ( ) ; 
 
 
 
                 p u b l i c   N y A R S q u a r e   s q u a r e   =   n e w   N y A R S q u a r e ( ) ; 
 
         } 
 
 
 
 
 
         / * *   Q萯000g0Y00000L0O(uY00S0h0o0B00~0[00* / 
 
         c l a s s   N y A R D e t e c t M a r k e r R e s u l t S t a c k   :   N y A R O b j e c t S t a c k < N y A R D e t e c t M a r k e r R e s u l t > 
 
         { 
 
                 p u b l i c   N y A R D e t e c t M a r k e r R e s u l t S t a c k ( i n t   i _ l e n g t h ) 
 
                 { 
 
                         t h i s . i n i t I n s t a n c e ( i _ l e n g t h ) ; 
 
                         r e t u r n ; 
 
                 } 
 
                 p r o t e c t e d   o v e r r i d e   N y A R D e t e c t M a r k e r R e s u l t   c r e a t e E l e m e n t ( ) 
 
                 { 
 
                         r e t u r n   n e w   N y A R D e t e c t M a r k e r R e s u l t ( ) ; 
 
                 } 
 
         } 
 
 } 
 
 