11 #include "../ami_image/image.h"
12 #include "../ami_image_draw/image_draw.h"
13 #include "../ami_primitives/image_primitives.h"
21 #define ami_free1d(direccion) { if (direccion != NULL){\
22 free(direccion);direccion=NULL;}}
29 #define ami_free2d(direccion) { if (direccion != NULL){\
30 ami_free1d(direccion[0]); free(direccion); direccion = NULL;}}
37 #define ami_free3d(direccion) {if (direccion != NULL){\
38 ami_free2d(direccion[0]); free(direccion); direccion=NULL;}}
46 #define ami_calloc2d(direccion,tipo,height,width) {int ml,mk; \
47 if ( width > 0 && height > 0){\
48 direccion=(tipo **) malloc(sizeof(tipo *)*(height)); \
49 if (direccion == NULL){\
50 printf("\nMemorila insuficiente.\n"); \
51 int val = scanf("%d",&ml); if(val==EOF) printf("Read error\n");}\
52 direccion[0]=(tipo *)malloc(sizeof(tipo)*(width)*(height)); \
53 if (direccion[0] == NULL){free(direccion); direccion = NULL;\
54 printf("\nMemoria insuficiente.\n"); \
55 int val = scanf("%d",&ml); if(val==EOF) printf("Read error\n");}\
56 for(ml=0;ml<(height);ml++) direccion[ml]=&(direccion[0][ml*(width)]);\
57 for(ml=0;ml<height;ml++) for(mk=0;mk<width;mk++) direccion[ml][mk]=0;\
59 else direccion = NULL;}
67 #define ami_calloc3d(direccion,tipo,depth,height,width) {int ml,mk,mu; \
68 if ( depth > 0 && width > 0 && height > 0){\
69 direccion=(tipo ***) malloc(sizeof(tipo **)*(depth)); \
70 if (direccion == NULL){\
71 printf("\nMemoria insuficiente.\n"); \
72 int val = scanf("%d",&ml); if(val==EOF) printf("Read error\n");}\
73 direccion[0]=(tipo **)malloc(sizeof(tipo *)*(depth)*(height)); \
74 if (direccion[0] == NULL){free(direccion); direccion = NULL;\
75 printf("\nMemoria insuficiente.\n"); \
76 int val = scanf("%d",&ml); if(val==EOF) printf("Read error\n");}\
77 direccion[0][0]=(tipo *)malloc(sizeof(tipo)*(depth)*(height)*(width));\
78 if (direccion[0][0] == NULL){free(direccion[0]); free(direccion);\
79 direccion = NULL; printf("\nMemoria insuficiente.\n");\
80 int val = scanf("%d",&ml); if(val==EOF) printf("Read error\n");}\
81 for(mu=0;mu<depth;mu++){ \
82 for(ml=0;ml<(height);ml++) \
83 direccion[0][ml+mu*(height)]=&(direccion[0][0][ml*(width)+\
84 mu*(width)*(height)]); \
85 direccion[mu]=&(direccion[0][mu*(height)]);}\
86 for(mu=0;mu<depth;mu++)\
87 for(ml=0;ml<height;ml++)\
88 for(mk=0;mk<width;mk++) direccion[mu][ml][mk]=0; \
90 else direccion = NULL;}
100 #define ami_malloc1d(direccion,tipo,size) {\
102 direccion=(tipo *) malloc(sizeof(tipo)*(size)); \
103 if (direccion == NULL)\
104 {int ml; printf("\nMemoria insuficiente.\n"); \
105 int val = scanf("%d",&ml); if(val==EOF) printf("Read error\n");}}\
106 else direccion = NULL;}
108 std::vector < std::vector <unsigned int> >
109 boundary_neighborhood_9n(
const unsigned int width,
const unsigned int height);
111 std::vector < std::vector <unsigned int> >
112 boundary_neighborhood_5n(
const unsigned int width,
const unsigned int height);
140 void print_function_syntax_lens_distortion_correction_division_model_1p();
147 int check_params_lens_distortion_correction_division_model_1p(
char *argv[]);
161 void manage_failure(
char *argv[]);
class to store the image primitives (points, lines, ellipses and ditortion model) ...
Definition: image_primitives.h:35
Class to store multiChannel images and basic methods.
Definition: image.h:65