Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Vasily Khoruzhick
libfprint
Commits
9e5ae25a
Commit
9e5ae25a
authored
Nov 12, 2018
by
Bastien Nocera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: Transform fp_img flags into a FpiImgFlags enum
And document it.
parent
9316dfed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
17 deletions
+27
-17
doc/libfprint-sections.txt
doc/libfprint-sections.txt
+1
-7
libfprint/fpi-img.c
libfprint/fpi-img.c
+3
-0
libfprint/fpi-img.h
libfprint/fpi-img.h
+23
-10
No files found.
doc/libfprint-sections.txt
View file @
9e5ae25a
...
...
@@ -261,13 +261,7 @@ fpi_drvcb_verify_stopped
<INCLUDE>fpi-img.h</INCLUDE>
<FILE>fpi-img</FILE>
fp_minutiae
FP_IMG_V_FLIPPED
FP_IMG_H_FLIPPED
FP_IMG_COLORS_INVERTED
FP_IMG_BINARIZED_FORM
FP_IMG_PARTIAL
FP_IMG_STANDARDIZATION_FLAGS
FpiImgFlags
fpi_img_new
fpi_img_new_for_imgdev
...
...
libfprint/fpi-img.c
View file @
9e5ae25a
...
...
@@ -303,6 +303,9 @@ static void minutiae_to_xyt(struct fp_minutiae *minutiae, int bwidth,
xyt
->
nrows
=
nmin
;
}
#define FP_IMG_STANDARDIZATION_FLAGS (FP_IMG_V_FLIPPED | FP_IMG_H_FLIPPED \
| FP_IMG_COLORS_INVERTED)
static
int
fpi_img_detect_minutiae
(
struct
fp_img
*
img
)
{
struct
fp_minutiae
*
minutiae
;
...
...
libfprint/fpi-img.h
View file @
9e5ae25a
...
...
@@ -24,21 +24,34 @@
struct
fp_minutiae
;
/* bit values for fp_img.flags */
#define FP_IMG_V_FLIPPED (1<<0)
#define FP_IMG_H_FLIPPED (1<<1)
#define FP_IMG_COLORS_INVERTED (1<<2)
#define FP_IMG_BINARIZED_FORM (1<<3)
#define FP_IMG_PARTIAL (1<<4)
#define FP_IMG_STANDARDIZATION_FLAGS (FP_IMG_V_FLIPPED | FP_IMG_H_FLIPPED \
| FP_IMG_COLORS_INVERTED)
/**
* FpiImgFlags:
* @FP_IMG_V_FLIPPED: the image is vertically flipped
* @FP_IMG_H_FLIPPED: the image is horizontally flipped
* @FP_IMG_COLORS_INVERTED: the colours are inverted
* @FP_IMG_BINARIZED_FORM: binarised image, see fp_img_binarize()
* @FP_IMG_PARTIAL: the image is partial, useful for driver to keep track
* of incomplete captures
*
* Flags used in the #fp_img structure to describe the image contained
* into the structure. Note that a number of functions will refuse to
* handle images which haven't been standardised through fp_img_standardize()
* (meaning the @FP_IMG_V_FLIPPED, @FP_IMG_H_FLIPPED and @FP_IMG_COLORS_INVERTED
* should all be unset when the image needs to be analysed).
*/
typedef
enum
{
FP_IMG_V_FLIPPED
=
1
<<
0
,
FP_IMG_H_FLIPPED
=
1
<<
1
,
FP_IMG_COLORS_INVERTED
=
1
<<
2
,
FP_IMG_BINARIZED_FORM
=
1
<<
3
,
FP_IMG_PARTIAL
=
1
<<
4
}
FpiImgFlags
;
struct
fp_img
{
int
width
;
int
height
;
size_t
length
;
uint16_t
flags
;
FpiImgFlags
flags
;
struct
fp_minutiae
*
minutiae
;
unsigned
char
*
binarized
;
unsigned
char
data
[
0
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment