libcvd-members
[Top][All Lists]
Advanced

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

[libcvd-members] libcvd/cvd vision.h


From: Edward Rosten
Subject: [libcvd-members] libcvd/cvd vision.h
Date: Tue, 01 Aug 2006 14:04:33 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        06/08/01 14:04:33

Modified files:
        cvd            : vision.h 

Log message:
        halfSample which returns the halfsampled image.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/vision.h?cvsroot=libcvd&r1=1.18&r2=1.19

Patches:
Index: vision.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/vision.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- vision.h    27 Jul 2006 11:14:57 -0000      1.18
+++ vision.h    1 Aug 2006 14:04:33 -0000       1.19
@@ -107,6 +107,19 @@
  void halfSample(const BasicImage<byte>& in, BasicImage<byte>& out);
 #endif
 
+/// subsamples an image to half its size by averaging 2x2 pixel blocks
+/// @param in input image
+/// @return The output image
+/// @throw IncompatibleImageSizes if out does not have half the dimensions of 
in
+/// @ingroup gVision
+template <class T>
+Image<T> halfSample(const BasicImage<T>& in)
+{
+       Image<T> out(in.size()/2);
+       halfSample(in, out);
+       return out;
+}
+
 
 /// thresholds an image by setting all pixel values below a minimum to 0 and 
all values above to a given maximum
 /// @param im input image changed in place




reply via email to

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