feat: tune camera exposition
This commit is contained in:
parent
4ec2aef409
commit
552f69e46e
@ -35,6 +35,8 @@ RUN poetry build
|
|||||||
#################
|
#################
|
||||||
FROM base
|
FROM base
|
||||||
|
|
||||||
|
COPY camera_tunning /camera_tuning
|
||||||
|
|
||||||
RUN mkdir /models
|
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
|
COPY --from=model-builder /models/mobile_object_localizer_192x192_openvino_2021.4_6shave.blob /models/mobile_object_localizer_192x192_openvino_2021.4_6shave.blob
|
||||||
|
|
||||||
|
@ -12,6 +12,10 @@ import paho.mqtt.client as mqtt
|
|||||||
|
|
||||||
from camera import oak_pipeline as cam
|
from camera import oak_pipeline as cam
|
||||||
|
|
||||||
|
CAMERA_EXPOSITION_DEFAULT = "default"
|
||||||
|
CAMERA_EXPOSITION_8300US = "8300us"
|
||||||
|
CAMERA_EXPOSITION_500US = "500us"
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
_DEFAULT_CLIENT_ID = "robocar-depthai"
|
_DEFAULT_CLIENT_ID = "robocar-depthai"
|
||||||
@ -49,6 +53,10 @@ def _parse_args_cli() -> argparse.Namespace:
|
|||||||
help="set rate at which camera should produce frames",
|
help="set rate at which camera should produce frames",
|
||||||
type=int,
|
type=int,
|
||||||
default=30)
|
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",
|
parser.add_argument("-H", "--image-height", help="image height",
|
||||||
type=int,
|
type=int,
|
||||||
default=_get_env_int_value("IMAGE_HEIGHT", 120))
|
default=_get_env_int_value("IMAGE_HEIGHT", 120))
|
||||||
@ -98,6 +106,12 @@ def execute_from_command_line() -> None:
|
|||||||
objects_threshold=args.objects_threshold)
|
objects_threshold=args.objects_threshold)
|
||||||
|
|
||||||
pipeline = dai.Pipeline()
|
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,
|
pipeline_controller = cam.PipelineController(pipeline=pipeline,
|
||||||
frame_processor=frame_processor,
|
frame_processor=frame_processor,
|
||||||
object_processor=object_processor,
|
object_processor=object_processor,
|
||||||
|
@ -390,6 +390,7 @@ class PipelineController:
|
|||||||
self._object_processor.process(in_nn, frame_ref)
|
self._object_processor.process(in_nn, frame_ref)
|
||||||
logger.debug("objects processed")
|
logger.debug("objects processed")
|
||||||
|
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
"""
|
"""
|
||||||
Stop event loop, if loop is not running, do nothing
|
Stop event loop, if loop is not running, do nothing
|
||||||
|
BIN
camera_tunning/tuning_exp_limit_500us.bin
Normal file
BIN
camera_tunning/tuning_exp_limit_500us.bin
Normal file
Binary file not shown.
BIN
camera_tunning/tuning_exp_limit_8300us.bin
Normal file
BIN
camera_tunning/tuning_exp_limit_8300us.bin
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user