source: flair-src/branches/sanscv/lib/FlairVisionFilter/src/cvtypes.h@ 324

Last change on this file since 324 was 324, checked in by Sanahuja Guillaume, 3 years ago

removing opencv dependency

File size: 3.9 KB
Line 
1// created: 2019/07/18
2// filename: cvtypes.cpp
3//
4// author: Guillaume Sanahuja
5// Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7// version: $Id: $
8//
9// purpose: types used by both gpp and dsp
10//
11//
12/*********************************************************************/
13
14#ifndef CVTYPES_H
15#define CVTYPES_H
16
17
18#define CV_PI 3.1415926535897932384626433832795
19
20
21typedef struct _IplImage
22{
23 int nSize; /* sizeof(IplImage) */
24 int ID; /* version (=0)*/
25 int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */
26 int alphaChannel; /* Ignored by OpenCV */
27 int depth; /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
28 IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported. */
29 char colorModel[4]; /* Ignored by OpenCV */
30 char channelSeq[4]; /* ditto */
31 int dataOrder; /* 0 - interleaved color channels, 1 - separate color channels.
32 cvCreateImage can only create interleaved images */
33 int origin; /* 0 - top-left origin,
34 1 - bottom-left origin (Windows bitmaps style). */
35 int align; /* Alignment of image rows (4 or 8).
36 OpenCV ignores it and uses widthStep instead. */
37 int width; /* Image width in pixels. */
38 int height; /* Image height in pixels. */
39 struct _IplROI *roi; /* Image ROI. If NULL, the whole image is selected. */
40 struct _IplImage *maskROI; /* Must be NULL. */
41 void *imageId; /* " " */
42 struct _IplTileInfo *tileInfo; /* " " */
43 int imageSize; /* Image data size in bytes
44 (==image->height*image->widthStep
45 in case of interleaved data)*/
46 char *imageData; /* Pointer to aligned image data. */
47 int widthStep; /* Size of aligned image row in bytes. */
48 int BorderMode[4]; /* Ignored by OpenCV. */
49 int BorderConst[4]; /* Ditto. */
50 char *imageDataOrigin; /* Pointer to very origin of image data
51 (not necessarily aligned) -
52 needed for correct deallocation */
53}
54IplImage;
55
56typedef struct _IplROI
57{
58 int coi; /* 0 - no COI (all channels are selected), 1 - 0th channel is selected ...*/
59 int xOffset;
60 int yOffset;
61 int width;
62 int height;
63}
64IplROI;
65
66typedef struct _IplTileInfo IplTileInfo;
67
68
69typedef struct CvMat
70{
71 int type;
72 int step;
73
74 /* for internal use only */
75 int* refcount;
76 int hdr_refcount;
77
78 union
79 {
80 unsigned char* ptr;
81 short* s;
82 int* i;
83 float* fl;
84 double* db;
85 } data;
86
87#ifdef __cplusplus
88 union
89 {
90 int rows;
91 int height;
92 };
93
94 union
95 {
96 int cols;
97 int width;
98 };
99#else
100 int rows;
101 int cols;
102#endif
103
104}
105CvMat;
106
107
108/*********************************** CvTermCriteria *************************************/
109
110#define CV_TERMCRIT_ITER 1
111#define CV_TERMCRIT_NUMBER CV_TERMCRIT_ITER
112#define CV_TERMCRIT_EPS 2
113
114typedef struct CvTermCriteria
115{
116 int type; /* may be combination of
117 CV_TERMCRIT_ITER
118 CV_TERMCRIT_EPS */
119 int max_iter;
120 double epsilon;
121}
122CvTermCriteria;
123
124/******************************* CvPoint and variants ***********************************/
125
126typedef struct CvPoint
127{
128 int x;
129 int y;
130}
131CvPoint;
132
133typedef struct CvPoint2D32f
134{
135 float x;
136 float y;
137}
138CvPoint2D32f;
139
140/******************************** CvSize's & CvBox **************************************/
141
142typedef struct
143{
144 int width;
145 int height;
146}
147CvSize;
148
149
150#endif /*CVTYPES_H*/
Note: See TracBrowser for help on using the repository browser.