Go to the documentation of this file.00001 #include <stdlib.h>
00002 #include <stdio.h>
00003 #include <assert.h>
00004
00005
00006
00007 #if !defined PLATFORM_N900 && !defined PLATFORM_F2
00008 #define PLATFORM_N900
00009 #endif
00010
00011 #if defined PLATFORM_N900
00012 #include <FCam/N900.h>
00013 namespace Plat = FCam::N900;
00014 #endif
00015
00016 #if defined PLATFORM_F2
00017 #include <FCam/F2.h>
00018 namespace Plat = FCam::F2;
00019 #endif
00020
00023
00024
00025
00026
00027
00028
00029
00030 int main(int argc, char ** argv) {
00031
00032
00033 Plat::Sensor sensor;
00034
00035
00036 FCam::Shot shot1;
00037 shot1.exposure = 50000;
00038 shot1.gain = 1.0f;
00039
00040
00041 shot1.image = FCam::Image(2592, 1968, FCam::UYVY);
00042
00043
00044
00045
00046
00047 sensor.capture(shot1);
00048
00049
00050
00051
00052 FCam::Frame frame = sensor.getFrame();
00053
00054
00055 assert(frame.shot().id == shot1.id);
00056
00057
00058 if (argc > 1)
00059 FCam::saveJPEG(frame, argv[1]);
00060
00061
00062 assert(sensor.framesPending() == 0);
00063 assert(sensor.shotsPending() == 0);
00064
00065 return 0;
00066 }