00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <string.h>
00022 #include <math.h>
00023
00024 #include <flgrCoreData.h>
00025 #include <flgrCoreIO.h>
00026 #include <flgrCoreVector.h>
00027 #include <flgrCoreCopy.h>
00028 #include <flgrCoreShift.h>
00029 #include <flgrCoreDispatch.h>
00030 #include <flgrCoreArithDef.h>
00031 #include <flgrArith.h>
00032 #include <flgrArithShift.h>
00033 #include "flgrMorphoBaseFast.h"
00034
00035
00036
00037
00040
00043
00044 #define FLGR_MACRO_LINE_ERODE(dtype,lout,lin,ltmp) \
00045 flgr1d_arith_inf_shift_right_##dtype(ltmp,lin, 1); \
00046 flgr1d_arith_inf_shift_left_##dtype(lout,ltmp, 1)
00047
00048 #define FLGR_MACRO_LINE_RIGHT_ERODE(dtype,lout,lin,ltmp0) \
00049 flgr1d_arith_inf_shift_right_##dtype(lout,lin, 1)
00050
00051 #define FLGR_MACRO_LINE_LEFT_ERODE(dtype,lout,lin,ltmp0) \
00052 flgr1d_arith_inf_shift_left_##dtype(lout,lin, 1)
00053
00054 #define FLGR_MACRO_ERODE_4_CONNEXITY(dtype) \
00055 FLGR_Data1D *tmp = flgr1d_create_signal_from(datsrc->row[0]); \
00056 FLGR_Data1D *tmp0 = flgr1d_create_signal_from(datsrc->row[0]); \
00057 FLGR_Data1D *tmp1 = flgr1d_create_signal_from(datsrc->row[0]); \
00058 FLGR_Data1D *tmp2 = flgr1d_create_signal_from(datsrc->row[0]); \
00059 FLGR_Data1D *tmpsav; \
00060 FLGR_Data1D **pout = datdest->row; \
00061 FLGR_Data1D **pin = datsrc->row; \
00062 int k,j; \
00063 \
00064 \
00065 \
00066 flgr1d_copy_##dtype##_##dtype(tmp0,pin[0]); \
00067 flgr1d_copy_##dtype##_##dtype(tmp1,pin[1]); \
00068 \
00069 FLGR_MACRO_LINE_ERODE(dtype,pout[0],tmp0,tmp); \
00070 flgr1d_arith_inf_##dtype(pout[0],pout[0],tmp1); \
00071 \
00072 for(j=1,k=2 ; k<datsrc->size_y ; j++,k++) { \
00073 flgr1d_copy_##dtype##_##dtype(tmp2,pin[k]); \
00074 \
00075 FLGR_MACRO_LINE_ERODE(dtype,pout[j],tmp1,tmp); \
00076 flgr1d_arith_inf_##dtype(pout[j],pout[j],tmp2); \
00077 flgr1d_arith_inf_##dtype(pout[j],pout[j],tmp0); \
00078 \
00079 tmpsav=tmp0; \
00080 tmp0=tmp1; \
00081 tmp1=tmp2; \
00082 tmp2=tmpsav; \
00083 } \
00084 \
00085 FLGR_MACRO_LINE_ERODE(dtype,pout[j],tmp1,tmp); \
00086 flgr1d_arith_inf_##dtype(pout[j],pout[j],tmp0); \
00087 \
00088 flgr1d_destroy(tmp); \
00089 flgr1d_destroy(tmp0); \
00090 flgr1d_destroy(tmp1); \
00091 flgr1d_destroy(tmp2)
00092
00093
00094
00095 void flgr2d_erode_4_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00096 FLGR_MACRO_ERODE_4_CONNEXITY(fgBIT);
00097 }
00098 void flgr2d_erode_4_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00099 FLGR_MACRO_ERODE_4_CONNEXITY(fgUINT8);
00100 }
00101 void flgr2d_erode_4_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00102 FLGR_MACRO_ERODE_4_CONNEXITY(fgUINT16);
00103 }
00104 void flgr2d_erode_4_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00105 FLGR_MACRO_ERODE_4_CONNEXITY(fgUINT32);
00106 }
00107 void flgr2d_erode_4_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00108 FLGR_MACRO_ERODE_4_CONNEXITY(fgINT8);
00109 }
00110 void flgr2d_erode_4_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00111 FLGR_MACRO_ERODE_4_CONNEXITY(fgINT16);
00112 }
00113 void flgr2d_erode_4_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00114 FLGR_MACRO_ERODE_4_CONNEXITY(fgINT32);
00115 }
00116 void flgr2d_erode_4_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00117 FLGR_MACRO_ERODE_4_CONNEXITY(fgFLOAT32);
00118 }
00119 void flgr2d_erode_4_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00120 FLGR_MACRO_ERODE_4_CONNEXITY(fgFLOAT64);
00121 }
00122
00123
00124
00125
00126
00127
00128 #define FLGR_MACRO_ERODE_6_CONNEXITY(dtype) \
00129 FLGR_Data1D *tmp = flgr1d_create_signal_from(datsrc->row[0]); \
00130 FLGR_Data1D *tmp0 = flgr1d_create_signal_from(datsrc->row[0]); \
00131 FLGR_Data1D *tmp1 = flgr1d_create_signal_from(datsrc->row[0]); \
00132 FLGR_Data1D *tmp2 = flgr1d_create_signal_from(datsrc->row[0]); \
00133 FLGR_Data1D *tmps; \
00134 FLGR_Data1D **pout = datdest->row; \
00135 FLGR_Data1D **pin = datsrc->row; \
00136 FLGR_Vector *vec = flgr_vector_create(datsrc->spp,datsrc->type); \
00137 dtype max=MAX_##dtype; \
00138 int i; \
00139 \
00140 \
00141 \
00142 flgr_vector_populate_from_scalar_##dtype(vec,max); \
00143 \
00144 FLGR_MACRO_LINE_RIGHT_ERODE(dtype,tmp0,pin[0],tmp); \
00145 FLGR_MACRO_LINE_LEFT_ERODE(dtype,tmp1,pin[1],tmp); \
00146 flgr1d_shift_left_##dtype(tmp,pin[0],1,vec); \
00147 flgr1d_arith_inf_##dtype(tmp,tmp0,tmp); \
00148 flgr1d_arith_inf_##dtype(pout[0],tmp,tmp1); \
00149 \
00150 for(i=1;i<datsrc->size_y-1;i++) { \
00151 flgr1d_arith_inf_##dtype(tmp0,tmp0,tmp1); \
00152 \
00153 if((i%2)==1) { \
00154 flgr1d_shift_right_##dtype(tmp2,pin[i],1,vec); \
00155 }else { \
00156 flgr1d_shift_left_##dtype(tmp2,pin[i],1,vec); \
00157 } \
00158 \
00159 flgr1d_arith_inf_##dtype(tmp2,tmp0,tmp2); \
00160 tmps=tmp0; \
00161 tmp0=tmp1; \
00162 tmp1=tmps; \
00163 \
00164 if((i%2)==1) { \
00165 FLGR_MACRO_LINE_RIGHT_ERODE(dtype,tmp1,pin[i+1],tmp); \
00166 }else { \
00167 FLGR_MACRO_LINE_LEFT_ERODE(dtype,tmp1,pin[i+1],tmp); \
00168 } \
00169 \
00170 flgr1d_arith_inf_##dtype(pout[i],tmp1,tmp2); \
00171 } \
00172 \
00173 \
00174 i=datsrc->size_y-1; \
00175 flgr1d_arith_inf_##dtype(tmp0,tmp0,tmp1); \
00176 \
00177 if((i%2)==1) { \
00178 flgr1d_shift_right_##dtype(tmp2,pin[i],1,vec); \
00179 }else { \
00180 flgr1d_shift_left_##dtype(tmp2,pin[i],1,vec); \
00181 } \
00182 \
00183 flgr1d_arith_inf_##dtype(pout[i],tmp0,tmp2); \
00184 \
00185 flgr_vector_destroy(vec); \
00186 flgr1d_destroy(tmp); \
00187 flgr1d_destroy(tmp0); \
00188 flgr1d_destroy(tmp1); \
00189 flgr1d_destroy(tmp2)
00190
00191
00192 void flgr2d_erode_6_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00193 FLGR_MACRO_ERODE_6_CONNEXITY(fgBIT);
00194 }
00195 void flgr2d_erode_6_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00196 FLGR_MACRO_ERODE_6_CONNEXITY(fgUINT8);
00197 }
00198 void flgr2d_erode_6_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00199 FLGR_MACRO_ERODE_6_CONNEXITY(fgUINT16);
00200 }
00201 void flgr2d_erode_6_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00202 FLGR_MACRO_ERODE_6_CONNEXITY(fgUINT32);
00203 }
00204 void flgr2d_erode_6_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00205 FLGR_MACRO_ERODE_6_CONNEXITY(fgINT8);
00206 }
00207 void flgr2d_erode_6_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00208 FLGR_MACRO_ERODE_6_CONNEXITY(fgINT16);
00209 }
00210 void flgr2d_erode_6_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00211 FLGR_MACRO_ERODE_6_CONNEXITY(fgINT32);
00212 }
00213 void flgr2d_erode_6_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00214 FLGR_MACRO_ERODE_6_CONNEXITY(fgFLOAT32);
00215 }
00216 void flgr2d_erode_6_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00217 FLGR_MACRO_ERODE_6_CONNEXITY(fgFLOAT64);
00218 }
00219
00220
00221
00222 #define FLGR_MACRO_ERODE_8_CONNEXITY(dtype) \
00223 FLGR_Data1D *tmp = flgr1d_create_signal_from(datsrc->row[0]); \
00224 FLGR_Data1D *tmp0 = flgr1d_create_signal_from(datsrc->row[0]); \
00225 FLGR_Data1D *tmp1 = flgr1d_create_signal_from(datsrc->row[0]); \
00226 FLGR_Data1D *tmp2 = flgr1d_create_signal_from(datsrc->row[0]); \
00227 FLGR_Data1D *tmpsav; \
00228 FLGR_Data1D **pout = datdest->row; \
00229 FLGR_Data1D **pin = datsrc->row; \
00230 int k,j; \
00231 \
00232 \
00233 \
00234 FLGR_MACRO_LINE_ERODE(dtype,tmp0,pin[0],tmp); \
00235 FLGR_MACRO_LINE_ERODE(dtype,tmp1,pin[1],tmp); \
00236 \
00237 flgr1d_arith_inf_##dtype(pout[0],tmp0,tmp1); \
00238 \
00239 for(j=1,k=2 ; k<datsrc->size_y ; j++,k++) { \
00240 FLGR_MACRO_LINE_ERODE(dtype,tmp2,pin[k],tmp); \
00241 flgr1d_arith_inf_##dtype(tmp0,tmp1,tmp0); \
00242 flgr1d_arith_inf_##dtype(pout[j],tmp0,tmp2); \
00243 \
00244 tmpsav=tmp0; \
00245 tmp0=tmp1; \
00246 tmp1=tmp2; \
00247 tmp2=tmpsav; \
00248 } \
00249 \
00250 flgr1d_arith_inf_##dtype(pout[j],tmp0,tmp1); \
00251 \
00252 flgr1d_destroy(tmp); \
00253 flgr1d_destroy(tmp0); \
00254 flgr1d_destroy(tmp1); \
00255 flgr1d_destroy(tmp2)
00256
00257
00258 void flgr2d_erode_8_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00259 FLGR_MACRO_ERODE_8_CONNEXITY(fgBIT);
00260 }
00261 void flgr2d_erode_8_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00262 FLGR_MACRO_ERODE_8_CONNEXITY(fgUINT8);
00263 }
00264 void flgr2d_erode_8_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00265 FLGR_MACRO_ERODE_8_CONNEXITY(fgUINT16);
00266 }
00267 void flgr2d_erode_8_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00268 FLGR_MACRO_ERODE_8_CONNEXITY(fgUINT32);
00269 }
00270 void flgr2d_erode_8_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00271 FLGR_MACRO_ERODE_8_CONNEXITY(fgINT8);
00272 }
00273 void flgr2d_erode_8_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00274 FLGR_MACRO_ERODE_8_CONNEXITY(fgINT16);
00275 }
00276 void flgr2d_erode_8_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00277 FLGR_MACRO_ERODE_8_CONNEXITY(fgINT32);
00278 }
00279 void flgr2d_erode_8_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00280 FLGR_MACRO_ERODE_8_CONNEXITY(fgFLOAT32);
00281 }
00282 void flgr2d_erode_8_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00283 FLGR_MACRO_ERODE_8_CONNEXITY(fgFLOAT64);
00284 }
00285
00286
00289
00292
00293 void flgr2d_gradient_inner_8_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00294
00295 flgr2d_erode_8_connexity_fgBIT(datdest,datsrc);
00296 flgr2d_arith_xor_fgBIT(datdest,datsrc,datdest);
00297 }
00298 void flgr2d_gradient_inner_8_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00299
00300 flgr2d_erode_8_connexity_fgUINT8(datdest,datsrc);
00301 flgr2d_arith_sub_fgUINT8(datdest,datsrc,datdest);
00302 }
00303 void flgr2d_gradient_inner_8_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00304
00305 flgr2d_erode_8_connexity_fgUINT16(datdest,datsrc);
00306 flgr2d_arith_sub_fgUINT16(datdest,datsrc,datdest);
00307 }
00308 void flgr2d_gradient_inner_8_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00309
00310 flgr2d_erode_8_connexity_fgUINT32(datdest,datsrc);
00311 flgr2d_arith_sub_fgUINT32(datdest,datsrc,datdest);
00312 }
00313 void flgr2d_gradient_inner_8_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00314
00315 flgr2d_erode_8_connexity_fgINT8(datdest,datsrc);
00316 flgr2d_arith_sub_fgINT8(datdest,datsrc,datdest);
00317 }
00318 void flgr2d_gradient_inner_8_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00319
00320 flgr2d_erode_8_connexity_fgINT16(datdest,datsrc);
00321 flgr2d_arith_sub_fgINT16(datdest,datsrc,datdest);
00322 }
00323 void flgr2d_gradient_inner_8_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00324
00325 flgr2d_erode_8_connexity_fgINT32(datdest,datsrc);
00326 flgr2d_arith_sub_fgINT32(datdest,datsrc,datdest);
00327 }
00328 void flgr2d_gradient_inner_8_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00329
00330 flgr2d_erode_8_connexity_fgFLOAT32(datdest,datsrc);
00331 flgr2d_arith_sub_fgFLOAT32(datdest,datsrc,datdest);
00332 }
00333 void flgr2d_gradient_inner_8_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00334
00335 flgr2d_erode_8_connexity_fgFLOAT64(datdest,datsrc);
00336 flgr2d_arith_sub_fgFLOAT64(datdest,datsrc,datdest);
00337 }
00338
00339
00340
00341 void flgr2d_gradient_inner_4_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00342
00343 flgr2d_erode_4_connexity_fgBIT(datdest,datsrc);
00344 flgr2d_arith_xor_fgBIT(datdest,datsrc,datdest);
00345 }
00346 void flgr2d_gradient_inner_4_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00347
00348 flgr2d_erode_4_connexity_fgUINT8(datdest,datsrc);
00349 flgr2d_arith_sub_fgUINT8(datdest,datsrc,datdest);
00350 }
00351 void flgr2d_gradient_inner_4_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00352
00353 flgr2d_erode_4_connexity_fgUINT16(datdest,datsrc);
00354 flgr2d_arith_sub_fgUINT16(datdest,datsrc,datdest);
00355 }
00356 void flgr2d_gradient_inner_4_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00357
00358 flgr2d_erode_4_connexity_fgUINT32(datdest,datsrc);
00359 flgr2d_arith_sub_fgUINT32(datdest,datsrc,datdest);
00360 }
00361 void flgr2d_gradient_inner_4_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00362
00363 flgr2d_erode_4_connexity_fgINT8(datdest,datsrc);
00364 flgr2d_arith_sub_fgINT8(datdest,datsrc,datdest);
00365 }
00366 void flgr2d_gradient_inner_4_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00367
00368 flgr2d_erode_4_connexity_fgINT16(datdest,datsrc);
00369 flgr2d_arith_sub_fgINT16(datdest,datsrc,datdest);
00370 }
00371 void flgr2d_gradient_inner_4_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00372
00373 flgr2d_erode_4_connexity_fgINT32(datdest,datsrc);
00374 flgr2d_arith_sub_fgINT32(datdest,datsrc,datdest);
00375 }
00376 void flgr2d_gradient_inner_4_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00377
00378 flgr2d_erode_4_connexity_fgFLOAT32(datdest,datsrc);
00379 flgr2d_arith_sub_fgFLOAT32(datdest,datsrc,datdest);
00380 }
00381 void flgr2d_gradient_inner_4_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00382
00383 flgr2d_erode_4_connexity_fgFLOAT64(datdest,datsrc);
00384 flgr2d_arith_sub_fgFLOAT64(datdest,datsrc,datdest);
00385 }
00386
00387
00388
00389
00390 void flgr2d_gradient_inner_6_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00391
00392 flgr2d_erode_6_connexity_fgBIT(datdest,datsrc);
00393 flgr2d_arith_xor_fgBIT(datdest,datsrc,datdest);
00394 }
00395 void flgr2d_gradient_inner_6_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00396
00397 flgr2d_erode_6_connexity_fgUINT8(datdest,datsrc);
00398 flgr2d_arith_sub_fgUINT8(datdest,datsrc,datdest);
00399 }
00400 void flgr2d_gradient_inner_6_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00401
00402 flgr2d_erode_6_connexity_fgUINT16(datdest,datsrc);
00403 flgr2d_arith_sub_fgUINT16(datdest,datsrc,datdest);
00404 }
00405 void flgr2d_gradient_inner_6_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00406
00407 flgr2d_erode_6_connexity_fgUINT32(datdest,datsrc);
00408 flgr2d_arith_sub_fgUINT32(datdest,datsrc,datdest);
00409 }
00410 void flgr2d_gradient_inner_6_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00411
00412 flgr2d_erode_6_connexity_fgINT8(datdest,datsrc);
00413 flgr2d_arith_sub_fgINT8(datdest,datsrc,datdest);
00414 }
00415 void flgr2d_gradient_inner_6_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00416
00417 flgr2d_erode_6_connexity_fgINT16(datdest,datsrc);
00418 flgr2d_arith_sub_fgINT16(datdest,datsrc,datdest);
00419 }
00420 void flgr2d_gradient_inner_6_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00421
00422 flgr2d_erode_6_connexity_fgINT32(datdest,datsrc);
00423 flgr2d_arith_sub_fgINT32(datdest,datsrc,datdest);
00424 }
00425 void flgr2d_gradient_inner_6_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00426
00427 flgr2d_erode_6_connexity_fgFLOAT32(datdest,datsrc);
00428 flgr2d_arith_sub_fgFLOAT32(datdest,datsrc,datdest);
00429 }
00430 void flgr2d_gradient_inner_6_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00431
00432 flgr2d_erode_6_connexity_fgFLOAT64(datdest,datsrc);
00433 flgr2d_arith_sub_fgFLOAT64(datdest,datsrc,datdest);
00434 }
00435
00436
00437
00438
00441
00444
00445 #define FLGR_MACRO_LINE_DILATE(dtype,lout,lin,ltmp) \
00446 flgr1d_arith_sup_shift_right_##dtype(ltmp,lin, 1); \
00447 flgr1d_arith_sup_shift_left_##dtype(lout,ltmp, 1)
00448
00449 #define FLGR_MACRO_LINE_RIGHT_DILATE(dtype,lout,lin,ltmp0) \
00450 flgr1d_arith_sup_shift_right_##dtype(lout,lin, 1)
00451
00452 #define FLGR_MACRO_LINE_LEFT_DILATE(dtype,lout,lin,ltmp0) \
00453 flgr1d_arith_sup_shift_left_##dtype(lout,lin, 1)
00454
00455
00456 #define FLGR_MACRO_DILATE_4_CONNEXITY(dtype) \
00457 FLGR_Data1D *tmp = flgr1d_create_signal_from(datsrc->row[0]); \
00458 FLGR_Data1D *tmp0 = flgr1d_create_signal_from(datsrc->row[0]); \
00459 FLGR_Data1D *tmp1 = flgr1d_create_signal_from(datsrc->row[0]); \
00460 FLGR_Data1D *tmp2 = flgr1d_create_signal_from(datsrc->row[0]); \
00461 FLGR_Data1D *tmpsav; \
00462 FLGR_Data1D **pout = datdest->row; \
00463 FLGR_Data1D **pin = datsrc->row; \
00464 int k,j; \
00465 \
00466 \
00467 \
00468 flgr1d_copy_##dtype##_##dtype(tmp0,pin[0]); \
00469 flgr1d_copy_##dtype##_##dtype(tmp1,pin[1]); \
00470 \
00471 FLGR_MACRO_LINE_DILATE(dtype,pout[0],tmp0,tmp); \
00472 flgr1d_arith_sup_##dtype(pout[0],pout[0],tmp1); \
00473 \
00474 for(j=1,k=2 ; k<datsrc->size_y ; j++,k++) { \
00475 flgr1d_copy_##dtype##_##dtype(tmp2,pin[k]); \
00476 \
00477 FLGR_MACRO_LINE_DILATE(dtype,pout[j],tmp1,tmp); \
00478 flgr1d_arith_sup_##dtype(pout[j],pout[j],tmp2); \
00479 flgr1d_arith_sup_##dtype(pout[j],pout[j],tmp0); \
00480 \
00481 tmpsav=tmp0; \
00482 tmp0=tmp1; \
00483 tmp1=tmp2; \
00484 tmp2=tmpsav; \
00485 } \
00486 \
00487 FLGR_MACRO_LINE_DILATE(dtype,pout[j],tmp1,tmp); \
00488 flgr1d_arith_sup_##dtype(pout[j],pout[j],tmp0); \
00489 \
00490 \
00491 flgr1d_destroy(tmp); \
00492 flgr1d_destroy(tmp0); \
00493 flgr1d_destroy(tmp1); \
00494 flgr1d_destroy(tmp2)
00495
00496
00497 void flgr2d_dilate_4_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00498 FLGR_MACRO_DILATE_4_CONNEXITY(fgBIT);
00499 }
00500 void flgr2d_dilate_4_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00501 FLGR_MACRO_DILATE_4_CONNEXITY(fgUINT8);
00502 }
00503 void flgr2d_dilate_4_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00504 FLGR_MACRO_DILATE_4_CONNEXITY(fgUINT16);
00505 }
00506 void flgr2d_dilate_4_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00507 FLGR_MACRO_DILATE_4_CONNEXITY(fgUINT32);
00508 }
00509 void flgr2d_dilate_4_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00510 FLGR_MACRO_DILATE_4_CONNEXITY(fgINT8);
00511 }
00512 void flgr2d_dilate_4_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00513 FLGR_MACRO_DILATE_4_CONNEXITY(fgINT16);
00514 }
00515 void flgr2d_dilate_4_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00516 FLGR_MACRO_DILATE_4_CONNEXITY(fgINT32);
00517 }
00518 void flgr2d_dilate_4_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00519 FLGR_MACRO_DILATE_4_CONNEXITY(fgFLOAT32);
00520 }
00521 void flgr2d_dilate_4_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00522 FLGR_MACRO_DILATE_4_CONNEXITY(fgFLOAT64);
00523 }
00524
00525
00526
00527
00528
00529
00530 #define FLGR_MACRO_DILATE_6_CONNEXITY(dtype) \
00531 FLGR_Data1D *tmp = flgr1d_create_signal_from(datsrc->row[0]); \
00532 FLGR_Data1D *tmp0 = flgr1d_create_signal_from(datsrc->row[0]); \
00533 FLGR_Data1D *tmp1 = flgr1d_create_signal_from(datsrc->row[0]); \
00534 FLGR_Data1D *tmp2 = flgr1d_create_signal_from(datsrc->row[0]); \
00535 FLGR_Data1D *tmps; \
00536 FLGR_Data1D **pout = datdest->row; \
00537 FLGR_Data1D **pin = datsrc->row; \
00538 FLGR_Vector *vec = flgr_vector_create(datsrc->spp,datsrc->type); \
00539 dtype min = MIN_##dtype; \
00540 int i; \
00541 \
00542 \
00543 \
00544 flgr_vector_populate_from_scalar_##dtype(vec,min); \
00545 \
00546 FLGR_MACRO_LINE_RIGHT_DILATE(dtype,tmp0,pin[0],tmp); \
00547 FLGR_MACRO_LINE_LEFT_DILATE(dtype,tmp1,pin[1],tmp); \
00548 flgr1d_shift_left_##dtype(tmp,pin[0],1,vec); \
00549 flgr1d_arith_sup_##dtype(tmp,tmp0,tmp); \
00550 flgr1d_arith_sup_##dtype(pout[0],tmp,tmp1); \
00551 \
00552 for(i=1;i<datsrc->size_y-1;i++) { \
00553 flgr1d_arith_sup_##dtype(tmp0,tmp0,tmp1); \
00554 \
00555 if((i%2)==1) { \
00556 flgr1d_shift_right_##dtype(tmp2,pin[i],1,vec); \
00557 }else { \
00558 flgr1d_shift_left_##dtype(tmp2,pin[i],1,vec); \
00559 } \
00560 \
00561 flgr1d_arith_sup_##dtype(tmp2,tmp0,tmp2); \
00562 tmps=tmp0; \
00563 tmp0=tmp1; \
00564 tmp1=tmps; \
00565 \
00566 if((i%2)==1) { \
00567 FLGR_MACRO_LINE_RIGHT_DILATE(dtype,tmp1,pin[i+1],tmp); \
00568 }else { \
00569 FLGR_MACRO_LINE_LEFT_DILATE(dtype,tmp1,pin[i+1],tmp); \
00570 } \
00571 \
00572 flgr1d_arith_sup_##dtype(pout[i],tmp1,tmp2); \
00573 } \
00574 \
00575 \
00576 i=datsrc->size_y-1; \
00577 flgr1d_arith_sup_##dtype(tmp0,tmp0,tmp1); \
00578 \
00579 if((i%2)==1) { \
00580 flgr1d_shift_right_##dtype(tmp2,pin[i],1,vec); \
00581 }else { \
00582 flgr1d_shift_left_##dtype(tmp2,pin[i],1,vec); \
00583 } \
00584 \
00585 flgr1d_arith_sup_##dtype(pout[i],tmp0,tmp2); \
00586 \
00587 flgr_vector_destroy(vec); \
00588 flgr1d_destroy(tmp); \
00589 flgr1d_destroy(tmp0); \
00590 flgr1d_destroy(tmp1); \
00591 flgr1d_destroy(tmp2)
00592
00593
00594 void flgr2d_dilate_6_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00595 FLGR_MACRO_DILATE_6_CONNEXITY(fgBIT);
00596 }
00597 void flgr2d_dilate_6_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00598 FLGR_MACRO_DILATE_6_CONNEXITY(fgUINT8);
00599 }
00600 void flgr2d_dilate_6_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00601 FLGR_MACRO_DILATE_6_CONNEXITY(fgUINT16);
00602 }
00603 void flgr2d_dilate_6_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00604 FLGR_MACRO_DILATE_6_CONNEXITY(fgUINT32);
00605 }
00606 void flgr2d_dilate_6_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00607 FLGR_MACRO_DILATE_6_CONNEXITY(fgINT8);
00608 }
00609 void flgr2d_dilate_6_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00610 FLGR_MACRO_DILATE_6_CONNEXITY(fgINT16);
00611 }
00612 void flgr2d_dilate_6_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00613 FLGR_MACRO_DILATE_6_CONNEXITY(fgINT32);
00614 }
00615 void flgr2d_dilate_6_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00616 FLGR_MACRO_DILATE_6_CONNEXITY(fgFLOAT32);
00617 }
00618 void flgr2d_dilate_6_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00619 FLGR_MACRO_DILATE_6_CONNEXITY(fgFLOAT64);
00620 }
00621
00622
00623
00624
00625 #define FLGR_MACRO_DILATE_8_CONNEXITY(dtype) \
00626 FLGR_Data1D *tmp = flgr1d_create_signal_from(datsrc->row[0]); \
00627 FLGR_Data1D *tmp0 = flgr1d_create_signal_from(datsrc->row[0]); \
00628 FLGR_Data1D *tmp1 = flgr1d_create_signal_from(datsrc->row[0]); \
00629 FLGR_Data1D *tmp2 = flgr1d_create_signal_from(datsrc->row[0]); \
00630 FLGR_Data1D **pout = datdest->row; \
00631 FLGR_Data1D **pin = datsrc->row; \
00632 FLGR_Data1D *tmpsav; \
00633 int k,j; \
00634 \
00635 \
00636 \
00637 FLGR_MACRO_LINE_DILATE(dtype,tmp0,pin[0],tmp); \
00638 FLGR_MACRO_LINE_DILATE(dtype,tmp1,pin[1],tmp); \
00639 \
00640 flgr1d_arith_sup_##dtype(pout[0],tmp0,tmp1); \
00641 \
00642 for(j=1,k=2 ; k<datsrc->size_y ; j++,k++) { \
00643 FLGR_MACRO_LINE_DILATE(dtype,tmp2,pin[k],tmp); \
00644 flgr1d_arith_sup_##dtype(tmp0,tmp1,tmp0); \
00645 flgr1d_arith_sup_##dtype(pout[j],tmp0,tmp2); \
00646 \
00647 tmpsav = tmp0; \
00648 tmp0 = tmp1; \
00649 tmp1 = tmp2; \
00650 tmp2 = tmpsav; \
00651 } \
00652 \
00653 flgr1d_arith_sup_##dtype(pout[j],tmp0,tmp1); \
00654 \
00655 flgr1d_destroy(tmp); \
00656 flgr1d_destroy(tmp0); \
00657 flgr1d_destroy(tmp1); \
00658 flgr1d_destroy(tmp2)
00659
00660
00661 void flgr2d_dilate_8_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00662 FLGR_MACRO_DILATE_8_CONNEXITY(fgBIT);
00663 }
00664 void flgr2d_dilate_8_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00665 FLGR_MACRO_DILATE_8_CONNEXITY(fgUINT8);
00666 }
00667 void flgr2d_dilate_8_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00668 FLGR_MACRO_DILATE_8_CONNEXITY(fgUINT16);
00669 }
00670 void flgr2d_dilate_8_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00671 FLGR_MACRO_DILATE_8_CONNEXITY(fgUINT32);
00672 }
00673 void flgr2d_dilate_8_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00674 FLGR_MACRO_DILATE_8_CONNEXITY(fgINT8);
00675 }
00676 void flgr2d_dilate_8_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00677 FLGR_MACRO_DILATE_8_CONNEXITY(fgINT16);
00678 }
00679 void flgr2d_dilate_8_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00680 FLGR_MACRO_DILATE_8_CONNEXITY(fgINT32);
00681 }
00682 void flgr2d_dilate_8_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00683 FLGR_MACRO_DILATE_8_CONNEXITY(fgFLOAT32);
00684 }
00685 void flgr2d_dilate_8_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00686 FLGR_MACRO_DILATE_8_CONNEXITY(fgFLOAT64);
00687 }
00688
00689
00690
00693
00696
00697 void flgr2d_gradient_outer_8_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00698
00699 flgr2d_dilate_8_connexity_fgBIT(datdest,datsrc);
00700 flgr2d_arith_xor_fgBIT(datdest,datdest,datsrc);
00701 }
00702 void flgr2d_gradient_outer_8_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00703
00704 flgr2d_dilate_8_connexity_fgUINT8(datdest,datsrc);
00705 flgr2d_arith_sub_fgUINT8(datdest,datdest,datsrc);
00706 }
00707 void flgr2d_gradient_outer_8_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00708
00709 flgr2d_dilate_8_connexity_fgUINT16(datdest,datsrc);
00710 flgr2d_arith_sub_fgUINT16(datdest,datdest,datsrc);
00711 }
00712 void flgr2d_gradient_outer_8_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00713
00714 flgr2d_dilate_8_connexity_fgUINT32(datdest,datsrc);
00715 flgr2d_arith_sub_fgUINT32(datdest,datdest,datsrc);
00716 }
00717 void flgr2d_gradient_outer_8_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00718
00719 flgr2d_dilate_8_connexity_fgINT8(datdest,datsrc);
00720 flgr2d_arith_sub_fgINT8(datdest,datdest,datsrc);
00721 }
00722 void flgr2d_gradient_outer_8_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00723
00724 flgr2d_dilate_8_connexity_fgINT16(datdest,datsrc);
00725 flgr2d_arith_sub_fgINT16(datdest,datdest,datsrc);
00726 }
00727 void flgr2d_gradient_outer_8_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00728
00729 flgr2d_dilate_8_connexity_fgINT32(datdest,datsrc);
00730 flgr2d_arith_sub_fgINT32(datdest,datdest,datsrc);
00731 }
00732 void flgr2d_gradient_outer_8_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00733
00734 flgr2d_dilate_8_connexity_fgFLOAT32(datdest,datsrc);
00735 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,datsrc);
00736 }
00737 void flgr2d_gradient_outer_8_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00738
00739 flgr2d_dilate_8_connexity_fgFLOAT64(datdest,datsrc);
00740 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,datsrc);
00741 }
00742
00743
00744
00745 void flgr2d_gradient_outer_6_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00746
00747 flgr2d_dilate_6_connexity_fgBIT(datdest,datsrc);
00748 flgr2d_arith_xor_fgBIT(datdest,datdest,datsrc);
00749 }
00750 void flgr2d_gradient_outer_6_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00751
00752 flgr2d_dilate_6_connexity_fgUINT8(datdest,datsrc);
00753 flgr2d_arith_sub_fgUINT8(datdest,datdest,datsrc);
00754 }
00755 void flgr2d_gradient_outer_6_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00756
00757 flgr2d_dilate_6_connexity_fgUINT16(datdest,datsrc);
00758 flgr2d_arith_sub_fgUINT16(datdest,datdest,datsrc);
00759 }
00760 void flgr2d_gradient_outer_6_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00761
00762 flgr2d_dilate_6_connexity_fgUINT32(datdest,datsrc);
00763 flgr2d_arith_sub_fgUINT32(datdest,datdest,datsrc);
00764 }
00765 void flgr2d_gradient_outer_6_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00766
00767 flgr2d_dilate_6_connexity_fgINT8(datdest,datsrc);
00768 flgr2d_arith_sub_fgINT8(datdest,datdest,datsrc);
00769 }
00770 void flgr2d_gradient_outer_6_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00771
00772 flgr2d_dilate_6_connexity_fgINT16(datdest,datsrc);
00773 flgr2d_arith_sub_fgINT16(datdest,datdest,datsrc);
00774 }
00775 void flgr2d_gradient_outer_6_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00776
00777 flgr2d_dilate_6_connexity_fgINT32(datdest,datsrc);
00778 flgr2d_arith_sub_fgINT32(datdest,datdest,datsrc);
00779 }
00780 void flgr2d_gradient_outer_6_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00781
00782 flgr2d_dilate_6_connexity_fgFLOAT32(datdest,datsrc);
00783 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,datsrc);
00784 }
00785 void flgr2d_gradient_outer_6_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00786
00787 flgr2d_dilate_6_connexity_fgFLOAT64(datdest,datsrc);
00788 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,datsrc);
00789 }
00790
00791
00792
00793
00794 void flgr2d_gradient_outer_4_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00795
00796 flgr2d_dilate_4_connexity_fgBIT(datdest,datsrc);
00797 flgr2d_arith_xor_fgBIT(datdest,datdest,datsrc);
00798 }
00799 void flgr2d_gradient_outer_4_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00800
00801 flgr2d_dilate_4_connexity_fgUINT8(datdest,datsrc);
00802 flgr2d_arith_sub_fgUINT8(datdest,datdest,datsrc);
00803 }
00804 void flgr2d_gradient_outer_4_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00805
00806 flgr2d_dilate_4_connexity_fgUINT16(datdest,datsrc);
00807 flgr2d_arith_sub_fgUINT16(datdest,datdest,datsrc);
00808 }
00809 void flgr2d_gradient_outer_4_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00810
00811 flgr2d_dilate_4_connexity_fgUINT32(datdest,datsrc);
00812 flgr2d_arith_sub_fgUINT32(datdest,datdest,datsrc);
00813 }
00814 void flgr2d_gradient_outer_4_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00815
00816 flgr2d_dilate_4_connexity_fgINT8(datdest,datsrc);
00817 flgr2d_arith_sub_fgINT8(datdest,datdest,datsrc);
00818 }
00819 void flgr2d_gradient_outer_4_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00820
00821 flgr2d_dilate_4_connexity_fgINT16(datdest,datsrc);
00822 flgr2d_arith_sub_fgINT16(datdest,datdest,datsrc);
00823 }
00824 void flgr2d_gradient_outer_4_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00825
00826 flgr2d_dilate_4_connexity_fgINT32(datdest,datsrc);
00827 flgr2d_arith_sub_fgINT32(datdest,datdest,datsrc);
00828 }
00829 void flgr2d_gradient_outer_4_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00830
00831 flgr2d_dilate_4_connexity_fgFLOAT32(datdest,datsrc);
00832 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,datsrc);
00833 }
00834 void flgr2d_gradient_outer_4_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00835
00836 flgr2d_dilate_4_connexity_fgFLOAT64(datdest,datsrc);
00837 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,datsrc);
00838 }
00839
00840
00841
00842
00845
00848
00849 void flgr2d_gradient_thick_8_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00850 FLGR_Data2D *tmp;
00851
00852
00853
00854 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00855
00856 flgr2d_erode_8_connexity_fgBIT(tmp,datsrc);
00857 flgr2d_dilate_8_connexity_fgBIT(datdest,datsrc);
00858 flgr2d_arith_xor_fgBIT(datdest,datdest,tmp);
00859
00860 flgr2d_destroy(tmp);
00861 }
00862 void flgr2d_gradient_thick_8_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00863 FLGR_Data2D *tmp;
00864
00865
00866
00867 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00868
00869 flgr2d_erode_8_connexity_fgUINT8(tmp,datsrc);
00870 flgr2d_dilate_8_connexity_fgUINT8(datdest,datsrc);
00871 flgr2d_arith_sub_fgUINT8(datdest,datdest,tmp);
00872
00873 flgr2d_destroy(tmp);
00874 }
00875 void flgr2d_gradient_thick_8_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00876 FLGR_Data2D *tmp;
00877
00878
00879
00880 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00881
00882 flgr2d_erode_8_connexity_fgUINT16(tmp,datsrc);
00883 flgr2d_dilate_8_connexity_fgUINT16(datdest,datsrc);
00884 flgr2d_arith_sub_fgUINT16(datdest,datdest,tmp);
00885
00886 flgr2d_destroy(tmp);
00887 }
00888 void flgr2d_gradient_thick_8_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00889 FLGR_Data2D *tmp;
00890
00891
00892
00893 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00894
00895 flgr2d_erode_8_connexity_fgUINT32(tmp,datsrc);
00896 flgr2d_dilate_8_connexity_fgUINT32(datdest,datsrc);
00897 flgr2d_arith_sub_fgUINT32(datdest,datdest,tmp);
00898
00899 flgr2d_destroy(tmp);
00900 }
00901 void flgr2d_gradient_thick_8_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00902 FLGR_Data2D *tmp;
00903
00904
00905
00906 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00907
00908 flgr2d_erode_8_connexity_fgINT8(tmp,datsrc);
00909 flgr2d_dilate_8_connexity_fgINT8(datdest,datsrc);
00910 flgr2d_arith_sub_fgINT8(datdest,datdest,tmp);
00911
00912 flgr2d_destroy(tmp);
00913 }
00914 void flgr2d_gradient_thick_8_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00915 FLGR_Data2D *tmp;
00916
00917
00918
00919 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00920
00921 flgr2d_erode_8_connexity_fgINT16(tmp,datsrc);
00922 flgr2d_dilate_8_connexity_fgINT16(datdest,datsrc);
00923 flgr2d_arith_sub_fgINT16(datdest,datdest,tmp);
00924
00925 flgr2d_destroy(tmp);
00926 }
00927 void flgr2d_gradient_thick_8_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00928 FLGR_Data2D *tmp;
00929
00930
00931
00932 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00933
00934 flgr2d_erode_8_connexity_fgINT32(tmp,datsrc);
00935 flgr2d_dilate_8_connexity_fgINT32(datdest,datsrc);
00936 flgr2d_arith_sub_fgINT32(datdest,datdest,tmp);
00937
00938 flgr2d_destroy(tmp);
00939 }
00940 void flgr2d_gradient_thick_8_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00941 FLGR_Data2D *tmp;
00942
00943
00944
00945 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00946
00947 flgr2d_erode_8_connexity_fgFLOAT32(tmp,datsrc);
00948 flgr2d_dilate_8_connexity_fgFLOAT32(datdest,datsrc);
00949 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,tmp);
00950
00951 flgr2d_destroy(tmp);
00952 }
00953 void flgr2d_gradient_thick_8_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00954 FLGR_Data2D *tmp;
00955
00956
00957
00958 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00959
00960 flgr2d_erode_8_connexity_fgFLOAT64(tmp,datsrc);
00961 flgr2d_dilate_8_connexity_fgFLOAT64(datdest,datsrc);
00962 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,tmp);
00963
00964 flgr2d_destroy(tmp);
00965 }
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975 void flgr2d_gradient_thick_6_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00976 FLGR_Data2D *tmp;
00977
00978
00979
00980 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00981
00982 flgr2d_erode_6_connexity_fgBIT(tmp,datsrc);
00983 flgr2d_dilate_6_connexity_fgBIT(datdest,datsrc);
00984 flgr2d_arith_xor_fgBIT(datdest,datdest,tmp);
00985
00986 flgr2d_destroy(tmp);
00987 }
00988 void flgr2d_gradient_thick_6_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
00989 FLGR_Data2D *tmp;
00990
00991
00992
00993 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
00994
00995 flgr2d_erode_6_connexity_fgUINT8(tmp,datsrc);
00996 flgr2d_dilate_6_connexity_fgUINT8(datdest,datsrc);
00997 flgr2d_arith_sub_fgUINT8(datdest,datdest,tmp);
00998
00999 flgr2d_destroy(tmp);
01000 }
01001 void flgr2d_gradient_thick_6_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01002 FLGR_Data2D *tmp;
01003
01004
01005
01006 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01007
01008 flgr2d_erode_6_connexity_fgUINT16(tmp,datsrc);
01009 flgr2d_dilate_6_connexity_fgUINT16(datdest,datsrc);
01010 flgr2d_arith_sub_fgUINT16(datdest,datdest,tmp);
01011
01012 flgr2d_destroy(tmp);
01013 }
01014 void flgr2d_gradient_thick_6_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01015 FLGR_Data2D *tmp;
01016
01017
01018
01019 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01020
01021 flgr2d_erode_6_connexity_fgUINT32(tmp,datsrc);
01022 flgr2d_dilate_6_connexity_fgUINT32(datdest,datsrc);
01023 flgr2d_arith_sub_fgUINT32(datdest,datdest,tmp);
01024
01025 flgr2d_destroy(tmp);
01026 }
01027 void flgr2d_gradient_thick_6_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01028 FLGR_Data2D *tmp;
01029
01030
01031
01032 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01033
01034 flgr2d_erode_6_connexity_fgINT8(tmp,datsrc);
01035 flgr2d_dilate_6_connexity_fgINT8(datdest,datsrc);
01036 flgr2d_arith_sub_fgINT8(datdest,datdest,tmp);
01037
01038 flgr2d_destroy(tmp);
01039 }
01040 void flgr2d_gradient_thick_6_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01041 FLGR_Data2D *tmp;
01042
01043
01044
01045 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01046
01047 flgr2d_erode_6_connexity_fgINT16(tmp,datsrc);
01048 flgr2d_dilate_6_connexity_fgINT16(datdest,datsrc);
01049 flgr2d_arith_sub_fgINT16(datdest,datdest,tmp);
01050
01051 flgr2d_destroy(tmp);
01052 }
01053 void flgr2d_gradient_thick_6_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01054 FLGR_Data2D *tmp;
01055
01056
01057
01058 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01059
01060 flgr2d_erode_6_connexity_fgINT32(tmp,datsrc);
01061 flgr2d_dilate_6_connexity_fgINT32(datdest,datsrc);
01062 flgr2d_arith_sub_fgINT32(datdest,datdest,tmp);
01063
01064 flgr2d_destroy(tmp);
01065 }
01066 void flgr2d_gradient_thick_6_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01067 FLGR_Data2D *tmp;
01068
01069
01070
01071 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01072
01073 flgr2d_erode_6_connexity_fgFLOAT32(tmp,datsrc);
01074 flgr2d_dilate_6_connexity_fgFLOAT32(datdest,datsrc);
01075 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,tmp);
01076
01077 flgr2d_destroy(tmp);
01078 }
01079 void flgr2d_gradient_thick_6_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01080 FLGR_Data2D *tmp;
01081
01082
01083
01084 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01085
01086 flgr2d_erode_6_connexity_fgFLOAT64(tmp,datsrc);
01087 flgr2d_dilate_6_connexity_fgFLOAT64(datdest,datsrc);
01088 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,tmp);
01089
01090 flgr2d_destroy(tmp);
01091 }
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101 void flgr2d_gradient_thick_4_connexity_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01102 FLGR_Data2D *tmp;
01103
01104
01105
01106 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01107
01108 flgr2d_erode_4_connexity_fgBIT(tmp,datsrc);
01109 flgr2d_dilate_4_connexity_fgBIT(datdest,datsrc);
01110 flgr2d_arith_xor_fgBIT(datdest,datdest,tmp);
01111
01112 flgr2d_destroy(tmp);
01113 }
01114 void flgr2d_gradient_thick_4_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01115 FLGR_Data2D *tmp;
01116
01117
01118
01119 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01120
01121 flgr2d_erode_4_connexity_fgUINT8(tmp,datsrc);
01122 flgr2d_dilate_4_connexity_fgUINT8(datdest,datsrc);
01123 flgr2d_arith_sub_fgUINT8(datdest,datdest,tmp);
01124
01125 flgr2d_destroy(tmp);
01126 }
01127 void flgr2d_gradient_thick_4_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01128 FLGR_Data2D *tmp;
01129
01130
01131
01132 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01133
01134 flgr2d_erode_4_connexity_fgUINT16(tmp,datsrc);
01135 flgr2d_dilate_4_connexity_fgUINT16(datdest,datsrc);
01136 flgr2d_arith_sub_fgUINT16(datdest,datdest,tmp);
01137
01138 flgr2d_destroy(tmp);
01139 }
01140 void flgr2d_gradient_thick_4_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01141 FLGR_Data2D *tmp;
01142
01143
01144
01145 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01146
01147 flgr2d_erode_4_connexity_fgUINT32(tmp,datsrc);
01148 flgr2d_dilate_4_connexity_fgUINT32(datdest,datsrc);
01149 flgr2d_arith_sub_fgUINT32(datdest,datdest,tmp);
01150
01151 flgr2d_destroy(tmp);
01152 }
01153 void flgr2d_gradient_thick_4_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01154 FLGR_Data2D *tmp;
01155
01156
01157
01158 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01159
01160 flgr2d_erode_4_connexity_fgINT8(tmp,datsrc);
01161 flgr2d_dilate_4_connexity_fgINT8(datdest,datsrc);
01162 flgr2d_arith_sub_fgINT8(datdest,datdest,tmp);
01163
01164 flgr2d_destroy(tmp);
01165 }
01166 void flgr2d_gradient_thick_4_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01167 FLGR_Data2D *tmp;
01168
01169
01170
01171 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01172
01173 flgr2d_erode_4_connexity_fgINT16(tmp,datsrc);
01174 flgr2d_dilate_4_connexity_fgINT16(datdest,datsrc);
01175 flgr2d_arith_sub_fgINT16(datdest,datdest,tmp);
01176
01177 flgr2d_destroy(tmp);
01178 }
01179 void flgr2d_gradient_thick_4_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01180 FLGR_Data2D *tmp;
01181
01182
01183
01184 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01185
01186 flgr2d_erode_4_connexity_fgINT32(tmp,datsrc);
01187 flgr2d_dilate_4_connexity_fgINT32(datdest,datsrc);
01188 flgr2d_arith_sub_fgINT32(datdest,datdest,tmp);
01189
01190 flgr2d_destroy(tmp);
01191 }
01192 void flgr2d_gradient_thick_4_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01193 FLGR_Data2D *tmp;
01194
01195
01196
01197 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01198
01199 flgr2d_erode_4_connexity_fgFLOAT32(tmp,datsrc);
01200 flgr2d_dilate_4_connexity_fgFLOAT32(datdest,datsrc);
01201 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,tmp);
01202
01203 flgr2d_destroy(tmp);
01204 }
01205 void flgr2d_gradient_thick_4_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
01206 FLGR_Data2D *tmp;
01207
01208
01209
01210 tmp = flgr2d_create_pixmap(datdest->size_y,datdest->size_x,datdest->spp,datdest->type);
01211
01212 flgr2d_erode_4_connexity_fgFLOAT64(tmp,datsrc);
01213 flgr2d_dilate_4_connexity_fgFLOAT64(datdest,datsrc);
01214 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,tmp);
01215
01216 flgr2d_destroy(tmp);
01217 }
01218
01219
01220
01221
01222
01223
01224
01227
01230 #define FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(dtype,erodil) \
01231 int i; \
01232 \
01233 \
01234 \
01235 if(size<1) { \
01236 flgr2d_copy(datdest,datsrc); \
01237 return; \
01238 } \
01239 \
01240 flgr2d_##erodil##_8_connexity_##dtype(datdest,datsrc); \
01241 for(i=1 ; i<size ; i++) \
01242 flgr2d_##erodil##_8_connexity_##dtype(datdest,datdest); \
01243 \
01244 return
01245
01246 #define FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(dtype,erodil) \
01247 int i; \
01248 \
01249 \
01250 \
01251 if(size<1) { \
01252 flgr2d_copy(datdest,datsrc); \
01253 return; \
01254 } \
01255 \
01256 flgr2d_##erodil##_4_connexity_##dtype(datdest,datsrc); \
01257 for(i=1 ; i<size ; i++) \
01258 flgr2d_##erodil##_4_connexity_##dtype(datdest,datdest); \
01259 \
01260 return
01261
01262 #define FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(dtype,erodil) \
01263 int i; \
01264 \
01265 \
01266 \
01267 if(size<1) { \
01268 flgr2d_copy(datdest,datsrc); \
01269 return; \
01270 } \
01271 \
01272 flgr2d_##erodil##_6_connexity_##dtype(datdest,datsrc); \
01273 for(i=1 ; i<size ; i++) \
01274 flgr2d_##erodil##_6_connexity_##dtype(datdest,datdest); \
01275 \
01276 return
01277
01278 void flgr2d_erode_square_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01279 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgBIT,erode);
01280 }
01281 void flgr2d_erode_square_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01282 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgUINT8,erode);
01283 }
01284 void flgr2d_erode_square_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01285 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgUINT16,erode);
01286 }
01287 void flgr2d_erode_square_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01288 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgUINT32,erode);
01289 }
01290 void flgr2d_erode_square_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01291 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgINT8,erode);
01292 }
01293 void flgr2d_erode_square_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01294 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgINT16,erode);
01295 }
01296 void flgr2d_erode_square_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01297 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgINT32,erode);
01298 }
01299 void flgr2d_erode_square_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01300 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgFLOAT32,erode);
01301 }
01302 void flgr2d_erode_square_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01303 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgFLOAT64,erode);
01304 }
01305
01306
01307 void flgr2d_erode_cross_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01308 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgBIT,erode);
01309 }
01310 void flgr2d_erode_cross_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01311 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgUINT8,erode);
01312 }
01313 void flgr2d_erode_cross_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01314 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgUINT16,erode);
01315 }
01316 void flgr2d_erode_cross_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01317 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgUINT32,erode);
01318 }
01319 void flgr2d_erode_cross_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01320 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgINT8,erode);
01321 }
01322 void flgr2d_erode_cross_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01323 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgINT16,erode);
01324 }
01325 void flgr2d_erode_cross_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01326 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgINT32,erode);
01327 }
01328 void flgr2d_erode_cross_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01329 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgFLOAT32,erode);
01330 }
01331 void flgr2d_erode_cross_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01332 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgFLOAT64,erode);
01333 }
01334
01335
01336 void flgr2d_erode_hexa_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01337 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgBIT,erode);
01338 }
01339 void flgr2d_erode_hexa_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01340 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgUINT8,erode);
01341 }
01342 void flgr2d_erode_hexa_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01343 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgUINT16,erode);
01344 }
01345 void flgr2d_erode_hexa_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01346 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgUINT32,erode);
01347 }
01348 void flgr2d_erode_hexa_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01349 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgINT8,erode);
01350 }
01351 void flgr2d_erode_hexa_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01352 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgINT16,erode);
01353 }
01354 void flgr2d_erode_hexa_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01355 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgINT32,erode);
01356 }
01357 void flgr2d_erode_hexa_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01358 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgFLOAT32,erode);
01359 }
01360 void flgr2d_erode_hexa_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01361 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgFLOAT64,erode);
01362 }
01363
01364
01365
01366 #define FLGR_MACRO_ERODE_DILATE_OCTAGON(dtype,erodil) \
01367 int i; \
01368 double size_square = ((double) (size)) / (1+sqrt(2)); \
01369 double size_square2 = floor(size_square); \
01370 int nbsqr = (int) ((size_square-size_square2) < 0.5f ? \
01371 size_square2 : (size_square2+1)); \
01372 \
01373 \
01374 \
01375 \
01376 flgr2d_##erodil##_4_connexity_##dtype(datdest,datsrc); \
01377 for(i=1 ; i<size-nbsqr ; i++) { \
01378 flgr2d_##erodil##_4_connexity_##dtype(datdest,datdest); \
01379 } \
01380 \
01381 for(i=0 ; i<nbsqr ; i++) { \
01382 flgr2d_##erodil##_8_connexity_##dtype(datdest,datdest); \
01383 } \
01384 \
01385 return;
01386
01387
01388 void flgr2d_erode_octagon_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01389 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgBIT,erode);
01390 }
01391 void flgr2d_erode_octagon_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01392 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgUINT8,erode);
01393 }
01394 void flgr2d_erode_octagon_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01395 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgUINT16,erode);
01396 }
01397 void flgr2d_erode_octagon_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01398 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgUINT32,erode);
01399 }
01400 void flgr2d_erode_octagon_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01401 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgINT8,erode);
01402 }
01403 void flgr2d_erode_octagon_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01404 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgINT16,erode);
01405 }
01406 void flgr2d_erode_octagon_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01407 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgINT32,erode);
01408 }
01409 void flgr2d_erode_octagon_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01410 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgFLOAT32,erode);
01411 }
01412 void flgr2d_erode_octagon_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01413 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgFLOAT64,erode);
01414 }
01415
01416
01417
01420
01423 void flgr2d_dilate_square_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01424 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgBIT,dilate);
01425 }
01426 void flgr2d_dilate_square_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01427 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgUINT8,dilate);
01428 }
01429 void flgr2d_dilate_square_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01430 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgUINT16,dilate);
01431 }
01432 void flgr2d_dilate_square_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01433 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgUINT32,dilate);
01434 }
01435 void flgr2d_dilate_square_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01436 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgINT8,dilate);
01437 }
01438 void flgr2d_dilate_square_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01439 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgINT16,dilate);
01440 }
01441 void flgr2d_dilate_square_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01442 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgINT32,dilate);
01443 }
01444 void flgr2d_dilate_square_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01445 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgFLOAT32,dilate);
01446 }
01447 void flgr2d_dilate_square_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01448 FLGR_MACRO_ERODE_DILATE_OPTIM_SQUARE(fgFLOAT64,dilate);
01449 }
01450
01451
01452
01453 void flgr2d_dilate_cross_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01454 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgBIT,dilate);
01455 }
01456 void flgr2d_dilate_cross_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01457 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgUINT8,dilate);
01458 }
01459 void flgr2d_dilate_cross_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01460 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgUINT16,dilate);
01461 }
01462 void flgr2d_dilate_cross_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01463 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgUINT32,dilate);
01464 }
01465 void flgr2d_dilate_cross_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01466 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgINT8,dilate);
01467 }
01468 void flgr2d_dilate_cross_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01469 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgINT16,dilate);
01470 }
01471 void flgr2d_dilate_cross_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01472 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgINT32,dilate);
01473 }
01474 void flgr2d_dilate_cross_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01475 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgFLOAT32,dilate);
01476 }
01477 void flgr2d_dilate_cross_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01478 FLGR_MACRO_ERODE_DILATE_OPTIM_CROSS(fgFLOAT64,dilate);
01479 }
01480
01481
01482
01483 void flgr2d_dilate_hexa_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01484 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgBIT,dilate);
01485 }
01486 void flgr2d_dilate_hexa_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01487 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgUINT8,dilate);
01488 }
01489 void flgr2d_dilate_hexa_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01490 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgUINT16,dilate);
01491 }
01492 void flgr2d_dilate_hexa_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01493 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgUINT32,dilate);
01494 }
01495 void flgr2d_dilate_hexa_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01496 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgINT8,dilate);
01497 }
01498 void flgr2d_dilate_hexa_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01499 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgINT16,dilate);
01500 }
01501 void flgr2d_dilate_hexa_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01502 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgINT32,dilate);
01503 }
01504 void flgr2d_dilate_hexa_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01505 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgFLOAT32,dilate);
01506 }
01507 void flgr2d_dilate_hexa_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01508 FLGR_MACRO_ERODE_DILATE_OPTIM_HEXA(fgFLOAT64,dilate);
01509 }
01510
01511
01512
01513
01514 void flgr2d_dilate_octagon_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01515 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgBIT,dilate);
01516 }
01517 void flgr2d_dilate_octagon_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01518 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgUINT8,dilate);
01519 }
01520 void flgr2d_dilate_octagon_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01521 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgUINT16,dilate);
01522 }
01523 void flgr2d_dilate_octagon_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01524 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgUINT32,dilate);
01525 }
01526 void flgr2d_dilate_octagon_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01527 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgINT8,dilate);
01528 }
01529 void flgr2d_dilate_octagon_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01530 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgINT16,dilate);
01531 }
01532 void flgr2d_dilate_octagon_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01533 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgINT32,dilate);
01534 }
01535 void flgr2d_dilate_octagon_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01536 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgFLOAT32,dilate);
01537 }
01538 void flgr2d_dilate_octagon_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01539 FLGR_MACRO_ERODE_DILATE_OCTAGON(fgFLOAT64,dilate);
01540 }
01541
01542
01543
01546
01549 void flgr2d_open_square_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01550
01551 flgr2d_erode_square_fgBIT(datdest,datsrc,size);
01552 flgr2d_dilate_square_fgBIT(datdest,datdest,size);
01553 }
01554 void flgr2d_open_square_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01555
01556 flgr2d_erode_square_fgUINT8(datdest,datsrc,size);
01557 flgr2d_dilate_square_fgUINT8(datdest,datdest,size);
01558 }
01559 void flgr2d_open_square_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01560
01561 flgr2d_erode_square_fgUINT16(datdest,datsrc,size);
01562 flgr2d_dilate_square_fgUINT16(datdest,datdest,size);
01563 }
01564 void flgr2d_open_square_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01565
01566 flgr2d_erode_square_fgUINT32(datdest,datsrc,size);
01567 flgr2d_dilate_square_fgUINT32(datdest,datdest,size);
01568 }
01569 void flgr2d_open_square_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01570
01571 flgr2d_erode_square_fgINT8(datdest,datsrc,size);
01572 flgr2d_dilate_square_fgINT8(datdest,datdest,size);
01573 }
01574 void flgr2d_open_square_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01575
01576 flgr2d_erode_square_fgINT16(datdest,datsrc,size);
01577 flgr2d_dilate_square_fgINT16(datdest,datdest,size);
01578 }
01579 void flgr2d_open_square_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01580
01581 flgr2d_erode_square_fgINT32(datdest,datsrc,size);
01582 flgr2d_dilate_square_fgINT32(datdest,datdest,size);
01583 }
01584 void flgr2d_open_square_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01585
01586 flgr2d_erode_square_fgFLOAT32(datdest,datsrc,size);
01587 flgr2d_dilate_square_fgFLOAT32(datdest,datdest,size);
01588 }
01589 void flgr2d_open_square_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01590
01591 flgr2d_erode_square_fgFLOAT64(datdest,datsrc,size);
01592 flgr2d_dilate_square_fgFLOAT64(datdest,datdest,size);
01593 }
01594 FLGR_Ret flgr2d_open_square(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01595
01596 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_square,datdest,datsrc,size);
01597 }
01598
01599
01600 void flgr2d_open_cross_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01601
01602 flgr2d_erode_cross_fgBIT(datdest,datsrc,size);
01603 flgr2d_dilate_cross_fgBIT(datdest,datdest,size);
01604 }
01605 void flgr2d_open_cross_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01606
01607 flgr2d_erode_cross_fgUINT8(datdest,datsrc,size);
01608 flgr2d_dilate_cross_fgUINT8(datdest,datdest,size);
01609 }
01610 void flgr2d_open_cross_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01611
01612 flgr2d_erode_cross_fgUINT16(datdest,datsrc,size);
01613 flgr2d_dilate_cross_fgUINT16(datdest,datdest,size);
01614 }
01615 void flgr2d_open_cross_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01616
01617 flgr2d_erode_cross_fgUINT32(datdest,datsrc,size);
01618 flgr2d_dilate_cross_fgUINT32(datdest,datdest,size);
01619 }
01620 void flgr2d_open_cross_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01621
01622 flgr2d_erode_cross_fgINT8(datdest,datsrc,size);
01623 flgr2d_dilate_cross_fgINT8(datdest,datdest,size);
01624 }
01625 void flgr2d_open_cross_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01626
01627 flgr2d_erode_cross_fgINT16(datdest,datsrc,size);
01628 flgr2d_dilate_cross_fgINT16(datdest,datdest,size);
01629 }
01630 void flgr2d_open_cross_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01631
01632 flgr2d_erode_cross_fgINT32(datdest,datsrc,size);
01633 flgr2d_dilate_cross_fgINT32(datdest,datdest,size);
01634 }
01635 void flgr2d_open_cross_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01636
01637 flgr2d_erode_cross_fgFLOAT32(datdest,datsrc,size);
01638 flgr2d_dilate_cross_fgFLOAT32(datdest,datdest,size);
01639 }
01640 void flgr2d_open_cross_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01641
01642 flgr2d_erode_cross_fgFLOAT64(datdest,datsrc,size);
01643 flgr2d_dilate_cross_fgFLOAT64(datdest,datdest,size);
01644 }
01645 FLGR_Ret flgr2d_open_cross(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01646
01647 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_cross,datdest,datsrc,size);
01648 }
01649
01650
01651
01652 void flgr2d_open_hexa_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01653
01654 flgr2d_erode_hexa_fgBIT(datdest,datsrc,size);
01655 flgr2d_dilate_hexa_fgBIT(datdest,datdest,size);
01656 }
01657 void flgr2d_open_hexa_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01658
01659 flgr2d_erode_hexa_fgUINT8(datdest,datsrc,size);
01660 flgr2d_dilate_hexa_fgUINT8(datdest,datdest,size);
01661 }
01662 void flgr2d_open_hexa_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01663
01664 flgr2d_erode_hexa_fgUINT16(datdest,datsrc,size);
01665 flgr2d_dilate_hexa_fgUINT16(datdest,datdest,size);
01666 }
01667 void flgr2d_open_hexa_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01668
01669 flgr2d_erode_hexa_fgUINT32(datdest,datsrc,size);
01670 flgr2d_dilate_hexa_fgUINT32(datdest,datdest,size);
01671 }
01672 void flgr2d_open_hexa_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01673
01674 flgr2d_erode_hexa_fgINT8(datdest,datsrc,size);
01675 flgr2d_dilate_hexa_fgINT8(datdest,datdest,size);
01676 }
01677 void flgr2d_open_hexa_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01678
01679 flgr2d_erode_hexa_fgINT16(datdest,datsrc,size);
01680 flgr2d_dilate_hexa_fgINT16(datdest,datdest,size);
01681 }
01682 void flgr2d_open_hexa_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01683
01684 flgr2d_erode_hexa_fgINT32(datdest,datsrc,size);
01685 flgr2d_dilate_hexa_fgINT32(datdest,datdest,size);
01686 }
01687 void flgr2d_open_hexa_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01688
01689 flgr2d_erode_hexa_fgFLOAT32(datdest,datsrc,size);
01690 flgr2d_dilate_hexa_fgFLOAT32(datdest,datdest,size);
01691 }
01692 void flgr2d_open_hexa_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01693
01694 flgr2d_erode_hexa_fgFLOAT64(datdest,datsrc,size);
01695 flgr2d_dilate_hexa_fgFLOAT64(datdest,datdest,size);
01696 }
01697 FLGR_Ret flgr2d_open_hexa(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01698
01699 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_hexa,datdest,datsrc,size);
01700 }
01701
01702
01703
01704 void flgr2d_open_octagon_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01705
01706 flgr2d_erode_octagon_fgBIT(datdest,datsrc,size);
01707 flgr2d_dilate_octagon_fgBIT(datdest,datdest,size);
01708 }
01709 void flgr2d_open_octagon_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01710
01711 flgr2d_erode_octagon_fgUINT8(datdest,datsrc,size);
01712 flgr2d_dilate_octagon_fgUINT8(datdest,datdest,size);
01713 }
01714 void flgr2d_open_octagon_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01715
01716 flgr2d_erode_octagon_fgUINT16(datdest,datsrc,size);
01717 flgr2d_dilate_octagon_fgUINT16(datdest,datdest,size);
01718 }
01719 void flgr2d_open_octagon_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01720
01721 flgr2d_erode_octagon_fgUINT32(datdest,datsrc,size);
01722 flgr2d_dilate_octagon_fgUINT32(datdest,datdest,size);
01723 }
01724 void flgr2d_open_octagon_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01725
01726 flgr2d_erode_octagon_fgINT8(datdest,datsrc,size);
01727 flgr2d_dilate_octagon_fgINT8(datdest,datdest,size);
01728 }
01729 void flgr2d_open_octagon_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01730
01731 flgr2d_erode_octagon_fgINT16(datdest,datsrc,size);
01732 flgr2d_dilate_octagon_fgINT16(datdest,datdest,size);
01733 }
01734 void flgr2d_open_octagon_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01735
01736 flgr2d_erode_octagon_fgINT32(datdest,datsrc,size);
01737 flgr2d_dilate_octagon_fgINT32(datdest,datdest,size);
01738 }
01739 void flgr2d_open_octagon_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01740
01741 flgr2d_erode_octagon_fgFLOAT32(datdest,datsrc,size);
01742 flgr2d_dilate_octagon_fgFLOAT32(datdest,datdest,size);
01743 }
01744 void flgr2d_open_octagon_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01745
01746 flgr2d_erode_octagon_fgFLOAT64(datdest,datsrc,size);
01747 flgr2d_dilate_octagon_fgFLOAT64(datdest,datdest,size);
01748 }
01749 FLGR_Ret flgr2d_open_octagon(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01750
01751 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_octagon,datdest,datsrc,size);
01752 }
01753
01754
01755
01758
01761 void flgr2d_close_square_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01762
01763 flgr2d_dilate_square_fgBIT(datdest,datsrc,size);
01764 flgr2d_erode_square_fgBIT(datdest,datdest,size);
01765 }
01766 void flgr2d_close_square_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01767
01768 flgr2d_dilate_square_fgUINT8(datdest,datsrc,size);
01769 flgr2d_erode_square_fgUINT8(datdest,datdest,size);
01770 }
01771 void flgr2d_close_square_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01772
01773 flgr2d_dilate_square_fgUINT16(datdest,datsrc,size);
01774 flgr2d_erode_square_fgUINT16(datdest,datdest,size);
01775 }
01776 void flgr2d_close_square_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01777
01778 flgr2d_dilate_square_fgUINT32(datdest,datsrc,size);
01779 flgr2d_erode_square_fgUINT32(datdest,datdest,size);
01780 }
01781 void flgr2d_close_square_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01782
01783 flgr2d_dilate_square_fgINT8(datdest,datsrc,size);
01784 flgr2d_erode_square_fgINT8(datdest,datdest,size);
01785 }
01786 void flgr2d_close_square_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01787
01788 flgr2d_dilate_square_fgINT16(datdest,datsrc,size);
01789 flgr2d_erode_square_fgINT16(datdest,datdest,size);
01790 }
01791 void flgr2d_close_square_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01792
01793 flgr2d_dilate_square_fgINT32(datdest,datsrc,size);
01794 flgr2d_erode_square_fgINT32(datdest,datdest,size);
01795 }
01796 void flgr2d_close_square_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01797
01798 flgr2d_dilate_square_fgFLOAT32(datdest,datsrc,size);
01799 flgr2d_erode_square_fgFLOAT32(datdest,datdest,size);
01800 }
01801 void flgr2d_close_square_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01802
01803 flgr2d_dilate_square_fgFLOAT64(datdest,datsrc,size);
01804 flgr2d_erode_square_fgFLOAT64(datdest,datdest,size);
01805 }
01806 FLGR_Ret flgr2d_close_square(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01807
01808 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_square,datdest,datsrc,size);
01809 }
01810
01811
01812
01813 void flgr2d_close_cross_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01814
01815 flgr2d_dilate_cross_fgBIT(datdest,datsrc,size);
01816 flgr2d_erode_cross_fgBIT(datdest,datdest,size);
01817 }
01818 void flgr2d_close_cross_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01819
01820 flgr2d_dilate_cross_fgUINT8(datdest,datsrc,size);
01821 flgr2d_erode_cross_fgUINT8(datdest,datdest,size);
01822 }
01823 void flgr2d_close_cross_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01824
01825 flgr2d_dilate_cross_fgUINT16(datdest,datsrc,size);
01826 flgr2d_erode_cross_fgUINT16(datdest,datdest,size);
01827 }
01828 void flgr2d_close_cross_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01829
01830 flgr2d_dilate_cross_fgUINT32(datdest,datsrc,size);
01831 flgr2d_erode_cross_fgUINT32(datdest,datdest,size);
01832 }
01833 void flgr2d_close_cross_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01834
01835 flgr2d_dilate_cross_fgINT8(datdest,datsrc,size);
01836 flgr2d_erode_cross_fgINT8(datdest,datdest,size);
01837 }
01838 void flgr2d_close_cross_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01839
01840 flgr2d_dilate_cross_fgINT16(datdest,datsrc,size);
01841 flgr2d_erode_cross_fgINT16(datdest,datdest,size);
01842 }
01843 void flgr2d_close_cross_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01844
01845 flgr2d_dilate_cross_fgINT32(datdest,datsrc,size);
01846 flgr2d_erode_cross_fgINT32(datdest,datdest,size);
01847 }
01848 void flgr2d_close_cross_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01849
01850 flgr2d_dilate_cross_fgFLOAT32(datdest,datsrc,size);
01851 flgr2d_erode_cross_fgFLOAT32(datdest,datdest,size);
01852 }
01853 void flgr2d_close_cross_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01854
01855 flgr2d_dilate_cross_fgFLOAT64(datdest,datsrc,size);
01856 flgr2d_erode_cross_fgFLOAT64(datdest,datdest,size);
01857 }
01858 FLGR_Ret flgr2d_close_cross(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01859
01860 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_cross,datdest,datsrc,size);
01861 }
01862
01863
01864
01865 void flgr2d_close_hexa_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01866
01867 flgr2d_dilate_hexa_fgBIT(datdest,datsrc,size);
01868 flgr2d_erode_hexa_fgBIT(datdest,datdest,size);
01869 }
01870 void flgr2d_close_hexa_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01871
01872 flgr2d_dilate_hexa_fgUINT8(datdest,datsrc,size);
01873 flgr2d_erode_hexa_fgUINT8(datdest,datdest,size);
01874 }
01875 void flgr2d_close_hexa_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01876
01877 flgr2d_dilate_hexa_fgUINT16(datdest,datsrc,size);
01878 flgr2d_erode_hexa_fgUINT16(datdest,datdest,size);
01879 }
01880 void flgr2d_close_hexa_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01881
01882 flgr2d_dilate_hexa_fgUINT32(datdest,datsrc,size);
01883 flgr2d_erode_hexa_fgUINT32(datdest,datdest,size);
01884 }
01885 void flgr2d_close_hexa_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01886
01887 flgr2d_dilate_hexa_fgINT8(datdest,datsrc,size);
01888 flgr2d_erode_hexa_fgINT8(datdest,datdest,size);
01889 }
01890 void flgr2d_close_hexa_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01891
01892 flgr2d_dilate_hexa_fgINT16(datdest,datsrc,size);
01893 flgr2d_erode_hexa_fgINT16(datdest,datdest,size);
01894 }
01895 void flgr2d_close_hexa_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01896
01897 flgr2d_dilate_hexa_fgINT32(datdest,datsrc,size);
01898 flgr2d_erode_hexa_fgINT32(datdest,datdest,size);
01899 }
01900 void flgr2d_close_hexa_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01901
01902 flgr2d_dilate_hexa_fgFLOAT32(datdest,datsrc,size);
01903 flgr2d_erode_hexa_fgFLOAT32(datdest,datdest,size);
01904 }
01905 void flgr2d_close_hexa_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01906
01907 flgr2d_dilate_hexa_fgFLOAT64(datdest,datsrc,size);
01908 flgr2d_erode_hexa_fgFLOAT64(datdest,datdest,size);
01909 }
01910 FLGR_Ret flgr2d_close_hexa(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01911
01912 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_hexa,datdest,datsrc,size);
01913 }
01914
01915
01916
01917 void flgr2d_close_octagon_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01918
01919 flgr2d_dilate_octagon_fgBIT(datdest,datsrc,size);
01920 flgr2d_erode_octagon_fgBIT(datdest,datdest,size);
01921 }
01922 void flgr2d_close_octagon_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01923
01924 flgr2d_dilate_octagon_fgUINT8(datdest,datsrc,size);
01925 flgr2d_erode_octagon_fgUINT8(datdest,datdest,size);
01926 }
01927 void flgr2d_close_octagon_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01928
01929 flgr2d_dilate_octagon_fgUINT16(datdest,datsrc,size);
01930 flgr2d_erode_octagon_fgUINT16(datdest,datdest,size);
01931 }
01932 void flgr2d_close_octagon_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01933
01934 flgr2d_dilate_octagon_fgUINT32(datdest,datsrc,size);
01935 flgr2d_erode_octagon_fgUINT32(datdest,datdest,size);
01936 }
01937 void flgr2d_close_octagon_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01938
01939 flgr2d_dilate_octagon_fgINT8(datdest,datsrc,size);
01940 flgr2d_erode_octagon_fgINT8(datdest,datdest,size);
01941 }
01942 void flgr2d_close_octagon_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01943
01944 flgr2d_dilate_octagon_fgINT16(datdest,datsrc,size);
01945 flgr2d_erode_octagon_fgINT16(datdest,datdest,size);
01946 }
01947 void flgr2d_close_octagon_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01948
01949 flgr2d_dilate_octagon_fgINT32(datdest,datsrc,size);
01950 flgr2d_erode_octagon_fgINT32(datdest,datdest,size);
01951 }
01952 void flgr2d_close_octagon_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01953
01954 flgr2d_dilate_octagon_fgFLOAT32(datdest,datsrc,size);
01955 flgr2d_erode_octagon_fgFLOAT32(datdest,datdest,size);
01956 }
01957 void flgr2d_close_octagon_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01958
01959 flgr2d_dilate_octagon_fgFLOAT64(datdest,datsrc,size);
01960 flgr2d_erode_octagon_fgFLOAT64(datdest,datdest,size);
01961 }
01962 FLGR_Ret flgr2d_close_octagon(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01963
01964 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_octagon,datdest,datsrc,size);
01965 }
01966
01967
01968
01971
01974
01975 void flgr2d_open_tophat_square_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01976
01977 flgr2d_erode_square_fgBIT(datdest,datsrc,size);
01978 flgr2d_dilate_square_fgBIT(datdest,datdest,size);
01979 flgr2d_arith_xor_fgBIT(datdest,datsrc,datdest);
01980 }
01981 void flgr2d_open_tophat_square_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01982
01983 flgr2d_erode_square_fgUINT8(datdest,datsrc,size);
01984 flgr2d_dilate_square_fgUINT8(datdest,datdest,size);
01985 flgr2d_arith_sub_fgUINT8(datdest,datsrc,datdest);
01986 }
01987 void flgr2d_open_tophat_square_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01988
01989 flgr2d_erode_square_fgUINT16(datdest,datsrc,size);
01990 flgr2d_dilate_square_fgUINT16(datdest,datdest,size);
01991 flgr2d_arith_sub_fgUINT16(datdest,datsrc,datdest);
01992 }
01993 void flgr2d_open_tophat_square_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
01994
01995 flgr2d_erode_square_fgUINT32(datdest,datsrc,size);
01996 flgr2d_dilate_square_fgUINT32(datdest,datdest,size);
01997 flgr2d_arith_sub_fgUINT32(datdest,datsrc,datdest);
01998 }
01999 void flgr2d_open_tophat_square_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02000
02001 flgr2d_erode_square_fgINT8(datdest,datsrc,size);
02002 flgr2d_dilate_square_fgINT8(datdest,datdest,size);
02003 flgr2d_arith_sub_fgINT8(datdest,datsrc,datdest);
02004 }
02005 void flgr2d_open_tophat_square_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02006
02007 flgr2d_erode_square_fgINT16(datdest,datsrc,size);
02008 flgr2d_dilate_square_fgINT16(datdest,datdest,size);
02009 flgr2d_arith_sub_fgINT16(datdest,datsrc,datdest);
02010 }
02011 void flgr2d_open_tophat_square_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02012
02013 flgr2d_erode_square_fgINT32(datdest,datsrc,size);
02014 flgr2d_dilate_square_fgINT32(datdest,datdest,size);
02015 flgr2d_arith_sub_fgINT32(datdest,datsrc,datdest);
02016 }
02017 void flgr2d_open_tophat_square_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02018
02019 flgr2d_erode_square_fgFLOAT32(datdest,datsrc,size);
02020 flgr2d_dilate_square_fgFLOAT32(datdest,datdest,size);
02021 flgr2d_arith_sub_fgFLOAT32(datdest,datsrc,datdest);
02022 }
02023 void flgr2d_open_tophat_square_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02024
02025 flgr2d_erode_square_fgFLOAT64(datdest,datsrc,size);
02026 flgr2d_dilate_square_fgFLOAT64(datdest,datdest,size);
02027 flgr2d_arith_sub_fgFLOAT64(datdest,datsrc,datdest);
02028 }
02029 FLGR_Ret flgr2d_open_tophat_square(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02030
02031 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_tophat_square,datdest,datsrc,size);
02032 }
02033
02034
02035
02036
02037
02038
02039 void flgr2d_open_tophat_cross_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02040
02041 flgr2d_erode_cross_fgBIT(datdest,datsrc,size);
02042 flgr2d_dilate_cross_fgBIT(datdest,datdest,size);
02043 flgr2d_arith_xor_fgBIT(datdest,datsrc,datdest);
02044 }
02045 void flgr2d_open_tophat_cross_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02046
02047 flgr2d_erode_cross_fgUINT8(datdest,datsrc,size);
02048 flgr2d_dilate_cross_fgUINT8(datdest,datdest,size);
02049 flgr2d_arith_sub_fgUINT8(datdest,datsrc,datdest);
02050 }
02051 void flgr2d_open_tophat_cross_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02052
02053 flgr2d_erode_cross_fgUINT16(datdest,datsrc,size);
02054 flgr2d_dilate_cross_fgUINT16(datdest,datdest,size);
02055 flgr2d_arith_sub_fgUINT16(datdest,datsrc,datdest);
02056 }
02057 void flgr2d_open_tophat_cross_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02058
02059 flgr2d_erode_cross_fgUINT32(datdest,datsrc,size);
02060 flgr2d_dilate_cross_fgUINT32(datdest,datdest,size);
02061 flgr2d_arith_sub_fgUINT32(datdest,datsrc,datdest);
02062 }
02063 void flgr2d_open_tophat_cross_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02064
02065 flgr2d_erode_cross_fgINT8(datdest,datsrc,size);
02066 flgr2d_dilate_cross_fgINT8(datdest,datdest,size);
02067 flgr2d_arith_sub_fgINT8(datdest,datsrc,datdest);
02068 }
02069 void flgr2d_open_tophat_cross_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02070
02071 flgr2d_erode_cross_fgINT16(datdest,datsrc,size);
02072 flgr2d_dilate_cross_fgINT16(datdest,datdest,size);
02073 flgr2d_arith_sub_fgINT16(datdest,datsrc,datdest);
02074 }
02075 void flgr2d_open_tophat_cross_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02076
02077 flgr2d_erode_cross_fgINT32(datdest,datsrc,size);
02078 flgr2d_dilate_cross_fgINT32(datdest,datdest,size);
02079 flgr2d_arith_sub_fgINT32(datdest,datsrc,datdest);
02080 }
02081 void flgr2d_open_tophat_cross_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02082
02083 flgr2d_erode_cross_fgFLOAT32(datdest,datsrc,size);
02084 flgr2d_dilate_cross_fgFLOAT32(datdest,datdest,size);
02085 flgr2d_arith_sub_fgFLOAT32(datdest,datsrc,datdest);
02086 }
02087 void flgr2d_open_tophat_cross_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02088
02089 flgr2d_erode_cross_fgFLOAT64(datdest,datsrc,size);
02090 flgr2d_dilate_cross_fgFLOAT64(datdest,datdest,size);
02091 flgr2d_arith_sub_fgFLOAT64(datdest,datsrc,datdest);
02092 }
02093 FLGR_Ret flgr2d_open_tophat_cross(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02094
02095 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_tophat_cross,datdest,datsrc,size);
02096 }
02097
02098
02099
02100
02101
02102 void flgr2d_open_tophat_hexa_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02103
02104 flgr2d_erode_hexa_fgBIT(datdest,datsrc,size);
02105 flgr2d_dilate_hexa_fgBIT(datdest,datdest,size);
02106 flgr2d_arith_xor_fgBIT(datdest,datsrc,datdest);
02107 }
02108 void flgr2d_open_tophat_hexa_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02109
02110 flgr2d_erode_hexa_fgUINT8(datdest,datsrc,size);
02111 flgr2d_dilate_hexa_fgUINT8(datdest,datdest,size);
02112 flgr2d_arith_sub_fgUINT8(datdest,datsrc,datdest);
02113 }
02114 void flgr2d_open_tophat_hexa_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02115
02116 flgr2d_erode_hexa_fgUINT16(datdest,datsrc,size);
02117 flgr2d_dilate_hexa_fgUINT16(datdest,datdest,size);
02118 flgr2d_arith_sub_fgUINT16(datdest,datsrc,datdest);
02119 }
02120 void flgr2d_open_tophat_hexa_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02121
02122 flgr2d_erode_hexa_fgUINT32(datdest,datsrc,size);
02123 flgr2d_dilate_hexa_fgUINT32(datdest,datdest,size);
02124 flgr2d_arith_sub_fgUINT32(datdest,datsrc,datdest);
02125 }
02126 void flgr2d_open_tophat_hexa_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02127
02128 flgr2d_erode_hexa_fgINT8(datdest,datsrc,size);
02129 flgr2d_dilate_hexa_fgINT8(datdest,datdest,size);
02130 flgr2d_arith_sub_fgINT8(datdest,datsrc,datdest);
02131 }
02132 void flgr2d_open_tophat_hexa_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02133
02134 flgr2d_erode_hexa_fgINT16(datdest,datsrc,size);
02135 flgr2d_dilate_hexa_fgINT16(datdest,datdest,size);
02136 flgr2d_arith_sub_fgINT16(datdest,datsrc,datdest);
02137 }
02138 void flgr2d_open_tophat_hexa_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02139
02140 flgr2d_erode_hexa_fgINT32(datdest,datsrc,size);
02141 flgr2d_dilate_hexa_fgINT32(datdest,datdest,size);
02142 flgr2d_arith_sub_fgINT32(datdest,datsrc,datdest);
02143 }
02144 void flgr2d_open_tophat_hexa_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02145
02146 flgr2d_erode_hexa_fgFLOAT32(datdest,datsrc,size);
02147 flgr2d_dilate_hexa_fgFLOAT32(datdest,datdest,size);
02148 flgr2d_arith_sub_fgFLOAT32(datdest,datsrc,datdest);
02149 }
02150 void flgr2d_open_tophat_hexa_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02151
02152 flgr2d_erode_hexa_fgFLOAT64(datdest,datsrc,size);
02153 flgr2d_dilate_hexa_fgFLOAT64(datdest,datdest,size);
02154 flgr2d_arith_sub_fgFLOAT64(datdest,datsrc,datdest);
02155 }
02156 FLGR_Ret flgr2d_open_tophat_hexa(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02157
02158 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_tophat_hexa,datdest,datsrc,size);
02159 }
02160
02161
02162
02163
02164
02165
02166
02167
02168 void flgr2d_open_tophat_octagon_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02169
02170 flgr2d_erode_octagon_fgBIT(datdest,datsrc,size);
02171 flgr2d_dilate_octagon_fgBIT(datdest,datdest,size);
02172 flgr2d_arith_xor_fgBIT(datdest,datsrc,datdest);
02173 }
02174 void flgr2d_open_tophat_octagon_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02175
02176 flgr2d_erode_octagon_fgUINT8(datdest,datsrc,size);
02177 flgr2d_dilate_octagon_fgUINT8(datdest,datdest,size);
02178 flgr2d_arith_sub_fgUINT8(datdest,datsrc,datdest);
02179 }
02180 void flgr2d_open_tophat_octagon_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02181
02182 flgr2d_erode_octagon_fgUINT16(datdest,datsrc,size);
02183 flgr2d_dilate_octagon_fgUINT16(datdest,datdest,size);
02184 flgr2d_arith_sub_fgUINT16(datdest,datsrc,datdest);
02185 }
02186 void flgr2d_open_tophat_octagon_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02187
02188 flgr2d_erode_octagon_fgUINT32(datdest,datsrc,size);
02189 flgr2d_dilate_octagon_fgUINT32(datdest,datdest,size);
02190 flgr2d_arith_sub_fgUINT32(datdest,datsrc,datdest);
02191 }
02192 void flgr2d_open_tophat_octagon_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02193
02194 flgr2d_erode_octagon_fgINT8(datdest,datsrc,size);
02195 flgr2d_dilate_octagon_fgINT8(datdest,datdest,size);
02196 flgr2d_arith_sub_fgINT8(datdest,datsrc,datdest);
02197 }
02198 void flgr2d_open_tophat_octagon_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02199
02200 flgr2d_erode_octagon_fgINT16(datdest,datsrc,size);
02201 flgr2d_dilate_octagon_fgINT16(datdest,datdest,size);
02202 flgr2d_arith_sub_fgINT16(datdest,datsrc,datdest);
02203 }
02204 void flgr2d_open_tophat_octagon_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02205
02206 flgr2d_erode_octagon_fgINT32(datdest,datsrc,size);
02207 flgr2d_dilate_octagon_fgINT32(datdest,datdest,size);
02208 flgr2d_arith_sub_fgINT32(datdest,datsrc,datdest);
02209 }
02210 void flgr2d_open_tophat_octagon_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02211
02212 flgr2d_erode_octagon_fgFLOAT32(datdest,datsrc,size);
02213 flgr2d_dilate_octagon_fgFLOAT32(datdest,datdest,size);
02214 flgr2d_arith_sub_fgFLOAT32(datdest,datsrc,datdest);
02215 }
02216 void flgr2d_open_tophat_octagon_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02217
02218 flgr2d_erode_octagon_fgFLOAT64(datdest,datsrc,size);
02219 flgr2d_dilate_octagon_fgFLOAT64(datdest,datdest,size);
02220 flgr2d_arith_sub_fgFLOAT64(datdest,datsrc,datdest);
02221 }
02222 FLGR_Ret flgr2d_open_tophat_octagon(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02223
02224 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_open_tophat_octagon,datdest,datsrc,size);
02225 }
02226
02227
02228
02231
02234 void flgr2d_close_tophat_square_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02235
02236 flgr2d_dilate_square_fgBIT(datdest,datsrc,size);
02237 flgr2d_erode_square_fgBIT(datdest,datdest,size);
02238 flgr2d_arith_xor_fgBIT(datdest,datdest,datsrc);
02239 }
02240 void flgr2d_close_tophat_square_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02241
02242 flgr2d_dilate_square_fgUINT8(datdest,datsrc,size);
02243 flgr2d_erode_square_fgUINT8(datdest,datdest,size);
02244 flgr2d_arith_sub_fgUINT8(datdest,datdest,datsrc);
02245 }
02246 void flgr2d_close_tophat_square_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02247
02248 flgr2d_dilate_square_fgUINT16(datdest,datsrc,size);
02249 flgr2d_erode_square_fgUINT16(datdest,datdest,size);
02250 flgr2d_arith_sub_fgUINT16(datdest,datdest,datsrc);
02251 }
02252 void flgr2d_close_tophat_square_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02253
02254 flgr2d_dilate_square_fgUINT32(datdest,datsrc,size);
02255 flgr2d_erode_square_fgUINT32(datdest,datdest,size);
02256 flgr2d_arith_sub_fgUINT32(datdest,datdest,datsrc);
02257 }
02258 void flgr2d_close_tophat_square_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02259
02260 flgr2d_dilate_square_fgINT8(datdest,datsrc,size);
02261 flgr2d_erode_square_fgINT8(datdest,datdest,size);
02262 flgr2d_arith_sub_fgINT8(datdest,datdest,datsrc);
02263 }
02264 void flgr2d_close_tophat_square_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02265
02266 flgr2d_dilate_square_fgINT16(datdest,datsrc,size);
02267 flgr2d_erode_square_fgINT16(datdest,datdest,size);
02268 flgr2d_arith_sub_fgINT16(datdest,datdest,datsrc);
02269 }
02270 void flgr2d_close_tophat_square_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02271
02272 flgr2d_dilate_square_fgINT32(datdest,datsrc,size);
02273 flgr2d_erode_square_fgINT32(datdest,datdest,size);
02274 flgr2d_arith_sub_fgINT32(datdest,datdest,datsrc);
02275 }
02276 void flgr2d_close_tophat_square_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02277
02278 flgr2d_dilate_square_fgFLOAT32(datdest,datsrc,size);
02279 flgr2d_erode_square_fgFLOAT32(datdest,datdest,size);
02280 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,datsrc);
02281 }
02282 void flgr2d_close_tophat_square_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02283
02284 flgr2d_dilate_square_fgFLOAT64(datdest,datsrc,size);
02285 flgr2d_erode_square_fgFLOAT64(datdest,datdest,size);
02286 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,datsrc);
02287 }
02288 FLGR_Ret flgr2d_close_tophat_square(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02289
02290 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_tophat_square,datdest,datsrc,size);
02291 }
02292
02293
02294
02295
02296
02297 void flgr2d_close_tophat_cross_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02298
02299 flgr2d_dilate_cross_fgBIT(datdest,datsrc,size);
02300 flgr2d_erode_cross_fgBIT(datdest,datdest,size);
02301 flgr2d_arith_xor_fgBIT(datdest,datdest,datsrc);
02302 }
02303 void flgr2d_close_tophat_cross_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02304
02305 flgr2d_dilate_cross_fgUINT8(datdest,datsrc,size);
02306 flgr2d_erode_cross_fgUINT8(datdest,datdest,size);
02307 flgr2d_arith_sub_fgUINT8(datdest,datdest,datsrc);
02308 }
02309 void flgr2d_close_tophat_cross_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02310
02311 flgr2d_dilate_cross_fgUINT16(datdest,datsrc,size);
02312 flgr2d_erode_cross_fgUINT16(datdest,datdest,size);
02313 flgr2d_arith_sub_fgUINT16(datdest,datdest,datsrc);
02314 }
02315 void flgr2d_close_tophat_cross_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02316
02317 flgr2d_dilate_cross_fgUINT32(datdest,datsrc,size);
02318 flgr2d_erode_cross_fgUINT32(datdest,datdest,size);
02319 flgr2d_arith_sub_fgUINT32(datdest,datdest,datsrc);
02320 }
02321 void flgr2d_close_tophat_cross_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02322
02323 flgr2d_dilate_cross_fgINT8(datdest,datsrc,size);
02324 flgr2d_erode_cross_fgINT8(datdest,datdest,size);
02325 flgr2d_arith_sub_fgINT8(datdest,datdest,datsrc);
02326 }
02327 void flgr2d_close_tophat_cross_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02328
02329 flgr2d_dilate_cross_fgINT16(datdest,datsrc,size);
02330 flgr2d_erode_cross_fgINT16(datdest,datdest,size);
02331 flgr2d_arith_sub_fgINT16(datdest,datdest,datsrc);
02332 }
02333 void flgr2d_close_tophat_cross_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02334
02335 flgr2d_dilate_cross_fgINT32(datdest,datsrc,size);
02336 flgr2d_erode_cross_fgINT32(datdest,datdest,size);
02337 flgr2d_arith_sub_fgINT32(datdest,datdest,datsrc);
02338 }
02339 void flgr2d_close_tophat_cross_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02340
02341 flgr2d_dilate_cross_fgFLOAT32(datdest,datsrc,size);
02342 flgr2d_erode_cross_fgFLOAT32(datdest,datdest,size);
02343 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,datsrc);
02344 }
02345 void flgr2d_close_tophat_cross_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02346
02347 flgr2d_dilate_cross_fgFLOAT64(datdest,datsrc,size);
02348 flgr2d_erode_cross_fgFLOAT64(datdest,datdest,size);
02349 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,datsrc);
02350 }
02351 FLGR_Ret flgr2d_close_tophat_cross(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02352
02353 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_tophat_cross,datdest,datsrc,size);
02354 }
02355
02356
02357
02358
02359
02360 void flgr2d_close_tophat_hexa_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02361
02362 flgr2d_dilate_hexa_fgBIT(datdest,datsrc,size);
02363 flgr2d_erode_hexa_fgBIT(datdest,datdest,size);
02364 flgr2d_arith_xor_fgBIT(datdest,datdest,datsrc);
02365 }
02366 void flgr2d_close_tophat_hexa_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02367
02368 flgr2d_dilate_hexa_fgUINT8(datdest,datsrc,size);
02369 flgr2d_erode_hexa_fgUINT8(datdest,datdest,size);
02370 flgr2d_arith_sub_fgUINT8(datdest,datdest,datsrc);
02371 }
02372 void flgr2d_close_tophat_hexa_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02373
02374 flgr2d_dilate_hexa_fgUINT16(datdest,datsrc,size);
02375 flgr2d_erode_hexa_fgUINT16(datdest,datdest,size);
02376 flgr2d_arith_sub_fgUINT16(datdest,datdest,datsrc);
02377 }
02378 void flgr2d_close_tophat_hexa_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02379
02380 flgr2d_dilate_hexa_fgUINT32(datdest,datsrc,size);
02381 flgr2d_erode_hexa_fgUINT32(datdest,datdest,size);
02382 flgr2d_arith_sub_fgUINT32(datdest,datdest,datsrc);
02383 }
02384 void flgr2d_close_tophat_hexa_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02385
02386 flgr2d_dilate_hexa_fgINT8(datdest,datsrc,size);
02387 flgr2d_erode_hexa_fgINT8(datdest,datdest,size);
02388 flgr2d_arith_sub_fgINT8(datdest,datdest,datsrc);
02389 }
02390 void flgr2d_close_tophat_hexa_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02391
02392 flgr2d_dilate_hexa_fgINT16(datdest,datsrc,size);
02393 flgr2d_erode_hexa_fgINT16(datdest,datdest,size);
02394 flgr2d_arith_sub_fgINT16(datdest,datdest,datsrc);
02395 }
02396 void flgr2d_close_tophat_hexa_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02397
02398 flgr2d_dilate_hexa_fgINT32(datdest,datsrc,size);
02399 flgr2d_erode_hexa_fgINT32(datdest,datdest,size);
02400 flgr2d_arith_sub_fgINT32(datdest,datdest,datsrc);
02401 }
02402 void flgr2d_close_tophat_hexa_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02403
02404 flgr2d_dilate_hexa_fgFLOAT32(datdest,datsrc,size);
02405 flgr2d_erode_hexa_fgFLOAT32(datdest,datdest,size);
02406 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,datsrc);
02407 }
02408 void flgr2d_close_tophat_hexa_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02409
02410 flgr2d_dilate_hexa_fgFLOAT64(datdest,datsrc,size);
02411 flgr2d_erode_hexa_fgFLOAT64(datdest,datdest,size);
02412 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,datsrc);
02413 }
02414 FLGR_Ret flgr2d_close_tophat_hexa(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02415
02416 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_tophat_hexa,datdest,datsrc,size);
02417 }
02418
02419
02420
02421
02422 void flgr2d_close_tophat_octagon_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02423
02424 flgr2d_dilate_octagon_fgBIT(datdest,datsrc,size);
02425 flgr2d_erode_octagon_fgBIT(datdest,datdest,size);
02426 flgr2d_arith_xor_fgBIT(datdest,datdest,datsrc);
02427 }
02428 void flgr2d_close_tophat_octagon_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02429
02430 flgr2d_dilate_octagon_fgUINT8(datdest,datsrc,size);
02431 flgr2d_erode_octagon_fgUINT8(datdest,datdest,size);
02432 flgr2d_arith_sub_fgUINT8(datdest,datdest,datsrc);
02433 }
02434 void flgr2d_close_tophat_octagon_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02435
02436 flgr2d_dilate_octagon_fgUINT16(datdest,datsrc,size);
02437 flgr2d_erode_octagon_fgUINT16(datdest,datdest,size);
02438 flgr2d_arith_sub_fgUINT16(datdest,datdest,datsrc);
02439 }
02440 void flgr2d_close_tophat_octagon_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02441
02442 flgr2d_dilate_octagon_fgUINT32(datdest,datsrc,size);
02443 flgr2d_erode_octagon_fgUINT32(datdest,datdest,size);
02444 flgr2d_arith_sub_fgUINT32(datdest,datdest,datsrc);
02445 }
02446 void flgr2d_close_tophat_octagon_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02447
02448 flgr2d_dilate_octagon_fgINT8(datdest,datsrc,size);
02449 flgr2d_erode_octagon_fgINT8(datdest,datdest,size);
02450 flgr2d_arith_sub_fgINT8(datdest,datdest,datsrc);
02451 }
02452 void flgr2d_close_tophat_octagon_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02453
02454 flgr2d_dilate_octagon_fgINT16(datdest,datsrc,size);
02455 flgr2d_erode_octagon_fgINT16(datdest,datdest,size);
02456 flgr2d_arith_sub_fgINT16(datdest,datdest,datsrc);
02457 }
02458 void flgr2d_close_tophat_octagon_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02459
02460 flgr2d_dilate_octagon_fgINT32(datdest,datsrc,size);
02461 flgr2d_erode_octagon_fgINT32(datdest,datdest,size);
02462 flgr2d_arith_sub_fgINT32(datdest,datdest,datsrc);
02463 }
02464 void flgr2d_close_tophat_octagon_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02465
02466 flgr2d_dilate_octagon_fgFLOAT32(datdest,datsrc,size);
02467 flgr2d_erode_octagon_fgFLOAT32(datdest,datdest,size);
02468 flgr2d_arith_sub_fgFLOAT32(datdest,datdest,datsrc);
02469 }
02470 void flgr2d_close_tophat_octagon_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02471
02472 flgr2d_dilate_octagon_fgFLOAT64(datdest,datsrc,size);
02473 flgr2d_erode_octagon_fgFLOAT64(datdest,datdest,size);
02474 flgr2d_arith_sub_fgFLOAT64(datdest,datdest,datsrc);
02475 }
02476 FLGR_Ret flgr2d_close_tophat_octagon(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, int size) {
02477
02478 FLGR_DISPATCH_PROCEDURE(datdest->type,flgr2d_close_tophat_octagon,datdest,datsrc,size);
02479 }
02480
02481
02482
02483
02484
02485
02486
02487
02488
02489
02490 #define FLGR_MACRO_SORT_TWO_L(dtype, lineOutMin, lineOutMax, lineIn1, lineIn2) \
02491 flgr1d_arith_inf_##dtype(lineOutMin,lineIn1,lineIn2); \
02492 flgr1d_arith_sup_##dtype(lineOutMax,lineIn1,lineIn2)
02493
02494
02495 #define FLGR_MACRO_MEDIAN_8_CONNEXITY(dtype) \
02496 FLGR_Data1D *lineTmp1 = flgr1d_create_signal_from(datsrc->row[0]); \
02497 FLGR_Data1D *lineTmp2 = flgr1d_create_signal_from(datsrc->row[0]); \
02498 FLGR_Data1D *lineTmp3 = flgr1d_create_signal_from(datsrc->row[0]); \
02499 FLGR_Data1D *lineTmp4 = flgr1d_create_signal_from(datsrc->row[0]); \
02500 FLGR_Data1D *lineTmp5 = flgr1d_create_signal_from(datsrc->row[0]); \
02501 FLGR_Data1D *lineTmp6 = flgr1d_create_signal_from(datsrc->row[0]); \
02502 FLGR_Data1D *lineTmp7 = flgr1d_create_signal_from(datsrc->row[0]); \
02503 FLGR_Data1D *lineTmp8 = flgr1d_create_signal_from(datsrc->row[0]); \
02504 FLGR_Data1D *lineTmp9 = flgr1d_create_signal_from(datsrc->row[0]); \
02505 \
02506 FLGR_Data1D *lineReg1 = flgr1d_create_signal_from(datsrc->row[0]); \
02507 FLGR_Data1D *lineReg2 = flgr1d_create_signal_from(datsrc->row[0]); \
02508 FLGR_Data1D *lineReg3 = flgr1d_create_signal_from(datsrc->row[0]); \
02509 FLGR_Data1D *lineReg4 = flgr1d_create_signal_from(datsrc->row[0]); \
02510 FLGR_Data1D *lineReg5 = flgr1d_create_signal_from(datsrc->row[0]); \
02511 FLGR_Data1D *lineReg6 = flgr1d_create_signal_from(datsrc->row[0]); \
02512 FLGR_Data1D *lineReg7 = flgr1d_create_signal_from(datsrc->row[0]); \
02513 FLGR_Data1D *lineReg8 = flgr1d_create_signal_from(datsrc->row[0]); \
02514 FLGR_Data1D *lineReg9 = flgr1d_create_signal_from(datsrc->row[0]); \
02515 \
02516 FLGR_Data1D **pout = datdest->row; \
02517 FLGR_Data1D **pin = datsrc->row; \
02518 FLGR_Vector *vec_min = flgr_vector_create(datsrc->spp,datsrc->type); \
02519 FLGR_Vector *vec_max = flgr_vector_create(datsrc->spp,datsrc->type); \
02520 FLGR_Vector *vec1, *vec2; \
02521 dtype min = MIN_##dtype; \
02522 dtype max = MAX_##dtype; \
02523 int i,k; \
02524 \
02525 \
02526 \
02527 flgr_vector_populate_from_scalar_##dtype(vec_min,min); \
02528 flgr_vector_populate_from_scalar_##dtype(vec_max,max); \
02529 \
02530 vec1 = vec_max; \
02531 vec2 = vec_min; \
02532 \
02533 flgr1d_shift_right_##dtype(lineTmp4,pin[0],1, vec1); \
02534 flgr1d_copy_##dtype##_##dtype(lineTmp5,pin[0]); \
02535 flgr1d_shift_left_##dtype(lineTmp6,pin[0],1,vec1); \
02536 \
02537 flgr1d_shift_right_##dtype(lineTmp7,pin[1],1,vec2); \
02538 flgr1d_copy_##dtype##_##dtype(lineTmp8,pin[1]); \
02539 flgr1d_shift_left_##dtype(lineTmp9,pin[1],1,vec2); \
02540 \
02541 \
02542 for(k = 0 ; k<3 ; k++) { \
02543 flgr1d_copy_##dtype##_##dtype(lineReg4, lineTmp4); \
02544 FLGR_MACRO_SORT_TWO_L(dtype,lineReg5,lineReg6,lineTmp5,lineTmp6); \
02545 FLGR_MACRO_SORT_TWO_L(dtype,lineReg7,lineReg8,lineTmp7,lineTmp8); \
02546 flgr1d_copy_##dtype##_##dtype(lineReg9, lineTmp9); \
02547 \
02548 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp4,lineTmp5,lineReg4,lineReg5); \
02549 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp6,lineTmp7,lineReg6,lineReg7); \
02550 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp8,lineTmp9,lineReg8,lineReg9); \
02551 } \
02552 flgr1d_copy_##dtype##_##dtype(pout[0], lineTmp7); \
02553 \
02554 \
02555 for(i=1 ; i<datdest->size_y-1 ; i++) { \
02556 \
02557 vec1 = ((i%2)==0) ? vec_max : vec_min; \
02558 vec2 = ((i%2)==1) ? vec_max : vec_min; \
02559 \
02560 flgr1d_shift_right_##dtype(lineTmp1,pin[i-1],1,vec2); \
02561 flgr1d_copy_##dtype##_##dtype(lineTmp2,pin[i-1]); \
02562 flgr1d_shift_left_##dtype(lineTmp3,pin[i-1],1,vec2); \
02563 \
02564 flgr1d_shift_right_##dtype(lineTmp4,pin[i],1,vec1); \
02565 flgr1d_copy_##dtype##_##dtype(lineTmp5,pin[i]); \
02566 flgr1d_shift_left_##dtype(lineTmp6,pin[i],1,vec1); \
02567 \
02568 flgr1d_shift_right_##dtype(lineTmp7,pin[i+1],1,vec2); \
02569 flgr1d_copy_##dtype##_##dtype(lineTmp8,pin[i+1]); \
02570 flgr1d_shift_left_##dtype(lineTmp9,pin[i+1],1,vec2); \
02571 \
02572 for(k = 0 ; k<4 ; k++) { \
02573 flgr1d_copy_##dtype##_##dtype(lineReg1, lineTmp1); \
02574 FLGR_MACRO_SORT_TWO_L(dtype,lineReg2,lineReg3,lineTmp2,lineTmp3); \
02575 FLGR_MACRO_SORT_TWO_L(dtype,lineReg4,lineReg5,lineTmp4,lineTmp5); \
02576 FLGR_MACRO_SORT_TWO_L(dtype,lineReg6,lineReg7,lineTmp6,lineTmp7); \
02577 FLGR_MACRO_SORT_TWO_L(dtype,lineReg8,lineReg9,lineTmp8,lineTmp9); \
02578 \
02579 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp1,lineTmp2,lineReg1,lineReg2); \
02580 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp3,lineTmp4,lineReg3,lineReg4); \
02581 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp5,lineTmp6,lineReg5,lineReg6); \
02582 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp7,lineTmp8,lineReg7,lineReg8); \
02583 flgr1d_copy_##dtype##_##dtype(lineTmp9, lineReg9); \
02584 } \
02585 \
02586 flgr1d_copy_##dtype##_##dtype(lineReg1, lineTmp1); \
02587 FLGR_MACRO_SORT_TWO_L(dtype,lineReg2,lineReg3,lineTmp2,lineTmp3); \
02588 FLGR_MACRO_SORT_TWO_L(dtype,lineReg4,lineReg5,lineTmp4,lineTmp5); \
02589 FLGR_MACRO_SORT_TWO_L(dtype,lineReg6,lineReg7,lineTmp6,lineTmp7); \
02590 FLGR_MACRO_SORT_TWO_L(dtype,lineReg8,lineReg9,lineTmp8,lineTmp9); \
02591 \
02592 flgr1d_copy_##dtype##_##dtype(pout[i], lineReg5); \
02593 } \
02594 \
02595 i = datdest->size_y-1; \
02596 \
02597 vec1 = ((i%2)==0) ? vec_max : vec_min; \
02598 vec2 = ((i%2)==1) ? vec_max : vec_min; \
02599 \
02600 flgr1d_shift_right_##dtype(lineTmp4,pin[i-1],1,vec2); \
02601 flgr1d_copy_##dtype##_##dtype(lineTmp5,pin[i-1]); \
02602 flgr1d_shift_left_##dtype(lineTmp6,pin[i-1],1,vec2); \
02603 \
02604 flgr1d_shift_right_##dtype(lineTmp7,pin[i],1,vec1); \
02605 flgr1d_copy_##dtype##_##dtype(lineTmp8,pin[i]); \
02606 flgr1d_shift_left_##dtype(lineTmp9,pin[i],1,vec1); \
02607 \
02608 \
02609 for(k = 0 ; k<3 ; k++) { \
02610 flgr1d_copy_##dtype##_##dtype(lineReg4, lineTmp4); \
02611 FLGR_MACRO_SORT_TWO_L(dtype,lineReg5,lineReg6,lineTmp5,lineTmp6); \
02612 FLGR_MACRO_SORT_TWO_L(dtype,lineReg5,lineReg6,lineTmp5,lineTmp6); \
02613 FLGR_MACRO_SORT_TWO_L(dtype,lineReg7,lineReg8,lineTmp7,lineTmp8); \
02614 FLGR_MACRO_SORT_TWO_L(dtype,lineReg7,lineReg8,lineTmp7,lineTmp8); \
02615 flgr1d_copy_##dtype##_##dtype(lineReg9, lineTmp9); \
02616 \
02617 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp4,lineTmp5,lineReg4,lineReg5); \
02618 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp6,lineTmp7,lineReg6,lineReg7); \
02619 FLGR_MACRO_SORT_TWO_L(dtype,lineTmp8,lineTmp9,lineReg8,lineReg9); \
02620 } \
02621 \
02622 if((i%2)==1) { \
02623 flgr1d_copy_##dtype##_##dtype(pout[i], lineTmp6); \
02624 } else { \
02625 flgr1d_copy_##dtype##_##dtype(pout[i], lineTmp7); \
02626 } \
02627 \
02628 flgr_vector_destroy(vec_min); \
02629 flgr_vector_destroy(vec_max); \
02630 flgr1d_destroy(lineTmp1); \
02631 flgr1d_destroy(lineTmp2); \
02632 flgr1d_destroy(lineTmp3); \
02633 flgr1d_destroy(lineTmp4); \
02634 flgr1d_destroy(lineTmp5); \
02635 flgr1d_destroy(lineTmp6); \
02636 flgr1d_destroy(lineTmp7); \
02637 flgr1d_destroy(lineTmp8); \
02638 flgr1d_destroy(lineTmp9); \
02639 flgr1d_destroy(lineReg1); \
02640 flgr1d_destroy(lineReg2); \
02641 flgr1d_destroy(lineReg3); \
02642 flgr1d_destroy(lineReg4); \
02643 flgr1d_destroy(lineReg5); \
02644 flgr1d_destroy(lineReg6); \
02645 flgr1d_destroy(lineReg7); \
02646 flgr1d_destroy(lineReg8); \
02647 flgr1d_destroy(lineReg9)
02648
02649 void flgr2d_median_8_connexity_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02650 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgUINT8);
02651 }
02652 void flgr2d_median_8_connexity_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02653 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgUINT16);
02654 }
02655 void flgr2d_median_8_connexity_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02656 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgUINT32);
02657 }
02658 void flgr2d_median_8_connexity_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02659 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgINT8);
02660 }
02661 void flgr2d_median_8_connexity_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02662 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgINT16);
02663 }
02664 void flgr2d_median_8_connexity_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02665 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgINT32);
02666 }
02667 void flgr2d_median_8_connexity_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02668 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgFLOAT32);
02669 }
02670 void flgr2d_median_8_connexity_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc) {
02671 FLGR_MACRO_MEDIAN_8_CONNEXITY(fgFLOAT64);
02672 }
02673