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

Editing white balance & color transformation parameters - Node not existing (file 'genicam_wrap.cpp', line 16138) error #781

Open
frankbrewer opened this issue Sep 30, 2024 · 2 comments

Comments

@frankbrewer
Copy link

frankbrewer commented Sep 30, 2024

Describe what you want to implement and what the issue & the steps to reproduce it are:

Hi,

I am trying to change white balance (https://docs.baslerweb.com/balance-white) and color transformation parameters (https://docs.baslerweb.com/color-transformation#how-it-works) of my Basler ace L camera using pypylon. But I am getting the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/frankbrewer/anaconda3/envs/pylon/lib/python3.12/site-packages/pypylon/pylon.py", line 4400, in __getattr__
    return self.GetNodeMap().GetNode(attribute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/frankbrewer/anaconda3/envs/pylon/lib/python3.12/site-packages/pypylon/genicam.py", line 1360, in GetNode
    return _genicam.INodeMap_GetNode(self, Name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_genicam.LogicalErrorException: Node not existing (file 'genicam_wrap.cpp', line 16138)

Here is what I am doing: (throws error directly after trying to set red channel intensity)

from pypylon import pylon

tlf = pylon.TlFactory.GetInstance()
camera = pylon.InstantCamera(tlf.CreateFirstDevice())

camera.Open()

# enable software trigger
camera.TriggerSelector.Value = "FrameStart"
camera.TriggerSource.Value = "Software"
camera.TriggerMode.Value = "On"

# Set the red intensity
camera.BalanceRatioSelector.Value = "Red"
camera.BalanceRatio.Value = 310


# Select position Gain00 in the matrix
camera.ColorTransformationValueSelector.Value = "Gain00"
# Enter a floating point value for the selected position
camera.ColorTransformationValue.Value = 0.810

Could you help me with this?

Is your camera operational in Basler pylon viewer on your platform

Yes

Hardware setup & camera model(s) used

PC X86_64

Runtime information:

python: 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) [GCC 12.3.0]
platform: linux/x86_64/6.8.0-40-generic
pypylon: 4.0.0 / 8.0.0.10
@frankbrewer
Copy link
Author

I noticed that BalanceRatioRaw.Value should be used instead of BalanceRatio.Value, but I still do not have an idea about ColorTransformationValueSelector.Value

@HighImp
Copy link

HighImp commented Oct 1, 2024

Hi,
according to the docu, your code should work. It seems you copy the samples?
Can you please tell me your camera model and the FW-Version?
Also, just out of curiosity:
Can you tell me why and how do you want to change the TransformationValues?
Did you perform your own color calibration?
Best regards!

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

2 participants