00001 #include <FCam/N900.h>
00002 #include <iostream>
00003
00004 using namespace FCam;
00005
00006
00007
00008 int main(int argc, char **argv) {
00009 N900::Sensor sensor;
00010
00011 Shot shot;
00012 shot.image = Image(sensor.maxImageSize(), RAW, Image::AutoAllocate);
00013 shot.exposure = 1000;
00014 shot.gain = 1.0f;
00015 shot.frameTime = 100000;
00016
00017 sensor.stream(shot);
00018
00019 for (int i = 0; i < 100; i++) {
00020 Frame f = sensor.getFrame();
00021 printf("%d: %x\n", i, f.image()(0, 0));
00022
00023 Event e;
00024 while (getNextEvent(&e)) {
00025 std::cout << "Event: " << e.description << std::endl;
00026 }
00027 }
00028
00029 return 0;
00030 }