image_types.h
Go to the documentation of this file.
1 #ifndef _IMAGE_TYPES_H
2 #define _IMAGE_TYPES_H
3 
4 #include <stdint.h>
5 
6 // to support conversions between different types, we define all image
7 // types at once. Type-specific implementations can then #include this
8 // file, assured that the basic types of each image are known.
9 
10 typedef struct image_u8 image_u8_t;
11 struct image_u8
12 {
13  const int32_t width;
14  const int32_t height;
15  const int32_t stride;
16 
17  uint8_t *buf;
18 };
19 
20 typedef struct image_u8x3 image_u8x3_t;
21 struct image_u8x3
22 {
23  const int32_t width;
24  const int32_t height;
25  const int32_t stride; // bytes per line
26 
27  uint8_t *buf;
28 };
29 
30 typedef struct image_u8x4 image_u8x4_t;
31 struct image_u8x4
32 {
33  const int32_t width;
34  const int32_t height;
35  const int32_t stride; // bytes per line
36 
37  uint8_t *buf;
38 };
39 
40 typedef struct image_f32 image_f32_t;
41 struct image_f32
42 {
43  const int32_t width;
44  const int32_t height;
45  const int32_t stride; // floats per line
46 
47  float *buf; // indexed as buf[y*stride + x]
48 };
49 
50 typedef struct image_u32 image_u32_t;
51 struct image_u32
52 {
53  const int32_t width;
54  const int32_t height;
55  const int32_t stride; // int32_ts per line
56 
57  uint32_t *buf; // indexed as buf[y*stride + x]
58 };
59 
60 #endif
const int32_t stride
Definition: image_types.h:55
const int32_t height
Definition: image_types.h:34
const int32_t height
Definition: image_types.h:24
const int32_t height
Definition: image_types.h:44
const int32_t height
Definition: image_types.h:14
uint32_t * buf
Definition: image_types.h:57
const int32_t width
Definition: image_types.h:13
uint8_t * buf
Definition: image_types.h:27
const int32_t stride
Definition: image_types.h:15
uint8_t * buf
Definition: image_types.h:37
const int32_t stride
Definition: image_types.h:35
const int32_t stride
Definition: image_types.h:25
uint8_t * buf
Definition: image_types.h:17
const int32_t width
Definition: image_types.h:33
float * buf
Definition: image_types.h:47
const int32_t height
Definition: image_types.h:54
const int32_t stride
Definition: image_types.h:45
const int32_t width
Definition: image_types.h:23
const int32_t width
Definition: image_types.h:53
const int32_t width
Definition: image_types.h:43


apriltags2
Author(s): Danylo Malyuta
autogenerated on Fri Oct 19 2018 04:02:32