[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd integral_image.h
From: |
Qi Pan |
Subject: |
[libcvd-members] libcvd/cvd integral_image.h |
Date: |
Fri, 18 Sep 2009 11:01:07 +0000 |
CVSROOT: /sources/libcvd
Module name: libcvd
Changes by: Qi Pan <qpan> 09/09/18 11:01:07
Modified files:
cvd : integral_image.h
Log message:
uses assign instead of equals to enable integral image to convert
between e.g. Rgb<T1> and Rgb<T2>
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/integral_image.h?cvsroot=libcvd&r1=1.3&r2=1.4
Patches:
Index: integral_image.h
===================================================================
RCS file: /sources/libcvd/libcvd/cvd/integral_image.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- integral_image.h 1 Apr 2009 15:43:30 -0000 1.3
+++ integral_image.h 18 Sep 2009 11:01:07 -0000 1.4
@@ -24,6 +24,7 @@
#include <cvd/image.h>
#include <cvd/vision.h>
+#include <cvd/internal/pixel_operations.h>
namespace CVD
{
@@ -41,7 +42,7 @@
if( in.size() != out.size())
throw
Exceptions::Vision::IncompatibleImageSizes("integral_image");
- out[0][0] = in[0][0];
+ Pixel::operations<D>::assign(out[0][0], in[0][0]);
//Do the first row.
for(int x=1; x < in.size().x; x++)
out[0][x] =out[0][x-1] + in[0][x];
@@ -53,12 +54,13 @@
//Do the remainder of the image
for(int y=1; y < in.size().y; y++)
{
- D sum = in[y][0];
+ D sum;
+ Pixel::operations<D>::assign(sum,in[y][0]);
for(int x=1; x < in.size().x; x++)
{
sum+= in[y][x];
- out[y][x] = sum + out[y-1][x];
+ Pixel::operations<D>::assign(out[y][x],sum +
out[y-1][x]);
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd/cvd integral_image.h,
Qi Pan <=