basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
558 stars 207 forks source link

Manually Enabling PGI #693

Open ysraja2415 opened 9 months ago

ysraja2415 commented 9 months ago

Hi @thiesmoeller and Team , We are using aca1920 155 uc cameras for our machine vision applications. We are recording 12 bit data (pixel format : BayerRG12) at high FPS (as our application demands) and converting to BGR format using cv2.COLOR_BayerRGGB2BGR. This is done using custom built pypylon program.

It is observed that some unwanted frequencies are getting aliased which should be removed. While searching for the same we found the basler PGI set color antialiasing and denoising. Could you please share a snippet of code on how to manually enable PGI set and do antialiasing and denoising while custom recording 12 bit data using the aforementioned camera.

HighImp commented 9 months ago

Hi Raja,

the PGI feature is a only suitable for debayered image formats. So I am afraid that its not a solution to use BayerRG12 with PGI.

In the latest release, we added the feature demosaicing mode. For your requirements, I would try the unilinear mode. It is not as flexible as the PGI as there are no sliders to reduce noise or increase sharpness, but maybe it will help you with your problem.

If the feature is not available, please contact your local support for a firmware update file.

ysraja2415 commented 9 months ago

Hi @HighImp , Thanks so much for the quick reply.

  1. We are particularly looking for the anti-aliasing filter. And I am afraid that we should use 12-bit pixel format for our application. So is there anyway to anti alias the 12-bit recorded data while recording or after recording.
  2. I listed all the configurable parameters for my camera using pylon.FeaturePersistence.Save("default.txt", camera.GetNodeMap()) , but i don't see parameter BslDemosaicingMode to set.

Could you please help with above two queries.

HighImp commented 9 months ago

I'm sorry, I didn't read your model name correctly. It is not an ace2 as I previously thought. So unilinear mode is not available at all. I'm afraid you will have to contact your local support, as there is no camera API method to solve your problem as far as I know.

ysraja2415 commented 9 months ago

I'm sorry, I didn't read your model name correctly. It is not an ace2 as I previously thought. So unilinear mode is not available at all. I'm afraid you will have to contact your local support, as there is no camera API method to solve your problem as far as I know.

Thank you @HighImp