summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMihael Koep <koep@schneide.com>2014-10-07 12:22:52 +0200
committerMihael Koep <koep@schneide.com>2014-10-07 13:08:08 +0200
commitf2394f593a552f1c3d29ce894b5cd28914b884b7 (patch)
tree69535ada9e98ed40bb3e0578356847f130836708 /plugins
parent8e98707648406e2c7a6831c2f3366a2c34eba617 (diff)
downloadlibuca-f2394f593a552f1c3d29ce894b5cd28914b884b7.tar.gz
libuca-f2394f593a552f1c3d29ce894b5cd28914b884b7.tar.bz2
libuca-f2394f593a552f1c3d29ce894b5cd28914b884b7.tar.xz
libuca-f2394f593a552f1c3d29ce894b5cd28914b884b7.zip
Implement auto exposure property for pylon plugin
Conflicts: plugins/pylon/CMakeLists.txt plugins/pylon/changelog.txt plugins/pylon/uca-pylon-camera.c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pylon/CMakeLists.txt4
-rw-r--r--plugins/pylon/changelog.txt2
-rw-r--r--plugins/pylon/uca-pylon-camera.c14
-rw-r--r--plugins/pylon/uca-pylon-camera.h6
4 files changed, 24 insertions, 2 deletions
diff --git a/plugins/pylon/CMakeLists.txt b/plugins/pylon/CMakeLists.txt
index 7ae3288..69f668d 100644
--- a/plugins/pylon/CMakeLists.txt
+++ b/plugins/pylon/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6)
project(ucapylon C)
-set(VERSION "1.2.1")
+set(VERSION "1.3.0")
find_package(Pylon)
@@ -11,7 +11,7 @@ if (PYLON_FOUND)
set(PLUGIN_SUMMARY "Pylon plugin for libuca")
set(PLUGIN_CHANGELOG "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt")
set(PLUGIN_DESCRIPTION "Plugin for the Basler GigE CCD Camera.")
- set(PLUGIN_REQUIRES "libuca >= 1.3.0, libpyloncam >= 0.4.0")
+ set(PLUGIN_REQUIRES "libuca >= 1.3.0, libpyloncam >= 0.5.0")
set(PLUGIN_VENDOR "ANKA Computing Group")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in
diff --git a/plugins/pylon/changelog.txt b/plugins/pylon/changelog.txt
index 9e1584c..7ce5fa8 100644
--- a/plugins/pylon/changelog.txt
+++ b/plugins/pylon/changelog.txt
@@ -1,3 +1,5 @@
+* Tue Oct 7 2014 Mihael Koep <mihael.koep@softwareschneiderei.de> 1.3.0-1
+- require libpyloncam 0.5.0 because of new auto exposure feature
* Thu Sep 11 2014 Mihael Koep <mihael.koep@softwareschneiderei.de> 1.2.1-1
- improve robustness of roi setting
* Thu Jul 31 2014 Mihael Koep <mihael.koep@softwareschneiderei.de> 1.2.0-1
diff --git a/plugins/pylon/uca-pylon-camera.c b/plugins/pylon/uca-pylon-camera.c
index 1c3a759..f8c284a 100644
--- a/plugins/pylon/uca-pylon-camera.c
+++ b/plugins/pylon/uca-pylon-camera.c
@@ -55,6 +55,7 @@ enum {
PROP_ROI_HEIGHT_DEFAULT,
PROP_GAIN,
PROP_BALANCE_WHITE_AUTO,
+ PROP_EXPOSURE_AUTO,
N_PROPERTIES
};
@@ -149,6 +150,11 @@ static void uca_pylon_camera_set_property(GObject *object, guint property_id, co
pylon_camera_set_int_attribute("BalanceWhiteAuto", g_value_get_enum(value), &error);
break;
}
+ case PROP_EXPOSURE_AUTO:
+ {
+ pylon_camera_set_int_attribute("ExposureAuto", g_value_get_enum(value), &error);
+ break;
+ }
case PROP_ROI_X:
{
priv->roi_x = g_value_get_uint(value);
@@ -211,6 +217,14 @@ static void uca_pylon_camera_get_property(GObject *object, guint property_id, GV
g_value_set_enum(value, mode);
break;
}
+ case PROP_EXPOSURE_AUTO:
+ {
+ gint enum_value = UCA_CAMERA_EXPOSURE_AUTO_OFF;
+ pylon_camera_get_int_attribute("ExposureAuto", &enum_value, &error);
+ UcaCameraExposureAuto mode = enum_value;
+ g_value_set_enum(value, mode);
+ break;
+ }
case PROP_SENSOR_WIDTH:
pylon_camera_get_sensor_size(&priv->width, &priv->height, &error);
g_value_set_uint(value, priv->width);
diff --git a/plugins/pylon/uca-pylon-camera.h b/plugins/pylon/uca-pylon-camera.h
index f3d7bb5..621c8da 100644
--- a/plugins/pylon/uca-pylon-camera.h
+++ b/plugins/pylon/uca-pylon-camera.h
@@ -43,6 +43,12 @@ typedef enum {
UCA_CAMERA_BALANCE_WHITE_CONTINUOUSLY
} UcaCameraBalanceWhiteAuto;
+typedef enum {
+ UCA_CAMERA_EXPOSURE_AUTO_OFF,
+ UCA_CAMERA_EXPOSURE_AUTO_ONCE,
+ UCA_CAMERA_EXPOSURE_AUTO_CONTINUOUSLY
+} UcaCameraExposureAuto;
+
typedef struct _UcaPylonCamera UcaPylonCamera;
typedef struct _UcaPylonCameraClass UcaPylonCameraClass;
typedef struct _UcaPylonCameraPrivate UcaPylonCameraPrivate;