feat: tune camera exposition

This commit is contained in:
Cyrille Nofficial 2024-01-14 13:08:51 +01:00
parent 4ec2aef409
commit 552f69e46e
5 changed files with 17 additions and 0 deletions

View File

@ -35,6 +35,8 @@ RUN poetry build
#################
FROM base
COPY camera_tunning /camera_tuning
RUN mkdir /models
COPY --from=model-builder /models/mobile_object_localizer_192x192_openvino_2021.4_6shave.blob /models/mobile_object_localizer_192x192_openvino_2021.4_6shave.blob

View File

@ -12,6 +12,10 @@ import paho.mqtt.client as mqtt
from camera import oak_pipeline as cam
CAMERA_EXPOSITION_DEFAULT = "default"
CAMERA_EXPOSITION_8300US = "8300us"
CAMERA_EXPOSITION_500US = "500us"
logger = logging.getLogger(__name__)
_DEFAULT_CLIENT_ID = "robocar-depthai"
@ -49,6 +53,10 @@ def _parse_args_cli() -> argparse.Namespace:
help="set rate at which camera should produce frames",
type=int,
default=30)
parser.add_argument("--camera-tuning-exposition", type=str,
default=CAMERA_EXPOSITION_DEFAULT,
help="override camera exposition configuration",
choices=[CAMERA_EXPOSITION_DEFAULT, CAMERA_EXPOSITION_500US, CAMERA_EXPOSITION_8300US])
parser.add_argument("-H", "--image-height", help="image height",
type=int,
default=_get_env_int_value("IMAGE_HEIGHT", 120))
@ -98,6 +106,12 @@ def execute_from_command_line() -> None:
objects_threshold=args.objects_threshold)
pipeline = dai.Pipeline()
if args.camera_tuning_exposition == CAMERA_EXPOSITION_500US:
pipeline.setCameraTuningBlobPath('/camera_tuning/tuning_exp_limit_500us.bin')
elif args.camera_tuning_exposition == CAMERA_EXPOSITION_8300US:
pipeline.setCameraTuningBlobPath('/camera_tuning/tuning_exp_limit_8300us.bin')
pipeline_controller = cam.PipelineController(pipeline=pipeline,
frame_processor=frame_processor,
object_processor=object_processor,

View File

@ -390,6 +390,7 @@ class PipelineController:
self._object_processor.process(in_nn, frame_ref)
logger.debug("objects processed")
def stop(self) -> None:
"""
Stop event loop, if loop is not running, do nothing

Binary file not shown.

Binary file not shown.