diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-04-24 11:00:16 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2013-04-24 11:10:26 +0200 |
commit | 4784c2e457649d6452817f134aba33dff668b028 (patch) | |
tree | 5cc0ea1975252c2a1338759bc05b18e60b5af7f7 /plugins/ufo | |
parent | 5a147dc45f3d40d6b0c7f880af7e2e6006f41f6a (diff) | |
download | libuca-4784c2e457649d6452817f134aba33dff668b028.tar.gz libuca-4784c2e457649d6452817f134aba33dff668b028.tar.bz2 libuca-4784c2e457649d6452817f134aba33dff668b028.tar.xz libuca-4784c2e457649d6452817f134aba33dff668b028.zip |
Convert to correct frames per second
Diffstat (limited to 'plugins/ufo')
-rw-r--r-- | plugins/ufo/uca-ufo-camera.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/ufo/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c index 551e5f0..3f6d42c 100644 --- a/plugins/ufo/uca-ufo-camera.c +++ b/plugins/ufo/uca-ufo-camera.c @@ -86,6 +86,7 @@ static gint base_overrideables[] = { PROP_SENSOR_MAX_FRAME_RATE, PROP_SENSOR_BITDEPTH, PROP_EXPOSURE_TIME, + PROP_FRAMES_PER_SECOND, PROP_ROI_X, PROP_ROI_Y, PROP_ROI_WIDTH, @@ -495,6 +496,25 @@ uca_ufo_camera_get_property(GObject *object, guint property_id, GValue *value, G g_value_set_double (value, read_register_value (priv->handle, "cmosis_exp_time") * 129.0 / frequency / 1e6); } break; + case PROP_FRAMES_PER_SECOND: + { + gdouble exposure_time; + gdouble fps; + guint trigger_period; + guint roi_height; + + g_object_get (object, + "exposure-time", &exposure_time, + "ufo-trigger-period", &trigger_period, + "roi-height", &roi_height, + NULL); + + fps = 1. / (exposure_time + + (roi_height / 1088. * 2924. * 1e-6)+ + (trigger_period * 8. * 1e-9)); + g_value_set_double(value, fps); + } + break; case PROP_HAS_STREAMING: g_value_set_boolean(value, TRUE); break; |