Fingerprint module detection method, device and terminal equipment
By detecting and correcting bad spots in fingerprint module images, the security risks and user experience issues caused by module defects are resolved, thereby improving security and reliability.
Patent Information
- Application Number
- CN202211430253.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-11-15
AI Technical Summary
Fingerprint modules are prone to defects during manufacturing and use, leading to security risks and a decline in user experience. Existing technologies are unable to effectively detect and repair these defects.
By acquiring images from the fingerprint module, bad pixels are detected and their distribution is assessed to determine if it meets the correction criteria. If it does, correction is performed; otherwise, the module is prompted for replacement. Specific methods include removing first and second-class bad pixels, determining the density, continuity, and distance of bad pixels, and using the grayscale values of normal pixels for correction.
This improves the security and user experience of fingerprint module unlocking terminals, allowing for timely repair or replacement of modules and avoiding misidentification and security risks.
Smart Images

Figure CN115995036B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of display technology, and in particular to a method, apparatus and terminal device for detecting fingerprint modules. Background Technology
[0002] Currently, fingerprint unlocking terminal devices are being used in more and more scenarios. However, fingerprint modules that support fingerprint unlocking inevitably have various defects during the manufacturing and use process. For example, the fingerprint module may be damaged due to collisions, or the fingerprint unlocking may fail or the false recognition rate and false rejection rate may increase as the fingerprint module is used for more years. This not only poses security risks but also affects the user experience. Summary of the Invention
[0003] This invention provides a method, apparatus, and terminal device for detecting fingerprint modules to address the shortcomings of related technologies.
[0004] According to a first aspect of the present invention, a method for detecting a fingerprint module is provided, applied to a terminal device, wherein a fingerprint module is disposed under the display screen of the terminal device, the method comprising:
[0005] Acquire the image captured by the fingerprint module;
[0006] Detect bad pixels in the image;
[0007] Determine whether the distribution of bad pixels in the image meets the correction conditions;
[0008] If the distribution of bad pixels meets the correction conditions, then the bad pixels in the image are corrected; otherwise, a first prompt message is sent, which prompts the replacement of the fingerprint module.
[0009] In any embodiment, the image acquired by the fingerprint module includes at least one of the following:
[0010] The fingerprint image captured by the fingerprint module;
[0011] The fingerprint module captures an image of the display screen area in a highlighted state.
[0012] In any embodiment, the bad pixels include a first type of bad pixels and / or a second type of bad pixels, wherein the first type of bad pixels includes pixels with a gray value equal to a set gray value, and the second type of bad pixels includes pixels in any sub-region of the image whose gray value and the relationship between the gray value and the mean and standard deviation of the gray value of the sub-region meet a set requirement, wherein the set requirement is determined according to the size of the sub-region.
[0013] In any embodiment, when the image includes a fingerprint image acquired by a fingerprint module, the detection of bad spots in the image includes:
[0014] Remove the first type of bad pixels from the fingerprint image;
[0015] Determine the grayscale mean and standard deviation of the fingerprint image;
[0016] Pixels in the fingerprint image whose grayscale mean and standard deviation meet the set requirements are identified as second-type bad pixels, wherein the set requirements are determined based on the size of the fingerprint image.
[0017] In any embodiment, when the image includes an image of a bright display area captured by the fingerprint module, detecting dead pixels in the image includes:
[0018] Remove first-type dead pixels from the image in the display screen area;
[0019] In the image of the display screen area, a sub-region is slid with a set step size, for the sub-region during the sliding process:
[0020] Determine the mean and standard deviation of the grayscale values of the sub-region;
[0021] Pixels in the sub-region whose relationship with the mean gray value and standard deviation of the sub-region meets the set requirements are identified as second-type bad pixels.
[0022] In any embodiment, determining whether the distribution of bad pixels in the image meets the correction conditions includes:
[0023] Using any one defective pixel as the center, obtain the number of consecutive defective pixels within a specified area, where the specified area includes a set number of pixels;
[0024] If the number of bad pixels exceeds a threshold, it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0025] In any embodiment, determining whether the distribution of bad pixels in the image meets the correction conditions includes:
[0026] Obtain the distance between any two non-contiguous bad pixels in the image;
[0027] If the distance is less than a distance threshold, it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0028] In any embodiment, obtaining the distance between any two non-contiguous bad pixels in the image includes:
[0029] For any bad pixel in the image, obtain the bad pixels that are continuous with the bad pixel and merge them;
[0030] Obtain the distance between any two merged bad pixels in the image.
[0031] In any embodiment, determining whether the distribution of bad pixels in the image meets the correction conditions includes:
[0032] Obtain the density of bad pixels in any sub-region of the image;
[0033] If the density is greater than the density threshold, it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0034] In any embodiment, the correction of bad pixels in the image includes at least one of the following:
[0035] Update the grayscale value of the defective pixel based on the grayscale value of the normal pixels adjacent to the defective pixel;
[0036] The grayscale value of the defective pixel is updated based on the average grayscale value of the normal pixels in the correction region centered on the defective pixel, wherein the size of the correction region is determined according to the pixel size.
[0037] In any embodiment, after correcting the bad pixels in the image, the method further includes:
[0038] Detect bad pixels in the corrected image;
[0039] If the number of bad pixels detected exceeds the set value, a second prompt message is sent, which prompts the fingerprint module to be replaced.
[0040] According to a second aspect of the present invention, a fingerprint module detection device is provided, applied to a terminal device, wherein a fingerprint module is disposed under the display screen of the terminal device, the device comprising:
[0041] The acquisition unit is used to acquire the image collected by the fingerprint module;
[0042] A detection unit is used to detect bad pixels in the image;
[0043] The judgment unit is used to determine whether the distribution of bad pixels in the image meets the correction conditions. If the distribution of bad pixels meets the correction conditions, the bad pixels in the image are corrected; otherwise, a first prompt message is sent to prompt the replacement of the fingerprint module.
[0044] According to a third aspect of the present invention, a terminal device is provided, the terminal device including a display screen, a fingerprint module disposed under the display screen, and the fingerprint module being detected using the method described in any one of the preceding embodiments.
[0045] As can be seen from the above embodiments, by acquiring images collected by the fingerprint module, detecting bad pixels in the images; determining whether the distribution of bad pixels in the images meets the correction conditions; if the distribution of bad pixels meets the correction conditions, then the bad pixels in the images are corrected; otherwise, a first prompt message for prompting the replacement of the fingerprint module is sent. This can detect whether the fingerprint module has bad pixels, whether the bad pixels can be corrected if they are present, and if they can be corrected, then they are corrected in a timely manner. If they cannot be corrected, the user is promptly prompted to replace the fingerprint module. By promptly correcting and repairing bad pixels or promptly reminding the user to replace the fingerprint module, the security of unlocking terminal devices using the fingerprint module can be improved.
[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0048] Figure 1 This is a flowchart illustrating a fingerprint module detection method according to an embodiment of the present invention.
[0049] Figure 2 This is a schematic diagram illustrating the sliding of a sub-region during the detection process according to an embodiment of the present invention.
[0050] Figure 3 This is a flowchart illustrating defect detection according to an embodiment of the present invention.
[0051] Figure 4 This is a schematic diagram of continuous dead pixels according to an embodiment of the present invention.
[0052] Figure 5 This is a schematic diagram illustrating the determination of defect categories according to an embodiment of the present invention.
[0053] Figure 6 This is a schematic diagram of normal pixels and bad pixels in the correction area according to an embodiment of the present invention.
[0054] Figure 7 This is a schematic diagram illustrating the installation of a fingerprint module into a terminal device according to an embodiment of the present invention.
[0055] Figure 8 This is a detailed flowchart of a fingerprint module detection method according to an embodiment of the present invention.
[0056] Figure 9 This is a schematic diagram of a fingerprint module detection device according to an embodiment of the present invention. Detailed Implementation
[0057] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0058] The following embodiments will describe the detection method of the fingerprint module provided in this embodiment with reference to the accompanying drawings. The fingerprint module mentioned in this embodiment may include a fingerprint module set under the display screen of a terminal device, such as an optical fingerprint module. The terminal device may include a mobile phone, a computer, a wearable device, and a door lock, etc.
[0059] The detection method provided in this embodiment can be used to detect fingerprint modules installed under the display screen of terminal devices. If a defect is detected in the fingerprint module, it is determined whether the defect can be corrected or repaired. If the defect can be corrected or repaired, it is corrected or repaired in a timely manner. If the defect cannot be corrected or repaired, the user is reminded to replace the fingerprint module in a timely manner to improve security.
[0060] Figure 1 This is a flowchart illustrating a fingerprint module detection method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the detection method may include steps 101 to 104.
[0061] In step 101, the image captured by the fingerprint module is obtained.
[0062] In some embodiments, fingerprint images collected by the fingerprint module can be acquired, such as fingerprint images collected by the fingerprint module when the user unlocks the terminal device.
[0063] In other embodiments, images of the display area under a bright state collected by the fingerprint module can also be acquired. For example, a light source can be provided to the fingerprint module so that the display area corresponding to the fingerprint module displays a large area of white light spots, and the image of the display area collected by the fingerprint module under this condition can be acquired.
[0064] In step 102, bad pixels in the image are detected.
[0065] In this embodiment, dead pixels can include pixels with insufficient response and pixels with excessive response.
[0066] The term "pixel dead pixel" can include pixels that do not respond, or pixels that respond to a constant value independent of illumination, such as pixels that saturate due to a short circuit or pixels that do not output due to an open circuit. The grayscale value of a pixel saturating due to a short circuit is 255, and the grayscale value of a pixel not outputting due to an open circuit is 0. In other words, a pixel dead pixel can include pixels whose grayscale value equals a set grayscale value, which can be 255 or 0. In this embodiment, the pixel dead pixel is referred to as a first-type bad pixel.
[0067] The pixels with insufficient response and pixels with excessive response can be pixels in any sub-region of the image whose grayscale value meets the set requirements in relation to the mean and standard deviation of the grayscale value of the sub-region. For example, the set requirements can include a grayscale value exceeding the mean grayscale value ± N × the standard deviation of the grayscale value. Specifically, a pixel with insufficient response refers to a pixel in any sub-region whose grayscale value is lower than the mean grayscale value + N × the standard deviation of the grayscale value; a pixel with excessive response refers to a pixel in any sub-region whose grayscale value is higher than the mean grayscale value - N × the standard deviation of the grayscale value.
[0068] In this embodiment, N is a positive integer. N can be determined based on the size of the sub-region. For example, if the size of the sub-region is 100×100, N can be 6.
[0069] In this embodiment, pixels with insufficient response and pixels with excessive response are referred to as second-type bad pixels.
[0070] This embodiment can detect different types of images collected by the fingerprint module.
[0071] In step 103, it is determined whether the distribution of bad pixels in the image meets the correction conditions.
[0072] In practical use, fingerprint modules typically acquire small fingerprint images and compare them with pre-stored templates using a comparison algorithm. The comparison algorithm can determine whether the two images come from the same finger by comparing various feature points of the fingerprint images. These feature points are all micrometer-sized and are easily affected by bad pixels. Therefore, the distribution of bad pixels in the image can be judged. When the distribution of bad pixels in the image is relatively dense or concentrated, correcting the bad pixels will introduce a large error, meaning that correction cannot be performed in this case.
[0073] In step 104, if the distribution of bad pixels meets the correction conditions, the bad pixels in the image are corrected; otherwise, a first prompt message is sent to prompt the replacement of the fingerprint module.
[0074] If the distribution of bad pixels meets the correction conditions, it means that the bad pixels in the image can be repaired through correction. If the distribution of bad pixels does not meet the correction conditions, it means that the bad pixels cannot be repaired through correction. In this case, a first prompt message can be sent to the user to remind them to replace the fingerprint module.
[0075] This embodiment acquires images captured by a fingerprint module, detects bad pixels in the images, determines whether the distribution of bad pixels in the images meets the correction conditions, and corrects the bad pixels in the images if the distribution meets the correction conditions; otherwise, it sends a first prompt message to remind the user to replace the fingerprint module. This can detect whether the fingerprint module has bad pixels, whether the bad pixels can be corrected if they are present, and if so, correct them promptly. If they cannot be corrected, the user is promptly prompted to replace the fingerprint module. By promptly correcting bad pixels or reminding the user to replace the fingerprint module, the security of unlocking terminal devices using the fingerprint module can be improved.
[0076] In this embodiment, when the image includes a fingerprint image acquired by a fingerprint module, detecting bad pixels in the image may include: removing first-type bad pixels from the fingerprint image; determining the grayscale mean and standard deviation of the fingerprint image; and identifying pixels in the fingerprint image whose relationship with the grayscale mean and standard deviation of the fingerprint image meets a set requirement as second-type bad pixels, wherein the set requirement is determined according to the size of the fingerprint image.
[0077] In other words, pixels in the fingerprint image whose grayscale value equals a set grayscale value are identified as first-type bad pixels. To avoid affecting subsequent bad pixel detection, first-type bad pixels in the fingerprint image can be removed. The mean and standard deviation of the grayscale value of the fingerprint image after removing first-type bad pixels are determined. Pixels in the fingerprint image whose relationship with the mean and standard deviation of the grayscale value of the fingerprint image meets the set requirements are then identified as second-type bad pixels.
[0078] Normally, the grayscale value of a detected bad pixel is significantly higher than that of the fingerprint image, so there is no situation where the fingerprint signal is misjudged as a bad pixel.
[0079] Taking the relationship between grayscale value and the mean and standard deviation of the grayscale value of a fingerprint image as an example, where the grayscale value exceeds the mean ± N × standard deviation, in this embodiment, the value of N can be determined based on the size of the fingerprint image. For example, if the size of the fingerprint image is 100 × 100, N can be 6. That is, pixels with grayscale values higher than the mean + 6 × standard deviation and pixels with grayscale values lower than the mean - 6 × standard deviation can be found in the fingerprint image, and the found pixels are marked as second-type bad pixels.
[0080] In this embodiment, when the image includes an image of a display screen area in a bright state acquired by the fingerprint module, detecting bad pixels in the image may include: removing first-type bad pixels from the image of the display screen area; sliding a sub-region in the image of the display screen area with a set step size, and for the sub-region during the sliding process: determining the gray-scale mean and standard deviation of the sub-region; and identifying pixels in the sub-region whose relationship with the gray-scale mean and standard deviation of the sub-region satisfies the set requirements as second-type bad pixels.
[0081] Assuming the fingerprint module's dimensions are X×Y, it can capture an image of a display area with dimensions X×Y. Let the dimensions of this sub-region be m×n, where the fingerprint module's dimensions X×Y are greater than the sub-region's dimensions m×n. The horizontal and vertical sliding steps of the sub-region can be set according to actual needs; for example, the horizontal sliding step could be set to one column, and the vertical sliding step to one row. Figure 2 This is a schematic diagram illustrating the sliding of a sub-region during the detection process according to an embodiment of the present invention, as shown below. Figure 2 The sub-region shown slides one column to the right each time, and after sliding to the far right of the image, it slides down one column until the bottom right corner of the sub-region coincides with the bottom right corner of the image.
[0082] Figure 3 This is a flowchart illustrating defect detection according to an embodiment of the present invention, such as... Figure 3 As shown, the defect detection process includes the following steps 301 to 306.
[0083] In step 301, pixels in the image of the display screen area whose grayscale value is equal to the grayscale setting value are identified as first-type bad pixels.
[0084] In step 302, the coordinates of the first type of bad pixels are recorded, and the first type of bad pixels in the image are removed.
[0085] In step 303, starting from the top left corner of the image, an m×n sub-region is divided.
[0086] In step 304, the gray mean and standard deviation of the sub-region are determined, and pixels in the sub-region whose relationship with the gray mean and standard deviation meets the set requirements are identified as second-type bad pixels. The coordinates of the second-type bad pixels are recorded, and the second-type bad pixels in the image are removed.
[0087] In step 305, it is determined whether the sub-region has slid to the rightmost end of the image. If the sub-region has not slid to the rightmost end of the image, then step 306 is executed. If the sub-region has slid to the rightmost end of the image, then step 307 is executed.
[0088] In step 306, the sub-region slides one column to the right, and then proceeds to step 304.
[0089] In step 307, it is determined whether the sub-region has slid to the bottom of the image. If the sub-region has not slid to the bottom of the image, step 308 is executed; if the sub-region has slid to the bottom of the image, step 309 is executed.
[0090] In step 308, the sub-region slides down one line, at which point the sub-region is located at the leftmost end of the image, and step 304 continues.
[0091] In step 309, the bad pixel detection results are output.
[0092] In other words, the starting coordinates of the top left pixel of the entire X×Y image are set to (0, 0). The starting coordinates of the top left pixel of the m×n sub-region image are also (0, 0), which are the same as the starting coordinates of the entire X×Y image. After each bad pixel detection in the sub-region, the sub-region moves one column to the right until the starting coordinates of the sub-region image move to the rightmost coordinates (Xm) of the entire image. Then the sub-region moves to the right sequentially starting from (n, 0), and so on, until the sub-region moves to (Xm, Yn) to complete the last bad pixel detection in the sub-region.
[0093] In some embodiments, the complete sub-region sliding detection described above can be repeated multiple times until no new bad pixels are detected.
[0094] In some embodiments, determining whether the distribution of bad pixels in the image meets the correction conditions may include: taking any bad pixel as the center, obtaining the number of consecutive bad pixels in a specified area, wherein the specified area includes a set number of pixels; if the number is greater than a threshold, determining that the distribution of bad pixels in the image does not meet the correction conditions.
[0095] Generally, the larger the pixel size, the fewer pixels are needed to sample a fingerprint valley or ridge. In this case, the number of consecutive bad pixels that can be corrected is smaller, so a smaller designated area can be selected. On the other hand, the smaller the pixel size, the more pixels are needed to sample a fingerprint valley or ridge. The number of consecutive bad pixels that can be corrected is larger, so a larger designated area can be selected. In other words, in this embodiment, the number of pixels in the designated area can be determined according to the size of the pixels in the image.
[0096] For example, when the fingerprint module includes an optical / ultrasonic glass-based sensor, the size of the pixels collected by the optical / ultrasonic glass-based sensor can reach more than 50um. That is to say, 2 to 3 pixels are enough to sample the width of a fingerprint valley or ridge. Therefore, the number of pixels in the specified area can be determined to be 9, that is, the size of the specified area can be 3×3.
[0097] For example, when the fingerprint module includes a silicon-based optical fingerprint sensor, the size of the pixels collected by the silicon-based optical fingerprint sensor is less than 20um. That is to say, the number of pixels corresponding to the width of a fingerprint valley or ridge can reach more than 7. Therefore, it can be determined that the number of pixels in the specified area is 25, that is, the size of the specified area can be 5×5.
[0098] In this embodiment, for a defective point at the center of a specified area, the number of defective points in the specified area that are consecutive to the center defective point can be counted. Specifically, multiple defective points that are horizontally connected to the center defective point, multiple defective points that are vertically connected, and / or multiple defective points that are diagonally connected can be determined as consecutive defective points in the specified area.
[0099] Figure 4 This is a schematic diagram of continuous dead pixels according to an embodiment of the present invention, such as... Figure 4 As shown, taking a specified area with 9 pixels (i.e., the size of the specified area is 3×3) as an example, the number of consecutive bad pixels in the nine-grid area can include: single point, 2 consecutive points, 3 consecutive points, 4 consecutive points, 5 consecutive points, 6 consecutive points, 7 consecutive points, and 8 consecutive points.
[0100] When the specified area is a 3x3 grid, the number threshold can be set to 4. That is, if the number of consecutive bad pixels in the 3x3 grid is greater than 4 consecutive points, it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0101] When the number of pixels in the specified area is 25 (i.e., the size of the specified area is 5×5), the number threshold can be set to 8. That is, if the number of consecutive bad pixels in the specified 5×5 area is greater than 8 consecutive points, it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0102] During implementation, the category of each defective pixel can be determined, and the distribution of defective pixels in the image can be judged based on the category of the defective pixels to determine whether it meets the correction conditions. The category of defective pixels can include the number of consecutive defective pixels within a specified region.
[0103] Taking the specified area as a 3x3 grid as an example, the category of each defective pixel in the 3x3 grid can be the number of consecutive defective pixels in the 3x3 grid. That is to say, the category of each defective pixel in the 3x3 grid can include: single pixel, 2 consecutive pixels, 3 consecutive pixels, 4 consecutive pixels, 5 consecutive pixels, 6 consecutive pixels, 7 consecutive pixels, and 8 consecutive pixels.
[0104] If a defective point in a specified area already has a category that overlaps with the categories of other defective points in the specified area, it means that the defective point has already been used as an interior point in an adjacent specified area. In this case, the two classification methods can be compared, and the category with the most consecutive defective points in the specified area should be given priority.
[0105] Figure 5 This is a schematic diagram illustrating the determination of defect categories according to an embodiment of the present invention, such as... Figure 5 As shown, the category of each defective pixel in designated area 501 is 4 consecutive points, and the category of each defective pixel in designated area 502 is 5 consecutive points. Defective pixel A belongs to both designated area 501 and designated area 502. In this case, the category of defective pixel A is determined by the number of consecutive defective pixels, i.e., defective pixel A is 5 consecutive points. During the process of determining the defective pixel category, there may be defective pixels located at the image edge that are not within any designated area, such as defective pixel B. In this case, defective pixel B is classified as a single point.
[0106] Given the categories of all defective pixels in an image, it can be determined whether the distribution of defective pixels in the image meets the correction conditions. If the category of defective pixels in the image belongs to the uncorrectable category, then it is determined that the distribution of defective pixels in the image does not meet the correction conditions. For example, if the specified area is a 3x3 grid, the uncorrectable category can include 5 consecutive points, 6 consecutive points, 7 consecutive points, or 8 consecutive points. If the category of defective pixels in the image is 5 consecutive points, 6 consecutive points, 7 consecutive points, or 8 consecutive points, then it is determined that the distribution of defective pixels in the image does not meet the correction conditions.
[0107] In this embodiment, the number of consecutive bad pixels in rows and columns of the image can also be obtained. If the number of consecutive bad pixels in rows or columns exceeds the number threshold, it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0108] In one implementation, when the number of consecutive bad pixels in a row or column exceeds a threshold, the category of each bad pixel constituting the consecutive bad pixels is determined as a bad line. If there are bad pixels that are classified as bad lines, then it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0109] By determining the number of consecutive bad pixels within a specified area, the accuracy of the correction is improved, ensuring that the bad pixels within the correction area are within the correctable range.
[0110] In some embodiments, determining whether the distribution of bad pixels in the image meets the correction conditions may include: obtaining the distance between any two non-contiguous bad pixels in the image; and if the distance is less than a distance threshold, determining that the distribution of bad pixels in the image does not meet the correction conditions.
[0111] If the distance between any two non-contiguous bad pixels is too close, it will introduce a large correction error. Therefore, if the distance between any two non-contiguous bad pixels is less than the distance threshold, it is determined that the distribution of bad pixels in the image does not meet the correction conditions.
[0112] The step of obtaining the distance between any two non-contiguous bad pixels in the image may include: for any bad pixel in the image, obtaining bad pixels that are contiguous with the bad pixel and merging them; and obtaining the distance between any two merged bad pixels in the image.
[0113] Starting from any defective point in the image, other defective points connected to that defective point can be obtained from different angles. For example, one or more defective points connected horizontally to the defective point, one or more defective points connected vertically to the defective point, and one or more defective points connected diagonally to the defective point can be obtained. The defective point and the defective points connected to it are defined as one defective point. The connections involved in this embodiment can include direct connections or indirect connections.
[0114] For example, still using Figure 5 Taking bad pixel A as an example, we can obtain bad pixels that are continuous with bad pixel A. Figure 5 We can find 8 other bad points consecutive to bad point A. These 9 consecutive bad points are merged into one bad point A'. Since bad point A' and bad point B are non-consecutive, we can obtain the distance between them. In other words, multiple consecutive bad points are treated as one bad point, thus allowing us to obtain the distance between non-consecutive bad points.
[0115] In other words, the distance between any two non-contiguous bad points can be determined based on the coordinates of the bad points, and the relationship between the distance between any two non-contiguous bad points and the distance threshold can be judged. If |x1-x2| < distance threshold or |y1-y2| < distance threshold, then it is determined that the distribution of bad points in the image does not meet the correction conditions.
[0116] The relationship between the distance between discontinuous bad pixels and the distance threshold is used to determine whether correction can be performed. If the distance between discontinuous bad pixels does not meet the distance threshold, it means that the discontinuous bad pixels are too close. In this case, correction will affect the accuracy of correction. Therefore, correction is not performed when the distance between discontinuous bad pixels does not meet the distance threshold.
[0117] In some embodiments, determining whether the distribution of bad pixels in the image meets the correction conditions may include: obtaining the density of bad pixels in any sub-region of the image; and if the density is greater than a density threshold, determining that the distribution of bad pixels in the image does not meet the correction conditions.
[0118] In other words, the number of bad pixels in a sub-region and the number of pixels in the sub-region can be obtained, and the density of bad pixels in the sub-region can be determined based on the number of bad pixels and the number of pixels in the sub-region.
[0119] By judging the density of bad pixels in the sub-region, we can avoid having too many bad pixels, which would affect the accuracy of the correction.
[0120] In some embodiments, the gray value of the bad pixel can be updated based on the gray value of the normal pixel adjacent to the bad pixel, thereby correcting the bad pixel in the image.
[0121] In other embodiments, the gray value of the bad pixel can be updated based on the average gray value of the normal pixels in the correction region centered on the bad pixel, thereby correcting the bad pixels in the image, wherein the size of the correction region is determined according to the pixel size.
[0122] Figure 6 This is a schematic diagram illustrating normal pixels and bad pixels in the correction area according to an embodiment of the present invention, such as... Figure 6 As shown, black pixels represent bad pixels and gray pixels represent normal pixels. The gray value of the bad pixels can be updated based on the average gray value of the normal pixels in the correction area.
[0123] In this embodiment, the size of the correction region can be the same as the size of the specified region used to determine the number of consecutive bad pixels mentioned earlier. That is, the size of the correction region can be determined based on the pixel size, and the smaller the size of the correction region used, the smaller the error introduced by the correction.
[0124] When the pixel size is 50µm or larger, a 3×3 correction area can be used for correction. To reduce the introduction of large errors during the correction process, the number of bad pixels within the 3x3 grid should be ≤4, meaning that for large pixels, a maximum of 4 consecutive bad pixels can be corrected. When the pixel size is less than 20µm, a 5×5 or 7×7 correction area can be used for correction. When using a 5×5 correction area, 8 consecutive bad pixels can be corrected.
[0125] The previous determination of the number of consecutive bad pixels within a specified area can be understood as a way to reduce the introduction of correction errors and improve correction accuracy.
[0126] In some embodiments, after correcting bad pixels in the image, the method may further include: detecting bad pixels in the corrected image; if the number of bad pixels detected is greater than a set value for the number of bad pixels, sending a second prompt message, the second prompt message being used to prompt the replacement of the fingerprint module.
[0127] By re-detecting bad pixels in the corrected image, the accuracy of detection is improved. If the number of bad pixels exceeds a set value, a second prompt message is sent to suggest replacing the fingerprint module, thus preventing the corrected fingerprint module from malfunctioning and improving the user experience.
[0128] The detection method provided in this embodiment can detect the fingerprint image collected by the fingerprint module when the user unlocks the terminal device. The detection of the fingerprint module can be completed during the user unlocking process, thereby reducing the impact of fingerprint module detection on the user's use of the terminal device.
[0129] In one example, the fingerprint image collected by the fingerprint module each time the user unlocks the terminal device can be detected. By performing high-frequency detection on the frequently used fingerprint module area, if bad spots are detected and the distribution of bad spots meets the correction conditions, timely correction and repair can be performed. If bad spots are detected but the distribution of bad spots does not meet the correction conditions, the user can be promptly reminded to replace the fingerprint module.
[0130] Using the detection method provided in this embodiment, users can be periodically reminded to perform fingerprint module detection. If the user agrees to the detection, a light source is provided to the fingerprint module, making the corresponding display area bright. Multiple frames of complete display area images are then captured for dead pixel detection and correction. In this embodiment, if the user agrees to perform fingerprint module detection, it means the user agrees to suspend the use of the terminal device and ensure that there are no foreign objects or fingers placed above the display area corresponding to the fingerprint module.
[0131] When detecting fingerprint images, some areas may not be detected for a long time because they are areas where the user's fingerprints are less likely to be covered. However, the image on the display screen can completely detect all the bad spots of the fingerprint module and correct them if the correction conditions are met.
[0132] The detection method provided in this embodiment can detect the fingerprint module during the user's use of the fingerprint module. If the defects in the fingerprint module cannot be corrected or repaired, the user will be prompted that the defects in the fingerprint module cannot be corrected and it is recommended to replace the fingerprint module.
[0133] In addition to the above scenarios, this embodiment can also be applied to the production testing stage of fingerprint modules. For example, after the fingerprint module is installed in a terminal device, the detection algorithm provided in this embodiment can be used to perform factory calibration and testing, and filter out fingerprint modules with functional problems and calibration failures.
[0134] Figure 7 This is a schematic diagram illustrating the installation of a fingerprint module into a terminal device according to an embodiment of the present invention, as shown below. Figure 7As shown, the fingerprint module 702 is located below the display screen 701 of the terminal device 703. After the fingerprint module 702 is installed in the terminal device 703, it can acquire images of the display screen area under high brightness conditions. The image of the display screen area is then subjected to dead pixel detection. If the dead pixel distribution meets the correction conditions, correction and repair can be performed. If the dead pixel distribution does not meet the correction conditions, a message indicating that the fingerprint module is of substandard quality can be displayed, i.e., the fingerprint module is determined to be a defective product. In the case of a mobile phone as the terminal device... Figure 7 The 703 can be used for the mid-frame of a mobile phone.
[0135] In one example Figure 7 The display screen can be an OLED (Organic Light-Emitting Diode) screen.
[0136] Whether considering improving production yield or extending user lifespan, the detection algorithm provided in this embodiment can be used for detection. If the correction conditions are met, the algorithm will process the defects. Only when the damage is too severe to be processed by the algorithm will the product be judged as defective during the production stage, and the user will be reminded to replace the fingerprint module in time during the user's use stage.
[0137] To better understand the detection method provided in this embodiment, the following embodiments will be combined with Figure 8 Please provide a detailed explanation.
[0138] Figure 8 This is a detailed flowchart of the fingerprint module detection method according to an embodiment of the present invention, as shown below. Figure 8 As shown, the detection method includes the following steps 801 to 807.
[0139] In step 801, an image captured by the fingerprint module is obtained. The image may include a fingerprint image or an image of the display screen area.
[0140] In step 802, bad pixels in the image are detected.
[0141] In step 803, it is determined whether there are bad pixels in the image. If there are no bad pixels in the image, it means that there are no bad pixels in the fingerprint module; if there are bad pixels in the image, then step 804 is executed.
[0142] In step 804, the number of consecutive bad pixels within a specified area is obtained, with any bad pixel as the center.
[0143] In step 805, the relationship between the number of bad pixels and the number threshold is determined. If the number of bad pixels is greater than the number threshold, it is determined that the distribution of bad pixels in the image does not meet the correction conditions, and step 806 is executed; if the number of bad pixels is less than the number threshold, step 807 is executed.
[0144] In step 806, a prompt message to replace the fingerprint module is sent.
[0145] In step 807, the distance between any two non-contiguous bad pixels in the image is obtained, and the relationship between the distance and the distance threshold is determined. If the distance is less than the distance threshold, it is determined that the distribution of bad pixels in the image does not meet the correction conditions, and step 806 can be executed to send a prompt message to replace the fingerprint module; if the distance is greater than the distance threshold, step 808 is executed.
[0146] In step 808, the density of bad points in any sub-region of the image is obtained, and the relationship between the density and the density threshold is determined. If the density is greater than the density threshold, it is determined that the distribution of bad points in the image does not meet the correction conditions, and step 806 can be executed to send a prompt message to replace the fingerprint module; if the density is less than the density threshold, step 809 can be executed.
[0147] In step 809, bad pixels in the image are corrected.
[0148] In step 810, bad pixels in the corrected image are detected. If the number of bad pixels in the corrected image is greater than the set value for the number of bad pixels, then step 806 is executed to send a prompt message to replace the fingerprint module. If the number of bad pixels in the corrected image is less than the set value for the number of bad pixels, then step 811 is executed.
[0149] In step 811, the fingerprint module detection is completed.
[0150] The detection method provided in this embodiment can correct bad pixels to prevent security risks such as misidentification and inability to unlock fingerprints due to bad pixels. In cases where bad pixels cannot be corrected, the user is promptly reminded to replace the module, thus improving the user experience.
[0151] Figure 9 This is a schematic diagram of a fingerprint module detection device according to an embodiment of the present invention, as shown below. Figure 9 As shown, the device includes:
[0152] Acquisition unit 901 is used to acquire the image collected by the fingerprint module;
[0153] Detection unit 902 is used to detect bad pixels in the image;
[0154] The judgment unit 903 is used to determine whether the distribution of bad pixels in the image meets the correction conditions. If the distribution of bad pixels meets the correction conditions, the bad pixels in the image are corrected; otherwise, a first prompt message is sent to prompt the replacement of the fingerprint module.
[0155] In some embodiments, when the image includes a fingerprint image acquired by a fingerprint module, the detection unit 902 is specifically used for:
[0156] Remove the first type of bad pixels from the fingerprint image;
[0157] Determine the grayscale mean and standard deviation of the fingerprint image;
[0158] Pixels in the fingerprint image whose grayscale mean and standard deviation meet the set requirements are identified as second-type bad pixels, wherein the set requirements are determined based on the size of the fingerprint image.
[0159] In some embodiments, when the image includes an image of a display area in a highlighted state captured by the fingerprint module, the detection unit 902 is specifically used for:
[0160] Remove first-type dead pixels from the image in the display screen area;
[0161] In the image of the display screen area, a sub-region is slid with a set step size, for the sub-region during the sliding process:
[0162] Determine the mean and standard deviation of the grayscale values of the sub-region;
[0163] Pixels in the sub-region whose relationship with the mean gray value and standard deviation of the sub-region meets the set requirements are identified as second-type bad pixels.
[0164] In some embodiments, the determination unit 903 is specifically used to: obtain the number of consecutive bad pixels in a specified area centered on any bad pixel, wherein the specified area includes a set number of pixels; and determine that the distribution of bad pixels in the image does not meet the correction conditions if the number is greater than a threshold.
[0165] In some embodiments, the determination unit 903 is specifically used to: obtain the distance between any two non-contiguous bad pixels in the image; and determine that the distribution of bad pixels in the image does not meet the correction conditions if the distance is less than a distance threshold.
[0166] In some embodiments, the determination unit 903 is specifically used to: obtain the density of bad pixels in any sub-region of the image; and determine that the distribution of bad pixels in the image does not meet the correction conditions if the density is greater than a density threshold.
[0167] In some embodiments, the determining unit 903 is specifically configured to: update the gray value of the bad pixel based on the gray value of the normal pixel adjacent to the bad pixel; or update the gray value of the bad pixel based on the average gray value of the normal pixel in the correction region centered on the bad pixel, wherein the size of the correction region is determined based on the pixel size.
[0168] This embodiment also provides a terminal device, which includes a display screen and a fingerprint module disposed under the display screen, and the fingerprint module is detected using the method described in any one of the above embodiments.
[0169] This embodiment may also include the display device of the aforementioned display screen. The display device in this embodiment can be any product or component with display function, such as electronic paper, mobile phone, tablet computer, television, laptop computer, digital photo frame, or navigator.
[0170] It should be noted that the dimensions of layers and regions may be exaggerated in the accompanying drawings for clarity. Furthermore, it is understood that when an element or layer is referred to as being "on" another element or layer, it can be directly on the other element, or there may be intermediate layers. Additionally, it is understood that when an element or layer is referred to as being "below" another element or layer, it can be directly below the other element, or there may be more than one intermediate layer or element. Furthermore, it is also understood that when a layer or element is referred to as being "between" two layers or two elements, it can be the only layer between the two layers or two elements, or there may be more than one intermediate layer or element. Similar reference numerals throughout indicate similar elements.
[0171] In this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "multiple" refers to two or more unless otherwise expressly defined.
[0172] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. The invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0173] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for detecting a fingerprint module, characterized in that, The method is applied to a terminal device, a fingerprint module is arranged below a display screen of the terminal device, and the method comprises: acquiring an image collected by the fingerprint module; detecting bad points in the image, the bad points comprising first-type bad points and / or second-type bad points, wherein the first-type bad points comprise pixel points with a gray value equal to a set gray value, and the second-type bad points comprise pixel points in any sub-region of the image, a relationship between a gray value of the pixel points and a gray mean value and a standard deviation of the sub-region satisfying a set requirement, the set requirement being determined according to a size of the sub-region; judging whether a distribution of the bad points in the image satisfies a correction condition, comprising: acquiring a number of continuous bad points in a specified region with any one bad point as a center, the specified region comprising a set number of pixel points; in a case where the number is greater than a number threshold, determining that the distribution of the bad points in the image does not satisfy the correction condition; if the distribution of the bad points satisfies the correction condition, correcting the bad points in the image; otherwise, sending a first prompt information, the first prompt information being used to prompt to replace the fingerprint module.
2. The method of claim 1, wherein, the image collected by the fingerprint module comprises at least one of: a fingerprint image collected by the fingerprint module; an image of a display screen region in a high-light state collected by the fingerprint module.
3. The method of claim 1, wherein, in a case where the image comprises a fingerprint image collected by the fingerprint module, the detecting the bad points in the image comprises: eliminating the first-type bad points in the fingerprint image; determining a gray mean value and a standard deviation of the fingerprint image; determining, as the second-type bad points, pixels in the fingerprint image, a relationship between the pixels and the gray mean value and the standard deviation of the fingerprint image satisfying a set requirement, the set requirement being determined according to a size of the fingerprint image.
4. The method of claim 1, wherein, in a case where the image comprises an image of a display screen region in a high-light state collected by the fingerprint module, the detecting the bad points in the image comprises: eliminating the first-type bad points in the image of the display screen region; in the image of the display screen region, sliding a sub-region with a set step, and for the sub-region in the sliding process: determining a gray mean value and a standard deviation of the sub-region; determining, as the second-type bad points, pixels in the sub-region, a relationship between the pixels and the gray mean value and the standard deviation of the sub-region satisfying the set requirement.
5. The method of claim 1, wherein, the judging whether the distribution of the bad points in the image satisfies the correction condition comprises: acquiring a distance between any two non-continuous bad points in the image; in a case where the distance is less than a distance threshold, determining that the distribution of the bad points in the image does not satisfy the correction condition.
6. The method of claim 5, wherein, the acquiring the distance between any two non-continuous bad points in the image comprises: for any bad point in the image, acquiring and merging continuous bad points with the bad point; acquiring a distance between any two merged bad points in the image.
7. The method of claim 1, wherein, the judging whether the distribution of the bad points in the image satisfies the correction condition comprises: acquiring a density of the bad points in any sub-region of the image; in a case where the density is greater than a density threshold, determining that the distribution of the bad points in the image does not satisfy the correction condition.
8. The method of claim 1, wherein, the correcting the bad points in the image comprises at least one of: updating the gray value of the bad pixel according to the gray value of the normal pixel adjacent to the bad pixel; updating the gray value of the bad pixel according to the average gray value of the normal pixels in a correction region centered on the bad pixel, wherein the size of the correction region is determined according to the pixel size.
9. The method of claim 1, wherein, After the bad pixels in the image are corrected, the method further comprises: detecting the bad pixels in the corrected image; if the number of detected bad pixels is greater than a set value of the number of bad pixels, sending second prompt information, the second prompt information being used to prompt replacement of the fingerprint module.
10. A detection device of a fingerprint module, characterized in that, The device is applied to a terminal device, and a fingerprint module is arranged below a display screen of the terminal device, and the device comprises: an acquisition unit configured to acquire an image collected by the fingerprint module; a detection unit configured to detect bad pixels in the image, the bad pixels comprising first-type bad pixels and / or second-type bad pixels, wherein the first-type bad pixels comprise pixel points with a gray value equal to a set gray value, and the second-type bad pixels comprise pixel points in any sub-region of the image, a relationship between the gray value of the pixel points and a gray mean value and a standard deviation of the sub-region satisfying a set requirement, the set requirement being determined according to the size of the sub-region; a judgment unit configured to judge whether the distribution of the bad pixels in the image satisfies a correction condition, comprising: acquiring the number of continuous bad pixels in a specified region centered on any one bad pixel, the specified region comprising a set number of pixel points; determining that the distribution of the bad pixels in the image does not satisfy the correction condition if the number is greater than a number threshold; correcting the bad pixels in the image if the distribution of the bad pixels satisfies the correction condition; or sending first prompt information if the distribution of the bad pixels does not satisfy the correction condition, the first prompt information being used to prompt replacement of the fingerprint module.
11. A terminal device, comprising: The terminal device comprises a display screen, and a fingerprint module is arranged below the display screen, and the fingerprint module is detected by using the method according to any one of claims 1 to 9. The terminal device comprises a display screen, and a fingerprint module is arranged below the display screen, and the fingerprint module is detected by using the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Fingerprint image processing method, fingerprint image processing device and terminal equipment
CN105469083A
Fingerprint image enhancement method and device
CN106156726A