libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd cvd/convolution.h cvd_src/convolution.cc


From: Edward Rosten
Subject: [libcvd-members] libcvd cvd/convolution.h cvd_src/convolution.cc
Date: Thu, 18 Jun 2009 11:21:17 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        09/06/18 11:21:17

Modified files:
        cvd            : convolution.h 
        cvd_src        : convolution.cc 

Log message:
        Fix gcc-4.4 compile error (and remove errant printf)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/convolution.h?cvsroot=libcvd&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/convolution.cc?cvsroot=libcvd&r1=1.7&r2=1.8

Patches:
Index: cvd/convolution.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/convolution.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- cvd/convolution.h   15 Jul 2008 00:47:42 -0000      1.15
+++ cvd/convolution.h   18 Jun 2009 11:21:16 -0000      1.16
@@ -128,6 +128,16 @@
             IncompatibleImageSizes(const std::string & function)
             {
                 what = "Incompatible image sizes in " + function;
+           }
+       };
+
+                               
+        /// Input images have incompatible dimensions
+        /// @ingroup gException
+        struct OddSizedKernelRequired : public All {
+            OddSizedKernelRequired(const std::string & function)
+            {
+                what = "Odd sized kernel required in " + function;
             };
         };
     }

Index: cvd_src/convolution.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/convolution.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- cvd_src/convolution.cc      12 Jun 2008 13:04:14 -0000      1.7
+++ cvd_src/convolution.cc      18 Jun 2009 11:21:16 -0000      1.8
@@ -12,8 +12,7 @@
     unsigned char* p = I;
     unsigned int i,j,m;
     if (size%2 == 0) {
-        printf("In convolveSeparable, size must be odd.\n");
-        return;
+               throw 
Exceptions::Convolution::OddSizedKernelRequired("convolveSeparable");
     }
     for (i=height; i>0; i--) {
         for (j=0;j<width-size+1;j++) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]