Skip to content

feature request: resolution enums to have an INVALID or COUNT enumerator #68

@diablodale

Description

@diablodale

I request a tweak to the enums for camera resolutions -- to have an entry that represents something invalid or not-a-resolution and/or a count of the enumerators.

I would use this in my code to distinguish a native camera resolution and a non-native camera resolution during resolution lookups/mapping. If named such, I could also use it to count the number of enumerators in the resolution enum.

Example

struct MonoCameraProperties { ...
enum class SensorResolution : int32_t { THE_720_P, THE_800_P, THE_400_P, THE_480_P, THE_INVALID };
// or
enum class SensorResolution : int32_t { THE_720_P, THE_800_P, THE_400_P, THE_480_P, THE_COUNT };

struct ColorCameraProperties { ...
enum class SensorResolution : int32_t { THE_1080_P, THE_4_K, THE_12_MP, THE_13_MP, THE_INVALID };
// or
enum class SensorResolution : int32_t { THE_1080_P, THE_4_K, THE_12_MP, THE_13_MP, THE_COUNT };

Currently I hack in an "invalid" value by static_cast<dai::MonoCameraProperties::SensorResolution>(-1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions