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

devices: imx708: Add a new IMX708 helper class #1093

Merged
merged 2 commits into from
Aug 28, 2024
Merged

Conversation

naushir
Copy link
Collaborator

@naushir naushir commented Aug 12, 2024

This class provides a convenient helper function set enable/disable sensor HDR mode without relying on external tools. Usage example:

from picamera2.devices.imx708 import IMX708
from picamera2 import Picamera2

camera_num = 0
c = IMX708(camera_num)
c.set_hdr_mode(True)
picam2 = Picamera2(camera_num)

Note that after calling IMX708.set_hdr_mode(), you must re-initialise the Picamera2 instance.

A change to the CameraManager class is also needed to allow it to be reset as it caches sensor modes internally in libcamera.

@naushir naushir force-pushed the next branch 4 times, most recently from a1598a6 to e94547c Compare August 13, 2024 08:12
setup.py Outdated Show resolved Hide resolved
@davidplowman
Copy link
Collaborator

davidplowman commented Aug 14, 2024

Thanks, Naush. Just a couple of general observations... firstly, we should fix the flake8 complaints, and secondly, could we maybe add some kind of a test for this? We could even make it an example - "here's how you handle an imx708".

Add a reset() method to the CameraManager class. This will reset the
camera manager singleton and in particular cause the sensor modes to be
enumerated again within libcamera.

Signed-off-by: Naushir Patuck <[email protected]>
@naushir naushir force-pushed the next branch 3 times, most recently from 563d07a to a46184e Compare August 27, 2024 14:43
This class provides a convenient helper function set enable/disable
sensor HDR mode without relying on external tools. Usage example:

-----
from picamera2.devices.imx708 import IMX708
from picamera2 import Picamera2

camera_num = 0
c = IMX708(camera_num)
c.set_sensor_hdr_mode(True)
picam2 = Picamera2(camera_num)
-----

Note that after calling IMX708.set_hdr_mode(), you must re-initialise
the Picamera2 instance.

Signed-off-by: Naushir Patuck <[email protected]>
@naushir naushir merged commit 82095a6 into raspberrypi:next Aug 28, 2024
4 checks passed
@naushir naushir deleted the next branch August 28, 2024 08:55
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.

2 participants