Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
dai::node::MonoCamera Class Reference

MonoCamera node. For use with grayscale sensors. More...

#include <MonoCamera.hpp>

Inheritance diagram for dai::node::MonoCamera:
Inheritance graph
[legend]

Public Member Functions

CameraBoardSocket getBoardSocket () const
 
std::string getCamera () const
 
int64_t getCamId () const
 
float getFps () const
 
std::vector< dai::FrameEventgetFrameEventFilter () const
 
CameraImageOrientation getImageOrientation () const
 Get camera image orientation. More...
 
int getNumFramesPool () const
 Get number of frames in main (ISP output) pool. More...
 
int getRawNumFramesPool () const
 Get number of frames in raw pool. More...
 
Properties::SensorResolution getResolution () const
 Get sensor resolution. More...
 
int getResolutionHeight () const
 Get sensor resolution height. More...
 
std::tuple< int, int > getResolutionSize () const
 Get sensor resolution as size. More...
 
int getResolutionWidth () const
 Get sensor resolution width. More...
 
 MonoCamera (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId)
 
 MonoCamera (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId, std::unique_ptr< Properties > props)
 
void setBoardSocket (CameraBoardSocket boardSocket)
 
void setCamera (std::string name)
 
void setCamId (int64_t id)
 
void setFps (float fps)
 
void setFrameEventFilter (const std::vector< dai::FrameEvent > &events)
 
void setImageOrientation (CameraImageOrientation imageOrientation)
 Set camera image orientation. More...
 
void setIsp3aFps (int isp3aFps)
 
void setNumFramesPool (int num)
 Set number of frames in main (ISP output) pool. More...
 
void setRawNumFramesPool (int num)
 Set number of frames in raw pool. More...
 
void setRawOutputPacked (bool packed)
 
void setResolution (Properties::SensorResolution resolution)
 Set sensor resolution. More...
 
- Public Member Functions inherited from dai::NodeCRTP< Node, MonoCamera, MonoCameraProperties >
std::unique_ptr< Nodeclone () const override
 
const char * getName () const override
 
- Public Member Functions inherited from dai::Node
virtual std::unique_ptr< Nodeclone () const =0
 Deep copy the node. More...
 
AssetManagergetAssetManager ()
 Get node AssetManager as a reference. More...
 
const AssetManagergetAssetManager () const
 Get node AssetManager as a const reference. More...
 
std::vector< Input * > getInputRefs ()
 Retrieves reference to node inputs. More...
 
std::vector< const Input * > getInputRefs () const
 Retrieves reference to node inputs. More...
 
std::vector< InputgetInputs ()
 Retrieves all nodes inputs. More...
 
virtual const char * getName () const =0
 Retrieves nodes name. More...
 
std::vector< Output * > getOutputRefs ()
 Retrieves reference to node outputs. More...
 
std::vector< const Output * > getOutputRefs () const
 Retrieves reference to node outputs. More...
 
std::vector< OutputgetOutputs ()
 Retrieves all nodes outputs. More...
 
Pipeline getParentPipeline ()
 
const Pipeline getParentPipeline () const
 
 Node (const std::shared_ptr< PipelineImpl > &p, Id nodeId, std::unique_ptr< Properties > props)
 Constructs Node. More...
 
virtual ~Node ()=default
 

Public Attributes

Output frameEvent {*this, "frameEvent", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
CameraControl initialControl
 
Input inputControl {*this, "inputControl", Input::Type::SReceiver, true, 8, {{DatatypeEnum::CameraControl, false}}}
 
Output out {*this, "out", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
Output raw {*this, "raw", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
- Public Attributes inherited from dai::NodeCRTP< Node, MonoCamera, MonoCameraProperties >
Propertiesproperties
 Underlying properties. More...
 
- Public Attributes inherited from dai::Node
const Id id
 Id of node. More...
 
Propertiesproperties
 

Static Public Attributes

constexpr static const char * NAME = "MonoCamera"
 

Protected Member Functions

PropertiesgetProperties ()
 
- Protected Member Functions inherited from dai::Node
virtual tl::optional< OpenVINO::VersiongetRequiredOpenVINOVersion ()
 
void setInputMapRefs (InputMap *inMapRef)
 
void setInputMapRefs (std::initializer_list< InputMap * > l)
 
void setInputRefs (Input *inRef)
 
void setInputRefs (std::initializer_list< Input * > l)
 
void setOutputMapRefs (OutputMap *outMapRef)
 
void setOutputMapRefs (std::initializer_list< OutputMap * > l)
 
void setOutputRefs (Output *outRef)
 
void setOutputRefs (std::initializer_list< Output * > l)
 

Private Attributes

std::shared_ptr< RawCameraControlrawControl
 

Additional Inherited Members

- Public Types inherited from dai::NodeCRTP< Node, MonoCamera, MonoCameraProperties >
using Properties = MonoCameraProperties
 
- Public Types inherited from dai::Node
using Id = std::int64_t
 Node identificator. Unique for every node on a single Pipeline. More...
 
- Protected Attributes inherited from dai::Node
AssetManager assetManager
 
std::unordered_map< std::string, InputMap * > inputMapRefs
 
std::unordered_map< std::string, Input * > inputRefs
 
std::unordered_map< std::string, OutputMap * > outputMapRefs
 
std::unordered_map< std::string, Output * > outputRefs
 
std::weak_ptr< PipelineImplparent
 
copyable_unique_ptr< PropertiespropertiesHolder
 

Detailed Description

MonoCamera node. For use with grayscale sensors.

Definition at line 17 of file MonoCamera.hpp.

Constructor & Destructor Documentation

◆ MonoCamera() [1/2]

dai::node::MonoCamera::MonoCamera ( const std::shared_ptr< PipelineImpl > &  par,
int64_t  nodeId 
)

Definition at line 8 of file MonoCamera.cpp.

◆ MonoCamera() [2/2]

dai::node::MonoCamera::MonoCamera ( const std::shared_ptr< PipelineImpl > &  par,
int64_t  nodeId,
std::unique_ptr< Properties props 
)

Definition at line 9 of file MonoCamera.cpp.

Member Function Documentation

◆ getBoardSocket()

CameraBoardSocket dai::node::MonoCamera::getBoardSocket ( ) const

Retrieves which board socket to use

Returns
Board socket to use

Definition at line 32 of file MonoCamera.cpp.

◆ getCamera()

std::string dai::node::MonoCamera::getCamera ( ) const

Retrieves which camera to use by name

Returns
Name of the camera to use

Definition at line 40 of file MonoCamera.cpp.

◆ getCamId()

int64_t dai::node::MonoCamera::getCamId ( ) const

Definition at line 67 of file MonoCamera.cpp.

◆ getFps()

float dai::node::MonoCamera::getFps ( ) const

Get rate at which camera should produce frames

Returns
Rate in frames per second

Definition at line 106 of file MonoCamera.cpp.

◆ getFrameEventFilter()

std::vector< dai::FrameEvent > dai::node::MonoCamera::getFrameEventFilter ( ) const

Definition at line 94 of file MonoCamera.cpp.

◆ getImageOrientation()

CameraImageOrientation dai::node::MonoCamera::getImageOrientation ( ) const

Get camera image orientation.

Definition at line 77 of file MonoCamera.cpp.

◆ getNumFramesPool()

int dai::node::MonoCamera::getNumFramesPool ( ) const

Get number of frames in main (ISP output) pool.

Definition at line 156 of file MonoCamera.cpp.

◆ getProperties()

MonoCamera::Properties & dai::node::MonoCamera::getProperties ( )
protectedvirtual

Reimplemented from dai::Node.

Definition at line 21 of file MonoCamera.cpp.

◆ getRawNumFramesPool()

int dai::node::MonoCamera::getRawNumFramesPool ( ) const

Get number of frames in raw pool.

Definition at line 159 of file MonoCamera.cpp.

◆ getResolution()

MonoCameraProperties::SensorResolution dai::node::MonoCamera::getResolution ( ) const

Get sensor resolution.

Definition at line 86 of file MonoCamera.cpp.

◆ getResolutionHeight()

int dai::node::MonoCamera::getResolutionHeight ( ) const

Get sensor resolution height.

Definition at line 145 of file MonoCamera.cpp.

◆ getResolutionSize()

std::tuple< int, int > dai::node::MonoCamera::getResolutionSize ( ) const

Get sensor resolution as size.

Definition at line 116 of file MonoCamera.cpp.

◆ getResolutionWidth()

int dai::node::MonoCamera::getResolutionWidth ( ) const

Get sensor resolution width.

Definition at line 141 of file MonoCamera.cpp.

◆ setBoardSocket()

void dai::node::MonoCamera::setBoardSocket ( dai::CameraBoardSocket  boardSocket)

Specify which board socket to use

Parameters
boardSocketBoard socket to use

Definition at line 27 of file MonoCamera.cpp.

◆ setCamera()

void dai::node::MonoCamera::setCamera ( std::string  name)

Specify which camera to use by name

Parameters
nameName of the camera to use

Definition at line 36 of file MonoCamera.cpp.

◆ setCamId()

void dai::node::MonoCamera::setCamId ( int64_t  id)

Definition at line 45 of file MonoCamera.cpp.

◆ setFps()

void dai::node::MonoCamera::setFps ( float  fps)

Set rate at which camera should produce frames

Parameters
fpsRate in frames per second

Definition at line 98 of file MonoCamera.cpp.

◆ setFrameEventFilter()

void dai::node::MonoCamera::setFrameEventFilter ( const std::vector< dai::FrameEvent > &  events)

Definition at line 90 of file MonoCamera.cpp.

◆ setImageOrientation()

void dai::node::MonoCamera::setImageOrientation ( CameraImageOrientation  imageOrientation)

Set camera image orientation.

Definition at line 72 of file MonoCamera.cpp.

◆ setIsp3aFps()

void dai::node::MonoCamera::setIsp3aFps ( int  isp3aFps)

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.

Definition at line 102 of file MonoCamera.cpp.

◆ setNumFramesPool()

void dai::node::MonoCamera::setNumFramesPool ( int  num)

Set number of frames in main (ISP output) pool.

Definition at line 149 of file MonoCamera.cpp.

◆ setRawNumFramesPool()

void dai::node::MonoCamera::setRawNumFramesPool ( int  num)

Set number of frames in raw pool.

Definition at line 152 of file MonoCamera.cpp.

◆ setRawOutputPacked()

void dai::node::MonoCamera::setRawOutputPacked ( bool  packed)

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.

Definition at line 163 of file MonoCamera.cpp.

◆ setResolution()

void dai::node::MonoCamera::setResolution ( Properties::SensorResolution  resolution)

Set sensor resolution.

Definition at line 82 of file MonoCamera.cpp.

Member Data Documentation

◆ frameEvent

Output dai::node::MonoCamera::frameEvent {*this, "frameEvent", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}

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

Definition at line 64 of file MonoCamera.hpp.

◆ initialControl

CameraControl dai::node::MonoCamera::initialControl

Initial control options to apply to sensor

Definition at line 34 of file MonoCamera.hpp.

◆ inputControl

Input dai::node::MonoCamera::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

Definition at line 40 of file MonoCamera.hpp.

◆ NAME

constexpr static const char* dai::node::MonoCamera::NAME = "MonoCamera"
staticconstexpr

Definition at line 19 of file MonoCamera.hpp.

◆ out

Output dai::node::MonoCamera::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

Definition at line 47 of file MonoCamera.hpp.

◆ raw

Output dai::node::MonoCamera::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

Definition at line 54 of file MonoCamera.hpp.

◆ rawControl

std::shared_ptr<RawCameraControl> dai::node::MonoCamera::rawControl
private

Definition at line 22 of file MonoCamera.hpp.


The documentation for this class was generated from the following files:


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:20