-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbe_feature_incitsminutiae.h
210 lines (181 loc) · 6.11 KB
/
be_feature_incitsminutiae.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/*
* This software was developed at the National Institute of Standards and
* Technology (NIST) by employees of the Federal Government in the course
* of their official duties. Pursuant to title 17 Section 105 of the
* United States Code, this software is not subject to copyright protection
* and is in the public domain. NIST assumes no responsibility whatsoever for
* its use by other parties, and makes no guarantees, expressed or implied,
* about its quality, reliability, or any other characteristic.
*/
#ifndef __BE_FEATURE_INCITSMINUTIAE_H__
#define __BE_FEATURE_INCITSMINUTIAE_H__
#include <iostream>
#include <be_feature_minutiae.h>
#include <be_memory_autoarray.h>
#include <be_memory_indexedbuffer.h>
namespace BiometricEvaluation
{
namespace Feature
{
/**
* @brief
* A class to represent a set of minutiae in an
* ANSI/INCITS record.
* @details
* The base INCTISMinutiae class is responsible for
* reading minutiae data points and extended data.
* Each minutiae point, ridge count item, core, and delta
* is represented in the native ANSI/INCITS format.
* Objects of this base class cannot be instantiated, but
* rather derived classes are used to represent minutiae
* data taken from the INCITS-derived record formats.
*/
class INCITSMinutiae : public Minutiae {
public:
/*
* Constants relevant to INCITS and ISO finger minutiae
* data records.
*/
static const std::string FMR_ANSI_SPEC_VERSION;
static const std::string FMR_ISO_SPEC_VERSION;
static const std::string FMR_ANSI07_SPEC_VERSION;
static const uint8_t FMR_SPEC_VERSION_LEN = 4;
/*
* Define the lengths of data blocks in the finger
* minutiae record.
*/
static const uint32_t FED_HEADER_LENGTH = 4;
static const uint32_t FED_RCD_ITEM_LENGTH = 3;
/*
* Define the masks for the minutia type and x/y
* coordinates within a minutia data record
*/
static const uint16_t FMD_MINUTIA_TYPE_MASK = 0xC000;
static const uint16_t FMD_RESERVED_MASK = 0xC000;
static const uint16_t FMD_MINUTIA_TYPE_SHIFT = 14;
static const uint16_t FMD_RESERVED_SHIFT = 14;
static const uint16_t FMD_X_COORD_MASK = 0x3FFF;
static const uint16_t FMD_Y_COORD_MASK = 0x3FFF;
/*
* The ISO Compact FMD record has type encoded with the
* angle value.
*/
static const uint16_t FMD_ISO_COMPACT_MINUTIA_TYPE_MASK
= 0xC0;
static const uint16_t FMD_ISO_COMPACT_MINUTIA_TYPE_SHIFT
= 6;
static const uint16_t FMD_ISO_COMPACT_MINUTIA_ANGLE_MASK
= 0x3F;
/* Range of the Minutia Quality values */
static const uint16_t FMD_MIN_MINUTIA_QUALITY = 0;
static const uint16_t FMD_MAX_MINUTIA_QUALITY = 100;
static const uint16_t FMD_UNKNOWN_MINUTIA_QUALITY = 0;
/* Range of Minutia Angle values. */
static const uint16_t FMD_MIN_MINUTIA_ANGLE = 0;
static const uint16_t FMD_MAX_MINUTIA_ANGLE = 179;
static const uint16_t FMD_MAX_MINUTIA_ISONC_ANGLE = 255;
static const uint16_t FMD_MAX_MINUTIA_ISOCC_ANGLE = 63;
/*
* What each unit of angle represents in terms of
* degrees.
*/
static const uint16_t FMD_ANSI_ANGLE_UNIT = 2;
static const uint16_t FMD_ISO_ANGLE_UNIT;
static const uint16_t FMD_ISOCC_ANGLE_UNIT;
/* Types of Minutia */
static const uint16_t FMD_MINUTIA_TYPE_OTHER = 0;
static const uint16_t FMD_MINUTIA_TYPE_RIDGE_ENDING = 1;
static const uint16_t FMD_MINUTIA_TYPE_BIFURCATION = 2;
/* Range of the Finger Quality values */
static const uint16_t FMR_MIN_FINGER_QUALITY = 0;
static const uint16_t FMR_MAX_FINGER_QUALITY = 100;
static const uint16_t ISO_UNKNOWN_FINGER_QUALITY = 0;
/* Extended Data Area Type Codes */
static const uint16_t FED_RESERVED = 0x0000;
static const uint16_t FED_RIDGE_COUNT = 0x0001;
static const uint16_t FED_CORE_AND_DELTA = 0x0002;
/* Ridge Count Extraction Method Codes */
static const uint16_t RCE_NONSPECIFIC = 0x00;
static const uint16_t RCE_FOUR_NEIGHBOR = 0x01;
static const uint16_t RCE_EIGHT_NEIGHBOR = 0x02;
/* Core and Delta type codes. */
static const uint16_t CORE_TYPE_NONANGULAR = 0x00;
static const uint16_t CORE_TYPE_ANGULAR = 0x01;
static const uint16_t DELTA_TYPE_NONANGULAR = 0x00;
static const uint16_t DELTA_TYPE_ANGULAR = 0x01;
/*
* Feature::Minutiae implementations.
*/
MinutiaeFormat getFormat() const;
MinutiaPointSet getMinutiaPoints() const;
RidgeCountItemSet getRidgeCountItems() const;
CorePointSet getCores() const;
DeltaPointSet getDeltas() const;
/**
* @brief
* Construct an INCITS Minutiae object from its
* components.
* @details
* The buffer index must be set to the location in the
* buffer to start reading minutiae data points and
* extended data.
*
* @param[in] mps
* The set of minutiae points.
* @param[in] rcis
* The set of ridge count items.
* @param[in] cps
* The set of core points.
* @param[in] dps
* The set of delta points.
*/
INCITSMinutiae(
const MinutiaPointSet &mps,
const RidgeCountItemSet &rcis,
const CorePointSet &cps,
const DeltaPointSet &dps);
/**
* @brief
* Default constructor for an INCITS Minutiae object.
*/
INCITSMinutiae();
/**
* @brief
* Mutator for the minutiae point set.
* @param[in] mps The minutiae points.
*/
void setMinutiaPoints(
const MinutiaPointSet& mps);
/**
* @brief
* Mutator for the ridge count items.
* @param[in] rcis
* The set of ridge count items.
*/
void setRidgeCountItems(
const RidgeCountItemSet& rcis);
/**
* @brief
* Mutator for the set of core points.
* @param[in] cps
* The set of core points.
*/
void setCorePointSet(
const CorePointSet& cps);
/**
* @brief
* Mutator for the set of delta points.
* @param[in] dps
* The set of delta point items.
*/
void setDeltaPointSet(
const DeltaPointSet& dps);
private:
MinutiaPointSet _minutiaPointSet;
RidgeCountItemSet _ridgeCountItemSet;
CorePointSet _corePointSet;
DeltaPointSet _deltaPointSet;
};
}
}
#endif /* __BE_FEATURE_INCITSMINUTIAE_H__ */