summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/camera/test_camera.cc
diff options
context:
space:
mode:
authorschodet2003-09-10 20:13:52 +0000
committerschodet2003-09-10 20:13:52 +0000
commite40722474578d38fb31f4aa97af49904eda75544 (patch)
tree2259cd5b07ad12f2a8ed52a9354ab2bf8b256b25 /2003/i/buzz/src/camera/test_camera.cc
parent5b1f702f012e9fcb0e64cdb6954759acc4c13e31 (diff)
Aprés 2003.
Diffstat (limited to '2003/i/buzz/src/camera/test_camera.cc')
-rw-r--r--2003/i/buzz/src/camera/test_camera.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/2003/i/buzz/src/camera/test_camera.cc b/2003/i/buzz/src/camera/test_camera.cc
index 11dac93..701b050 100644
--- a/2003/i/buzz/src/camera/test_camera.cc
+++ b/2003/i/buzz/src/camera/test_camera.cc
@@ -4,6 +4,7 @@
//
#include "camera.h"
#include "erreur/erreur.h"
+#include "date/date.h"
#include <fstream>
#include <unistd.h>
@@ -15,6 +16,7 @@ main (int argc, char **argv)
try
{
Camera cam;
+ Date date;
int w, h, d;
cam.getSize (w, h, d);
unsigned char *image = new unsigned char[w * h * d];
@@ -42,7 +44,7 @@ main (int argc, char **argv)
}
for (int j = 0; j < w * h; ++j)
{
- int t = (int) image[j * 4 + 2] >> 2 - (int) image[j * 4 + 1] >> 2;
+ int t = ((int) image[j * 4 + 2] >> 1) - ((int) image[j * 4 + 1] >> 1);
t = t > 0 ? t : -t;
image2[j] = t;
}