00001 #include <stdlib.h>
00002 #include <stdio.h>
00003 #include <assert.h>
00004 #include <FCam/N900.h>
00005
00008
00009 namespace Plat = FCam::N900;
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 int main(int argc, char ** argv) {
00020
00021
00022 Plat::Sensor sensor;
00023
00024
00025 FCam::Shot shot1;
00026 shot1.exposure = 50000;
00027 shot1.gain = 1.0f;
00028
00029
00030 shot1.image = FCam::Image(2592, 1968, FCam::UYVY);
00031
00032
00033 sensor.capture(shot1);
00034 assert(sensor.shotsPending() == 1);
00035
00036
00037 FCam::Frame::Ptr frame = sensor.getFrame();
00038
00039
00040 assert(frame->shot().id == shot1.id);
00041
00042
00043 if (argc > 1)
00044 FCam::saveJPEG(frame, argv[1]);
00045
00046
00047 assert(sensor.framesPending() == 0);
00048 assert(sensor.shotsPending() == 0);
00049 }