diff options
Diffstat (limited to 'test/grab.c')
-rw-r--r-- | test/grab.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/test/grab.c b/test/grab.c index fa4d6c3..2a9d9ea 100644 --- a/test/grab.c +++ b/test/grab.c @@ -38,7 +38,9 @@ int main(int argc, char *argv[]) { GError *error = NULL; (void) signal(SIGINT, sigint_handler); - guint sensor_width, sensor_height, roi_width, roi_height, roi_x, roi_y, bits, sensor_rate; + guint sensor_width, sensor_height, sensor_width_extended, sensor_height_extended; + guint roi_width, roi_height, roi_x, roi_y; + guint bits, sensor_rate; g_type_init(); camera = uca_camera_new("pco", &error); @@ -48,18 +50,24 @@ int main(int argc, char *argv[]) return 1; } + g_object_get(G_OBJECT(camera), + "sensor-width", &sensor_width, + "sensor-height", &sensor_height, + "sensor-width-extended", &sensor_width_extended, + "sensor-height-extended", &sensor_height_extended, + NULL); + g_object_set(G_OBJECT(camera), "exposure-time", 0.1, "delay-time", 0.0, "roi-x0", 0, "roi-y0", 0, - "roi-width", 1024, - "roi-height", 512, + "sensor-extended", FALSE, + "roi-width", sensor_width, + "roi-height", sensor_height, NULL); g_object_get(G_OBJECT(camera), - "sensor-width", &sensor_width, - "sensor-height", &sensor_height, "roi-width", &roi_width, "roi-height", &roi_height, "roi-x0", &roi_x, @@ -68,8 +76,10 @@ int main(int argc, char *argv[]) "sensor-pixelrate", &sensor_rate, NULL); - g_print("Sensor: %ix%i px, ROI %ix%i @ (%i, %i) and %i Hz\n", - sensor_width, sensor_height, roi_width, roi_height, roi_x, roi_y, sensor_rate); + g_print("Sensor: %ix%i px (extended: %ix%i), ROI %ix%i @ (%i, %i) and %i Hz\n", + sensor_width, sensor_height, + sensor_width_extended, sensor_height_extended, + roi_width, roi_height, roi_x, roi_y, sensor_rate); const int pixel_size = bits == 8 ? 1 : 2; gpointer buffer = g_malloc0(roi_width * roi_height * pixel_size); |