Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pylon 2 camera Indeterminance #74

Open
cafsigjolmos opened this issue Jan 12, 2022 · 6 comments
Open

Pylon 2 camera Indeterminance #74

cafsigjolmos opened this issue Jan 12, 2022 · 6 comments

Comments

@cafsigjolmos
Copy link

cafsigjolmos commented Jan 12, 2022

Hello, i am trying to build a homemade stereo camera with two basler cameras and i found this repository that allow Genicam interfaces to be easily integrated with gstreamer (nice and hard work, you have my congrats). When using 2 cameras with pylon plugin the two cameras have a given index related to their connection time. Because of that it is impossible to identify the camera (left or right) and the ids can change making imposible to fix a configuration.

  • Is there any way to do that?
  • Create the src element giving the camera name or camera serial ID? I know that in C++ pylon Api there is a function for that but in C API i am not sure and involves some device props checking if not.
  • Introducing camera serial number as a plugin read-only parameter so that this number can be checked from calling program?
  • Could you consider implementing this feature?

Regards

@mrstecklo
Copy link
Contributor

mrstecklo commented Jan 14, 2022

Hi, @JMOlmos-cafsig.
I've once created a console application for configuring Basler cameras using C API. Unfortunately I've lost the code.
But as far as I remember you need to connect to each device one by one and request their serial numbers manually.

I think that the best way is to add serial-number property to the plugin so that required camera is selected upon creation.

The required code is actually already written (see gst_pylonsrc_select_device and pylonc_print_camera_info), so you can go ahead and implement this property yourself.

@thiesmoeller
Copy link
Contributor

@JMOlmos-cafsig the serial number or user specified name of the device can be given into the DeviceInfo object during the enumeration query

@cafsigjolmos
Copy link
Author

@thiesmoeller , do you mean in pylonC api?
i will implement little changes to pylonsrc for initialize device by serialnumber and upload the workaround with a merge request after some testing with basler cameras, @mrstecklo it is ok this way?

@mrstecklo
Copy link
Contributor

I'm not a project owner which is @joshdoe. So I can't make any final decisions. I've just used to contribute to this plugin. So now I'm just sticking around pretending I know something about Pylon. While @joshdoe does not show up very often here.
@JMOlmos-cafsig, you are free to make any changes in your fork and open a pull request

@joshdoe
Copy link
Owner

joshdoe commented Jan 17, 2022

I'd be happy to review pull requests. All I ask is that you run gst-indent, and follow the GStreamer style of commit messages.

@thiesmoeller
Copy link
Contributor

thiesmoeller commented Jan 17, 2022

@JMOlmos-cafsig yes via pylonc API.

If you add this, adding a "open via user name" would be done exactly the same way and would allow to name your camera e.g "Left" and "Right' and makes the app code more readable....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants