Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libfprint
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
84
Issues
84
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
libfprint
libfprint
Commits
887e0e6a
Commit
887e0e6a
authored
Nov 19, 2007
by
Daniel Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API to access minutiae
parent
fa742a21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
16 deletions
+65
-16
libfprint/fp_internal.h
libfprint/fp_internal.h
+0
-15
libfprint/fprint.h
libfprint/fprint.h
+18
-0
libfprint/img.c
libfprint/img.c
+47
-1
No files found.
libfprint/fp_internal.h
View file @
887e0e6a
...
...
@@ -189,21 +189,6 @@ gboolean fpi_print_data_compatible(uint16_t driver_id1, uint32_t devtype1,
enum
fp_print_data_type
type1
,
uint16_t
driver_id2
,
uint32_t
devtype2
,
enum
fp_print_data_type
type2
);
struct
fp_minutia
{
int
x
;
int
y
;
int
ex
;
int
ey
;
int
direction
;
double
reliability
;
int
type
;
int
appearing
;
int
feature_id
;
int
*
nbrs
;
int
*
ridge_counts
;
int
num_nbrs
;
};
struct
fp_minutiae
{
int
alloc
;
int
num
;
...
...
libfprint/fprint.h
View file @
887e0e6a
...
...
@@ -207,12 +207,30 @@ uint16_t fp_print_data_get_driver_id(struct fp_print_data *data);
uint32_t
fp_print_data_get_devtype
(
struct
fp_print_data
*
data
);
/* Image handling */
/** \ingroup img */
struct
fp_minutia
{
int
x
;
int
y
;
int
ex
;
int
ey
;
int
direction
;
double
reliability
;
int
type
;
int
appearing
;
int
feature_id
;
int
*
nbrs
;
int
*
ridge_counts
;
int
num_nbrs
;
};
int
fp_img_get_height
(
struct
fp_img
*
img
);
int
fp_img_get_width
(
struct
fp_img
*
img
);
unsigned
char
*
fp_img_get_data
(
struct
fp_img
*
img
);
int
fp_img_save_to_file
(
struct
fp_img
*
img
,
char
*
path
);
void
fp_img_standardize
(
struct
fp_img
*
img
);
struct
fp_img
*
fp_img_binarize
(
struct
fp_img
*
img
);
struct
fp_minutia
**
fp_img_get_minutiae
(
struct
fp_img
*
img
,
int
*
nr_minutiae
);
void
fp_img_free
(
struct
fp_img
*
img
);
/* Library */
...
...
libfprint/img.c
View file @
887e0e6a
...
...
@@ -398,8 +398,10 @@ API_EXPORTED struct fp_img *fp_img_binarize(struct fp_img *img)
int
r
=
fpi_img_detect_minutiae
(
img
);
if
(
r
<
0
)
return
NULL
;
if
(
!
img
->
binarized
)
if
(
!
img
->
binarized
)
{
fp_err
(
"no minutiae after successful detection?"
);
return
NULL
;
}
}
ret
=
fpi_img_new
(
imgsize
);
...
...
@@ -410,3 +412,47 @@ API_EXPORTED struct fp_img *fp_img_binarize(struct fp_img *img)
return
ret
;
}
/** \ingroup img
* Get a list of minutiae detected in an image. A minutia point is a feature
* detected on a fingerprint, typically where ridges end or split.
* libfprint's image processing code relies upon comparing sets of minutiae,
* so accurate placement of minutia points is critical for good imaging
* performance.
*
* The image must have been \ref img_std "standardized" otherwise this function
* will fail.
*
* You cannot pass a binarized image to this function. Instead, pass the
* original image.
*
* Returns a list of pointers to minutiae, where the list is of length
* indicated in the nr_minutiae output parameter. The returned list is only
* valid while the parent image has not been freed, and the minutiae data
* must not be modified or freed.
*
* \param img a standardized image
* \param nr_minutiae an output location to store minutiae list length
* \returns a list of minutiae points. Must not be modified or freed.
*/
API_EXPORTED
struct
fp_minutia
**
fp_img_get_minutiae
(
struct
fp_img
*
img
,
int
*
nr_minutiae
)
{
if
(
img
->
flags
&
FP_IMG_BINARIZED_FORM
)
{
fp_err
(
"image is binarized"
);
return
NULL
;
}
if
(
!
img
->
minutiae
)
{
int
r
=
fpi_img_detect_minutiae
(
img
);
if
(
r
<
0
)
return
NULL
;
if
(
!
img
->
minutiae
)
{
fp_err
(
"no minutiae after successful detection?"
);
return
NULL
;
}
}
*
nr_minutiae
=
img
->
minutiae
->
num
;
return
img
->
minutiae
->
list
;
}
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