MonoCamera¶
MonoCamera node is a source of image frames. You can control in at runtime with the inputControl. Some DepthAI modules don’t
have mono camera(s). Two mono cameras are used to calculate stereo depth (with StereoDepth node).
How to place it¶
pipeline = dai.Pipeline()
mono = pipeline.create(dai.node.MonoCamera)
dai::Pipeline pipeline;
auto mono = pipeline.create<dai::node::MonoCamera>();
Inputs and Outputs¶
┌───────────────────┐
│ │
│ │
inputControl │ │ out
──────────────►│ MonoCamera ├───────────►
│ │
│ │
│ │
└───────────────────┘
Message types
inputControl- CameraControlout- ImgFrame
Usage¶
pipeline = dai.Pipeline()
mono = pipeline.create(dai.node.MonoCamera)
mono.setBoardSocket(dai.CameraBoardSocket.RIGHT)
mono.setResolution(dai.MonoCameraProperties.SensorResolution.THE_720_P)
dai::Pipeline pipeline;
auto mono = pipeline.create<dai::node::MonoCamera>();
mono->setBoardSocket(dai::CameraBoardSocket::RIGHT);
mono->setResolution(dai::MonoCameraProperties::SensorResolution::THE_720_P);
Examples of functionality¶
Reference¶
-
class
depthai.node.MonoCamera MonoCamera node. For use with grayscale sensors.
-
class
Connection Connection between an Input and Output
-
class
Id Node identificator. Unique for every node on a single Pipeline
-
Properties alias of
depthai.MonoCameraProperties
-
getAssetManager(*args, **kwargs) Overloaded function.
getAssetManager(self: depthai.Node) -> depthai.AssetManager
Get node AssetManager as a const reference
getAssetManager(self: depthai.Node) -> depthai.AssetManager
Get node AssetManager as a const reference
-
getBoardSocket(self: depthai.node.MonoCamera) → depthai.CameraBoardSocket Retrieves which board socket to use
- Returns
Board socket to use
-
getCamId(self: depthai.node.MonoCamera) → int
-
getFps(self: depthai.node.MonoCamera) → float Get rate at which camera should produce frames
- Returns
Rate in frames per second
-
getImageOrientation(self: depthai.node.MonoCamera) → depthai.CameraImageOrientation Get camera image orientation
-
getInputRefs(*args, **kwargs) Overloaded function.
getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]
Retrieves reference to node inputs
getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]
Retrieves reference to node inputs
-
getInputs(self: depthai.Node) → List[depthai.Node.Input] Retrieves all nodes inputs
-
getName(self: depthai.Node) → str Retrieves nodes name
-
getOutputRefs(*args, **kwargs) Overloaded function.
getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]
Retrieves reference to node outputs
getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]
Retrieves reference to node outputs
-
getOutputs(self: depthai.Node) → List[depthai.Node.Output] Retrieves all nodes outputs
-
getParentPipeline(*args, **kwargs) Overloaded function.
getParentPipeline(self: depthai.Node) -> depthai.Pipeline
getParentPipeline(self: depthai.Node) -> depthai.Pipeline
-
getResolution(self: depthai.node.MonoCamera) → depthai.MonoCameraProperties.SensorResolution Get sensor resolution
-
getResolutionHeight(self: depthai.node.MonoCamera) → int Get sensor resolution height
-
getResolutionSize(self: depthai.node.MonoCamera) → Tuple[int, int] Get sensor resolution as size
-
getResolutionWidth(self: depthai.node.MonoCamera) → int Get sensor resolution width
-
property
id Id of node
-
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
-
setBoardSocket(self: depthai.node.MonoCamera, boardSocket: depthai.CameraBoardSocket) → None Specify which board socket to use
- Parameter
boardSocket: Board socket to use
- Parameter
-
setCamId(self: depthai.node.MonoCamera, arg0: int) → None
-
setFps(self: depthai.node.MonoCamera, fps: float) → None Set rate at which camera should produce frames
- Parameter
fps: Rate in frames per second
- Parameter
-
setImageOrientation(self: depthai.node.MonoCamera, imageOrientation: depthai.CameraImageOrientation) → None Set camera image orientation
-
setResolution(self: depthai.node.MonoCamera, resolution: depthai.MonoCameraProperties.SensorResolution) → None Set sensor resolution
-
class
-
class
dai::node::MonoCamera: public dai::NodeCRTP<Node, MonoCamera, MonoCameraProperties>¶ MonoCamera node. For use with grayscale sensors.
Public Functions
-
void
setBoardSocket(CameraBoardSocket boardSocket)¶ Specify which board socket to use
- Parameters
boardSocket: Board socket to use
-
CameraBoardSocket
getBoardSocket() const¶ Retrieves which board socket to use
- Return
Board socket to use
-
void
setCamId(int64_t id)¶
-
int64_t
getCamId() const¶
-
void
setImageOrientation(CameraImageOrientation imageOrientation)¶ Set camera image orientation.
-
CameraImageOrientation
getImageOrientation() const¶ Get camera image orientation.
-
void
setResolution(Properties::SensorResolution resolution)¶ Set sensor resolution.
-
Properties::SensorResolution
getResolution() const¶ Get sensor resolution.
-
void
setFps(float fps)¶ Set rate at which camera should produce frames
- Parameters
fps: Rate in frames per second
-
float
getFps() const¶ Get rate at which camera should produce frames
- Return
Rate in frames per second
-
std::tuple<int, int>
getResolutionSize() const¶ Get sensor resolution as size.
-
int
getResolutionWidth() const¶ Get sensor resolution width.
-
int
getResolutionHeight() const¶ Get sensor resolution height.
Public Members
-
CameraControl
initialControl¶ Initial control options to apply to sensor
-
Input
inputControl= {*this, "inputControl", Input::Type::SReceiver, true, 8, {{DatatypeEnum::CameraControl, false}}}¶ Input for CameraControl message, which can modify camera parameters in runtime Default queue is blocking with size 8
-
Output
out= {*this, "out", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}¶ Outputs ImgFrame message that carries RAW8 encoded (grayscale) frame data.
Suitable for use StereoDepth node. Processed by ISP
-
Output
raw= {*this, "raw", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}¶ Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
Captured directly from the camera sensor
Public Static Attributes
-
constexpr const char *
NAME= "MonoCamera"¶
Private Members
-
std::shared_ptr<RawCameraControl>
rawControl¶
-
void
Got questions?
We’re always happy to help with code or other questions you might have.