Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
diablodale opened this issue Nov 28, 2021 · 0 comments

Comments

@diablodale
Copy link
Contributor

diablodale commented Nov 28, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant