Program Listing for File CameraProperties.hpp

Return to documentation for file (include/depthai/properties/CameraProperties.hpp)

#pragma once
#include <optional>

#include "depthai/capabilities/ImgFrameCapability.hpp"
#include "depthai/common/CameraBoardSocket.hpp"
#include "depthai/common/CameraImageOrientation.hpp"
#include "depthai/common/CameraSensorType.hpp"
#include "depthai/pipeline/datatype/CameraControl.hpp"
#include "depthai/properties/Properties.hpp"

namespace dai {

struct CameraProperties : PropertiesSerializable<Properties, CameraProperties> {
    static constexpr int AUTO = -1;

    std::vector<ImgFrameCapability> outputRequests;

    CameraControl initialControl;

    CameraBoardSocket boardSocket = CameraBoardSocket::AUTO;

    CameraSensorType sensorType = CameraSensorType::AUTO;

    std::string cameraName = "";

    CameraImageOrientation imageOrientation = CameraImageOrientation::AUTO;

    int32_t resolutionWidth = AUTO;
    int32_t resolutionHeight = AUTO;

    int32_t mockIspWidth = AUTO;

    int32_t mockIspHeight = AUTO;

    float mockIspFps = AUTO;

    float fps = AUTO;

    int isp3aFps = 0;

    int numFramesPoolRaw = 3;
    int maxSizePoolRaw = 1024 * 1024 * 10;  // 10MB

    int numFramesPoolIsp = 3;
    int maxSizePoolIsp = 1024 * 1024 * 10;  // 10MB

    int numFramesPoolVideo = 4;  // No max size in bytes for video pool, used in mono and color cameras only, those are deprecated

    int numFramesPoolPreview = 4;  // No max size in bytes for preview pool, used in mono and color cameras only, those are deprecated

    int numFramesPoolStill = 4;  // No max size in bytes for still pool, used in mono and color cameras only, those are deprecated

    int numFramesPoolOutputs = 3;
    int maxSizePoolOutputs = 10 * 1024 * 1024;  // 10MB

    ~CameraProperties() override;
};

DEPTHAI_SERIALIZE_EXT(CameraProperties,
                      initialControl,
                      boardSocket,
                      sensorType,
                      cameraName,
                      imageOrientation,
                      resolutionWidth,
                      resolutionHeight,
                      mockIspWidth,
                      mockIspHeight,
                      fps,
                      isp3aFps,
                      numFramesPoolRaw,
                      maxSizePoolRaw,
                      numFramesPoolIsp,
                      maxSizePoolIsp,
                      numFramesPoolVideo,
                      numFramesPoolPreview,
                      numFramesPoolStill,
                      numFramesPoolOutputs,
                      maxSizePoolOutputs,
                      outputRequests);

}  // namespace dai