Comments (21)
Ah, looking at the docs again, I guess I missed the struct entries the first time because the doc search they have is broken (had to grep for them).
Yeah, you should be able to add it by just adding the instructions to set BslContrast, i.e. PylonDeviceSetFloatFeature(pylonsrc->deviceHandle, "BslContrast", <value>);
.
for BslContrastMode, you'll need PylonDeviceFeatureFromString(pylonsrc->deviceHandle, "BslContrastMode", <value>);
, where value can be either Linear
or SCurve
.
You'll need to check for the features first using PylonDeviceFeatureIsAvailable
. From what I gather these will only work with dart and pulse cameras (not ace).
from gst-pylonsrc.
Hi Steven,
Try "BslSaturationValue" instead. I think our documentation here has a typo (perhaps the section is a bit outdated). :-(.
If possible, try to use the pylon viewer as the first go to for feature names. It is pulling the xml file directly from the camera.
Sorry for this!
-Matt
from gst-pylonsrc.
As far as I can tell Pylon 5.0.12 does not let you set contrast values, and as such this plugin does not have this functionality.
from gst-pylonsrc.
Just curious, where do you check if pylon supports certain functions or not?
From this page it looks like basler does support certain functions. I dont know how this relates to pylon though.
https://docs.baslerweb.com/brightness-and-contrast.html
from gst-pylonsrc.
The pylon redist comes with header files and docs that describe all available functions. If it's not there, it's usually a sign that it's not available.
The docs you linked seem to be from Pylon 6.0, but as far as I can tell it's only available for Windows right now.
from gst-pylonsrc.
I do agree with you that contrast doesnt exist for Pylon 5.0.12 in C. But the docs do show contrast settings in C++. Is there a reason why we can't use C++?
from gst-pylonsrc.
gstreamer plugins are written in C using gobject etc libs. It might be possible, but I suspect gobject won't play well with C++, if at all.
I don't know if they're suitable for your use case, but AppSrc plugins can be written in C++, and there's one for pylon available here https://github.com/MattsProjects/pylon_gstreamer
from gst-pylonsrc.
Just to make sure i'm on the same page, are you looking at docs in .../pylon5/share/doc/BPD/
?
from gst-pylonsrc.
I use the C++ docs to look at the classes, i.e. C++/class_basler___usb_camera_params_1_1_c_usb_camera_params___params.html#a330bd845cac1b1631066736d857220f3
. When developing this I basically took everything pylon gave me for my camera (it was an ace), and just implemented it into the plugin (which is why contrast controls are missing). The BPD docs had a bunch of stuff I didn't need, so I didn't use them.
from gst-pylonsrc.
how do i go about troubleshooting the camera? I'm using a dart and i implemented the contrast. The camera doesnt seem to be throwing any error, but contrast also isnt changing as expected.
from gst-pylonsrc.
Does it change at all? Does it change properly using the Pylon viewer app? How different are the results you get from the viewer app and gstreamer video output?
from gst-pylonsrc.
it doesnt change at all, when pull the parameter GST_DEBUG_OBJECT(pylonsrc, "The resulting contrast is %.0lf.", contrastRate);
after i set it, it still returns 0.
if(PylonDeviceFeatureIsAvailable(pylonsrc->deviceHandle, "BslContrast")) {
GST_DEBUG_OBJECT(pylonsrc, "Setting contrast to %.2lf", pylonsrc->contrast);
res = PylonDeviceFeatureFromString(pylonsrc->deviceHandle, "BslContrastMode", "Linear");
PYLONC_CHECK_ERROR(pylonsrc, res);
res = PylonDeviceSetFloatFeature(pylonsrc->deviceHandle, "BslContrast", pylonsrc->contrast);
PYLONC_CHECK_ERROR(pylonsrc, res);
double contrastRate = 0.0;
res = PylonDeviceGetFloatFeature(pylonsrc->deviceHandle, "BslContrast", &contrastRate);
PYLONC_CHECK_ERROR(pylonsrc, res);
GST_DEBUG_OBJECT(pylonsrc, "The resulting contrast is %.0lf.", contrastRate);
} else {
GST_WARNING_OBJECT(pylonsrc, "This camera doesn't support contrast.");
}
when i adjust contrast in the viewer it does change the output 0->.22 results in a brighter image.
In gstreamer video output it looks the same as 0.
from gst-pylonsrc.
What does PylonDeviceFeatureIsWritable(pylonsrc->deviceHandle, "BslContrast")
return?
from gst-pylonsrc.
it returns true.
0:00:01.177648058 35322 0x5617454b4630 DEBUG pylonsrc gstpylonsrc.c:1067:gst_pylonsrc_start:<pylonsrc0> Is contrast writeable: 1.
0:00:01.177689018 35322 0x5617454b4630 DEBUG pylonsrc gstpylonsrc.c:1068:gst_pylonsrc_start:<pylonsrc0> Setting contrast to 0.22
0:00:01.222329427 35322 0x5617454b4630 DEBUG pylonsrc gstpylonsrc.c:1079:gst_pylonsrc_start:<pylonsrc0> The resulting contrast is 0.
from gst-pylonsrc.
Hm, this is really weird. I've never seen a situation where it fails to set a value without an error message like this. And without a camera there's very little I can do myself to test it. Sorry I couldn't be of more help :(
from gst-pylonsrc.
so i'm also trying adjust saturation. The doc says that saturation is only available for YCbCr422-8 or RGB8 format. I'm using YCbCr422-8 but when i check to see if saturation is available it returns false.
I can see in the pylon viewer changing the image format will gray out/not gray out saturation.
I'm wondering if the image format isn't set yet when i trying to change saturation?
i adjust saturation after your plugin prints out pylonsrc gstpylonsrc.c:1255:gst_pylonsrc_start:<pylonsrc0> Using YCbCr422_8 image format.
from gst-pylonsrc.
Does it happen if you set the correct format in pylon viewer, then stop it from streaming without disconnecting the device (close the viewer) and run the plugin? All active settings are saved in camera's RAM (at least ace's were), so if you set something up in the viewer the settings should carry on to the output of the plugin as well (as long as the plugin doesn't overwrite them, which it does for some settings).
from gst-pylonsrc.
I can't run gstreamer plugin while device is still connected to pylon viewer. It looks like the default pixel format is YCbCr422-8, so i dont understand why i can't set saturation. It looks like like none of the settings is saved in RAM for this camera. I'm trying to get in touch with basler, maybe they can help me debug their own hardware
from gst-pylonsrc.
from gst-pylonsrc.
Hi there,
For the contrast issue, I think that maybe you are not completely implementing this into the code?
I attached the .h and .c that I just edited over here and a screenshot. It seems to work fine for me...
For the saturation issue, maybe check the order of operations here. The pixel format must be set first before the saturation becomes available. So when I set "imageformat=YCbCr422_8 colorredsaturation=1.2", that worked.
gstpylonsrc_edit.zip
from gst-pylonsrc.
Hi Matt,
Thank you for helping me out.
I looked at your code for contrast and it looks identical to mine.
I found a bug with mine though.
GST_DEBUG_OBJECT(pylonsrc, "The resulting contrast is %.0lf.", contrastRate);
which is why it would return 0 when i try to set it to .22.
But I still can't get saturation to work.
my dart camera doesnt support saturation via color adjustment (COLORREDSATURATION, COLORYELLOWSATURATION, etc)
The doc says I should be using 'BslSaturation'.
but it returns false when i queue it with PylonDeviceFeatureIsAvailable().
I believe that the pixelFormat is already set before i try to set saturation.
Ive included my code for you to review.
gstpylonsrc-mod.zip
from gst-pylonsrc.
Related Issues (16)
- Bayer RG 8 supported? HOT 9
- Related project gst-plugins-vision HOT 6
- Camera couldn't prepare buffer in time. Probably Dead. HOT 1
- Cannot find proper location on Jeston baord HOT 6
- HW triggering parameter HOT 1
- No such element or plugin 'pylonsrc' HOT 6
- pipeline for generating rtsp stream from pylon camera is failing HOT 4
- UDP Stream cuts out after one second HOT 6
- limitbandwidth not implemented for all cameras? HOT 2
- gst-pylonsrc not found HOT 2
- Mono8 to BGR24 conversion is getting failed HOT 9
- gstpylonsrc.c : Error in the image processing loop HOT 11
- Internal data stream error HOT 2
- cross compiling for arm HOT 1
- Can't set continuous to false HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gst-pylonsrc.