Go to the documentation of this file.
5 #include "spdlog/fmt/fmt.h"
14 initialControl(rawControl) {
69 throw std::invalid_argument(fmt::format(
"CamId value: {} is invalid.", camId));
158 setIspScale(numerator, denominator, numerator, denominator);
162 setIspScale(std::get<0>(scale), std::get<1>(scale));
166 setIspScale(std::get<0>(horizScale), std::get<1>(horizScale), std::get<0>(vertScale), std::get<1>(vertScale));
219 int maxVideoWidth = 1920;
220 int maxVideoHeight = 1080;
228 maxVideoWidth = 3840;
229 maxVideoHeight = 2160;
233 maxVideoHeight = 1200;
237 maxVideoWidth = 2592;
238 maxVideoHeight = 1944;
242 maxVideoWidth = 1280;
243 maxVideoHeight = 720;
247 maxVideoWidth = 1280;
248 maxVideoHeight = 800;
252 maxVideoWidth = 1440;
255 maxVideoWidth = 2024;
258 maxVideoWidth = 1352;
264 if(numW > 0 && denW > 0) {
270 if(numH > 0 && denH > 0) {
274 return {maxVideoWidth, maxVideoHeight};
292 int maxStillWidth = 1920;
293 int maxStillHeight = 1080;
295 maxStillHeight = 1200;
298 maxStillWidth = 3840;
299 maxStillHeight = 2160;
302 maxStillWidth = 2592;
303 maxStillHeight = 1944;
306 maxStillWidth = 4000;
307 maxStillHeight = 3000;
310 maxStillWidth = 4032;
311 maxStillHeight = 3040;
314 maxStillWidth = 4192;
315 maxStillHeight = 3120;
318 maxStillWidth = 5312;
319 maxStillHeight = 6000;
322 maxStillWidth = 8000;
323 maxStillHeight = 6000;
326 maxStillWidth = 1440;
327 maxStillHeight = 1080;
330 maxStillWidth = 2024;
331 maxStillHeight = 1520;
334 maxStillWidth = 1352;
335 maxStillHeight = 1012;
341 if(numW > 0 && denW > 0) {
347 if(numH > 0 && denH > 0) {
351 return {maxStillWidth, maxStillHeight};
438 return (input * num - 1) / denom + 1;
445 if(num > 0 && den > 0) {
455 if(num > 0 && den > 0) {
471 if(x < 0 || x >= 1) {
472 throw std::invalid_argument(
"Sensor crop x must be specified as normalized value [0:1)");
474 if(y < 0 || y >= 1) {
475 throw std::invalid_argument(
"Sensor crop y must be specified as normalized value [0:1)");
Properties & properties
Underlying properties.
int getStillHeight() const
Get still height.
void setPreviewKeepAspectRatio(bool keep)
CameraImageOrientation imageOrientation
bool getInterleaved() const
Get planar or interleaved data of preview output frames.
void setWaitForConfigInput(bool wait)
int getRawNumFramesPool()
Get number of frames in raw pool.
int getIspHeight() const
Get 'isp' output height.
bool getFp16() const
Get fp16 (0..255) data of preview output frames.
@ THE_2024X1520
2024 × 1520
void setResolution(Properties::SensorResolution resolution)
Set sensor resolution.
RawCameraControl structure.
tl::optional< bool > rawPacked
int getResolutionWidth() const
Get sensor resolution width.
void setIsp3aFps(int isp3aFps)
std::vector< dai::FrameEvent > getFrameEventFilter() const
void setInputRefs(std::initializer_list< Input * > l)
SensorResolution resolution
RawCameraControl initialControl
ColorCamera node. For use with color sensors.
std::tuple< int, int > getResolutionSize() const
Get sensor resolution as size.
void setIspNumFramesPool(int num)
Set number of frames in isp pool.
CameraBoardSocket getBoardSocket() const
int getVideoNumFramesPool()
Get number of frames in video pool.
void setFrameEventFilter(const std::vector< dai::FrameEvent > &events)
void setRawNumFramesPool(int num)
Set number of frames in raw pool.
int getPreviewHeight() const
Get preview height.
@ THE_1352X1012
1352 × 1012
int64_t getCamId() const
Get which color camera to use.
void setColorOrder(ColorCameraProperties::ColorOrder colorOrder)
Set color order of preview output images. RGB or BGR.
int getStillWidth() const
Get still width.
int getVideoHeight() const
Get video height.
Properties & getProperties()
bool previewKeepAspectRatio
void setPreviewNumFramesPool(int num)
Set number of frames in preview pool.
int getStillNumFramesPool()
Get number of frames in still pool.
std::tuple< int, int > getStillSize() const
Get still size as tuple.
ColorCamera(const std::shared_ptr< PipelineImpl > &par, int64_t nodeId)
void setSensorCrop(float x, float y)
int getVideoWidth() const
Get video width.
float getSensorCropX() const
Get sensor top left x crop coordinate.
@ THE_1440X1080
1440 × 1080
std::tuple< float, float > getSensorCrop() const
static constexpr int AUTO
constexpr auto size(const C &c) -> decltype(c.size())
void setVideoSize(int width, int height)
Set video output size.
std::shared_ptr< RawCameraControl > rawControl
void setRawOutputPacked(bool packed)
CameraBoardSocket boardSocket
void setStillNumFramesPool(int num)
Set number of frames in preview pool.
int getPreviewWidth() const
Get preview width.
void setBoardSocket(CameraBoardSocket boardSocket)
void setImageOrientation(CameraImageOrientation imageOrientation)
Set camera image orientation.
void setFp16(bool fp16)
Set fp16 (0..255) data type of preview output frames.
@ THE_5312X6000
5312 × 6000
bool getPreviewKeepAspectRatio()
CameraImageOrientation getImageOrientation() const
Get camera image orientation.
int getIspWidth() const
Get 'isp' output width.
Base Properties structure.
void setStillSize(int width, int height)
Set still output size.
int getPreviewNumFramesPool()
Get number of frames in preview pool.
int getIspNumFramesPool()
Get number of frames in isp pool.
void setInterleaved(bool interleaved)
Set planar or interleaved data of preview output frames.
int getResolutionHeight() const
Get sensor resolution height.
bool getWaitForConfigInput() const
void setNumFramesPool(int raw, int isp, int preview, int video, int still)
Set number of frames in all pools.
void setOutputRefs(std::initializer_list< Output * > l)
std::string getCamera() const
float getSensorCropY() const
Get sensor top left y crop coordinate.
std::tuple< int, int > getPreviewSize() const
Get preview size as tuple.
void setPreviewSize(int width, int height)
Set preview output size.
void setVideoNumFramesPool(int num)
Set number of frames in preview pool.
std::tuple< int, int > getVideoSize() const
Get video size as tuple.
std::tuple< int, int > getIspSize() const
Get 'isp' output resolution as size, after scaling.
Properties::SensorResolution getResolution() const
Get sensor resolution.
void setIspScale(int numerator, int denominator)
ColorCameraProperties::ColorOrder getColorOrder() const
Get color order of preview output frames. RGB or BGR.
std::vector< dai::FrameEvent > eventFilter
@ THE_4000X3000
4000 × 3000
void setCamera(std::string name)
int getScaledSize(int input, int num, int denom) const
void setCamId(int64_t id)
Set which color camera to use.
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19