-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisualDetection.h
86 lines (73 loc) · 3.02 KB
/
visualDetection.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/************************************************************************
This file is part of 4th_uavgp(visual detection part)
Copyright (C) 2016 Zhixing Hou <[email protected]>
(Intelligent Mobile Robotics Lab (iMRL),
Nanjing University of Science and Technology, China)
4th_uavgp is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
4th_uavgp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#pragma once
#ifndef uint8
#define uint8 unsigned char
#endif
#ifndef s16
#define s16 short
#endif
#ifndef BYTE
#define BYTE unsigned char
#endif
#pragma pack(push)
#pragma pack(1)
typedef struct tagDigit_POINT
{
uint8 DisplayWndOrPaintWnd; //1->dispaly window 0->painting window
uint8 ImgStatue; // 0-100 CONFIDENCE ??????¡À?¡Á??? 0????????¡À????? 1??¡À????? 2 ??¡À?????????
uint8 DigitName; // ??¡Á??? 0,1,2,3,4,5,6,7,8,9
s16 xPiont_mm; // w.r.p center // ??¡Á???????????x¡Á?¡À¨º?? ????mm ??????
s16 yPiont_mm; // ??¡Á???????????y¡Á?¡À¨º?? ????mm
}Digit_POINT;
typedef struct tagDigit_INFO
{
uint8 Head; // 24
uint8 FrameID; //??ID????¡¤????????¨¢????
uint8 Key; //?????¨¹¡Á? ?????¡§?????? 1
uint8 Spray_Statue; //??????????¡À?¡Á??? 0????¡À???¡À? 1????¡À????? VERY
uint8 SprayScale; //?¡À?¡ã????¡À????¨®?? 0-100%
uint8 ShotPoint_Statue; // ?¨¬???¨¦¡Á?????¡À?¡Á??? 0????¡À???¡À? 1????¡À????? x
s16 ShotPoint_x_mm; // ?¨¬???¨¦¡Á??? ¡Á?¡À¨ºX x
s16 ShotPoint_y_mm; // ?¨¬???¨¦¡Á??? ¡Á?¡À¨ºY x
uint8 valid_Digit_N; //
Digit_POINT tagDigit_POINT[11]; //tagDigit_POIN[0]????¡À?????¡Á???tagDigit_POIN[1]- tagDigit_POIN[10]????????10????????11????¡Á???¡Á?¡À¨º???? 11*6=66bytes
uint8 tmp1; // ?¡è??
uint8 tmp2; // ?¡è??
}Digit_INFO; // ???? 78bytes
typedef struct tagUav2Img_INFO
{
uint8 Head; // 0x24
uint8 Key; //?????¨¹¡Á? ?????¡§?????? 2
uint8 DigitName; //????????????¡Á?ID??
s16 DisImg_mm; // ?¨¤?¨²????¡Á???????
s16 AngleImg_mrad; // ?¨¤?¨²???????????? ???? ??????
s16 TargSprayPoint_x_mm; // ??????????¡À?????¡À?¡Á?¡À¨ºX
s16 TargSprayPoint_y_mm; // ??????????¡À?????¡À?¡Á?¡À¨ºY
uint8 Spraygun_status; //0,3-close 1-ready 2-running 3-finish
uint8 tmp1; // checksum
uint8 tmp2; // 0x0d
}Uav2Img_INFO; //
#pragma pack(pop)
#ifdef __cplusplus
extern "C"{
#endif
bool VisualDetection_Initialization(int width, int height);
void VisualDetection_DoNext(unsigned char *pOrgImg, Uav2Img_INFO *input, Digit_INFO *output, unsigned char *pResImg);
#ifdef __cplusplus
}
#endif