Editing User:Level zero/GSOC13/api

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
=API CALLS=
 
=API CALLS=
 
==Cropping(Group1)==
 
==Cropping(Group1)==
'''for bwrect, pixrect'''
+
*for bwrect, pixrect
'''Comments'''
+
    void
*Removes a rectangular portion of a potentially huge image.
+
    icv_rect(icv_image_file_t *img,
*''orig'', is the point that corresponds to  Bottom left corner to extract the image from
+
            icv_image_file_t *img_out,  
*''area'' corresponds to the total number of pixels in the new map.
+
            icv_point_t *area,
*''img_out'' is the output image.
+
            icv_point_t *orig); 
  
     int
+
*for bwcrop
     icv_rect(const icv_image_t *img,
+
     void
             const icv_point_t *area,
+
     icv_crop(icv_image_file_t *img,
             const icv_point_t *orig
+
             icv_image_file_t *img_out,
            icv_image_t *img_out); 
+
             icv_size_t *outsize,
 
+
             icv_point_t *p1,
 
+
             icv_point_t *p2,
'''for bwcrop'''
+
             icv_point_t *p3,
 
+
             icv_point_t *p4);
'''Comments'''
 
*Crops file with arbitrary points
 
*''p1'', ''p2'', ''p3'', ''p4'' are left lower, right lower, left upper and right upper points respectively.
 
*''img_out'' is the output image.
 
 
 
    int
 
    icv_crop(const icv_image_t *img,
 
             const icv_point_t *p1,
 
             const icv_point_t *p2,
 
             const icv_point_t *p3,
 
             const icv_point_t *p4,
 
            const icv_size_t *outsize,
 
            icv_image_t *img_out);
 
 
 
 
 
 
==Operations (Group2)==
 
==Operations (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 bwdiff, pixdiff'''
+
*for bwmod
 
+
     void
'''Comments'''
+
     icv_oper1(icv_image_file* img,
*Performs arithmetic operations between the pixels of two images.
+
              icv_image_file_t *img_out,
*''img_1'' and ''img_2'' are two input images.
+
               icv_operation_t *oper[],   
*''opr'' corresponds to the operation information.
+
               int numop);  
*''img_out'' is the output image.
 
 
 
 
 
     int
 
     icv_airth2(const icv_image_t* img1,
 
              const icv_image_t* img2,
 
              const icv_operation_t *opr,
 
              icv_image_t *img_out)
 
 
 
'''for bwmod'''
 
 
 
'''Comments'''
 
*Performs arithmetic operations with a value of the pixels of the input image, the resultant value is replaced in the same input image.
 
*''oper'' is the array corresponding to the operations.
 
*''numop'' is the number of operations.
 
*''img_out'' is the output image.
 
 
 
    int
 
    icv_airth1(icv_image_t* img,
 
               const icv_operation_t *oper[],   
 
               const int numop);  
 
  
'''for Pixsaturate'''
+
*for Pixsaturate
 
+
     void
'''Comments'''
+
     icv_saturate(icv_image_file_t *img,
*''saturation'' is the saturation value
+
                 icv_image_file_t *img_out,  
*''img_out'' is the output image.
+
                 double saturation);
 
 
     int
 
     icv_saturate(const icv_image_t *img,
 
                 const double saturation,
 
                 icv_image_t *img_out);
 
  
 
==Filters (Group3)==
 
==Filters (Group3)==
'''for bwfilter, pixfilter, pix3filter, pixfade
+
*for bwfilter, pixfilter, pix3filter, pixfade
 
+
     void
'''Comments'''
+
     icv_filter(icv_image_file_t *img,
*Performs filtering of image using convolution with the kernel.
+
               icv_image_file_t *img_out, 
*''kernel'' corresponds to kernel used for image filter
+
               int kernel);
*''img_out'' is the output image.
 
 
 
     int
 
     icv_filter(const icv_image_t *img,
 
               const icv_kernel_type_t kernel;
 
               icv_image_ *img_out);
 
  
 
==Histogram (Group4)==
 
==Histogram (Group4)==
'''for bwhist, pixhist'''
+
*for bwhist, pixhist
 
+
     void
'''Comments'''
+
     icv_hist(icv_image_file_t *img,  
*Finds histogram of the image
+
            long *bin1,  
*''bin'' is the number of bins for calculating histogram
+
            long *bin2,  
*''bin_out1'', ''bin_out2'' and ''bin_out3'' are the pointers for output histograms
+
            long *bin3);
*For three channel image this is called with all the three output pointers, for bw image this is called with pointers only for first and others are left as NULL
 
 
 
     int
 
     icv_hist(const icv_image_t *img,
 
            const int bin,
 
            long *bin_out1,
 
            long *bin_out2,
 
            long *bin_out3);
 
 
 
'''for bwhisteq'''
 
 
 
'''Comments'''
 
*Calculates histogram equalization of the image
 
  
    int
+
*for bwhisteq
     icv_histeq(const icv_image_t *img,
+
     void icv_histeq(icv_image_file_t *img,
                     icv_imgage_file_t *img_out);
+
                     icv_imgage_file_t *out);
  
 
==Scale (Group5)==
 
==Scale (Group5)==
'''for bwscale, pixscale'''
+
*for bwscale, pixscale
 
+
     void icv_histeq(icv_image_file_t *img,
'''Comments'''
+
                    icv_image_file_t *img_out,
* ''outsize'' is the required output size
+
                    icv_size_t *size,
* ''method'' is the prescribed method   
+
                    int method);
 
+
*for bwshrink, pixshrink
    int   
+
     void icv_shrink(icv_image_file_t *img,
     icv_scale(const icv_image_t *img,
+
                     icv_image_file_t* img_out,
                  const icv_size_t *outsize,
+
                     icv_size_t *size,
                  const icv_scale_method_t method,
+
                    int factor,
                  icv_image_t *img_out);
+
                     int method);
 
 
'''for bwshrink, pixshrink'''
 
 
 
'''Comments'''
 
* ''factor'' is shrinking factor.
 
* ''method'' is the prescribed method.
 
 
 
    int
 
     icv_shrink(const icv_image_t *img,
 
                     icv_image_t *img_out,
 
                     const int factor,
 
                     const icv_shrink_mehtod_t method);
 
  
 
==Stats (Group6)==
 
==Stats (Group6)==
'''for imgdims, pixcount'''
+
*for imgdims, pixcount
 
Not useful     
 
Not useful     
 
+
*for pixstat, bwstat
'''for pixstat, bwstat'''
+
     void icv_stat(icv_image_file_t *img,
 
 
'''Comments'''
 
* finds the image statistics
 
 
 
    int
 
     icv_stat(const icv_image_t *img,
 
 
                   icv_stat_t *stat1,  
 
                   icv_stat_t *stat1,  
 
                   icv_stat_t *stat2,   
 
                   icv_stat_t *stat2,   
 
                   icv_stat_t *stat3);
 
                   icv_stat_t *stat3);
  
'''for pixcolors'''
+
*for pixcolors
 
+
     void icv_colors(icv_image_file_t *img)  
    int
 
     icv_colors(icv_image_t *img)  
 
 
     /* Prints all the colors */     
 
     /* Prints all the colors */     
 
      
 
      
  
 
==Threshold (Group7)==
 
==Threshold (Group7)==
'''for bwthresh'''
+
*for bwthresh  
 
+
     void icv_threshold(icv_image_file_t *img,
'''Comments'''
+
                       icv_image_file_t *img_out,
* ''val'' is a pointer to an array of threshold values
+
                       unsigned char *val,
* ''num_thresh'' is the number of the threshold values
+
  int num_thresh);
* ''img_out'' is the output image
+
*for pixclump
 
+
     void icv_clump()
    int
 
     icv_threshold(const icv_image_t *img,
 
                       icv_image_t *img_out,
 
                       const unsigned char *val,
 
                      const int num_thresh);
 
 
 
'''for pixclump'''
 
 
 
    int
 
     icv_clump()
 
 
/* Need Suggestions */
 
/* Need Suggestions */
 
      
 
      
== Interpolate (Group8) ==
+
==Interpolate(Group8)==
'''for pixinterep2x'''
+
*for pixinterep2x
 
+
     void icv_interep2x(icv_image_file_t *img,
'''Comments'''
+
                       icv_image_file_t *img_out);     
*Interpolates the image two twice its resolution
+
*for pixhalve
 
+
     void icv_halve(icv_image_file_t *img,
    int
+
                   icv_image_file_t *img_out
     icv_interep2x(const icv_image_t *img,
+
                  int autosize );
                       icv_image_t *img_out);     
 
 
 
'''for pixhalve'''
 
 
 
'''Comments'''
 
*Decimates the image
 
 
 
    int
 
     icv_halve(const icv_image_t *img,
 
                   icv_image_t *img_out);
 
  
 
=Structure=
 
=Structure=

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)