struct utils::ScannerParams — HIRO 0.7.0 documentation

# struct utils::ScannerParams

## Overview

Parameters of a virtual scanner. More…

    #include <ScannerParams.h>

    struct ScannerParams: public utils::IntrinsicParams {
        // fields

        glm::uvec2 resolution;
        float baseline { 350.0f };
        float camera_angle { 11.75f };
        float projector_angle { 11.75f };
        float projector_fovx { 47.50f };
        float projector_fovy { 36.00f };
        float near_range { 458.0f };
        float far_range { 1118.0f };

        // methods

        bool IsValid() const;
        virtual void AddToJsonNode(nlohmann::json& node) const;
        virtual bool ReadFromJsonNode(const nlohmann::json& node);
    };

### Inherited Members

    public:
        // fields

        float fx { 0.0f };
        float fy { 0.0f };
        float cx { 0.0f };
        float cy { 0.0f };

        // methods

        std::string Serialize() const;
        bool Deserialize(const std::string& json_string);
        virtual void AddToJsonNode(nlohmann::json& node) const = 0;
        virtual bool ReadFromJsonNode(const nlohmann::json& node) = 0;
        float GetFovX() const;
        float GetFovY() const;
        virtual void AddToJsonNode(nlohmann::json& node) const;
        virtual bool ReadFromJsonNode(const nlohmann::json& node);

## Detailed Documentation

Parameters of a virtual scanner.

### Fields

    glm::uvec2 resolution

Resolution of device.

    float baseline { 350.0f }

Distance between camera and projector.

    float camera_angle { 11.75f }

The amount of angular deviation (degrees) of camera from being orthogonal to the device.

    float projector_angle { 11.75f }

The amount of angular deviation (degrees) of projector from being orthogonal to the device.

    float projector_fovx { 47.50f }

Field of view of projection volume in x direction.

    float projector_fovy { 36.00f }

Field of view of projection volume in y direction.

    float near_range { 458.0f }

The minimal distance that can be captured by scanner.

    float far_range { 1118.0f }

The maximal distance that can be captured by scanner.

### Methods

    bool IsValid() const

Checks validity of parameters values. If they are incorrect returns false and logs errors.

    virtual void AddToJsonNode(nlohmann::json& node) const

Fill data of this to json node.

    virtual bool ReadFromJsonNode(const nlohmann::json& node)

Read json node and initialize this.

Parameters:

nlohmann::json::exception | when required keys are missing.