libcvd-members
[Top][All Lists]
Advanced

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

[libcvd-members] libcvd/cvd/internal builtin_components.h pixel_...


From: Georg Klein
Subject: [libcvd-members] libcvd/cvd/internal builtin_components.h pixel_...
Date: Wed, 29 Oct 2008 12:29:36 +0000

CVSROOT:        /sources/libcvd
Module name:    libcvd
Changes by:     Georg Klein <georgklein>        08/10/29 12:29:36

Modified files:
        cvd/internal   : builtin_components.h pixel_traits.h 

Log message:
        Let images of matrices be blurred

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/internal/builtin_components.h?cvsroot=libcvd&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/internal/pixel_traits.h?cvsroot=libcvd&r1=1.12&r2=1.13

Patches:
Index: builtin_components.h
===================================================================
RCS file: /sources/libcvd/libcvd/cvd/internal/builtin_components.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- builtin_components.h        23 Jun 2008 11:34:52 -0000      1.9
+++ builtin_components.h        29 Oct 2008 12:29:36 -0000      1.10
@@ -102,6 +102,22 @@
        return pixel[i];
       }
     };
+
+    template<int N, int M> struct Component<TooN::Matrix<N,M> >
+    {
+      typedef double type;
+      static const size_t count=N*M;
+      
+      static const type& get(const TooN::Matrix<N,M>& pixel, size_t i)
+      {
+       return pixel[i/M][i%M];
+      }
+
+      static inline type& get(TooN::Matrix<N,M>& pixel, size_t i)
+      {
+       return pixel[i/M][i%M];
+      }
+    };
 #endif
                
   }

Index: pixel_traits.h
===================================================================
RCS file: /sources/libcvd/libcvd/cvd/internal/pixel_traits.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- pixel_traits.h      8 Nov 2007 17:54:42 -0000       1.12
+++ pixel_traits.h      29 Oct 2008 12:29:36 -0000      1.13
@@ -207,6 +207,14 @@
     };
     template <int N> const TooN::Vector<N> traits<TooN::Vector<N> 
>::max_intensity = TooN::Vector<N>(1.0);
 
+    template<int N, int M> struct traits<TooN::Matrix<N,M> >
+    {
+      typedef TooN::Matrix<N,M> wider_type;
+      typedef TooN::Matrix<N,M> float_type;
+      static const bool integral = false;
+      static const bool is_signed = true;
+    };
+
 #endif
 
 




reply via email to

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