Program Listing for File image_struct.h

Return to documentation for file (c/fmdt/image/image_struct.h)

#pragma once

#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>

enum pixfmt_e { PIXFMT_RGB24 = 0,
                PIXFMT_GRAY8
};

size_t image_get_pixsize(const enum pixfmt_e pixfmt);

enum color_e { COLOR_MISC = 0,
               COLOR_GRAY,
               COLOR_GREEN,
               COLOR_RED,
               COLOR_PURPLE,
               COLOR_ORANGE,
               COLOR_BLUE,
               COLOR_YELLOW,
               N_COLORS
};

typedef enum color_e* vec_color_e;

typedef struct {
    uint8_t r;
    uint8_t g;
    uint8_t b;
} rgb8_t;

typedef struct {
    size_t height;
    size_t width;
    void* pixels;
    void* container_2d;
} img_data_t;

typedef struct {
    uint32_t frame_id;
    uint32_t track_id;
    uint32_t bb_x;
    uint32_t bb_y;
    uint32_t rx;
    uint32_t ry;
    int is_extrapolated;
} BB_t;

typedef BB_t* vec_BB_t;