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

Make camera configuration objects work properly with sensor configuration #850

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

davidplowman
Copy link
Collaborator

You can now set the sensor.output_size and sensor.bit_depth in the camera config object. You can also set it to None so that any raw stream parameters will take precendence.

This will allow users of the configuration classes to set the sensor
configuration output_size and bit_depth in the natural way, e.g.

picam2.still_configuration.sensor.output_size = (4056, 3040)

Signed-off-by: David Plowman <[email protected]>
@siranshen
Copy link

siranshen commented Nov 8, 2023

0.3.14 is broken due to this, and apt install can't find 0.3.12 any more. It would be great if the version can be reverted while the fix is ongoing.

@davidplowman
Copy link
Collaborator Author

0.3.14 is broken due to this, and apt install can't find 0.3.12 any more. It would be great if the version can be reverted while the fix is ongoing.

0.3.12 won't work with the new version of libcamera and Linux kernel. Are you able to use the workaround where you clear the configuration object before reusing it? (e.g. picam2.still_configuration = picam2.create_still_configuration() and then you do the rest of your configuration as before)

@siranshen
Copy link

No... Is it possible to have both versions released and available for apt install?

@davidplowman
Copy link
Collaborator Author

No... Is it possible to have both versions released and available for apt install?

You would have to back out the kernel and libcamera, find versions that are compatible, and then install Picamera2 0.3.12 (which is available through pip, it just won't work any more). Perhaps you could to a pip install from this fix branch? Just remember to uninstall it once a fixed apt package becomes available.

@siranshen
Copy link

Good point. I'll use pip in a virtual env. Thanks

@davidplowman
Copy link
Collaborator Author

@naushir @will-v-pi Please shout if you see any acts of great stupidity in this PR...

@Manuel-Angel-Es
Copy link

@davidplowman,

In the picamera2 module ver. 0.3.14-1 on my RPi4 I have replaced the original configuration.py and picamera2.py files with the new files.

I have subsequently modified my own software following your instructions.

Once the appropriate tests were carried out, everything worked correctly as expected.

Thank you very much for your work and the quick resolution of this problem.

Best regards

@naushir
Copy link
Collaborator

naushir commented Nov 9, 2023

I see nothing obviously wrong with this change.

@davidplowman davidplowman merged commit b5fb01f into next Nov 10, 2023
4 checks passed
@davidplowman davidplowman deleted the sensor-config-fix branch November 10, 2023 13:22
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

Successfully merging this pull request may close these issues.

4 participants