Skip to content

Commit

Permalink
Update color camera
Browse files Browse the repository at this point in the history
- set board socket
- set isp scale
  • Loading branch information
JojoDevel committed Mar 6, 2022
1 parent 34d7ec9 commit ee7e05b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions depthai_lightning/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def __init__(
fps=30,
rotate=False,
preview_size=(300, 300),
isp_scale=(1, 1),
):
"""Create a depthai color camera
Expand All @@ -247,9 +248,12 @@ def __init__(
self.fps = fps
self.preview_size = preview_size
self.name = name
self.isp_scale = isp_scale

self.cam.setBoardSocket(dai.CameraBoardSocket.RGB)
self.cam.setResolution(ColorCamera.rgb_res_opts.get(self.resolution))
self.cam.setPreviewSize(*self.preview_size)
self.cam.setIspScale(*self.isp_scale)

# Optional, set manual focus. 255: macro (8cm), about 120..130: infinity
# if args.lens_position >= 0:
Expand Down

0 comments on commit ee7e05b

Please sign in to comment.