summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-06-14 10:54:09 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-06-14 11:07:00 +0200
commitf6f1407d38e348e62199a8735b98beda18d3c976 (patch)
tree5742fd94ace8ffc32d9eb30d46e9ff3140c77936 /test
parent3e4783c72bf7d0c9b181d349c37708ffbebf183e (diff)
downloaduca-f6f1407d38e348e62199a8735b98beda18d3c976.tar.gz
uca-f6f1407d38e348e62199a8735b98beda18d3c976.tar.bz2
uca-f6f1407d38e348e62199a8735b98beda18d3c976.tar.xz
uca-f6f1407d38e348e62199a8735b98beda18d3c976.zip
Fix LU-4
The larger sensor area can now be used as a ROI.
Diffstat (limited to 'test')
-rw-r--r--test/grab.c24
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);