basler / gst-plugin-pylon

The official GStreamer plug-in for Basler cameras
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

Trying to set the BslBrightness feature to a decimal value #80

Closed rbnrtg closed 10 months ago

rbnrtg commented 10 months ago

As in the example shown in the Features section of the GitHub post, I'm trying to modify the value of the BslBrightness feature of pylonsrc as follows:

gst-launch-1.0 pylonsrc cam::BslBrightness=0.9 ! videoconvert ! autovideosink

But this parameter is only modified when the indicated value is -1, 0 or 1, but when it is a decimal value it cannot be modified from the plugin.

Is there any way to modify this feature with decimal values?

thiesmoeller commented 10 months ago

what is your camera model ?

rbnrtg commented 10 months ago

My camera is Basler daA3840-45uc (USB Model)

rbnrtg commented 10 months ago

Any update? @thiesmoeller Thank you

thiesmoeller commented 10 months ago

What is the platform.

Can you call your pipeline with GST_DEBUG=pylonsrc:10 ...

And post the output. And the error message you get when setting the value

rbnrtg commented 10 months ago

I am testing both on x86 and ARM.

When I call these pipelines I do not receive any error but if I set the BslBrightness parameter to 1, it is modified, but if I set it to 0.9, it is not modified.

This is the output when BslBrightness=1: GST_DEBUG=pylonsrc:10 gst-launch-1.0 pylonsrc cam::BslBrightness=1 ! videoconvert ! autovideosink INFO pylonsrc gstpylonobject.cpp:256:gst_pylon_object_set_pylon_feature<double (*)(const _GValue*), Pylon::CFloatParameter>: Set Feature BslBrightness: 1.000

But when i set BslBrightness=0.9, the output is: GST_DEBUG=pylonsrc:10 gst-launch-1.0 pylonsrc cam::BslBrightness=0.9 ! videoconvert ! autovideosink INFO pylonsrc gstpylonobject.cpp:256:gst_pylon_object_set_pylon_feature<double (*)(const _GValue*), Pylon::CFloatParameter>: Set Feature BslBrightness: 0.000

And my question is that BslBrightness is supposed to allow decimal values between -1 and 1.

Thank you @thiesmoeller

thiesmoeller commented 10 months ago

can reproduce. the feature is clipped to integer values. so -1, 0, +1 work as you describe

We'll work on fix.

thiesmoeller commented 10 months ago

argh! this was quick to fix. an older refactoring broke all float features and the tests didn't catch this. please try the branch feature/fix_float_features

thiesmoeller commented 10 months ago

Code is now on main