eLynx SDK
v3.3.0 C++ image processing API reference |
00001 ÿþ/ / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 00002 00003 / / R e s a m p l e F i l t e r I m p l s . h M a t h . C o m p o n e n t p a c k a g e 00004 00005 / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 00006 00007 / / U s a g e : d e f i n e c o m m o n r e s a m p l e f i l t e r i m p l e m e n t a t i o n s 00008 00009 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00010 00011 / / C o p y r i g h t ( C ) 2 0 0 6 b y e L y n x p r o j e c t 00012 00013 / / 00014 00015 / / T h i s l i b r a r y 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 00016 00017 / / 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 L i b r a r y G e n e r a l P u b l i c 00018 00019 / / 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 00020 00021 / / v e r s i o n 2 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 . 00022 00023 / / 00024 00025 / / T h i s l i b r a r y 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 , 00026 00027 / / 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 00028 00029 / / 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 . 00030 00031 / / S e e t h e G N U L i b r a r y 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 . 00032 00033 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00034 00035 # i f n d e f _ _ R e s a m p l e F i l t e r I m p l s _ h _ _ 00036 00037 # d e f i n e _ _ R e s a m p l e F i l t e r I m p l s _ h _ _ 00038 00039 00040 00041 # i n c l u d e " I R e s a m p l e F i l t e r . h " 00042 00043 00044 00045 n a m e s p a c e e L y n x { 00046 00047 n a m e s p a c e M a t h { 00048 00049 00050 00051 / / / M a c r o t o d e f i n e a r e s a m p l e f i l t e r . 00052 00053 # d e f i n e D E F I N E _ R E S A M P L E _ F I L T E R ( c l a s s n a m e ) \ 00054 00055 c l a s s E x p o r t e d B y M a t h c l a s s n a m e # # F i l t e r : p u b l i c I R e s a m p l e F i l t e r \ 00056 00057 { \ 00058 00059 p u b l i c : \ 00060 00061 v i r t u a l d o u b l e G e t R a d i u s ( ) c o n s t ; \ 00062 00063 v i r t u a l d o u b l e G e t V a l u e ( d o u b l e i X ) c o n s t ; \ 00064 00065 } ; 00066 00067 00068 00069 / / / B o x f i l t e r : p u l s e , F o u r i e r w i n d o w , 1 s t o r d e r ( c o n s t a n t ) b - s p l i n e . 00070 00071 D E F I N E _ R E S A M P L E _ F I L T E R ( B o x ) ; 00072 00073 00074 00075 / / / T r i a n g l e f i l t e r : B a r t l e t t w i n d o w , 2 n d o r d e r ( l i n e a r ) b - s p l i n e . 00076 00077 D E F I N E _ R E S A M P L E _ F I L T E R ( T r i a n g l e ) ; 00078 00079 00080 00081 / / / H e r m i t e f i l t e r : 2 t 3 " 3 t 2 + 1 00082 00083 D E F I N E _ R E S A M P L E _ F I L T E R ( H e r m i t e ) ; 00084 00085 00086 00087 / / / B e l l f i l t e r : 00088 00089 D E F I N E _ R E S A M P L E _ F I L T E R ( B e l l ) ; 00090 00091 00092 00093 / / / C u b i c B s p l i n e f i l t e r : 00094 00095 D E F I N E _ R E S A M P L E _ F I L T E R ( C u b i c B S p l i n e ) ; 00096 00097 00098 00099 / / / L a n c z o s 3 f i l t e r : 00100 00101 D E F I N E _ R E S A M P L E _ F I L T E R ( L a n c z o s 3 ) ; 00102 00103 00104 00105 / / / M i t c h e l l f i l t e r : 00106 00107 D E F I N E _ R E S A M P L E _ F I L T E R ( M i t c h e l l ) ; 00108 00109 00110 00111 / / / C o s i n e f i l t e r : 00112 00113 D E F I N E _ R E S A M P L E _ F I L T E R ( C o s i n e ) ; 00114 00115 00116 00117 / / / C a t m u l l R o m f i l t e r : 00118 00119 D E F I N E _ R E S A M P L E _ F I L T E R ( C a t m u l l R o m ) ; 00120 00121 00122 00123 / / / Q u a d r a t i c f i l t e r : 00124 00125 D E F I N E _ R E S A M P L E _ F I L T E R ( Q u a d r a t i c ) ; 00126 00127 00128 00129 / / / C u b i c c o n v o l u t i o n f i l t e r : 00130 00131 D E F I N E _ R E S A M P L E _ F I L T E R ( C u b i c C o n v o l u t i o n ) ; 00132 00133 00134 00135 / / / L a n c z o s 5 f i l t e r : 00136 00137 D E F I N E _ R E S A M P L E _ F I L T E R ( L a n c z o s 5 ) ; 00138 00139 00140 00141 / / / L a n c z o s 8 f i l t e r : 00142 00143 D E F I N E _ R E S A M P L E _ F I L T E R ( L a n c z o s 8 ) ; 00144 00145 00146 00147 / / / B l a c k m a n H a r r i s f i l t e r : 00148 00149 D E F I N E _ R E S A M P L E _ F I L T E R ( B l a c k m a n H a r r i s ) ; 00150 00151 00152 00153 / / / S i n c f i l t e r : 00154 00155 D E F I N E _ R E S A M P L E _ F I L T E R ( S i n c ) ; 00156 00157 00158 00159 / / / H a n n i n g f i l t e r : 00160 00161 D E F I N E _ R E S A M P L E _ F I L T E R ( H a n n i n g ) ; 00162 00163 00164 00165 / / / H a m m i n g f i l t e r : 00166 00167 D E F I N E _ R E S A M P L E _ F I L T E R ( H a m m i n g ) ; 00168 00169 00170 00171 / / / B l a c k m a n f i l t e r : 00172 00173 D E F I N E _ R E S A M P L E _ F I L T E R ( B l a c k m a n ) ; 00174 00175 00176 00177 / / / G a u s s i a n f i l t e r : 00178 00179 D E F I N E _ R E S A M P L E _ F I L T E R ( G a u s s i a n ) ; 00180 00181 00182 00183 00184 00185 00186 00187 / / / I m p l e m e n t e d r e s a m p l e f i l t e r c o l l e c t i o n . 00188 00189 e n u m E R e s a m p l e F i l t e r 00190 00191 { 00192 00193 R F _ B o x , / / / < p u l s e , F o u r i e r w i n d o w , 1 s t o r d e r ( c o n s t a n t ) b - s p l i n e 00194 00195 R F _ T r i a n g l e , / / / < B a r t l e t t w i n d o w , 2 n d o r d e r ( l i n e a r ) b - s p l i n e 00196 00197 R F _ H e r m i t e , 00198 00199 R F _ B e l l , / / / < 3 r d o r d e r ( q u a d r a t i c ) b - s p l i n e 00200 00201 R F _ C u b i c B S p l i n e , / / / < 4 t h o r d e r ( c u b i c ) b - s p l i n e 00202 00203 R F _ L a n c z o s 3 , 00204 00205 R F _ M i t c h e l l , / / / < M i t c h e l l & N e t r a v a l i ' s t w o - p a r a m c u b i c 00206 00207 R F _ C o s i n e , 00208 00209 R F _ C a t m u l l R o m , / / / < C a t m u l l - R o m s p l i n e , O v e r h a u s e r s p l i n e 00210 00211 R F _ Q u a d r a t i c , 00212 00213 R F _ C u b i c C o n v o l u t i o n , 00214 00215 R F _ L a n c z o s 5 , 00216 00217 R F _ L a n c z o s 8 , 00218 00219 R F _ B l a c k m a n H a r r i s , 00220 00221 R F _ S y n c , 00222 00223 R F _ H a n n i n g , 00224 00225 R F _ H a m m i n g , 00226 00227 R F _ B l a c k m a n , 00228 00229 R F _ G a u s s i a n , 00230 00231 R F _ U n d e f i n e d 00232 00233 } ; 00234 00235 00236 00237 / / / R e t u r n t h e s t r i n g n a m e o f t h e r e s a m p l e f i l t e r f u n c t i o n . 00238 00239 / / / @ p a r a m i F i l t e r T h e r e q u e s t e d f i l t e r . 00240 00241 / / / @ r e t u r n T h e s t r i n g n a m e o f t h e r e s a m p l e f i l t e r f u n c t i o n . 00242 00243 E x p o r t e d B y M a t h c o n s t c h a r * e l x T o S t r i n g ( E R e s a m p l e F i l t e r i F i l t e r ) ; 00244 00245 00246 00247 / / / C o n v e r t s s t r i n g t o E R e s a m p l e F i l t e r . 00248 00249 / / / @ p a r a m i p r F i l t e r T h e r e s a m p l e f i l t e r a s a s t r i n g . 00250 00251 / / / @ r e t u r n f i l t e r t y p e a s e n u m . 00252 00253 E x p o r t e d B y M a t h E R e s a m p l e F i l t e r e l x T o E R e s a m p l e F i l t e r ( c o n s t c h a r * i p r F i l t e r ) ; 00254 00255 00256 00257 / / / G e t r e s a m p l e f i l t e r f r o m e n u m . 00258 00259 / / / @ p a r a m i F i l t e r T h e r e q u e s t e d f i l t e r . 00260 00261 / / / @ r e t u r n I m p l e m e n t a t i o n o f I R e s a m p l e F i l t e r f o r t h e g i v e n e n u m . 00262 00263 E x p o r t e d B y M a t h c o n s t I R e s a m p l e F i l t e r & e l x G e t R e s a m p l e F i l t e r ( E R e s a m p l e F i l t e r i F i l t e r ) ; 00264 00265 00266 00267 } / / n a m e s p a c e I m a g e 00268 00269 } / / n a m e s p a c e e L y n x 00270 00271 00272 00273 # e n d i f / / _ _ R e s a m p l e F i l t e r I m p l s _ h _ _ 00274 00275