basler / gst-plugin-pylon

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

how to use gst-plugin-pylon construct gstreamer project in c++? #33

Open Junkai-Liu opened 1 year ago

Junkai-Liu commented 1 year ago

hi,can you provide some examples to demonstrate how to use cmakelist to build c++projects?

thiesmoeller commented 1 year ago

As a first start two links;

One example to use cmake for Gstreamer is here: https://stackoverflow.com/a/74038236

The plugin can be used like any other Gstreamer plugin. We have some examples on how to use it programmatically here: https://github.com/basler/gst-plugin-pylon/tree/main/tests/examples/pylon

Junkai-Liu commented 1 year ago

As a first start two links;

One example to use cmake for Gstreamer is here: https://stackoverflow.com/a/74038236

The plugin can be used like any other Gstreamer plugin. We have some examples on how to use it programmatically here: https://github.com/basler/gst-plugin-pylon/tree/main/tests/examples/pylon

Thank you very much for your help, I would like to ask if this plugin can start the camera supported by the pylon package, can it take up less CPU resources than calling the pylon C++ interface directly?

thiesmoeller commented 1 year ago

The gstreamer pylon plugin is a based on the pylon c++ SDK. So what pylon supports, this plugin can also Support in principle ( In the limits of Gstreamer capabilities)

On what platform and with which camera interface do you observe too much CPU ressources used ?

Junkai-Liu commented 1 year ago

I'm running a gige protocol based camera on the xavier platform and it takes 30% of the cpu. Can I reduce it to around 10% if I use the gstreamer plugin?

thiesmoeller commented 1 year ago

@Junkai-Liu, important factor in gige performance is the size of the network packet, that are send.

To configure your host:

gst-launch-1.0 pylonsrc cam::GevSCPSPacketSize=8192 ! videoconvert ! autovideosink