单目摄像头
单目摄像头
inputControl 在运行时控制它。一些 DepthAI 模块没有单目摄像头。两个单目摄像头用于计算立体深度(与 StereoDepth 节点一起)。如何放置它
Python
Python
1pipeline = dai.Pipeline()
2mono = pipeline.create(dai.node.MonoCamera)输入和输出
用法
Python
Python
1pipeline = dai.Pipeline()
2mono = pipeline.create(dai.node.MonoCamera)
3mono.setCamera("right")
4mono.setResolution(dai.MonoCameraProperties.SensorResolution.THE_720_P)3A 算法
- 立体相机: 传感器共享同一 I2C 总线,可确保自动同 步 3A 设置(AWB、AE)。
- 独立传感器: 在 OAK FFC 或 OAK-D-LR 等设置中,每个传感器都有自己的 I2C,可以使用
3a-follow功能将一个传感器的 3A 设置同步到其他传感器。
Python
1cam['cam_b'].initialControl.setMisc("3a-follow", dai.CameraBoardSocket.CAM_A)
2cam['cam_c'].initialControl.setMisc("3a-follow", dai.CameraBoardSocket.CAM_A)3a-follow 功能将 3A 设置(曝光、ISO 和白平衡)从主相机(例如 CAM_A)复制到设置中的其他 相机(例如 CAM_B 和 CAM_C)。功能示例
参考
class
depthai.node.MonoCamera(depthai.Node)
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
method
getCamera(self) -> str: strRetrieves which camera to use by name Returns: Name of the camera to use
method
getFps(self) -> float: floatGet rate at which camera should produce frames Returns: Rate in frames per second
method
method
getImageOrientation(self) -> depthai.CameraImageOrientation: depthai.CameraImageOrientationGet camera image orientation
method
getNumFramesPool(self) -> int: intGet number of frames in main (ISP output) pool
method
getRawNumFramesPool(self) -> int: intGet number of frames in raw pool
method
getResolution(self) -> depthai.MonoCameraProperties.SensorResolution: depthai.MonoCameraProperties.SensorResolutionGet sensor resolution
method
getResolutionHeight(self) -> int: intGet sensor resolution height
method
getResolutionSize(self) -> tuple[int, int]: tuple[int, int]Get sensor resolution as size
method
getResolutionWidth(self) -> int: intGet sensor resolution width
method
setBoardSocket(self, boardSocket: depthai.CameraBoardSocket)Specify which board socket to use Parameter ``boardSocket``: Board socket to use
method
method
setCamera(self, name: str)Specify which camera to use by name Parameter ``name``: Name of the camera to use
method
setFps(self, fps: typing.SupportsFloat)Set rate at which camera should produce frames Parameter ``fps``: Rate in frames per second
method
method
setImageOrientation(self, imageOrientation: depthai.CameraImageOrientation)Set camera image orientation
method
setIsp3aFps(self, isp3aFps: typing.SupportsInt)Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.). Default (0) matches the camera FPS, meaning that 3A is running on each frame. Reducing the rate of 3A reduces the CPU usage on CSS, but also increases the convergence rate of 3A. Note that camera controls will be processed at this rate. E.g. if camera is running at 30 fps, and camera control is sent at every frame, but 3A fps is set to 15, the camera control messages will be processed at 15 fps rate, which will lead to queueing.
method
setNumFramesPool(self, arg0: typing.SupportsInt)Set number of frames in main (ISP output) pool
method
setRawNumFramesPool(self, arg0: typing.SupportsInt)Set number of frames in raw pool
method
setRawOutputPacked(self, packed: bool)Configures whether the camera `raw` frames are saved as MIPI-packed to memory. The packed format is more efficient, consuming less memory on device, and less data to send to host: RAW10: 4 pixels saved on 5 bytes, RAW12: 2 pixels saved on 3 bytes. When packing is disabled (`false`), data is saved lsb-aligned, e.g. a RAW10 pixel will be stored as uint16, on bits 9..0: 0b0000'00pp'pppp'pppp. Default is auto: enabled for standard color/monochrome cameras where ISP can work with both packed/unpacked, but disabled for other cameras like ToF.
method
setResolution(self, resolution: depthai.MonoCameraProperties.SensorResolution)Set sensor resolution
property
frameEvent
Outputs metadata-only ImgFrame message as an early indicator of an incoming frame. It's sent on the MIPI SoF (start-of-frame) event, just after the exposure of the current frame has finished and before the exposure for next frame starts. Could be used to synchronize various processes with camera capture. Fields populated: camera id, sequence number, timestamp
property
initialControl
Initial control options to apply to sensor
property
inputControl
Input for CameraControl message, which can modify camera parameters in runtime Default queue is blocking with size 8
property
out
Outputs ImgFrame message that carries RAW8 encoded (grayscale) frame data. Suitable for use StereoDepth node. Processed by ISP
property
raw
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data. Captured directly from the camera sensor
需要帮助?
请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。