Difference between revisions of "User:Level zero/GSOC13/api"
From BRL-CAD
Level zero (talk | contribs) (→API DESIGN) |
Level zero (talk | contribs) (→STructures and API) |
||
Line 1: | Line 1: | ||
− | + | =API CALLS= | |
− | * | + | ==Group1== |
+ | *for bwrect, pixrect | ||
void | void | ||
icv_rect(icv_image_file_t *img, | icv_rect(icv_image_file_t *img, | ||
Line 7: | Line 8: | ||
icv_point_t *orig); | icv_point_t *orig); | ||
− | * | + | *for bwcrop |
void | void | ||
icv_crop(icv_image_file_t *img, | icv_crop(icv_image_file_t *img, | ||
Line 16: | Line 17: | ||
icv_point_t *p3, | icv_point_t *p3, | ||
icv_point_t *p4); | icv_point_t *p4); | ||
− | + | ==Group2== | |
− | + | *for bwdiff, pixdiff | |
− | * | ||
void | void | ||
icv_oper2(icv_image_file_t* img1, | icv_oper2(icv_image_file_t* img1, | ||
Line 25: | Line 25: | ||
icv_operation *opr) | icv_operation *opr) | ||
− | * | + | *for bwmod |
void | void | ||
icv_oper1(icv_image_file* img, | icv_oper1(icv_image_file* img, | ||
Line 32: | Line 32: | ||
int numop); | int numop); | ||
− | * | + | *for Pixsaturate |
void | void | ||
icv_saturate(icv_image_file_t *img, | icv_saturate(icv_image_file_t *img, | ||
Line 38: | Line 38: | ||
double saturation); | double saturation); | ||
− | + | ==Group3== | |
− | * | + | *for bwfilter, pixfilter, pix3filter, pixfade |
void | void | ||
icv_filter(icv_image_file_t *img, | icv_filter(icv_image_file_t *img, | ||
Line 45: | Line 45: | ||
int kernel); | int kernel); | ||
− | + | ==Group4== | |
− | * | + | *for bwhist, pixhist |
void | void | ||
icv_hist(icv_image_file_t *img, | icv_hist(icv_image_file_t *img, | ||
Line 53: | Line 53: | ||
long *bin3); | long *bin3); | ||
− | * | + | *for bwhisteq |
void icv_histeq(icv_image_file_t *img, | void icv_histeq(icv_image_file_t *img, | ||
icv_imgage_file_t *out); | icv_imgage_file_t *out); | ||
− | + | ==Group5== | |
− | + | *for bwscale, pixscale | |
void icv_histeq(icv_image_file_t *img, | void icv_histeq(icv_image_file_t *img, | ||
icv_image_file_t *img_out, | icv_image_file_t *img_out, | ||
icv_size_t *size, | icv_size_t *size, | ||
int method); | int method); | ||
− | + | *for bwshrink, pixshrink | |
void icv_shrink(icv_image_file_t *img, | void icv_shrink(icv_image_file_t *img, | ||
icv_image_file_t* img_out, | icv_image_file_t* img_out, | ||
Line 70: | Line 70: | ||
int method); | int method); | ||
− | + | ==Group6== | |
− | + | *for imgdims, pixcount | |
Not useful | Not useful | ||
− | + | *for pixstat, bwstat | |
void icv_stat(icv_image_file_t *img, | void icv_stat(icv_image_file_t *img, | ||
icv_stat_t *stat1, | icv_stat_t *stat1, | ||
Line 79: | Line 79: | ||
icv_stat_t *stat3); | icv_stat_t *stat3); | ||
− | + | *for pixcolors | |
void icv_colors(icv_image_file_t *img) | void icv_colors(icv_image_file_t *img) | ||
/* Prints all the colors */ | /* Prints all the colors */ | ||
− | + | ==Group7== | |
− | + | *for bwthresh | |
void icv_threshold(icv_image_file_t *img, | void icv_threshold(icv_image_file_t *img, | ||
icv_image_file_t *img_out, | icv_image_file_t *img_out, | ||
unsigned char *val, | unsigned char *val, | ||
int num_thresh); | int num_thresh); | ||
− | + | *for pixclump | |
void icv_clump() | void icv_clump() | ||
/* Need Suggestions */ | /* Need Suggestions */ | ||
− | + | ==Group8== | |
− | + | *for pixinterep2x | |
void icv_interep2x(icv_image_file_t *img, | void icv_interep2x(icv_image_file_t *img, | ||
icv_image_file_t *img_out); | icv_image_file_t *img_out); | ||
− | + | *for pixhalve | |
void icv_halve(icv_image_file_t *img, | void icv_halve(icv_image_file_t *img, | ||
icv_image_file_t *img_out | icv_image_file_t *img_out | ||
int autosize ); | int autosize ); | ||
+ | |||
+ | =Structure= | ||
+ | *ICV_IMAGE_FILE | ||
+ | struct icv_image_file { | ||
+ | uint_32 magic; | ||
+ | char* filename; | ||
+ | int fd; | ||
+ | int format; | ||
+ | int width, height, depth; | ||
+ | unsigned char *data; | ||
+ | unisgned long flags; | ||
+ | } | ||
+ | |||
+ | *ICV_SIZE | ||
+ | struct icv_size { | ||
+ | int height, width; | ||
+ | } | ||
+ | |||
+ | *ICV_POINT | ||
+ | struct icv_point { | ||
+ | int x,y; | ||
+ | } | ||
+ | |||
+ | *ICV_OPERATION | ||
+ | struct icv_operation { | ||
+ | char oper; | ||
+ | double val; | ||
+ | } | ||
+ | *ICV_KERNEL | ||
+ | struct icv_kernel { | ||
+ | char *name; | ||
+ | char *uname; /* What is needed to recognize it */ | ||
+ | int kern[9]; | ||
+ | int kerndiv; /* Divisor for kernel */ | ||
+ | int kernoffset; /* To be added to result */ | ||
+ | } | ||
+ | |||
+ | *ICV_STAT | ||
+ | struct icv_stat { | ||
+ | long bin[256]; | ||
+ | int max, min, mode, median; | ||
+ | double mean, var, skew; | ||
+ | long sum, partial_sum; | ||
+ | } |
Revision as of 13:13, 10 June 2013
Contents
API CALLS
Group1
- for bwrect, pixrect
void icv_rect(icv_image_file_t *img, icv_image_file_t *img_out, icv_point_t *area, icv_point_t *orig);
- for bwcrop
void icv_crop(icv_image_file_t *img, icv_image_file_t *img_out, icv_size_t *outsize, icv_point_t *p1, icv_point_t *p2, icv_point_t *p3, icv_point_t *p4);
Group2
- for bwdiff, pixdiff
void icv_oper2(icv_image_file_t* img1, icv_image_file_t* img2, icv_image_file_t *img_out, icv_operation *opr)
- for bwmod
void icv_oper1(icv_image_file* img, icv_image_file_t *img_out, icv_operation_t *oper[], int numop);
- for Pixsaturate
void icv_saturate(icv_image_file_t *img, icv_image_file_t *img_out, double saturation);
Group3
- for bwfilter, pixfilter, pix3filter, pixfade
void icv_filter(icv_image_file_t *img, icv_image_file_t *img_out, int kernel);
Group4
- for bwhist, pixhist
void icv_hist(icv_image_file_t *img, long *bin1, long *bin2, long *bin3);
- for bwhisteq
void icv_histeq(icv_image_file_t *img, icv_imgage_file_t *out);
Group5
- for bwscale, pixscale
void icv_histeq(icv_image_file_t *img, icv_image_file_t *img_out, icv_size_t *size, int method);
- for bwshrink, pixshrink
void icv_shrink(icv_image_file_t *img, icv_image_file_t* img_out, icv_size_t *size, int factor, int method);
Group6
- for imgdims, pixcount
Not useful
- for pixstat, bwstat
void icv_stat(icv_image_file_t *img, icv_stat_t *stat1, icv_stat_t *stat2, icv_stat_t *stat3);
- for pixcolors
void icv_colors(icv_image_file_t *img) /* Prints all the colors */
Group7
- for bwthresh
void icv_threshold(icv_image_file_t *img, icv_image_file_t *img_out, unsigned char *val,
int num_thresh);
- for pixclump
void icv_clump()
/* Need Suggestions */
Group8
- for pixinterep2x
void icv_interep2x(icv_image_file_t *img, icv_image_file_t *img_out);
- for pixhalve
void icv_halve(icv_image_file_t *img, icv_image_file_t *img_out int autosize );
Structure
- ICV_IMAGE_FILE
struct icv_image_file { uint_32 magic; char* filename; int fd; int format; int width, height, depth; unsigned char *data; unisgned long flags; }
- ICV_SIZE
struct icv_size { int height, width; }
- ICV_POINT
struct icv_point { int x,y; }
- ICV_OPERATION
struct icv_operation { char oper; double val; }
- ICV_KERNEL
struct icv_kernel { char *name; char *uname; /* What is needed to recognize it */ int kern[9]; int kerndiv; /* Divisor for kernel */ int kernoffset; /* To be added to result */ }
- ICV_STAT
struct icv_stat {
long bin[256]; int max, min, mode, median; double mean, var, skew; long sum, partial_sum;
}