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

ColorCamera node. For use with color sensors. More...

#include <ColorCamera.hpp>

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

Public Member Functions

 ColorCamera (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId)
 
 ColorCamera (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId, std::unique_ptr< Properties > props)
 
CameraBoardSocket getBoardSocket () const
 
std::string getCamera () const
 
int64_t getCamId () const
 Get which color camera to use. More...
 
ColorCameraProperties::ColorOrder getColorOrder () const
 Get color order of preview output frames. RGB or BGR. More...
 
bool getFp16 () const
 Get fp16 (0..255) data of preview output frames. More...
 
float getFps () const
 
std::vector< dai::FrameEventgetFrameEventFilter () const
 
CameraImageOrientation getImageOrientation () const
 Get camera image orientation. More...
 
bool getInterleaved () const
 Get planar or interleaved data of preview output frames. More...
 
int getIspHeight () const
 Get 'isp' output height. More...
 
int getIspNumFramesPool ()
 Get number of frames in isp pool. More...
 
std::tuple< int, int > getIspSize () const
 Get 'isp' output resolution as size, after scaling. More...
 
int getIspWidth () const
 Get 'isp' output width. More...
 
int getPreviewHeight () const
 Get preview height. More...
 
bool getPreviewKeepAspectRatio ()
 
int getPreviewNumFramesPool ()
 Get number of frames in preview pool. More...
 
std::tuple< int, int > getPreviewSize () const
 Get preview size as tuple. More...
 
int getPreviewWidth () const
 Get preview width. More...
 
int getRawNumFramesPool ()
 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...
 
int getScaledSize (int input, int num, int denom) const
 
std::tuple< float, float > getSensorCrop () const
 
float getSensorCropX () const
 Get sensor top left x crop coordinate. More...
 
float getSensorCropY () const
 Get sensor top left y crop coordinate. More...
 
int getStillHeight () const
 Get still height. More...
 
int getStillNumFramesPool ()
 Get number of frames in still pool. More...
 
std::tuple< int, int > getStillSize () const
 Get still size as tuple. More...
 
int getStillWidth () const
 Get still width. More...
 
int getVideoHeight () const
 Get video height. More...
 
int getVideoNumFramesPool ()
 Get number of frames in video pool. More...
 
std::tuple< int, int > getVideoSize () const
 Get video size as tuple. More...
 
int getVideoWidth () const
 Get video width. More...
 
bool getWaitForConfigInput () const
 
void sensorCenterCrop ()
 
void setBoardSocket (CameraBoardSocket boardSocket)
 
void setCamera (std::string name)
 
void setCamId (int64_t id)
 Set which color camera to use. More...
 
void setColorOrder (ColorCameraProperties::ColorOrder colorOrder)
 Set color order of preview output images. RGB or BGR. More...
 
void setFp16 (bool fp16)
 Set fp16 (0..255) data type of preview output frames. More...
 
void setFps (float fps)
 
void setFrameEventFilter (const std::vector< dai::FrameEvent > &events)
 
void setImageOrientation (CameraImageOrientation imageOrientation)
 Set camera image orientation. More...
 
void setInterleaved (bool interleaved)
 Set planar or interleaved data of preview output frames. More...
 
void setIsp3aFps (int isp3aFps)
 
void setIspNumFramesPool (int num)
 Set number of frames in isp pool. More...
 
void setIspScale (int horizNum, int horizDenom, int vertNum, int vertDenom)
 
void setIspScale (int numerator, int denominator)
 
void setIspScale (std::tuple< int, int > horizScale, std::tuple< int, int > vertScale)
 Set 'isp' output scaling, per each direction, as <numerator, denominator> tuples. More...
 
void setIspScale (std::tuple< int, int > scale)
 Set 'isp' output scaling, as a tuple <numerator, denominator> More...
 
void setNumFramesPool (int raw, int isp, int preview, int video, int still)
 Set number of frames in all pools. More...
 
void setPreviewKeepAspectRatio (bool keep)
 
void setPreviewNumFramesPool (int num)
 Set number of frames in preview pool. More...
 
void setPreviewSize (int width, int height)
 Set preview output size. More...
 
void setPreviewSize (std::tuple< int, int > size)
 Set preview output size, as a tuple <width, height> 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...
 
void setSensorCrop (float x, float y)
 
void setStillNumFramesPool (int num)
 Set number of frames in preview pool. More...
 
void setStillSize (int width, int height)
 Set still output size. More...
 
void setStillSize (std::tuple< int, int > size)
 Set still output size, as a tuple <width, height> More...
 
void setVideoNumFramesPool (int num)
 Set number of frames in preview pool. More...
 
void setVideoSize (int width, int height)
 Set video output size. More...
 
void setVideoSize (std::tuple< int, int > size)
 Set video output size, as a tuple <width, height> More...
 
void setWaitForConfigInput (bool wait)
 
- Public Member Functions inherited from dai::NodeCRTP< Node, ColorCamera, ColorCameraProperties >
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 inputConfig {*this, "inputConfig", Input::Type::SReceiver, false, 8, {{DatatypeEnum::ImageManipConfig, false}}}
 
Input inputControl {*this, "inputControl", Input::Type::SReceiver, true, 8, {{DatatypeEnum::CameraControl, false}}}
 
Output isp {*this, "isp", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
Output preview {*this, "preview", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
Output raw {*this, "raw", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
Output still {*this, "still", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
Output video {*this, "video", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
 
- Public Attributes inherited from dai::NodeCRTP< Node, ColorCamera, ColorCameraProperties >
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 = "ColorCamera"
 

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, ColorCamera, ColorCameraProperties >
using Properties = ColorCameraProperties
 
- 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

ColorCamera node. For use with color sensors.

Definition at line 16 of file ColorCamera.hpp.

Constructor & Destructor Documentation

◆ ColorCamera() [1/2]

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

Constructs ColorCamera node.

Definition at line 10 of file ColorCamera.cpp.

◆ ColorCamera() [2/2]

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

Definition at line 11 of file ColorCamera.cpp.

Member Function Documentation

◆ getBoardSocket()

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

Retrieves which board socket to use

Returns
Board socket to use

Definition at line 40 of file ColorCamera.cpp.

◆ getCamera()

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

Retrieves which camera to use by name

Returns
Name of the camera to use

Definition at line 48 of file ColorCamera.cpp.

◆ getCamId()

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

Get which color camera to use.

Definition at line 75 of file ColorCamera.cpp.

◆ getColorOrder()

ColorCameraProperties::ColorOrder dai::node::ColorCamera::getColorOrder ( ) const

Get color order of preview output frames. RGB or BGR.

Definition at line 96 of file ColorCamera.cpp.

◆ getFp16()

bool dai::node::ColorCamera::getFp16 ( ) const

Get fp16 (0..255) data of preview output frames.

Definition at line 116 of file ColorCamera.cpp.

◆ getFps()

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

Get rate at which camera should produce frames

Returns
Rate in frames per second

Definition at line 192 of file ColorCamera.cpp.

◆ getFrameEventFilter()

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

Definition at line 188 of file ColorCamera.cpp.

◆ getImageOrientation()

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

Get camera image orientation.

Definition at line 85 of file ColorCamera.cpp.

◆ getInterleaved()

bool dai::node::ColorCamera::getInterleaved ( ) const

Get planar or interleaved data of preview output frames.

Definition at line 106 of file ColorCamera.cpp.

◆ getIspHeight()

int dai::node::ColorCamera::getIspHeight ( ) const

Get 'isp' output height.

Definition at line 451 of file ColorCamera.cpp.

◆ getIspNumFramesPool()

int dai::node::ColorCamera::getIspNumFramesPool ( )

Get number of frames in isp pool.

Definition at line 551 of file ColorCamera.cpp.

◆ getIspSize()

std::tuple< int, int > dai::node::ColorCamera::getIspSize ( ) const

Get 'isp' output resolution as size, after scaling.

Definition at line 461 of file ColorCamera.cpp.

◆ getIspWidth()

int dai::node::ColorCamera::getIspWidth ( ) const

Get 'isp' output width.

Definition at line 441 of file ColorCamera.cpp.

◆ getPreviewHeight()

int dai::node::ColorCamera::getPreviewHeight ( ) const

Get preview height.

Definition at line 211 of file ColorCamera.cpp.

◆ getPreviewKeepAspectRatio()

bool dai::node::ColorCamera::getPreviewKeepAspectRatio ( )
See also
setPreviewKeepAspectRatio
Returns
Preview keep aspect ratio option

Definition at line 511 of file ColorCamera.cpp.

◆ getPreviewNumFramesPool()

int dai::node::ColorCamera::getPreviewNumFramesPool ( )

Get number of frames in preview pool.

Definition at line 539 of file ColorCamera.cpp.

◆ getPreviewSize()

std::tuple< int, int > dai::node::ColorCamera::getPreviewSize ( ) const

Get preview size as tuple.

Definition at line 203 of file ColorCamera.cpp.

◆ getPreviewWidth()

int dai::node::ColorCamera::getPreviewWidth ( ) const

Get preview width.

Definition at line 207 of file ColorCamera.cpp.

◆ getProperties()

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

Reimplemented from dai::Node.

Definition at line 29 of file ColorCamera.cpp.

◆ getRawNumFramesPool()

int dai::node::ColorCamera::getRawNumFramesPool ( )

Get number of frames in raw pool.

Definition at line 548 of file ColorCamera.cpp.

◆ getResolution()

ColorCameraProperties::SensorResolution dai::node::ColorCamera::getResolution ( ) const

Get sensor resolution.

Definition at line 172 of file ColorCamera.cpp.

◆ getResolutionHeight()

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

Get sensor resolution height.

Definition at line 433 of file ColorCamera.cpp.

◆ getResolutionSize()

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

Get sensor resolution as size.

Definition at line 367 of file ColorCamera.cpp.

◆ getResolutionWidth()

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

Get sensor resolution width.

Definition at line 429 of file ColorCamera.cpp.

◆ getScaledSize()

int dai::node::ColorCamera::getScaledSize ( int  input,
int  num,
int  denom 
) const

Computes the scaled size given numerator and denominator

Definition at line 437 of file ColorCamera.cpp.

◆ getSensorCrop()

std::tuple< float, float > dai::node::ColorCamera::getSensorCrop ( ) const
Returns
Sensor top left crop coordinates

Definition at line 481 of file ColorCamera.cpp.

◆ getSensorCropX()

float dai::node::ColorCamera::getSensorCropX ( ) const

Get sensor top left x crop coordinate.

Definition at line 491 of file ColorCamera.cpp.

◆ getSensorCropY()

float dai::node::ColorCamera::getSensorCropY ( ) const

Get sensor top left y crop coordinate.

Definition at line 495 of file ColorCamera.cpp.

◆ getStillHeight()

int dai::node::ColorCamera::getStillHeight ( ) const

Get still height.

Definition at line 362 of file ColorCamera.cpp.

◆ getStillNumFramesPool()

int dai::node::ColorCamera::getStillNumFramesPool ( )

Get number of frames in still pool.

Definition at line 545 of file ColorCamera.cpp.

◆ getStillSize()

std::tuple< int, int > dai::node::ColorCamera::getStillSize ( ) const

Get still size as tuple.

Definition at line 289 of file ColorCamera.cpp.

◆ getStillWidth()

int dai::node::ColorCamera::getStillWidth ( ) const

Get still width.

Definition at line 358 of file ColorCamera.cpp.

◆ getVideoHeight()

int dai::node::ColorCamera::getVideoHeight ( ) const

Get video height.

Definition at line 284 of file ColorCamera.cpp.

◆ getVideoNumFramesPool()

int dai::node::ColorCamera::getVideoNumFramesPool ( )

Get number of frames in video pool.

Definition at line 542 of file ColorCamera.cpp.

◆ getVideoSize()

std::tuple< int, int > dai::node::ColorCamera::getVideoSize ( ) const

Get video size as tuple.

Definition at line 216 of file ColorCamera.cpp.

◆ getVideoWidth()

int dai::node::ColorCamera::getVideoWidth ( ) const

Get video width.

Definition at line 280 of file ColorCamera.cpp.

◆ getWaitForConfigInput()

bool dai::node::ColorCamera::getWaitForConfigInput ( ) const
See also
setWaitForConfigInput
Returns
True if wait for inputConfig message, false otherwise

Definition at line 503 of file ColorCamera.cpp.

◆ sensorCenterCrop()

void dai::node::ColorCamera::sensorCenterCrop ( )

Specify sensor center crop. Resolution size / video size

Definition at line 465 of file ColorCamera.cpp.

◆ setBoardSocket()

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

Specify which board socket to use

Parameters
boardSocketBoard socket to use

Definition at line 35 of file ColorCamera.cpp.

◆ setCamera()

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

Specify which camera to use by name

Parameters
nameName of the camera to use

Definition at line 44 of file ColorCamera.cpp.

◆ setCamId()

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

Set which color camera to use.

Definition at line 53 of file ColorCamera.cpp.

◆ setColorOrder()

void dai::node::ColorCamera::setColorOrder ( ColorCameraProperties::ColorOrder  colorOrder)

Set color order of preview output images. RGB or BGR.

Definition at line 91 of file ColorCamera.cpp.

◆ setFp16()

void dai::node::ColorCamera::setFp16 ( bool  fp16)

Set fp16 (0..255) data type of preview output frames.

Definition at line 111 of file ColorCamera.cpp.

◆ setFps()

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

Set rate at which camera should produce frames

Parameters
fpsRate in frames per second

Definition at line 176 of file ColorCamera.cpp.

◆ setFrameEventFilter()

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

Definition at line 184 of file ColorCamera.cpp.

◆ setImageOrientation()

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

Set camera image orientation.

Definition at line 80 of file ColorCamera.cpp.

◆ setInterleaved()

void dai::node::ColorCamera::setInterleaved ( bool  interleaved)

Set planar or interleaved data of preview output frames.

Definition at line 101 of file ColorCamera.cpp.

◆ setIsp3aFps()

void dai::node::ColorCamera::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 180 of file ColorCamera.cpp.

◆ setIspNumFramesPool()

void dai::node::ColorCamera::setIspNumFramesPool ( int  num)

Set number of frames in isp pool.

Definition at line 535 of file ColorCamera.cpp.

◆ setIspScale() [1/4]

void dai::node::ColorCamera::setIspScale ( int  horizNum,
int  horizDenom,
int  vertNum,
int  vertDenom 
)

Set 'isp' output scaling, per each direction. If the horizontal scaling factor (horizNum/horizDen) is different than the vertical scaling factor (vertNum/vertDen), a distorted (stretched or squished) image is generated

Definition at line 150 of file ColorCamera.cpp.

◆ setIspScale() [2/4]

void dai::node::ColorCamera::setIspScale ( int  numerator,
int  denominator 
)

Set 'isp' output scaling (numerator/denominator), preserving the aspect ratio. The fraction numerator/denominator is simplified first to a irreducible form, then a set of hardware scaler constraints applies: max numerator = 16, max denominator = 63

Definition at line 157 of file ColorCamera.cpp.

◆ setIspScale() [3/4]

void dai::node::ColorCamera::setIspScale ( std::tuple< int, int >  horizScale,
std::tuple< int, int >  vertScale 
)

Set 'isp' output scaling, per each direction, as <numerator, denominator> tuples.

Definition at line 165 of file ColorCamera.cpp.

◆ setIspScale() [4/4]

void dai::node::ColorCamera::setIspScale ( std::tuple< int, int >  scale)

Set 'isp' output scaling, as a tuple <numerator, denominator>

Definition at line 161 of file ColorCamera.cpp.

◆ setNumFramesPool()

void dai::node::ColorCamera::setNumFramesPool ( int  raw,
int  isp,
int  preview,
int  video,
int  still 
)

Set number of frames in all pools.

Definition at line 515 of file ColorCamera.cpp.

◆ setPreviewKeepAspectRatio()

void dai::node::ColorCamera::setPreviewKeepAspectRatio ( bool  keep)

Specifies whether preview output should preserve aspect ratio, after downscaling from video size or not.

Parameters
keepIf true, a larger crop region will be considered to still be able to create the final image in the specified aspect ratio. Otherwise video size is resized to fit preview size

Definition at line 507 of file ColorCamera.cpp.

◆ setPreviewNumFramesPool()

void dai::node::ColorCamera::setPreviewNumFramesPool ( int  num)

Set number of frames in preview pool.

Definition at line 523 of file ColorCamera.cpp.

◆ setPreviewSize() [1/2]

void dai::node::ColorCamera::setPreviewSize ( int  width,
int  height 
)

Set preview output size.

Definition at line 121 of file ColorCamera.cpp.

◆ setPreviewSize() [2/2]

void dai::node::ColorCamera::setPreviewSize ( std::tuple< int, int >  size)

Set preview output size, as a tuple <width, height>

Definition at line 126 of file ColorCamera.cpp.

◆ setRawNumFramesPool()

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

Set number of frames in raw pool.

Definition at line 532 of file ColorCamera.cpp.

◆ setRawOutputPacked()

void dai::node::ColorCamera::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 555 of file ColorCamera.cpp.

◆ setResolution()

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

Set sensor resolution.

Definition at line 169 of file ColorCamera.cpp.

◆ setSensorCrop()

void dai::node::ColorCamera::setSensorCrop ( float  x,
float  y 
)

Specifies the cropping that happens when converting ISP to video output. By default, video will be center cropped from the ISP output. Note that this doesn't actually do on-sensor cropping (and MIPI-stream only that region), but it does postprocessing on the ISP (on RVC).

Parameters
xTop left X coordinate
yTop left Y coordinate

Definition at line 470 of file ColorCamera.cpp.

◆ setStillNumFramesPool()

void dai::node::ColorCamera::setStillNumFramesPool ( int  num)

Set number of frames in preview pool.

Definition at line 529 of file ColorCamera.cpp.

◆ setStillSize() [1/2]

void dai::node::ColorCamera::setStillSize ( int  width,
int  height 
)

Set still output size.

Definition at line 141 of file ColorCamera.cpp.

◆ setStillSize() [2/2]

void dai::node::ColorCamera::setStillSize ( std::tuple< int, int >  size)

Set still output size, as a tuple <width, height>

Definition at line 146 of file ColorCamera.cpp.

◆ setVideoNumFramesPool()

void dai::node::ColorCamera::setVideoNumFramesPool ( int  num)

Set number of frames in preview pool.

Definition at line 526 of file ColorCamera.cpp.

◆ setVideoSize() [1/2]

void dai::node::ColorCamera::setVideoSize ( int  width,
int  height 
)

Set video output size.

Definition at line 131 of file ColorCamera.cpp.

◆ setVideoSize() [2/2]

void dai::node::ColorCamera::setVideoSize ( std::tuple< int, int >  size)

Set video output size, as a tuple <width, height>

Definition at line 136 of file ColorCamera.cpp.

◆ setWaitForConfigInput()

void dai::node::ColorCamera::setWaitForConfigInput ( bool  wait)

Specify to wait until inputConfig receives a configuration message, before sending out a frame.

Parameters
waitTrue to wait for inputConfig message, false otherwise

Definition at line 499 of file ColorCamera.cpp.

Member Data Documentation

◆ frameEvent

Output dai::node::ColorCamera::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 100 of file ColorCamera.hpp.

◆ initialControl

CameraControl dai::node::ColorCamera::initialControl

Initial control options to apply to sensor

Definition at line 41 of file ColorCamera.hpp.

◆ inputConfig

Input dai::node::ColorCamera::inputConfig {*this, "inputConfig", Input::Type::SReceiver, false, 8, {{DatatypeEnum::ImageManipConfig, false}}}

Input for ImageManipConfig message, which can modify crop parameters in runtime

Default queue is non-blocking with size 8

Definition at line 48 of file ColorCamera.hpp.

◆ inputControl

Input dai::node::ColorCamera::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 55 of file ColorCamera.hpp.

◆ isp

Output dai::node::ColorCamera::isp {*this, "isp", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}

Outputs ImgFrame message that carries YUV420 planar (I420/IYUV) frame data.

Generated by the ISP engine, and the source for the 'video', 'preview' and 'still' outputs

Definition at line 83 of file ColorCamera.hpp.

◆ NAME

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

Definition at line 18 of file ColorCamera.hpp.

◆ preview

Output dai::node::ColorCamera::preview {*this, "preview", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}

Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.

Suitable for use with NeuralNetwork node

Definition at line 69 of file ColorCamera.hpp.

◆ raw

Output dai::node::ColorCamera::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, and the source for the 'isp' output.

Definition at line 90 of file ColorCamera.hpp.

◆ rawControl

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

Definition at line 24 of file ColorCamera.hpp.

◆ still

Output dai::node::ColorCamera::still {*this, "still", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}

Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.

The message is sent only when a CameraControl message arrives to inputControl with captureStill command set.

Definition at line 76 of file ColorCamera.hpp.

◆ video

Output dai::node::ColorCamera::video {*this, "video", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}

Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.

Suitable for use with VideoEncoder node

Definition at line 62 of file ColorCamera.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