The invention generally relates to technology for recognizing a finger, and more particularly, to technology for recognizing a finger and a non-finger object according to Haar-like features.
Electronic devices that have the function of fingerprint recognition are popular on the market. Before performing fingerprint recognition, in order to prevent a false trigger by a non-finger object, the electronic device may determine whether the object placed on the fingerprint sensing device is a finger. In the conventional method for determining whether the object placed on the fingerprint sensing device is a finger, the electronic device determines whether the object placed on the fingerprint sensing device is a finger according to the number of shade variations of the lines in the image. When the number of shade variations of the lines is great, it means that the textures of the object are full of variety, and the electronic device may therefore determine that the object is a finger. However, when the method is applied to a water droplet or a wet finger, errors in judgment may easily occur.
A method and electronic device for recognizing a finger and a non-finger object according to Haar-like features are provided.
An embodiment of the invention provides a method for recognizing a finger. The method is applied to an electronic device which comprises a fingerprint sensing device. The method comprises the steps of sensing a recognized object placed on the fingerprint sensing device to generate a frame; selecting at least one block from the frame, wherein each of the blocks comprises a plurality of block groups; calculating a sequence of characteristic values corresponding to each of the block groups according to a plurality of Haar-like features; and respectively substituting the sequence of characteristic values corresponding to each of the block groups into a polynomial to determine whether the recognized object placed on the fingerprint sensing device is a finger.
An embodiment of the invention provides an electronic device. The electronic device comprises a fingerprint sensing device and a processor. The fingerprint sensing device senses a recognized object placed on the fingerprint sensing device to generate a frame. The processor is coupled to the fingerprint sensing device. The processor selects at least one block from the frame, wherein each of the blocks comprises a plurality of block groups, calculates a sequence of characteristic values corresponding to each of the block groups according to a plurality of Haar-like features, and substitutes the sequence of characteristic values corresponding to each of the block groups into a polynomial respectively to determine whether the recognized object placed on the fingerprint sensing device is a finger.
Other aspects and features of the invention will become apparent to those with ordinary skill in the art upon review of the following descriptions of specific embodiments of methods and devices.
The invention will become more fully understood by referring to the following detailed description with reference to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
In the embodiments of the invention, the fingerprint sensing device 110 may be a sensing chip, but the invention should not be limited thereto. The fingerprint sensing device 110 may comprise a sensing array, and the sensing array comprises a plurality of sensing units arranged in two dimensions and each of the sensing units corresponds to a pixel.
According to the embodiments of the invention, a polynomial P and a first threshold are stored in the storage device 130 in advance. The Haar-like features are image features used for object recognition, and they comprise a plurality of types of image features. According to the embodiments of the invention, some common and representative types of Haar-like features (e.g. 6 types of Haar-like features) may be selected in advance, and the selected Haar-like features may be stored in the storage device 130. The polynomial P is expressed as:
P=f
0
w
0
+f
1
w
1
+f
2
w
2
+f
3
w
3
+f
4
w
4
+f
5
w
5,
wherein w0, w1, w2, w3, w4 and w5 are constants, and they are calculated and obtained through the Support Vector Machine (SVM) and respectively represent the weights of the 6 selected types of Haar-like features; and f0, f1, f2, f3, f4 and f5 are variables and respectively represent the characteristic values corresponding to the 6 selected types of Haar-like features.
According to the embodiments of the invention, in order to generate the polynomial P, the weights w0, w1, w2, w3, w4 and w5 and the first threshold, the data of a representative fingerprint database (e.g. 50 thousand block groups of fingerprint, wherein each of the block groups comprises 6×6 pixels) and the data of a representative water-stain database (e.g. 50 thousand block groups of water stain, wherein each of the block groups comprises 6×6 pixels) may respectively be input into the Support Vector Machine (SVM). Specifically, the 50 thousand sequences of characteristic values [f0, f1, f2, f3, f4, f5] corresponding to the 50 thousand block groups of fingerprint and the 50 thousand sequences of characteristic values [f0, f1, f2, f3, f4, f5] corresponding to the 50 thousand block groups of water-stain will be substituted into the polynomial P to calculate and obtain the weights w0, w1, w2, w3, w4 and w5 respectively corresponding to the 6 selected types of Haar-like features and calculate and obtain the first threshold through a machine learning method (e.g. SVM algorithm). The method for generating the sequence of characteristic values [f0, f1, f2, f3, f4, f5] corresponding to each of the block groups will be illustrated below. It should be noted that the form of the polynomial P is not limited to the polynomial shown above. The polynomial P may be different according to the different numbers of selected types of Haar-like features.
According to the embodiments of the invention, when the fingerprint sensing device 110 senses an object placed on the fingerprint sensing device 110, the fingerprint sensing device 110 may sense the object and generate a frame F corresponding to the object. The frame F has X×Y pixels.
In an embodiment of the invention, after the processor 120 obtains the frame F, the processor 120 may select at least one block B from the frame F.
Each of the blocks B may comprise a plurality of sub-blocks Sub-B, and each of the sub-blocks Sub-B is one pixel. Each of the blocks B may be an M×M pixel matrix, wherein M is an even number, and M≥4. That is to say, each of the blocks B may comprise M×M sub-blocks Sub-B. In addition, the processor 120 may divide the M×M sub-blocks Sub-B into a plurality of block groups GB. Each of the block groups GB may be an N×N pixel matrix, i.e. each of the block groups GB may comprise N×N sub-blocks Sub-B, wherein N=M/2 or M/3. For example, if a block B comprises 4×4 sub-blocks Sub-B, the block B may comprise 4 block groups GB which respectively comprise 2×2 sub-blocks Sub-B. If a block B comprises 18×18 sub-blocks Sub-B, the block B may comprise 9 block groups GB which respectively comprise 6×6 sub-blocks Sub-B.
According to the embodiments of the invention, the processor 120 may calculate the sequence of characteristic values of each of the block groups GB according to a plurality of Haar-like features. The Haar-like features are image features used for object recognition, and they comprise a plurality of types of image features. For example, the types of Haar-like features may comprise types of edge features (e.g. Haar-like features H1 and H2 shown in
Referring to
In the embodiment of the invention, when the processor 120 determines whether the recognized object placed on the fingerprint sensing device is a finger, the processor may obtain a first determination result of each of the blocks B of the recognized object. In order to obtain the first determination result, the processor 120 may calculate a second determination result corresponding to each of the block groups GB of the block B first. In order to obtain the second determination result, after the processor 120 calculates the sequence of characteristic values [f0, f1, f2, f3, f4, f5] of the block group GB, the processor 120 will substitute the sequence of characteristic values [f0, f1, f2, f3, f4, f5] into the polynomial P to generate the second determination result corresponding to the block group GB. Accordingly, the processor 120 may substitute the sequence of characteristic values [f0, f1, f2, f3, f4, f5] corresponding to each of the block groups GB into the polynomial P to generate the second determination result corresponding to the block group GB to determine whether the block group GB corresponds to a finger. The details are illustrated below.
In an embodiment of the invention, the processor 120 may determine whether the second determination result corresponding to a block group GB is smaller than the first threshold. When the second determination result is smaller than the first threshold, the processor 120 may determine that the block group GB corresponding to the second determination result corresponds to a finger. When the second determination result is greater than or equal to the first threshold, the processor 120 may determine that the block group GB corresponding to the second determination result corresponds to a non-finger object. For example, if the first threshold is 1000, when the determination result corresponding to the block group GB is 500, the processor 120 may determine that the block group GB corresponds to a finger. If the first threshold is 1000, when the determination result corresponding to the block group GB is 1200, the processor 120 may determine that the block group GB corresponds to a non-finger object.
In an embodiment of the invention, when in a block B, the number of block groups GB which are determined to correspond to a finger is greater than or equal to a second threshold, the processor 120 may determine that the block B corresponds to the finger. When in the block B, the number of block groups GB which are determined to correspond to a finger is smaller than the second threshold, the processor 120 may determine that the block B corresponds to a non-finger object. Taking
In another embodiment of the invention, when in a block B, the number of block groups GB which are determined to correspond to a finger is greater than or equal to the number of block groups GB which are determined to correspond to a non-finger object, the processor 120 may determine that the block B corresponds to the finger. When in a block B, the number of block groups GB which are determined to correspond to a finger is smaller than the number of block groups GB which are determined to correspond to a non-finger object, the processor 120 may determine that the block B corresponds to a non-finger object.
In an embodiment of the invention, when in a frame F, the number of blocks B which are determined to correspond to a finger (i.e. the first determination result) is greater than or equal to a third threshold, the processor 120 may determine that the recognized object placed on the fingerprint sensing device 110 is a finger. When in a frame F, the number of blocks B which are determined to correspond to a finger (i.e. the first determination result) is smaller than a third threshold, the processor 120 may determine that the recognized object placed on the fingerprint sensing device 110 is a non-finger object. Taking
In another embodiment of the invention, when the first determination result (i.e. the number of the blocks B which are determined to correspond to a finger in the frame F) is greater than or equal to the number of the blocks B which are determined to correspond to a non-finger object in the frame F, the processor 120 may determine that the recognized object placed on the fingerprint sensing device 110 is a finger. When the first determination result (i.e. the number of the blocks B which are determined to correspond to a finger in the frame F) is smaller than the number of blocks B which are determined to correspond to a non-finger object in the frame F, the processor 120 may determine that the recognized object placed on the fingerprint sensing device 110 is a non-finger.
In another embodiment of the invention, when all of the blocks B in a half (e.g. left half, right half, upper half or lower half) of the frame F are determined to correspond to a finger, the processor 120 may determine that the recognized object placed on the fingerprint sensing device 110 is a finger. For example, when all of the blocks B in the left half of the frame F are determined to correspond to a finger, the processor 120 may determine that the recognized object placed on the fingerprint sensing device 110 is a finger.
In step S525, the electronic device 100 determines whether the second determination result is smaller than a first threshold. When the second determination result is smaller than the first threshold, step S530 is performed. In step S530, the electronic device 100 determines that the block group corresponding to the second determination result corresponds to a finger. When the second determination result is greater than or equal to the first threshold, step S535 is performed. In step S535, the electronic device 100 determines that the block group corresponding to the second determination result corresponds to a non-finger object.
In step S540, the electronic device 100 determines whether the number of block groups which are determined to correspond to a finger is greater than or equal to a second threshold in each of the blocks. When the number of block groups which are determined to correspond to a finger is greater than or equal to the second threshold, step S545 is performed. In step S545, the electronic device 100 determines that the block corresponds to a finger. When the number of block groups which are determined to correspond to a finger is smaller than the second threshold, step S550 is performed. In step S550, the electronic device 100 determines that the block corresponds to a non-finger object.
In another embodiment of the invention, in step S540, the electronic device 100 determines whether the number of block groups which are determined to correspond to a finger is greater than or equal to the number of block groups which are determined to correspond to a non-finger object in each of the blocks. When the number of block groups which are determined to correspond to a finger is greater than or equal to the number of block groups which are determined to correspond to a non-finger object, the electronic device 100 may determine that the block corresponds to a finger. When the number of block groups which are determined to correspond to a finger is smaller than the number of block groups which are determined to correspond to a non-finger object, the electronic device 100 may determine that the block corresponds to a non-finger object.
In step S555, the electronic device 100 determines whether the number of blocks which are determined to correspond to a finger (referred to as a first determination result below) is greater than or equal to a third threshold. When the first determination result is greater than or equal to the third threshold, step S560 is performed. In step S560, the electronic device 100 determines that the recognized object is a finger. When the first determination result is smaller than the third threshold, step S565 is performed. In step S565, the electronic device 100 determines that the recognized object is a non-finger object.
In another embodiment of the invention, in step S555, the electronic device 100 determines whether the number of blocks which are determined to correspond to a finger (referred to as a first determination result below) is greater than or equal to the number of blocks which are determined to correspond to a non-finger object. When the number of blocks which are determined to correspond to a finger is greater than or equal to the number of blocks which are determined to correspond to a non-finger object, the electronic device 100 determines that the recognized object is a finger. When the number of blocks which are determined to correspond to a finger is smaller than the number of blocks which are determined to correspond to a non-finger object, the electronic device 100 determines that the recognized object is a non-finger object.
In another embodiment of the invention, in step S555, the electronic device 100 determines whether the blocks in a half of the frame are all determined to correspond to a finger. When the blocks in a half of the frame are all determined to correspond to a finger, the electronic device 100 may determine that the recognized object is a finger (S560). Otherwise, the electronic device 100 may determine that the recognized object is a non-finger object (S565).
The method and electronic device for recognizing a finger provided in the embodiments of the invention can prevent the false trigger caused by a non-finger object when the non-finger object (e.g. water droplet) is placed on the fingerprint sensing device 110. The method and electronic device for recognizing a finger provided in the embodiments of the invention also can prevent the error judgment occurring when a wet finger is placed on the fingerprint sensing device 110. Therefore, the method and electronic device for recognizing a finger provided in the embodiments of the invention can increase the accuracy for recognizing a finger and a non-finger object.
The steps of the method described in connection with the aspects disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module (e.g., including executable instructions and related data) and other data may reside in a data memory such as RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of computer-readable storage medium known in the art. A sample storage medium may be coupled to a machine such as, for example, a computer/processor (which may be referred to herein, for convenience, as a “processor”) such that the processor can read information (e.g., code) from and write information to the storage medium. A sample storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in user equipment. Alternatively, the processor and the storage medium may reside as discrete components in user equipment. Moreover, in some aspects any suitable computer-program product may comprise a computer-readable medium comprising codes relating to one or more of the aspects of the disclosure. In some aspects a computer program product may comprise packaging materials.
Reference throughout this specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention, but do not denote that they are present in every embodiment. Thus, the appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily referring to the same embodiment of the invention.
The above paragraphs describe many aspects. Obviously, the teaching of the invention can be accomplished by many methods, and any specific configurations or functions in the disclosed embodiments only present a representative condition. Those who are skilled in this technology will understand that all of the disclosed aspects in the invention can be applied independently or be incorporated.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. Those who are skilled in this technology can still make various alterations and modifications without departing from the scope and spirit of this invention. Therefore, the scope of the present invention shall be defined and protected by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
201710647877.3 | Aug 2017 | CN | national |
This application claims priority of Provisional Patent Application No. 62/444,959 filed on Jan. 11, 2017, and CN Patent Application No. 201710647877.3 filed on Aug. 1, 2017, the entirety of which is incorporated by reference herein.
Number | Date | Country | |
---|---|---|---|
62444959 | Jan 2017 | US |