MonoCamera node. For use with grayscale sensors. More...
#include <MonoCamera.hpp>
Public Member Functions | |
CameraBoardSocket | getBoardSocket () const |
std::string | getCamera () const |
int64_t | getCamId () const |
float | getFps () const |
std::vector< dai::FrameEvent > | getFrameEventFilter () 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... | |
![]() | |
std::unique_ptr< Node > | clone () const override |
const char * | getName () const override |
![]() | |
virtual std::unique_ptr< Node > | clone () const =0 |
Deep copy the node. More... | |
AssetManager & | getAssetManager () |
Get node AssetManager as a reference. More... | |
const AssetManager & | getAssetManager () 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< Input > | getInputs () |
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< Output > | getOutputs () |
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}}} |
![]() | |
Properties & | properties |
Underlying properties. More... | |
![]() | |
const Id | id |
Id of node. More... | |
Properties & | properties |
Static Public Attributes | |
constexpr static const char * | NAME = "MonoCamera" |
Protected Member Functions | |
Properties & | getProperties () |
![]() | |
virtual tl::optional< OpenVINO::Version > | getRequiredOpenVINOVersion () |
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< RawCameraControl > | rawControl |
Additional Inherited Members | |
![]() | |
using | Properties = MonoCameraProperties |
![]() | |
using | Id = std::int64_t |
Node identificator. Unique for every node on a single Pipeline. More... | |
![]() | |
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< PipelineImpl > | parent |
copyable_unique_ptr< Properties > | propertiesHolder |
MonoCamera node. For use with grayscale sensors.
Definition at line 17 of file MonoCamera.hpp.
dai::node::MonoCamera::MonoCamera | ( | const std::shared_ptr< PipelineImpl > & | par, |
int64_t | nodeId | ||
) |
Definition at line 8 of file MonoCamera.cpp.
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.
CameraBoardSocket dai::node::MonoCamera::getBoardSocket | ( | ) | const |
Retrieves which board socket to use
Definition at line 32 of file MonoCamera.cpp.
std::string dai::node::MonoCamera::getCamera | ( | ) | const |
Retrieves which camera to use by name
Definition at line 40 of file MonoCamera.cpp.
int64_t dai::node::MonoCamera::getCamId | ( | ) | const |
Definition at line 67 of file MonoCamera.cpp.
float dai::node::MonoCamera::getFps | ( | ) | const |
Get rate at which camera should produce frames
Definition at line 106 of file MonoCamera.cpp.
std::vector< dai::FrameEvent > dai::node::MonoCamera::getFrameEventFilter | ( | ) | const |
Definition at line 94 of file MonoCamera.cpp.
CameraImageOrientation dai::node::MonoCamera::getImageOrientation | ( | ) | const |
Get camera image orientation.
Definition at line 77 of file MonoCamera.cpp.
int dai::node::MonoCamera::getNumFramesPool | ( | ) | const |
Get number of frames in main (ISP output) pool.
Definition at line 156 of file MonoCamera.cpp.
|
protectedvirtual |
Reimplemented from dai::Node.
Definition at line 21 of file MonoCamera.cpp.
int dai::node::MonoCamera::getRawNumFramesPool | ( | ) | const |
Get number of frames in raw pool.
Definition at line 159 of file MonoCamera.cpp.
MonoCameraProperties::SensorResolution dai::node::MonoCamera::getResolution | ( | ) | const |
Get sensor resolution.
Definition at line 86 of file MonoCamera.cpp.
int dai::node::MonoCamera::getResolutionHeight | ( | ) | const |
Get sensor resolution height.
Definition at line 145 of file MonoCamera.cpp.
std::tuple< int, int > dai::node::MonoCamera::getResolutionSize | ( | ) | const |
Get sensor resolution as size.
Definition at line 116 of file MonoCamera.cpp.
int dai::node::MonoCamera::getResolutionWidth | ( | ) | const |
Get sensor resolution width.
Definition at line 141 of file MonoCamera.cpp.
void dai::node::MonoCamera::setBoardSocket | ( | dai::CameraBoardSocket | boardSocket | ) |
Specify which board socket to use
boardSocket | Board socket to use |
Definition at line 27 of file MonoCamera.cpp.
void dai::node::MonoCamera::setCamera | ( | std::string | name | ) |
Specify which camera to use by name
name | Name of the camera to use |
Definition at line 36 of file MonoCamera.cpp.
void dai::node::MonoCamera::setCamId | ( | int64_t | id | ) |
Definition at line 45 of file MonoCamera.cpp.
void dai::node::MonoCamera::setFps | ( | float | fps | ) |
Set rate at which camera should produce frames
fps | Rate in frames per second |
Definition at line 98 of file MonoCamera.cpp.
void dai::node::MonoCamera::setFrameEventFilter | ( | const std::vector< dai::FrameEvent > & | events | ) |
Definition at line 90 of file MonoCamera.cpp.
void dai::node::MonoCamera::setImageOrientation | ( | CameraImageOrientation | imageOrientation | ) |
Set camera image orientation.
Definition at line 72 of file MonoCamera.cpp.
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.
void dai::node::MonoCamera::setNumFramesPool | ( | int | num | ) |
Set number of frames in main (ISP output) pool.
Definition at line 149 of file MonoCamera.cpp.
void dai::node::MonoCamera::setRawNumFramesPool | ( | int | num | ) |
Set number of frames in raw pool.
Definition at line 152 of file MonoCamera.cpp.
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.
void dai::node::MonoCamera::setResolution | ( | Properties::SensorResolution | resolution | ) |
Set sensor resolution.
Definition at line 82 of file MonoCamera.cpp.
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.
CameraControl dai::node::MonoCamera::initialControl |
Initial control options to apply to sensor
Definition at line 34 of file MonoCamera.hpp.
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.
|
staticconstexpr |
Definition at line 19 of file MonoCamera.hpp.
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.
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.
|
private |
Definition at line 22 of file MonoCamera.hpp.