From 4a820d10fee71d9a40c1c33a4a90408dacf962ef Mon Sep 17 00:00:00 2001 From: Anna Bergamaschi Date: Wed, 24 May 2023 17:59:42 +0200 Subject: [PATCH] added enums for corner and pixel indexes --- enums.py | 20 ++++++++++++++++++++ src/data_types.h | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 enums.py diff --git a/enums.py b/enums.py new file mode 100644 index 0000000..a82f1e3 --- /dev/null +++ b/enums.py @@ -0,0 +1,20 @@ +from enum import Enum + +class corner(Enum): + cBottomLeft=0 + cBottomRight=1 + cTopLeft=2 + cTopRight=3 + + +class pixel(Enum): + pBottomLeft=0 + pBottom=1 + pBottomRight=2 + pLeft=3 + pCenter=4 + pRight=5 + pTopLeft=6 + pTop=7 + pTopRight=8 + diff --git a/src/data_types.h b/src/data_types.h index 7a47c1b..13a071b 100644 --- a/src/data_types.h +++ b/src/data_types.h @@ -25,14 +25,14 @@ typedef enum { pRight=5, pTopLeft=6, pTop=7, - qTopRight=8 + pTopRight=8 } pixel; typedef struct { int32_t tot2; int32_t tot3; - int8_t c; + uint32_t c; } ClusterAnalysis ;