summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/camera/test_camera.cc
diff options
context:
space:
mode:
authorschodet2003-05-22 18:05:25 +0000
committerschodet2003-05-22 18:05:25 +0000
commit028befd70da61c3468149a1f1afa3d9eaf4369c7 (patch)
tree253d937265197995715102411af4e3af883f6875 /2003/i/buzz/src/camera/test_camera.cc
parentd201c6b9e46b79b6dabb5a7cd753b95c108c0915 (diff)
Ajout de Dumpimage
R├ęglage des param├Ętres de la camera.
Diffstat (limited to '2003/i/buzz/src/camera/test_camera.cc')
-rw-r--r--2003/i/buzz/src/camera/test_camera.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/2003/i/buzz/src/camera/test_camera.cc b/2003/i/buzz/src/camera/test_camera.cc
index 130d53e..1868ad5 100644
--- a/2003/i/buzz/src/camera/test_camera.cc
+++ b/2003/i/buzz/src/camera/test_camera.cc
@@ -3,12 +3,26 @@
// Copyright (C) 2003 Nicolas Schodet
//
#include "camera.h"
-#include "vision/image.h"
+
+#include <fstream>
int
main (int argc, char **argv)
{
Camera cam;
- Image image (cam, 0);
- image.dump (argc == 2 ? argv[1] : "test.ppm");
+ ofstream o0 (argc >= 2 ? argv[1] : "camera0.raw");
+ ofstream o1 (argc >= 3 ? argv[2] : "camera1.raw");
+ ofstream o2 (argc == 4 ? argv[3] : "camera2.raw");
+ int w, h;
+ cam.getSize (w, h);
+ unsigned char *image = new unsigned char[w * h * 3];
+ cam.read (image);
+ o0.write (image, w * h * 3);
+ o0.close ();
+ cam.read (image);
+ o1.write (image, w * h * 3);
+ o1.close ();
+ cam.read (image);
+ o2.write (image, w * h * 3);
+ o2.close ();
}