CN113705545A - Fingerprint acquisition method and device, electronic equipment and readable storage medium - Google Patents
Fingerprint acquisition method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN113705545A CN113705545A CN202111259657.6A CN202111259657A CN113705545A CN 113705545 A CN113705545 A CN 113705545A CN 202111259657 A CN202111259657 A CN 202111259657A CN 113705545 A CN113705545 A CN 113705545A
- Authority
- CN
- China
- Prior art keywords
- fingerprint
- shooting frequency
- image
- calculating
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000006073 displacement reaction Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012216 screening Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005096 rolling process Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Image Input (AREA)
Abstract
The invention relates to the field of image acquisition, and discloses a fingerprint acquisition method, which comprises the following steps: when the touch operation of the user finger is detected, capturing a fingerprint image of the user finger by using an initial shooting frequency; counting the number of the captured fingerprint images in real time, and calculating the moving distance of the finger of the user according to the continuously captured fingerprint images when the number is greater than or equal to a preset threshold value; calculating the moving speed of the finger of the user according to the moving distance and the initial shooting frequency; searching for a shooting frequency corresponding to the moving speed to update the initial shooting frequency, and returning to the step of capturing the fingerprint image of the finger of the user by using the preset initial shooting frequency; and when the touch operation is finished, sequentially splicing all the captured fingerprint images according to the capturing time to obtain the target fingerprint image of the user. The invention also provides a fingerprint acquisition device, equipment and a medium. The invention can dynamically adjust the acquisition frequency according to the finger moving speed of the user and improve the accuracy of fingerprint acquisition.
Description
Technical Field
The present invention relates to the field of image acquisition, and in particular, to a fingerprint acquisition method and apparatus, an electronic device, and a readable storage medium.
Background
When the existing fingerprint identification technology collects fingerprints of a user, in order to acquire the complete fingerprints of the user, the user is required to roll and press the finger on the surface of a fingerprint collector from left to right (or from right to left) during fingerprint collection, the image collector shoots and collects fingerprint images when the finger rolls according to set frequency, and multiframe images collected during the rolling process of the finger of the user are spliced to obtain the complete fingerprints.
At present, when fingerprints are collected, the fingerprints are collected in a rolling mode generally according to a fixed frequency. However, the moving speed of the user's finger may change during the fingerprint collection process, and when the fingerprint collection is performed according to a fixed frequency, the fingerprint collection accuracy may be low because the complete fingerprint information of the user may not be obtained or too much redundant information may be collected.
Disclosure of Invention
The invention provides a fingerprint acquisition method, a fingerprint acquisition device, electronic equipment and a computer readable storage medium, and mainly aims to improve the accuracy of fingerprint acquisition.
In order to achieve the above object, the present invention provides a fingerprint acquisition method, including:
when the touch operation of a user finger is detected, capturing a fingerprint image of the user finger by using a preset initial shooting frequency;
counting the number of the captured fingerprint images in real time, and calculating the moving distance of the user finger according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value;
calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency;
searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
and when the touch operation is finished, sequentially splicing all the captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user.
Optionally, the calculating a moving distance of the user's finger from the continuously captured fingerprint images comprises:
arranging all the fingerprint images according to the sequence of the capturing time to obtain a fingerprint image sequence;
and calculating the distance between the first fingerprint image and the last fingerprint image in the fingerprint image sequence to obtain the moving distance.
Optionally, the calculating a distance between a first fingerprint image and a last fingerprint image in the fingerprint image sequence to obtain the moving distance includes:
acquiring all image contour coordinates in the first fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the first fingerprint image to obtain first target coordinates;
acquiring all image contour coordinates of the last fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the last fingerprint image to obtain second target coordinates;
and calculating the coordinate distance between the first target coordinate and the second target coordinate to obtain the moving distance.
Optionally, the calculating a coordinate distance between the first target coordinate and the second target coordinate to obtain the moving distance includes:
calculating the difference value of the abscissa between the first target coordinate and the second target coordinate to obtain an initial distance;
and executing absolute value taking operation on the initial distance to obtain the moving distance.
Optionally, the calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency includes:
calculating the time required from the capture of the first fingerprint image to the capture of the last fingerprint image according to the initial shooting frequency and the fingerprint of the fingerprint image sequence to obtain the moving time;
and calculating to obtain the moving speed according to the moving distance and the moving time.
Optionally, the calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency includes:
calculating the distance between every two continuously captured fingerprint images in the fingerprint image sequence to obtain a corresponding unit displacement distance;
calculating the unit speed for capturing every two continuously captured fingerprint images according to the initial shooting frequency and the unit displacement distance;
and carrying out weighted average on all the unit speeds to obtain the moving speed of the finger of the user.
Optionally, the searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, and updating the initial shooting frequency by using the searched shooting frequency includes:
selecting all shooting frequencies which are larger than the shooting frequency corresponding to the moving speed in the shooting frequency table to obtain a shooting frequency set;
and selecting the minimum value in the shooting frequency set to determine the initial shooting frequency after updating.
In order to solve the above problems, the present invention also provides a fingerprint acquisition apparatus, including:
the fingerprint acquisition module is used for capturing a fingerprint image of a user finger by using a preset initial shooting frequency when the touch operation of the user finger is detected;
the frequency adjusting module is used for counting the number of the captured fingerprint images in real time and calculating the moving distance of the user finger according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value; calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency; searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
and the fingerprint splicing module is used for sequentially splicing all captured fingerprint images according to the sequence of the capturing time when the touch operation is finished so as to obtain the target fingerprint image of the user.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and the processor executes the computer program stored in the memory to realize the fingerprint acquisition method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the fingerprint acquisition method described above.
When the touch operation of a user finger is detected, capturing a fingerprint image of the user finger by using a preset initial shooting frequency; counting the number of the captured fingerprint images in real time, and calculating the moving distance of the user finger according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value; calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency; searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency; and when the touch operation is finished, sequentially splicing all the captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user. Therefore, the fingerprint acquisition method, the fingerprint acquisition device, the electronic equipment and the readable storage medium provided by the embodiment of the invention improve the accuracy of fingerprint acquisition.
Drawings
Fig. 1 is a schematic flowchart of a fingerprint acquisition method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating a process of obtaining a moving distance in a fingerprint acquisition method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a fingerprint acquisition device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an internal structure of an electronic device implementing a fingerprint acquisition method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a fingerprint acquisition method. The execution subject of the fingerprint acquisition method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server, a terminal, and the like. In other words, the fingerprint collection method may be executed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to fig. 1, a schematic flow chart of a fingerprint acquisition method according to an embodiment of the present invention is shown, where in the embodiment of the present invention, the fingerprint acquisition method includes:
s1, when the touch operation of the user finger is detected, capturing the fingerprint image of the user finger by using a preset initial shooting frequency;
in the embodiment of the invention, the fingerprint image is the image of the finger of the user captured by the fingerprint collector when the user presses the surface of the fingerprint collector by the finger. The initial capture frequency may be a default value, such as 10 fingerprint images per second.
In one embodiment of the invention, when it is detected that a user finger touches the fingerprint collector, the fingerprint collector is triggered to capture a fingerprint image of the user finger by using a preset initial shooting frequency.
S2, counting the number of the captured fingerprint images in real time, and calculating the moving distance of the finger of the user according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value;
in detail, the embodiment of the present invention counts the number of the captured fingerprint images in real time, and determines whether the number of the fingerprint images is greater than or equal to a preset threshold.
Optionally, in the embodiment of the present invention, the preset threshold is 2, and only when the number of the captured fingerprint images is greater than or equal to 2, the distance moved by the finger may be calculated through a change of coordinates of pixel points of two fingerprint images. Further, in the embodiment of the present invention, because the fingerprint image is captured continuously, the continuously captured fingerprint image is dynamically increased as the fingerprint capturing process proceeds, and the moving distance is changed correspondingly as the captured fingerprint image changes.
Further, when the number of the fingerprint images is smaller than the preset threshold value, the embodiment of the present invention continues to capture the fingerprint image of the user finger by using the preset initial shooting frequency.
When the number of the fingerprint images is larger than or equal to the preset threshold, the embodiment of the invention calculates the moving distance of the finger of the user according to the continuously captured fingerprint images.
In one embodiment of the present invention, the calculating the moving distance of the user's finger according to the continuously captured fingerprint images includes:
arranging all the fingerprint images according to the sequence of the acquisition time to obtain a fingerprint image sequence;
and calculating the distance between the first fingerprint image and the last fingerprint image in the fingerprint image sequence to obtain the moving distance.
Referring to fig. 2, in an embodiment of the present invention, the calculating a distance between a first fingerprint image and a last fingerprint image in the fingerprint image sequence to obtain the moving distance includes:
s21, acquiring all image contour coordinates of the first fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the first fingerprint image to obtain first target coordinates;
in detail, in order to calculate a distance that a finger of a user rolls during fingerprint acquisition, in the embodiment of the present invention, a coordinate point on the leftmost side of a fingerprint profile of a first fingerprint image in the fingerprint image sequence may be used as a reference point. Further, in order to obtain a coordinate point on the leftmost side of the fingerprint contour in the first fingerprint image, in the embodiments of the present invention, an image contour coordinate with the smallest abscissa among all image contour coordinates of the first fingerprint image, that is, a coordinate point on the leftmost side of the fingerprint contour, is screened, so as to obtain a first target coordinate. Optionally, in the embodiment of the present invention, the image contour coordinate is an edge pixel coordinate of a fingerprint.
In another embodiment of the present invention, the coordinate point on the rightmost side of the fingerprint contour in the first fingerprint image may also be used as the reference point. Therefore, in order to obtain the coordinate point on the rightmost side of the fingerprint contour in the first fingerprint image, in the embodiment of the present invention, the image contour coordinate with the largest abscissa among all the image contour coordinates of the first fingerprint image, that is, the coordinate point on the rightmost side of the fingerprint contour, is screened, so as to obtain the first target coordinate.
S22, acquiring all image contour coordinates of the last fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the last fingerprint image to obtain second target coordinates;
in detail, in the embodiment of the present invention, the step B is the same as the specific operation method of the step a, and only the operation object is converted from the first fingerprint image to the last fingerprint image, which is not described in detail herein.
And S23, calculating the coordinate distance between the first target coordinate and the second target coordinate to obtain the moving distance.
In detail, in the embodiment of the present invention, a difference between abscissa coordinates of the first target coordinate and the second target coordinate is calculated to obtain an initial distance; and executing absolute value taking operation on the initial distance to obtain the moving distance.
S3, calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency;
in detail, in the embodiment of the present invention, the time required from the capture of the first fingerprint image to the capture of the last fingerprint image is calculated according to the initial shooting frequency and the fingerprint image sequence fingerprint, so as to obtain the moving time; and calculating to obtain the moving speed according to the moving distance and the moving time.
Optionally, in this embodiment of the present invention, the moving speed is obtained by dividing the moving distance by the moving time. For example: the movement distance is 3cm, the movement time is 0.1s, and the corresponding movement speed is 3/0.1=30 cm/s.
Further, in an embodiment of the present invention, calculating a time required from the capturing of the first fingerprint image to the capturing of the last fingerprint image to obtain the moving time includes:
converting the initial shooting frequency corresponding to the time from the second fingerprint image in the fingerprint image sequence to the time of capturing each fingerprint image in the last fingerprint image in the fingerprint image sequence into time to obtain corresponding fingerprint capturing time;
and calculating the movement time according to all the fingerprint capturing times.
For example: the second fingerprint image in the sequence of fingerprint images corresponds to an initial capture frequency of 5 images per second, and the corresponding fingerprint capture time 1/5=0.2s for the second fingerprint image.
In another embodiment of the present invention, in order to make the moving speed more representative, the calculating the moving speed according to the moving distance and the initial capturing frequency may further include:
step a: calculating the distance between every two continuously captured fingerprint images in all the captured fingerprint images to obtain the corresponding unit displacement distance;
for example: and the captured fingerprint images are sequentially A, B and C, and then the distance between the image A and the image B and the distance between the image B and the image C are calculated to obtain two unit displacement distances.
Step b: calculating the unit speed for capturing every two continuously captured fingerprint images according to the initial shooting frequency and the unit displacement distance;
in detail, the embodiment of the present invention calculates the initial shooting frequency corresponding to the next fingerprint image in every two continuously captured fingerprint images and converts the initial shooting frequency into time to obtain the corresponding image shooting time; and dividing the unit displacement distance by the image shooting time to obtain the unit speed.
For example: the two successively captured fingerprint images are image a and image B in sequence, the initial shooting frequency of image a is 5 pieces per second, then the time interval of the shooting acquisition of image a and image B is 0.2s, so the image shooting time is 0.2s, the unit displacement distance of image a and image B is 3cm, then the corresponding image displacement speed is 3/0.2=15 cm/s.
Step c: and carrying out weighted average on all the unit speeds to obtain the moving speed of the finger of the user.
In detail, in the embodiment of the present invention, the unit speed may be set to have different weight parameters for weighted average, so as to obtain the moving speed.
Optionally, in the embodiment of the present invention, the weighted average may be performed by using the following formula:
wherein,as the speed of the movement, it is,is a number of a unit speed,is unit velocityThe weight of (a) is determined,is unit velocity。
For example: in the embodiment of the present invention, when the unit velocities corresponding to the last two images in the fingerprint image sequence are selected as the moving velocity, the weight parameters of the unit velocities corresponding to the last two images in the fingerprint image sequence may be set as the total number of the unit velocities, the weights of the other unit velocities are set as 0, and the calculated moving velocity is the unit velocity corresponding to the last two images in the fingerprint image sequence and is used as the moving velocity.
Alternatively, the embodiment of the present invention may set different weights so as to determine an average, a median, a maximum, or a mode of all the unit speeds as the moving speed.
S4, searching the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, and updating the initial shooting frequency by using the searched shooting frequency;
in detail, in the embodiment of the present invention, the preset shooting frequency table is used to search for the shooting frequency corresponding to the moving speed, and the searched shooting frequency is used as the new initial shooting frequency.
In another embodiment of the present invention, if the shooting frequency of the fingerprint acquisition device cannot be adjusted at will and only has a few fixed frequency steps, the method searches for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, and updates the initial shooting frequency by using the searched shooting frequency, including:
step I, selecting all shooting frequencies which are larger than the shooting frequency corresponding to the moving speed in the shooting frequency table to obtain a shooting frequency set;
in the embodiment of the invention, the shooting frequency table is a data table of all the shooting frequencies supported by the fingerprint acquisition equipment.
And II, selecting the minimum value in the shooting frequency set and determining the minimum value as the updated initial shooting frequency.
For example: the shooting frequency set is 12 pieces per second, 13 pieces per second and 14 pieces per second, and then the shooting frequency of 12 pieces per second is used as the updated initial shooting frequency.
Furthermore, the initial shooting frequency is dynamically changed and updated through the moving speed, and the probability that fingerprint information collection is incomplete due to mismatching of the shooting frequency and the finger moving speed in the shooting collection time interval process is reduced.
S5, judging whether the touch operation is finished or not;
if the touch operation is not completed, the process returns to S1, and the fingerprint image of the user' S finger is captured using the updated initial photographing frequency.
And if the touch operation is finished, executing S6, and sequentially splicing all the captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user.
In detail, when the finger of the user leaves the surface of the fingerprint collector and is not in touch operation, the end of the fingerprint collection process of the user is indicated, so that all the captured fingerprint images are sequentially spliced according to the sequence of the capture time to obtain the target fingerprint image of the user.
In the embodiment of the invention, the capturing frequency corresponding to the fingerprint image is dynamically adjusted by calculating the moving speed of the finger of the user, so that the frequency corresponding to the captured fingerprint is not too low to cause that the complete fingerprint information of the user cannot be acquired, and the frequency corresponding to the captured fingerprint is not too high to cause that too much redundant information is acquired, the frequency corresponding to the captured fingerprint is matched with the moving speed of the finger of the user, and the efficiency and the accuracy of fingerprint acquisition are improved.
Fig. 3 is a functional block diagram of the fingerprint acquisition device of the present invention.
The fingerprint acquisition device 100 of the invention can be installed in an electronic device. According to the implemented functions, the fingerprint acquisition apparatus may include a fingerprint acquisition module 101, a frequency adjustment module 102, and a fingerprint concatenation module 103, which may also be referred to as a unit, and refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform fixed functions, and are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the fingerprint acquisition module 101 is configured to capture a fingerprint image of a user finger by using a preset initial shooting frequency when a touch operation of the user finger is detected;
in the embodiment of the invention, the fingerprint image is the image of the finger of the user captured by the fingerprint collector when the user presses the surface of the fingerprint collector by the finger. The initial capture frequency may be a default value, such as 10 fingerprint images per second.
In one embodiment of the invention, when it is detected that a user finger touches the fingerprint collector, the fingerprint collector is triggered to capture a fingerprint image of the user finger by using a preset initial shooting frequency.
The frequency adjustment module 102 is configured to count the number of the captured fingerprint images in real time, and calculate a moving distance of the user finger according to the continuously captured fingerprint images when the number is greater than or equal to a preset threshold; calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency; searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
in detail, in the embodiment of the present invention, the frequency adjustment module 102 counts the number of the captured fingerprint images in real time, and determines whether the number of the fingerprint images is greater than or equal to a preset threshold.
Optionally, in the embodiment of the present invention, the preset threshold is 2, and only when the number of the captured fingerprint images is greater than or equal to 2, the distance moved by the finger may be calculated through a change of coordinates of pixel points of two fingerprint images. Further, in the embodiment of the present invention, because the fingerprint image is captured continuously, the continuously captured fingerprint image is dynamically increased as the fingerprint capturing process proceeds, and the moving distance is changed correspondingly as the captured fingerprint image changes.
When the number of the fingerprint images is smaller than the preset threshold value, the frequency adjustment module 102 continues to capture the fingerprint image of the user finger by using the preset initial shooting frequency.
When the number of the fingerprint images is greater than or equal to the preset threshold, the frequency adjustment module 102 calculates the moving distance of the user finger according to the continuously captured fingerprint images.
In one embodiment of the present invention, the frequency adjustment module 102 calculates the moving distance of the finger of the user according to the continuously captured fingerprint images, including:
arranging all the fingerprint images according to the sequence of the acquisition time to obtain a fingerprint image sequence;
and calculating the distance between the first fingerprint image and the last fingerprint image in the fingerprint image sequence to obtain the moving distance.
In one embodiment of the present invention, the calculating the distance between the first fingerprint image and the last fingerprint image in the fingerprint image sequence by the frequency adjustment module 102 to obtain the moving distance includes:
acquiring all image contour coordinates of the first fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the first fingerprint image to obtain first target coordinates;
in detail, in order to calculate a distance that a finger of a user rolls during fingerprint acquisition, in the embodiment of the present invention, a coordinate point on the leftmost side of a fingerprint profile of a first fingerprint image in the fingerprint image sequence may be used as a reference point. Further, in order to obtain a coordinate point on the leftmost side of the fingerprint contour in the first fingerprint image, in the embodiments of the present invention, an image contour coordinate with the smallest abscissa among all image contour coordinates of the first fingerprint image, that is, a coordinate point on the leftmost side of the fingerprint contour, is screened, so as to obtain a first target coordinate. Optionally, in the embodiment of the present invention, the image contour coordinate is an edge pixel coordinate of a fingerprint.
In another embodiment of the present invention, the coordinate point on the rightmost side of the fingerprint contour in the first fingerprint image may also be used as the reference point. Therefore, in order to obtain the coordinate point on the rightmost side of the fingerprint contour in the first fingerprint image, in the embodiment of the present invention, the image contour coordinate with the largest abscissa among all the image contour coordinates of the first fingerprint image, that is, the coordinate point on the rightmost side of the fingerprint contour, is screened, so as to obtain the first target coordinate.
Acquiring all image contour coordinates of the last fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the last fingerprint image to obtain second target coordinates;
in detail, in the embodiment of the present invention, the step B is the same as the specific operation method of the step a, and only the operation object is converted from the first fingerprint image to the last fingerprint image, which is not described in detail herein.
And calculating the coordinate distance between the first target coordinate and the second target coordinate to obtain the moving distance.
In detail, in the embodiment of the present invention, a difference between abscissa coordinates of the first target coordinate and the second target coordinate is calculated to obtain an initial distance; and executing absolute value taking operation on the initial distance to obtain the moving distance.
In detail, in this embodiment of the present invention, the frequency adjustment module 102 calculates a time required from capturing a first fingerprint image to capturing a last fingerprint image according to the initial shooting frequency and the fingerprint image sequence fingerprint, so as to obtain a moving time; and calculating to obtain the moving speed according to the moving distance and the moving time.
Optionally, in this embodiment of the present invention, the moving speed is obtained by dividing the moving distance by the moving time. For example: the movement distance is 3cm, the movement time is 0.1s, and the corresponding movement speed is 3/0.1=30 cm/s.
Further, in an embodiment of the present invention, the frequency adjustment module 102 calculates a time required from the capturing of the first fingerprint image to the capturing of the last fingerprint image, and obtains the moving time, including:
converting the initial shooting frequency corresponding to the time from the second fingerprint image in the fingerprint image sequence to the time of capturing each fingerprint image in the last fingerprint image in the fingerprint image sequence into time to obtain corresponding fingerprint capturing time;
and calculating the movement time according to all the fingerprint capturing times.
For example: the second fingerprint image in the sequence of fingerprint images corresponds to an initial capture frequency of 5 images per second, and the corresponding fingerprint capture time 1/5=0.2s for the second fingerprint image.
In another embodiment of the present invention, in order to make the moving speed more representative, the frequency adjustment module 102 may calculate the moving speed according to the moving distance and the initial shooting frequency, and further include:
step a: calculating the distance between every two continuously captured fingerprint images in all the captured fingerprint images to obtain the corresponding unit displacement distance;
for example: and the captured fingerprint images are sequentially A, B and C, and then the distance between the image A and the image B and the distance between the image B and the image C are calculated to obtain two unit displacement distances.
Step b: calculating the unit speed for capturing every two continuously captured fingerprint images according to the initial shooting frequency and the unit displacement distance;
in detail, in the embodiment of the present invention, the frequency adjustment module 102 calculates the initial shooting frequency corresponding to the next fingerprint image in each two continuously captured fingerprint images and converts the initial shooting frequency into time, so as to obtain corresponding image shooting time; and dividing the unit displacement distance by the image shooting time to obtain the unit speed.
For example: the two successively captured fingerprint images are image a and image B in sequence, the initial shooting frequency of image a is 5 pieces per second, then the time interval of the shooting acquisition of image a and image B is 0.2s, so the image shooting time is 0.2s, the unit displacement distance of image a and image B is 3cm, then the corresponding image displacement speed is 3/0.2=15 cm/s.
Step c: and carrying out weighted average on all the unit speeds to obtain the moving speed of the finger of the user.
In detail, in the embodiment of the present invention, the unit speed may be set to have different weight parameters for weighted average, so as to obtain the moving speed.
Optionally, in the embodiment of the present invention, the weighted average may be performed by using the following formula:
wherein,as the speed of the movement, it is,is a number of a unit speed,is unit velocityThe weight of (a) is determined,is unit velocity。
For example: in the embodiment of the present invention, when the frequency adjustment module 102 selects the unit velocities corresponding to the last two images in the fingerprint image sequence as the moving velocity, the weight parameter of the unit velocity corresponding to the last two images in the fingerprint image sequence may be set as the total number of the unit velocities, the weights of the other unit velocities are set as 0, and the calculated moving velocity is the unit velocity corresponding to the last two images in the fingerprint image sequence as the moving velocity.
Alternatively, the embodiment of the present invention may set different weights so as to determine an average, a median, a maximum, or a mode of all the unit speeds as the moving speed.
In detail, in the embodiment of the present invention, the frequency adjustment module 102 searches for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, and uses the searched shooting frequency as the new initial shooting frequency.
In another embodiment of the present invention, if the shooting frequency of the fingerprint acquisition device cannot be adjusted at will and only has a few fixed frequency steps, the frequency adjustment module 102 searches for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, and updates the initial shooting frequency by using the searched shooting frequency, including:
step I, selecting all shooting frequencies which are larger than the shooting frequency corresponding to the moving speed in the shooting frequency table to obtain a shooting frequency set;
in the embodiment of the invention, the shooting frequency table is a data table of all the shooting frequencies supported by the fingerprint acquisition equipment.
And II, selecting the minimum value in the shooting frequency set and determining the minimum value as the updated initial shooting frequency.
For example: the shooting frequency set is 12 pieces per second, 13 pieces per second and 14 pieces per second, and then the shooting frequency of 12 pieces per second is used as the updated initial shooting frequency.
Furthermore, the initial shooting frequency is dynamically changed and updated through the moving speed, and the probability that fingerprint information collection is incomplete due to mismatching of the shooting frequency and the finger moving speed in the shooting collection time interval process is reduced.
The fingerprint stitching module 103 is configured to, when the touch operation is finished, sequentially stitch all captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user.
If the touch operation is not finished, returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
if the touch operation is finished, the fingerprint stitching module 103 sequentially stitches all captured fingerprint images according to the sequence of the capturing time to obtain the target fingerprint image of the user.
In detail, when the finger of the user leaves the surface of the fingerprint collector and is not performing the touch operation, it indicates that the fingerprint collection process of the user is finished, and therefore, the fingerprint stitching module 103 sequentially stitches all captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user.
Fig. 4 is a schematic structural diagram of an electronic device implementing the fingerprint acquisition method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a fingerprint acquisition program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a fingerprint acquisition program, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., fingerprint acquisition programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication bus 12 may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
Fig. 4 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 4 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Optionally, the communication interface 13 may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further include a user interface, which may be a Display (Display), an input unit (such as a Keyboard (Keyboard)), and optionally, a standard wired interface, or a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The fingerprint acquisition program stored in the memory 11 of the electronic device is a combination of computer programs, which when executed in the processor 10, enable:
when the touch operation of a user finger is detected, capturing a fingerprint image of the user finger by using a preset initial shooting frequency;
counting the number of the captured fingerprint images in real time, and calculating the moving distance of the user finger according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value;
calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency;
searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
and when the touch operation is finished, sequentially splicing all the captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable medium may be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
when the touch operation of a user finger is detected, capturing a fingerprint image of the user finger by using a preset initial shooting frequency;
counting the number of the captured fingerprint images in real time, and calculating the moving distance of the user finger according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value;
calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency;
searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
and when the touch operation is finished, sequentially splicing all the captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user.
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A fingerprint acquisition method, the method comprising:
when the touch operation of a user finger is detected, capturing a fingerprint image of the user finger by using a preset initial shooting frequency;
counting the number of the captured fingerprint images in real time, and calculating the moving distance of the user finger according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value;
calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency;
searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
and when the touch operation is finished, sequentially splicing all the captured fingerprint images according to the sequence of the capture time to obtain the target fingerprint image of the user.
2. The fingerprint acquisition method of claim 1, wherein the calculating the moving distance of the user's finger from the continuously captured fingerprint images comprises:
arranging all the fingerprint images according to the sequence of the capturing time to obtain a fingerprint image sequence;
and calculating the distance between the first fingerprint image and the last fingerprint image in the fingerprint image sequence to obtain the moving distance.
3. The fingerprint acquisition method of claim 2, wherein said calculating a distance between a first fingerprint image and a last fingerprint image in said sequence of fingerprint images to obtain said movement distance comprises:
acquiring all image contour coordinates in the first fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the first fingerprint image to obtain first target coordinates;
acquiring all image contour coordinates of the last fingerprint image, and screening image contour coordinates corresponding to extreme values in horizontal coordinates in all image contour coordinates of the last fingerprint image to obtain second target coordinates;
and calculating the coordinate distance between the first target coordinate and the second target coordinate to obtain the moving distance.
4. The fingerprint acquisition method of claim 3, wherein said calculating a coordinate distance between said first target coordinate and said second target coordinate to obtain said movement distance comprises:
calculating the difference value of the abscissa between the first target coordinate and the second target coordinate to obtain an initial distance;
and executing absolute value taking operation on the initial distance to obtain the moving distance.
5. The fingerprint acquisition method as claimed in claim 2, wherein said calculating the moving speed of the user's finger according to the moving distance and the initial photographing frequency comprises:
calculating the time required from the capture of the first fingerprint image to the capture of the last fingerprint image according to the initial shooting frequency and the fingerprint of the fingerprint image sequence to obtain the moving time;
and calculating to obtain the moving speed according to the moving distance and the moving time.
6. The fingerprint acquisition method according to claim 2, wherein said calculating the moving speed of the user's finger according to the moving distance and the initial photographing frequency comprises:
calculating the distance between every two continuously captured fingerprint images in the fingerprint image sequence to obtain a corresponding unit displacement distance;
calculating the unit speed for capturing every two continuously captured fingerprint images according to the initial shooting frequency and the unit displacement distance;
and carrying out weighted average on all the unit speeds to obtain the moving speed of the finger of the user.
7. The fingerprint acquisition method according to any one of claims 1 to 6, wherein the searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, and updating the initial shooting frequency by using the searched shooting frequency comprises:
selecting all shooting frequencies which are larger than the shooting frequency corresponding to the moving speed in the shooting frequency table to obtain a shooting frequency set;
and selecting the minimum value in the shooting frequency set to determine the initial shooting frequency after updating.
8. A fingerprint acquisition device, the device comprising:
the fingerprint acquisition module is used for capturing a fingerprint image of a user finger by using a preset initial shooting frequency when the touch operation of the user finger is detected;
the frequency adjusting module is used for counting the number of the captured fingerprint images in real time and calculating the moving distance of the user finger according to the continuously captured fingerprint images when the number is larger than or equal to a preset threshold value; calculating the moving speed of the user finger according to the moving distance and the initial shooting frequency; searching for the shooting frequency corresponding to the moving speed by using a preset shooting frequency table, updating the initial shooting frequency by using the searched shooting frequency, and returning to the step of capturing the fingerprint image of the user finger by using the preset initial shooting frequency;
and the fingerprint splicing module is used for sequentially splicing all captured fingerprint images according to the sequence of the capturing time when the touch operation is finished so as to obtain the target fingerprint image of the user.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the fingerprint acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the fingerprint acquisition method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111259657.6A CN113705545A (en) | 2021-10-28 | 2021-10-28 | Fingerprint acquisition method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111259657.6A CN113705545A (en) | 2021-10-28 | 2021-10-28 | Fingerprint acquisition method and device, electronic equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113705545A true CN113705545A (en) | 2021-11-26 |
Family
ID=78647230
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111259657.6A Pending CN113705545A (en) | 2021-10-28 | 2021-10-28 | Fingerprint acquisition method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113705545A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102905079A (en) * | 2012-10-16 | 2013-01-30 | 北京小米科技有限责任公司 | Method, device and mobile terminal for panorama shooting |
CN104376299A (en) * | 2014-10-16 | 2015-02-25 | 北京集创北方科技有限公司 | Fingerprint recognition sensor |
CN106022049A (en) * | 2016-05-24 | 2016-10-12 | 广东欧珀移动通信有限公司 | Screen unlocking method of electronic terminal and electronic terminal |
US20200026900A1 (en) * | 2017-05-03 | 2020-01-23 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for fingerprint collection and related products |
-
2021
- 2021-10-28 CN CN202111259657.6A patent/CN113705545A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102905079A (en) * | 2012-10-16 | 2013-01-30 | 北京小米科技有限责任公司 | Method, device and mobile terminal for panorama shooting |
CN104376299A (en) * | 2014-10-16 | 2015-02-25 | 北京集创北方科技有限公司 | Fingerprint recognition sensor |
CN106022049A (en) * | 2016-05-24 | 2016-10-12 | 广东欧珀移动通信有限公司 | Screen unlocking method of electronic terminal and electronic terminal |
US20200026900A1 (en) * | 2017-05-03 | 2020-01-23 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for fingerprint collection and related products |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111932482B (en) | Method and device for detecting target object in image, electronic equipment and storage medium | |
CN112446919A (en) | Object pose estimation method and device, electronic equipment and computer storage medium | |
CN108781252B (en) | Image shooting method and device | |
CN103353881B (en) | Method and device for searching application | |
CN112137591B (en) | Target object position detection method, device, equipment and medium based on video stream | |
CN111476225B (en) | In-vehicle human face identification method, device, equipment and medium based on artificial intelligence | |
CN112528908B (en) | Living body detection method, living body detection device, electronic equipment and storage medium | |
CN113920117B (en) | Panel defect area detection method and device, electronic equipment and storage medium | |
CN114241338A (en) | Building measuring method, device, equipment and storage medium based on image recognition | |
CN114693678B (en) | Intelligent detection method and device for workpiece quality | |
JPWO2015136709A1 (en) | Image processing apparatus, image sensor, and image processing method | |
CN110505397B (en) | Camera selection method, device and computer storage medium | |
CN112183431A (en) | Real-time pedestrian number statistical method and device, camera and server | |
CN112784102B (en) | Video retrieval method and device and electronic equipment | |
CN111353063B (en) | Picture display method, device and storage medium | |
CN113705545A (en) | Fingerprint acquisition method and device, electronic equipment and readable storage medium | |
CN111651625A (en) | Image retrieval method, image retrieval device, electronic equipment and storage medium | |
CN115289991B (en) | Subway track deformation monitoring method and device and electronic equipment | |
CN111460293A (en) | Information pushing method and device and computer readable storage medium | |
CN113901898A (en) | Image stable sampling method, device, equipment and medium in face recognition scene | |
CN113935663A (en) | Equipment combination analysis method, device, equipment and medium for panel product | |
CN113610934A (en) | Image brightness adjusting method, device, equipment and storage medium | |
CN112084092A (en) | Method, device, equipment and storage medium for determining diagnosis rule | |
CN111712833B (en) | Method and device for screening local feature points | |
CN114005148A (en) | Biological characteristic acquisition method, device, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211126 |