Skip to content

Commit b04d2df

Browse files
committed
cam_test.py: add -tun/--camera-tuning option
1 parent 9740db6 commit b04d2df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

utilities/cam_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import collections
4242
import time
4343
from itertools import cycle
44+
from pathlib import Path
4445

4546
def socket_type_pair(arg):
4647
socket, type = arg.split(',')
@@ -66,6 +67,8 @@ def socket_type_pair(arg):
6667
help="Downscale the ISP output by this factor")
6768
parser.add_argument('-rs', '--resizable-windows', action='store_true',
6869
help="Make OpenCV windows resizable. Note: may introduce some artifacts")
70+
parser.add_argument('-tun', '--camera-tuning', type=Path,
71+
help="Path to custom camera tuning database")
6972
args = parser.parse_args()
7073

7174
cam_list = []
@@ -174,11 +177,8 @@ def get(self):
174177
cam[c].setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG)
175178
cam[c].setFps(args.fps)
176179

177-
if 0:
178-
print("=== Using custom camera tuning, and limiting RGB FPS to 10")
179-
pipeline.setCameraTuningBlobPath("/home/user/Downloads/tuning_color_low_light.bin")
180-
# TODO: change sensor driver to make FPS automatic (based on requested exposure time)
181-
cam['rgb'].setFps(10)
180+
if args.camera_tuning:
181+
pipeline.setCameraTuningBlobPath(str(args.camera_tuning))
182182

183183
# Pipeline is defined, now we can connect to the device
184184
with dai.Device(pipeline) as device:

0 commit comments

Comments
 (0)