// test_camera.cc // buzz - Programme du robot Efrei Robotique I1-I2 2003 // Copyright (C) 2003 Nicolas Schodet // #include "camera.h" #include int main (int argc, char **argv) { Camera cam; 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 (); }