summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/camera/test_camera.cc
diff options
context:
space:
mode:
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;
}