24 class Minutia :
public Serializable
30 enum class Type : uint8_t
55 writer.Write(
"t",
static_cast<uint8_t
>(
type));
56 writer.Write(
"a",
angle);
70 :
center(std::move(pointArg))
76 bool operator==(
const Minutia& m)
const
78 auto isAngleEqual = std::abs(angle - m.
angle) < std::numeric_limits<Angle>::epsilon();
79 return center == m.
center && type == m.
type && isAngleEqual && quality == m.
quality;
81 bool operator!=(
const Minutia& m)
const
87 : type(Type::BIFURCATION)
93 virtual ~Minutia() =
default;
95 Minutia(
const Minutia& m) =
default;
96 Minutia(Minutia&& m) =
delete;
97 Minutia& operator=(
const Minutia& m) =
default;
98 Minutia& operator=(Minutia&& m) =
delete;
120 auto rect =
Rectangle{ { m->center.x -
static_cast<int>(r), m->center.y -
static_cast<int>(r) },
121 { m->center.x +
static_cast<int>(r), m->center.y -
static_cast<int>(r) },
122 { m->center.x +
static_cast<int>(r), m->center.y +
static_cast<int>(r) },
123 { m->center.x -
static_cast<int>(r), m->center.y +
static_cast<int>(r) } };
129 drawer.DrawCircle(
Circle{ { m->center.x, m->center.y }, r }, a);
131 auto angleLine =
Line{ { m->center.x, m->center.y }, m->angle, al };
132 drawer.DrawLine(angleLine, a);
146 unsigned int angleLength)
147 : m(std::move(minutia))
161 : m(std::move(minutia))
164 , al(DefaultAngleLength)
176 std::shared_ptr<Minutia> m;
177 static constexpr Radius DefaultRadius = 5;
180 static constexpr unsigned int DefaultAngleLength = 10;
197 for (
const auto& mi : m)
212 MinutiaeShape(
const std::vector<std::shared_ptr<Minutia>>& minutia,
215 unsigned int angleLength)
233 , al(DefaultAngleLength)
244 std::vector<std::shared_ptr<Minutia>> m;
245 static constexpr Radius DefaultRadius = 5;
248 static constexpr unsigned int DefaultAngleLength = 10;
It holds circle dimensions.
Definition ImageAttribute.h:691
It holds shape attributes such as color and line width.
Definition ImageShape.h:22
It is used by ImageShape to draw its shape.
Definition ImageShape.h:108
It holds line points.
Definition ImageAttribute.h:615
It draws Minutia into image.
Definition Minutia.h:108
MinutiaShape(std::shared_ptr< Minutia > minutia, ImageShapeAttributes attr)
Create Minutia shape.
Definition Minutia.h:159
void DrawIn(ImageShapeDrawer &drawer) const final
It draws Minutia into image.
Definition Minutia.h:114
MinutiaShape(std::shared_ptr< Minutia > minutia, Radius radius, ImageShapeAttributes attr, unsigned int angleLength)
Create Minutia shape.
Definition Minutia.h:142
It represents a particular Minutia (distinctive fingerprint feature point found in fingerprint skelet...
Definition Minutia.h:24
uint8_t quality
Minutia quality in range 0-100.
Definition Minutia.h:45
void WriteTo(Writer &writer) const final
Write itself into writer.
Definition Minutia.h:51
Point center
Minutia point.
Definition Minutia.h:37
Type
Type of Minutia.
Definition Minutia.h:30
@ RIDGE_ENDING
End of ridge.
Definition Minutia.h:34
@ BIFURCATION
Bifurcation Point where a friction ridge forks and becomes two separate ridges.
Definition Minutia.h:32
Minutia(Point pointArg, Type typeArg, Angle angleArg, uint8_t qualityArg)
It creates Minutia with given parameters.
Definition Minutia.h:68
Type type
Minutia type (bifurcation/ending).
Definition Minutia.h:39
Angle angle
The orientation of the minutia is represented in degrees, with zero degrees pointing horizontally and...
Definition Minutia.h:42
It draws Minutia into image.
Definition Minutia.h:188
MinutiaeShape(const std::vector< std::shared_ptr< Minutia > > &minutia, ImageShapeAttributes attr)
Create Minutia shape.
Definition Minutia.h:228
MinutiaeShape(const std::vector< std::shared_ptr< Minutia > > &minutia, Radius radius, ImageShapeAttributes attr, unsigned int angleLength)
Create Minutia shape.
Definition Minutia.h:211
void DrawIn(ImageShapeDrawer &drawer) const final
It draws all Minutia into image.
Definition Minutia.h:194
It holds X and Y coordinates of point.
Definition ImageAttribute.h:312
It holds rectangle and draws it.
Definition ImageShape.h:163
It holds rectangle vertexes, width, height.
Definition ImageAttribute.h:357
Provides interface for serialization of all classes.
Definition Writer.h:164
float Angle
Angle in degrees.
Definition ImageAttribute.h:122
unsigned int Radius
Radius.
Definition ImageAttribute.h:127