Revision: 56677
          http://sourceforge.net/p/brlcad/code/56677
Author:   mohitdaga
Date:     2013-08-07 19:31:26 +0000 (Wed, 07 Aug 2013)
Log Message:
-----------
Add Doxygen Comments for icv_resize. Also do some code cleaning.

Modified Paths:
--------------
    brlcad/trunk/include/icv.h
    brlcad/trunk/src/libicv/decimate.c

Modified: brlcad/trunk/include/icv.h
===================================================================
--- brlcad/trunk/include/icv.h  2013-08-07 18:40:18 UTC (rev 56676)
+++ brlcad/trunk/include/icv.h  2013-08-07 19:31:26 UTC (rev 56677)
@@ -581,15 +581,39 @@
  */
 
 typedef enum {
-    ICV_RESIZE_UPSAMPLE,
+    ICV_RESIZE_UNDERSAMPLE,
     ICV_RESIZE_SHRINK,
     ICV_RESIZE_NINTERP,
     ICV_RESIZE_BINTERP
 } ICV_RESIZE_METHOD;
 
-ICV_EXPORT int icv_resize(icv_image_t *bif, ICV_RESIZE_METHOD method, int 
out_width, int out_height, unsigned int factor);
+/**
+ * This function resizes the given input image.
+ * Mode of usage. 
+ * a) ICV_RESIZE_UNDERSAMPLE : This method undersamples the said image
+ * eg. icv_resize(bif, ICV_RESIZE_UNDERSAMPLE, 0, 0, 2);
+ *   undersamples the image with a factor of 2.
+ *
+ * b) ICV_RESIZE_SHRINK : This Shrinks the image, keeping the light 
+ * energy per square area as constant.
+ * eg. icv_resize(bif, ICV_RESIZE_SHRINK,0,0,2); shrinks the image 
+ * with a factor of 2.
+ *
+ * c) ICV_RESIZE_NITERP : This interpolates using nearest neighbour 
+ * method.
+ * eg. icv_resize(bif, ICV_RESIZE_NITERP,1024,1024,0);
+ *  Interpolates the output image to have the size of 1024X1024.
+ * 
+ * d) ICV_RESIZE_BINTERP : This interpolates using bilinear 
+ * Interpolation Method.
+ * eg. icv_resize(bif, ICV_RESIZE_NITERP,1024,1024,0);
+ *  Interpolates the output image to have the size of 1024X1024.
+ *
+ */
 
+ICV_EXPORT int icv_resize(icv_image_t *bif, ICV_RESIZE_METHOD method, unsigned 
int out_width, unsigned int out_height, unsigned int factor);
 
+
 /** @} */
 /* end image utilities */
 

Modified: brlcad/trunk/src/libicv/decimate.c
===================================================================
--- brlcad/trunk/src/libicv/decimate.c  2013-08-07 18:40:18 UTC (rev 56676)
+++ brlcad/trunk/src/libicv/decimate.c  2013-08-07 19:31:26 UTC (rev 56677)
@@ -199,10 +199,10 @@
 
 }
 
-int icv_resize(icv_image_t *bif, ICV_RESIZE_METHOD method, int out_width, int 
out_height, unsigned int factor)
+int icv_resize(icv_image_t *bif, ICV_RESIZE_METHOD method, unsigned int 
out_width, unsigned int out_height, unsigned int factor)
 {
     switch(method) {
-       case ICV_RESIZE_UPSAMPLE :
+       case ICV_RESIZE_UNDERSAMPLE :
            return shrink_image(bif, factor);
        case ICV_RESIZE_SHRINK :
            return under_sample(bif, factor);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to