A method and device for detecting fingerprint residue on housing

Through image processing technology, the contrast and area between the fingerprint area and the target area is calculated, which solves the problem of human eye judgment dependence in the prior art, improves the objectivity and accuracy of the camera fingerprint residue detection, and is suitable for different materials and light source conditions. .

CN118397664BActive Publication Date: 2024-12-06HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410861975.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-12-06
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

The existing shell fingerprint residue detection method relies on human eye judgment and does not make full use of image information, resulting in limited objectivity and accuracy of the detection results.

Method used

By acquiring the fingerprint image, image processing is performed to determine the target area and fingerprint area, the contrast and area of ​​the fingerprint area and the target area are calculated, and the fingerprint residual performance of the case is judged using the RGB channel value or grayscale value.

Benefits of technology

It improves the objectivity and accuracy of the shell fingerprint residue detection, can more accurately compare the differences in fingerprint residue performance between different materials, and reduces the impact of uneven light source and noise interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397664B_ABST
    Figure CN118397664B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method and device for detecting fingerprint residue on a shell, the method may include: obtaining a fingerprint image, the fingerprint image being an image obtained by photographing a fingerprint on the surface of a target shell; performing image processing on the fingerprint image to determine a target area in the fingerprint image and a fingerprint area in the target area where fingerprint patterns are collected; determining the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area; judging the fingerprint residue performance of the target shell based on the area of ​​the fingerprint area and the contrast. The embodiment of the present application can effectively use more information in the image to determine the fingerprint residue performance, and improve the objectivity and accuracy of the detection scheme of fingerprint residue on the shell.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of fingerprint recognition technology, and in particular to a method and device for detecting fingerprint residue on a housing. Background Art

[0002] Fingerprint recognition technology is a multidisciplinary field involving image processing, pattern recognition and information security, and aims to identify information by identifying an individual's unique fingerprint image. In this field, the fingerprint residue test of the shell is mainly used to test the material's anti-fingerprint and anti-fouling properties.

[0003] At present, the detection of fingerprint residue on the shell is mainly judged by staff observing the fingerprint image to determine the anti-fingerprint performance of the shell. Different staff may have different judgment criteria for fingerprint residue on the shell, and fail to make full use of other information in the image, resulting in limited objectivity and accuracy of the test results. It is necessary to provide a detection method for fingerprint residue on the shell, which can effectively use more information in the image to determine the fingerprint residue performance and improve the objectivity and accuracy of the detection scheme of fingerprint residue on the shell. Summary of the invention

[0004] The technical problem to be solved by the embodiments of the present application is to provide a method and device for detecting fingerprint residues on a shell, which can effectively use more information in an image to determine fingerprint residue performance and improve the objectivity and accuracy of the detection scheme for fingerprint residues on the shell.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting fingerprint residue on a shell, which may include: acquiring a fingerprint image, wherein the fingerprint image is an image obtained by photographing a fingerprint on the surface of a target shell; performing image processing on the fingerprint image to determine a target area in the fingerprint image and a fingerprint area in the target area where fingerprint patterns are collected; determining a contrast ratio between the fingerprint area and the target area based on pixel information of the fingerprint area and pixel information of the target area; and judging the fingerprint residue performance of the target shell based on the area of ​​the fingerprint area and the contrast ratio.

[0006] In the existing detection methods of fingerprint residues on shells, the anti-fingerprint performance of the shell is usually evaluated by staff observing the fingerprint clarity, fingerprint visibility and other visible data of the fingerprint image. This method is only based on the subjective judgment of the staff and lacks full use of other information in the image, resulting in low objectivity and accuracy of the detection results of residual fingerprints on the shell. In response to this technical problem, a more objective detection method of fingerprint residues on the shell is provided in the embodiment of the present application. After determining the target area based on the fingerprint image and the fingerprint area including the fingerprint lines in the target area, the fingerprint area is placed in the target area for comparison to obtain the contrast between the fingerprint area and the target area. Finally, the above contrast and the area of ​​the fingerprint area are compared with the preset standard value to objectively judge the fingerprint residue performance (i.e., anti-fingerprint performance and anti-fouling performance) of the target shell. Compared with the prior art in which the fingerprint residue performance of the shell is judged subjectively by the staff, the embodiment of the present application can judge the fingerprint residue performance by objectively comparing the data information in the fingerprint image, that is, the fingerprint area can be judged by the above contrast in the embodiment of the present application. The degree of color or brightness difference between the target areas (for example, when comparing the fingerprint residue performance on shells of different materials, because the color difference is large, the difference in fingerprint residue performance between different shells can be more accurately judged by the contrast of RGB channel values ​​between the fingerprint area and the target area, or, when comparing the fingerprint residue performance on shells of the same material, because the color difference is small and the grayscale information contains more feature information, the difference in fingerprint residue performance between different shells can be more accurately judged by the contrast of grayscale values ​​between the fingerprint area and the target area), and the number or density of fingerprint residues can be judged by the area of ​​the above fingerprint area, so as to more accurately and objectively judge the fingerprint residue performance, thereby improving the accuracy and objectivity of the detection of fingerprint residues on the shell.

[0007] In a possible implementation, if the pixel information includes RGB channel values; the determination of the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the fingerprint image includes: determining the sum of each channel value in the RGB channel values ​​of the fingerprint area and the sum of each channel value in the RGB channel values ​​of the target area; comparing the sum of each channel value in the RGB channel values ​​of the fingerprint area with the sum of each channel value in the RGB channel values ​​of the target area to obtain the contrast of each channel. In the embodiment of the present application, the color difference information between the fingerprint area and the target area can be obtained by comparing the sum of each channel value in the RGB channel values ​​of the fingerprint area and the target area. The greater the color difference between the fingerprint area and the target area, the higher the fingerprint residue degree; further, when comparing the fingerprint residue performance on the shells of different materials, because the shells of different materials usually have obvious color differences, the difference in fingerprint residue performance between different shells can be more accurately judged by the contrast of the RGB channel values ​​of the fingerprint area and the target area, thereby improving the accuracy of the shell fingerprint residue test results when comparing shells of different materials.

[0008] In a possible implementation, the image processing of the fingerprint image to determine the target area in the fingerprint image and the fingerprint area in the target area where the fingerprint lines are collected includes: determining the target area based on the shooting parameters of the fingerprint image; converting the image of the target area into a first grayscale image; performing image feature enhancement processing on the first grayscale image to obtain a second grayscale image; and binarizing the second grayscale image to determine the fingerprint area in the target area that meets the fingerprint features. In the embodiment of the present application, after determining the target area in the fingerprint image by shooting parameters, the image of the target area can be converted into a grayscale image, and image feature enhancement processing can be performed on it to effectively remove noise and highlight fingerprint features, and the pixel values ​​in the grayscale image after denoising processing can be converted into black and white colors by binarization processing, and the area in the black pixel value that meets the fingerprint features is determined as the fingerprint area, and the fingerprint area containing fingerprint lines is accurately located, thereby improving the objectivity of the shell fingerprint residue detection and the accuracy of the results.

[0009] In a possible implementation, the image processing of the fingerprint image to determine the target area in the fingerprint image and the fingerprint area in the target area where the fingerprint lines are collected includes: determining the target area based on the shooting parameters of the fingerprint image; converting the image of the target area into a third grayscale image; partitioning the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain multiple sub-areas; performing image feature enhancement processing on each sub-area in the third grayscale image to obtain a fourth grayscale image; binarizing the fourth grayscale image and merging the connected areas shared by each sub-area in the fourth grayscale image after the binarization processing to determine the fingerprint area. In the embodiment of the present application, after dividing the image into multiple sub-areas, threshold segmentation is performed for each sub-area, and the shared connected areas are merged to reduce the error caused by uneven light sources, thereby further improving the accuracy of extracting the fingerprint area. Specifically, in the embodiment of the present application, the target area is first determined by the shooting parameters in the fingerprint image, and after the image of the target area is converted into a grayscale image, the grayscale image is divided into multiple sub-areas, so that each sub-area is processed independently, thereby reducing the error caused by the unevenness of the light source; further, by performing threshold segmentation and feature enhancement processing (such as denoising and morphological processing) on ​​each sub-area, the characteristics of the fingerprint pattern are highlighted, thereby improving the recognition accuracy of the fingerprint area; finally, by merging the shared connected areas, a continuous and complete fingerprint area is obtained, which reduces the impact of the uneven light source while ensuring the accuracy of the detection result of the fingerprint residue on the shell.

[0010] In a possible implementation, if the pixel information includes a grayscale value; the determination of the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area includes: determining the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area; and determining the contrast as the comparison result of the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area. In the embodiment of the present application, by comparing the sum of the grayscale values ​​of the fingerprint area with the sum of the grayscale values ​​of the target area, if the greater the grayscale difference between the fingerprint area and the target area, the higher the fingerprint residue degree; further, when testing the same shell material, because the color difference between shells of the same material is small, and the grayscale information contains more feature information, the difference between the fingerprint residue performance can be judged by comparing the grayscale difference information between different shells. Therefore, the above-mentioned grayscale difference information can be used to more accurately and objectively judge the difference in fingerprint residue performance between the same shell materials.

[0011] In a possible implementation, the fingerprint image is processed to determine the target area in the fingerprint image and the fingerprint area in the target area where the fingerprint pattern is collected, including: determining the target area based on shooting parameters; converting the image of the target area into a first grayscale image; extracting the background area from the first grayscale image and removing the background area in the first grayscale image; performing image feature enhancement processing on the first grayscale image after removing the background area to obtain a second grayscale image; and binarizing the second grayscale image to determine the fingerprint area in the target area that meets the fingerprint feature. When performing fingerprint residue detection on shells of the same material, because the color difference between shells of the same material is small, and the grayscale information contains more feature information, the background extraction and removal steps can be added in the image processing (such as image grayscale calculation, image feature enhancement processing and binarization processing, etc.) process to remove the color information in the image and effectively reduce the interference of non-fingerprint areas, and more accurately judge the difference between shells of the same material based on the feature information contained in the grayscale information when performing subsequent image processing, so as to improve the objectivity and accuracy of the detection scheme of fingerprint residue on the shell.

[0012] In a possible implementation, the image processing of the fingerprint image to determine the target area in the fingerprint image and the fingerprint area in the target area where fingerprint lines are collected includes: determining the target area based on shooting parameters; converting the image of the target area into a third grayscale image; partitioning the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain multiple sub-areas; extracting the background area from each sub-area in the third grayscale image, and removing the background area in each sub-area in the third grayscale image; performing image feature enhancement processing on each sub-area in the third grayscale image after removing the background area to obtain a fourth grayscale image; and determining the fingerprint area by binarizing the fourth grayscale image and merging the connected areas shared by each sub-area in the fourth grayscale image after the binarization processing. In the embodiment of the present application, the error caused by uneven light source can be reduced through image processing methods such as adaptive partitioning, threshold segmentation, and common connected area merging, and background extraction and removal steps are added in the above image processing process to remove color information. In the subsequent image processing, the difference between shells of the same material can be more accurately judged based on the feature information contained in the grayscale information, thereby improving the objectivity and accuracy of the detection scheme for fingerprint residues on the shell.

[0013] In a possible implementation, the image feature enhancement process includes: performing denoising on the corresponding grayscale image through image filtering; and performing morphological processing on the grayscale image after denoising. In the embodiment of the present application, image filtering can be used to reduce the noise in the image and improve the quality and clarity of the image; further, morphological processing can be used to further repair the incomplete structure and shape in the image and enhance the features of the fingerprint area in the image, so as to more accurately extract the fingerprint area in the subsequent image processing process, thereby improving the accuracy of the detection scheme for fingerprint residues on the shell.

[0014] In a possible implementation, the morphological processing of the grayscale image after denoising includes: removing the uniform background area in the grayscale image after denoising to obtain the foreground area; removing the peripheral area in the foreground area to obtain the image after the peripheral area is removed; the uniform background includes uniform light source and / or uniform texture, and the peripheral area is the area in the foreground area except the connected area where the pixel values ​​are concentrated; the image after the peripheral area is removed is morphologically processed. In the embodiment of the present application, before morphological processing, the uniform background area (for example, the background with uniform light source and / or uniform texture) in the grayscale image after denoising can be removed, and more accurate fingerprint area recognition can be achieved based on the centroid concentration of the connected area in the grayscale image, that is, determining the area where the fingerprint lines are located, and removing the large block noise outside the area; further, if the connected area in the foreground area is not detected, it can be judged that the fingerprint residue is weak. In addition, the envelope of the area where the fingerprint lines are located can be determined by image segmentation or morphological processing, and the noise outside the envelope can be removed to further optimize the image quality of the target area.

[0015] In a possible implementation, the fingerprint residual performance of the target shell is judged based on the area of ​​the fingerprint area and the contrast, including: if the area of ​​the fingerprint area is smaller than a preset area, and the contrast is smaller than a preset contrast, then the fingerprint residual degree of the target shell is judged to be low. Compared with the prior art in which the fingerprint residual performance of the shell is judged subjectively by the staff, in the embodiment of the present application, the fingerprint residual performance can be judged more objectively by comparing the area of ​​the fingerprint area, and the color or grayscale contrast between the fingerprint area and the target area with a preset standard value (such as the standard area of ​​the fingerprint area, or the standard contrast value), so as to improve the accuracy and objectivity of the detection scheme of the fingerprint residue on the shell.

[0016] In one possible implementation, when testing and comparing the fingerprint residual performance of multiple shells, the fingerprint images corresponding to different shells can be images obtained by taking pictures under the same shooting conditions, such as the same shooting light source, shooting technique, shooting equipment and other conditions. In the subsequent comparison of the fingerprint residual performance differences of different shells, more objective and accurate comparison results can be obtained, avoiding the influence of data anomalies caused by different shooting conditions.

[0017] In a second aspect, an embodiment of the present application provides a detection device for fingerprint residue on a housing, which may include:

[0018] A fingerprint image acquisition unit, used to acquire a fingerprint image, wherein the fingerprint image is an image obtained by photographing the fingerprint on the surface of the target housing;

[0019] A fingerprint area determination unit is used to perform image processing on the fingerprint image to determine a target area in the fingerprint image and a fingerprint area in the target area where fingerprint patterns are collected;

[0020] a contrast determination unit, which determines the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area;

[0021] The fingerprint residual performance judging unit judges the fingerprint residual performance of the target housing based on the area of ​​the fingerprint region and the contrast.

[0022] In a possible implementation manner, if the pixel information includes RGB channel values; the contrast determination unit is specifically configured to:

[0023] Determine the sum of each channel value in the RGB channel values ​​of the fingerprint area and the sum of each channel value in the RGB channel values ​​of the target area;

[0024] The sum of each channel value in the RGB channel values ​​of the fingerprint area is compared with the sum of each channel value in the RGB channel values ​​of the target area to obtain the contrast of each channel.

[0025] In a possible implementation manner, the fingerprint area determination unit is specifically used to:

[0026] Determining the target area based on shooting parameters of the fingerprint image;

[0027] Converting the image of the target area into a first grayscale image;

[0028] Performing image feature enhancement processing on the first grayscale image to obtain a second grayscale image;

[0029] The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature.

[0030] In a possible implementation manner, the fingerprint area determination unit is specifically used to:

[0031] Determining the target area based on shooting parameters of the fingerprint image;

[0032] Converting the image of the target area into a third grayscale image;

[0033] Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas;

[0034] Performing image feature enhancement processing on each sub-region in the third grayscale image to obtain a fourth grayscale image;

[0035] The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

[0036] In a possible implementation manner, if the pixel information includes a grayscale value; the contrast determination unit is specifically configured to:

[0037] Determining the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area;

[0038] A comparison result of the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area is determined as the contrast.

[0039] In a possible implementation manner, the fingerprint area determination unit is specifically used to:

[0040] determining the target area based on shooting parameters;

[0041] Converting the image of the target area into a first grayscale image;

[0042] Extracting a background area from the first grayscale image, and removing the background area from the first grayscale image;

[0043] Performing image feature enhancement processing on the first grayscale image after removing the background area to obtain a second grayscale image;

[0044] The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature.

[0045] In a possible implementation manner, the fingerprint area determination unit is specifically used to:

[0046] determining the target area based on shooting parameters;

[0047] Converting the image of the target area into a third grayscale image;

[0048] Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas;

[0049] Extracting a background region from each sub-region in the third grayscale image, and removing the background region from each sub-region in the third grayscale image;

[0050] Performing image feature enhancement processing on each sub-region in the third grayscale image after removing the background region, to obtain a fourth grayscale image;

[0051] The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

[0052] In a possible implementation manner, the fingerprint area determination unit is specifically used to:

[0053] De-noising the corresponding grayscale image by image filtering;

[0054] Perform morphological processing on the denoised grayscale image.

[0055] In a possible implementation manner, the fingerprint area determination unit is specifically used to:

[0056] The uniform background area in the denoised grayscale image is removed to obtain the foreground area;

[0057] Removing the peripheral area in the foreground area to obtain an image after the peripheral area is removed; the uniform background includes uniform light source and / or uniform texture, and the peripheral area is an area in the foreground area excluding the connected area where the pixel values ​​are concentrated;

[0058] Morphological processing is performed on the image after the peripheral area is removed.

[0059] In a possible implementation, the fingerprint residual performance determination unit is specifically configured to:

[0060] If the area of ​​the fingerprint region is smaller than the preset area, and the contrast is smaller than the preset contrast, it is determined that the fingerprint residue of the target housing is low.

[0061] In a third aspect, an embodiment of the present application provides a computer storage medium for storing computer software instructions used in a detection device for fingerprint residue on a housing provided in the second aspect, which includes a program designed for executing the above aspect.

[0062] In a fourth aspect, an embodiment of the present application provides a computer program, which includes instructions. When the computer program is executed by a computer, the computer can execute the process executed in the detection device for detecting fingerprint residue on a shell in the second aspect.

[0063] In a fifth aspect, the present application provides an electronic device, the electronic device comprising a processor, a display screen and a sensor, the processor being the processor involved in any one of the implementations in the second aspect, the display screen being the display screen involved in any one of the implementations in the second aspect, and the sensor being the sensor involved in any one of the implementations in the second aspect. The electronic device may also include a communication interface for the terminal to communicate with other devices or a communication network.

[0064] In a sixth aspect, the present application provides a smart phone having the function of implementing any one of the detection methods for fingerprint residue on a housing in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0066] Figure 1A It is a flow chart of a detection scheme for fingerprint residue on a housing provided in an embodiment of the present application.

[0067] Figure 1B A schematic diagram of a shooting scene provided in an embodiment of the present application.

[0068] Figure 1C This is a schematic diagram of judging the fingerprint residue performance of shells of different materials provided in an embodiment of the present application.

[0069] Figure 2A This is a flow chart of another housing fingerprint residue testing solution provided in an embodiment of the present application.

[0070] Figure 2B This is a flowchart of an image grayscale calculation scenario 1 provided in an embodiment of the present application.

[0071] Figure 2C A schematic diagram of target area determination provided in an embodiment of the present application.

[0072] Figure 2D A schematic diagram of an inversion calculation provided in an embodiment of the present application.

[0073] Figure 3A This is a flowchart of a second image grayscale calculation scenario provided in an embodiment of the present application.

[0074] Figure 3B A schematic diagram of an uneven light source provided in an embodiment of the present application.

[0075] Figure 4A This is a flowchart of an image grayscale calculation scenario three provided in an embodiment of the present application.

[0076] Figure 4B A schematic diagram of uniform background extraction provided in an embodiment of the present application.

[0077] Figure 5A This is a flowchart of an image grayscale calculation scenario four provided in an embodiment of the present application.

[0078] Fig. 6A This is a flowchart of an image to grayscale calculation and background extraction scenario 1 provided in an embodiment of the present application.

[0079] Fig. 7A This is a flowchart of a second image-to-grayscale calculation scenario provided in an embodiment of the present application.

[0080] Fig. 8A This is a flowchart of an image to grayscale calculation scenario three provided in an embodiment of the present application.

[0081] Fig.9A This is a flowchart of an image grayscale calculation scenario four provided in an embodiment of the present application.

[0082] Fig.10 It is a structural schematic diagram of a detection device for fingerprint residue on a housing provided in an embodiment of the present application.

[0083] Fig.11 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0084] The embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0085] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0086] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0087] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process, a processor, an object, an executable file, an execution thread, a program and / or a computer running on a processor. By way of illustration, both applications and computing devices running on a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. For example, a component may communicate through a local and / or remote process according to a signal having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).

[0088] First, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0089] (1) Fingerprint connected domain refers to the fingerprint area in the image that is connected and has obvious boundaries. It is a key part of fingerprint recognition technology and involves the structure, features and their mutual relationship of the fingerprint image. The extraction of fingerprint connected domain usually includes feature extraction, edge detection, connected region analysis and other steps, aiming to effectively identify and locate the fingerprint area in the fingerprint image.

[0090] (2) Fingerprint image preprocessing refers to a series of processing steps performed on the original fingerprint image before fingerprint recognition or fingerprint feature extraction. These steps are aimed at improving image quality, enhancing fingerprint features, and reducing noise and interference to improve the accuracy and performance of subsequent fingerprint recognition algorithms.

[0091] (3) Binarization refers to the process of converting an image into only black and white colors. It involves threshold processing of grayscale images or color images. The binarization process usually includes the stages of selecting a threshold, applying the threshold to segment the image, and generating a binary image. The purpose is to simplify the image data and highlight the contours of the object of interest.

[0092] (4) RGB channels refer to the three independent color channels of red, green, and blue used in image processing and computer vision. It involves decomposing each pixel of the image into the intensity values ​​of the three primary colors of red, green, and blue. The processing of RGB channels usually includes color separation, channel operation, and color synthesis, with the aim of achieving precise color control and image enhancement.

[0093] (5) Image Grayscale Value refers to the brightness value of each pixel in a grayscale image. It involves the process of converting a color image into a single brightness level. The processing of image grayscale values ​​usually includes grayscale conversion, histogram analysis, and grayscale enhancement, with the aim of simplifying image data and highlighting important visual information.

[0094] (6) Residual Fingerprint Area refers to the area covered by the detectable fingerprint pattern left on the surface. It involves measuring and analyzing the degree of fingerprint residue on various surfaces. The calculation process of residual fingerprint area usually includes fingerprint image acquisition, image processing, region segmentation and area calculation, with the purpose of accurately quantifying the coverage of fingerprints.

[0095] (7) Connected components refer to the regions in a binary image that are composed of adjacent pixels with the same pixel value. It involves identifying and marking continuous groups of pixels in an image. The processing of connected components usually includes image binarization, connectivity detection, region labeling, and feature extraction, with the goal of segmenting and analyzing different objects in the image.

[0096] First, the technical problems to be solved by this application are analyzed and proposed. In the prior art, the technology for detecting fingerprint residues on the housing may include the following solutions:

[0097] Solution: The existing detection of fingerprint residue on the shell is usually to test the fingerprint area extracted from the fingerprint image, and it needs to be carried out in the same environment, the same light source illumination and non-reflective conditions.

[0098] The above solution is currently a common technology on the market, but it also has the following disadvantages:

[0099] Disadvantage 1: Limited accuracy. Existing detection technology for fingerprint residue on housings mainly relies on the staff's visual recognition of the fingerprint area in the fingerprint image, and evaluates the housing's anti-fingerprint performance through data visible to the naked eye such as fingerprint clarity and fingerprint visibility, without fully utilizing the deeper information that may be provided in the fingerprint image. For example, the area of ​​the residual fingerprint, the grayscale value and RGB channel value of the fingerprint area, the grayscale value and RGB channel value of the target area in the fingerprint image, etc. Therefore, relying solely on staff to perform detection through personnel identification may not be able to detect the characteristics of fingerprint residues at a deeper level, resulting in limited accuracy of the detection results and an inability to provide accurate evaluation.

[0100] Disadvantage 2: Lack of objectivity. Existing testing schemes for residual fingerprints on housings are usually based on subjective judgments by staff, rather than on objective data to detect the residual fingerprints. When comparing housings of the same material and different materials, the difference in characteristic information is large due to the difference in materials, and the differences between different housings cannot be objectively compared, thus affecting the objectivity of the detection scheme for residual fingerprints on housings.

[0101] In order to solve the problem that the current detection scheme of fingerprint residue on the shell does not meet the actual business needs and achieve the goal of meeting the needs of users and actual business, the technical problems to be solved by this application include one or more of the following two aspects, taking into account the shortcomings of the existing technology:

[0102] 1. Improve the accuracy of the detection scheme for fingerprint residue on the shell (disadvantage 1). The existing detection method for fingerprint residue on the shell mainly judges the fingerprint residue performance through data visible to the human eye, but fails to make full use of the deeper information that may be provided in the fingerprint image, resulting in insufficient accuracy of the detection result. Therefore, a detection method for fingerprint residue on the shell is needed that can make deeper use of the information in the fingerprint image and judge the fingerprint residue performance based on the above information to improve the accuracy of the detection result.

[0103] 2. Improve the objectivity of the detection scheme for fingerprint residue on the shell (disadvantage 2). The existing detection scheme for fingerprint residue on the shell is mainly based on subjective judgment of the staff, and there is no targeted treatment when testing shells of the same material and different materials, resulting in small differences between the detection results of different shells, and the comparison results are not objective enough. Therefore, a detection method for fingerprint residue on the shell is needed that can judge the fingerprint residue performance based on objective data and perform targeted treatment on shells of the same or different materials to improve the objectivity of the detection results.

[0104] Combined with the detection method of the fingerprint residue on the shell provided in the embodiment of the present application, the technical problems raised in the present application are specifically analyzed and solved, which can be seen in Figure 1A , Figure 1A It is a flow chart of a detection scheme for fingerprint residue on a housing provided in an embodiment of the present application. The method may include the following steps S100 to S103.

[0105] Step S100: Acquire a fingerprint image.

[0106] Specifically, the fingerprint image is an image obtained by photographing the fingerprint on the surface of the target housing. In the embodiment of the present application, the housing may be a structure composed of different shell materials or materials, wherein the housing may include a glass back panel, a screen back panel, a touch panel, and other structures that require quantitative and qualitative judgment of the anti-fingerprint performance and anti-fouling performance of the shell material (or material).

[0107] In one possible implementation, when testing and comparing the fingerprint residual performance of multiple shells, the fingerprint images captured based on each shell can be processed under the same shooting conditions, such as the same shooting light source, shooting technique, shooting equipment and other conditions. In the subsequent comparison of the fingerprint residual performance differences of different shells, more objective and accurate comparison results can be obtained, avoiding the impact of data anomalies caused by different shooting conditions. In an embodiment of the present application, in order to objectively evaluate the residual fingerprint in a fixed shooting environment, the shooting condition can be vertical shooting under a uniform light source to minimize the impact of reflections. Exemplarily, an embodiment of the present application provides a method for capturing and processing fingerprint images in a laboratory environment, please refer to Figure 1B , Figure 1B This is a schematic diagram of a shooting scene provided in an embodiment of the present application. Figure 1BThe apparatus may include a picture card bracket 01-A, a uniform light source 01-B, a residual fingerprint housing 01-C and a shooting device 01-D. Assuming that the shooting site is a camera assessment and measurement (CMA) laboratory, the shooting device includes two uniform light sources 01-B and a mobile phone or camera for shooting (i.e., the shooting device 01-D). The mobile phone is set to professional mode for shooting. The specific shooting method is as follows: the housing or the whole machine with residual fingerprint is placed vertically in the middle of the uniform light source, that is, the residual fingerprint housing 01-C is fixed with the picture card bracket 01-A to ensure that it is placed vertically in the middle of the uniform light source. The shooting device 01-D is located 40 cm in front of the residual fingerprint housing 01-C and is vertically aligned with the residual fingerprint housing 01-C for shooting. The two uniform light sources 01-B are arranged on both sides of the housing respectively, and the light source is adjusted to a brightness of D65 1000lux to ensure that the light source of the shooting environment is uniform. In summary, the embodiments of the present application ensure the quality and consistency of the captured images by using a uniform light source and professional shooting equipment in a fixed shooting environment to vertically shoot the residual fingerprint housing or the entire machine, and by precisely adjusting the light source and shooting parameters, minimize the impact of reflections and shadows on the image, thereby improving the accuracy and reliability of fingerprint image processing and analysis.

[0108] Step S101: performing image processing on the fingerprint image to determine a target area in the fingerprint image and a fingerprint area in the target area where fingerprint patterns are collected.

[0109] Specifically, in the embodiment of the present application, the system first receives a fingerprint image, which may be an image containing fingerprint lines. The system may perform a preprocessing operation on the fingerprint image to enhance the image quality and facilitate subsequent fingerprint area identification. The preprocessing operation may include one or more steps such as image graying, image filtering and denoising, histogram equalization, and binarization processing to more accurately determine the target area and the fingerprint area.

[0110] In a possible implementation, the image processing of the fingerprint image to determine the target area in the fingerprint image and the fingerprint area in the target area where fingerprint lines are collected includes: determining the target area based on the shooting parameters of the fingerprint image; converting the image of the target area into a first grayscale image; performing image feature enhancement processing on the first grayscale image to obtain a second grayscale image; and binarizing the second grayscale image to determine the fingerprint area in the target area that meets the fingerprint features. Specifically, in the embodiment of the present application, after determining the target area in the fingerprint image through shooting parameters (for example, assuming that the pixel area of ​​the fingerprint image is 1200*1200, the staff or system can determine the area with the most concentrated fingerprints in the fingerprint image as the target area based on the shooting equipment, shooting distance and shooting conditions, such as an area with a pixel area of ​​500*500 in the fingerprint image, which includes the fingerprint area where the fingerprint lines are located), the image of the target area is converted into a grayscale image, and the grayscale image is subjected to image feature enhancement processing (such as denoising and morphological processing), and the grayscale image after the above image feature enhancement processing is binarized (that is, the pixel values ​​in the grayscale image are converted into black and white colors based on a preset threshold), and finally the area in the black pixel value that meets the fingerprint characteristics is determined as the fingerprint area, and the fingerprint residual performance is more accurately evaluated based on the fingerprint area in the subsequent period. For a description of the specific scenario corresponding to the image processing in the embodiment of the present application, please refer to the following Figure 2B-Figure 2D The corresponding embodiments in the embodiments of the present application will not be described in detail.

[0111] In a possible implementation, the image processing of the fingerprint image to determine the target area in the fingerprint image and the fingerprint area in the target area where the fingerprint lines are collected includes: determining the target area based on the shooting parameters of the fingerprint image; converting the image of the target area into a third grayscale image; partitioning the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain multiple sub-areas; performing image feature enhancement processing on each sub-area in the third grayscale image to obtain a fourth grayscale image; binarizing the fourth grayscale image and merging the connected areas shared by each sub-area in the fourth grayscale image after the binarization processing to determine the fingerprint area. In the embodiment of the present application, after dividing the image into multiple sub-areas, threshold segmentation is performed for each sub-area, and the shared connected areas are merged to reduce the error caused by uneven light sources, thereby further improving the accuracy of extracting the fingerprint area. Specifically, after determining the target area based on the fingerprint image (for example, assuming that the pixel area of ​​the fingerprint image is 1200*1200, the staff or system can determine the area with the most concentrated fingerprints in the fingerprint image as the target area based on the shooting equipment, shooting distance and shooting conditions, such as an area with a pixel area of ​​500*500 in the fingerprint image, which includes the fingerprint area where the fingerprint lines are located), the image grayscale of the target area is calculated to obtain a grayscale image, and the grayscale image is divided into multiple sub-areas based on the shooting light source and shooting area of ​​the grayscale image; further, after performing image feature enhancement processing (such as denoising and / or morphological processing) on ​​the above-mentioned multiple sub-areas respectively, the multiple sub-areas after the image feature enhancement processing are threshold segmented by binarization processing to obtain a corresponding fourth grayscale image, wherein the connected area of ​​each sub-area in the above-mentioned fourth grayscale image may include multiple discontinuous fingerprint areas, and the common connected areas can be merged to accurately locate and extract the fingerprint area, thereby reducing the error caused by uneven light source. For a description of the specific scene corresponding to image processing under the condition of uneven light source in the embodiment of the present application, please refer to the following Figure 3A-Figure 5A The corresponding embodiments in the embodiments of the present application will not be described in detail.

[0112] In a possible implementation, the image processing of the fingerprint image to determine the target area in the fingerprint image and the fingerprint area in the target area where fingerprint lines are collected includes: determining the target area based on shooting parameters; converting the image of the target area into a first grayscale image; extracting the background area from the first grayscale image and removing the background area from the first grayscale image; performing image feature enhancement processing on the first grayscale image after removing the background area to obtain a second grayscale image; and binarizing the second grayscale image to determine the fingerprint area in the target area that meets the fingerprint features. In the embodiment of the present application, the target area in the fingerprint image is subjected to image processing, including grayscale conversion, background area extraction, image feature enhancement and binarization processing, so as to determine the fingerprint area in the target area where the fingerprint lines are collected, wherein, after the image of the target area is converted into a grayscale image, the background area is extracted and removed, so that the color information can be removed and the interference of the non-fingerprint area can be effectively reduced, and after subsequent image processing, the difference between shells of the same material can be more accurately judged by comparing the grayscale information, so that the subsequent image feature enhancement and binarization processing are more concentrated on the fingerprint area, so as to improve the accuracy and objectivity of the difference in the residual performance of the fingerprint of the shells of the same material. For the specific scene description corresponding to the image processing after the background extraction and the uniform light source in the embodiment of the present application, please refer to the following Fig. 6A The corresponding embodiments are not described in detail in the embodiments of this application.

[0113] In a possible implementation, the fingerprint image is processed to determine the target area in the fingerprint image and the fingerprint area in the target area where the fingerprint lines are collected, including: determining the target area based on shooting parameters; converting the image of the target area into a third grayscale image; partitioning the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain multiple sub-areas; extracting the background area from each sub-area in the third grayscale image, and removing the background area in each sub-area in the third grayscale image; performing image feature enhancement processing on each sub-area in the third grayscale image after removing the background area to obtain a fourth grayscale image; binarizing the fourth grayscale image and merging the connected areas shared by each sub-area in the fourth grayscale image after the binarization processing to determine the fingerprint area. In the embodiment of the present application, the error caused by uneven light source is reduced by adaptive partitioning, threshold segmentation, and merging of shared connected areas, and the accuracy of the fingerprint residue detection scheme of the shell is improved. Specifically, in the embodiment of the present application, after determining the target area in the fingerprint image based on the shooting parameters (for example, assuming that the pixel area of ​​the fingerprint image is 1200*1200, the staff or system can determine the area with the most concentrated fingerprints in the fingerprint image as the target area based on the shooting equipment, shooting distance and shooting conditions, such as an area with a pixel area of ​​500*500 in the fingerprint image, which includes the fingerprint area where the fingerprint lines are located), by performing background extraction on the image of the target area and removing color information to obtain a grayscale image, multiple sub-areas can be obtained by adaptively partitioning the grayscale image, and the difference between shells of the same material can be more accurately judged by comparing the grayscale information after subsequent image processing; further, the multiple sub-areas after background extraction can be subjected to steps such as image feature enhancement, threshold segmentation (i.e., binarization of the multiple grayscale images after image feature enhancement) and connected area merging to reduce the error caused by uneven light sources, so that the fingerprint area finally determined is more accurate. In summary, the embodiment of the present application reduces the influence of uneven light source by adaptively partitioning, threshold segmentation and merging of common connected areas of the image of the target area, and reduces the interference of non-fingerprint areas by extracting the background of multiple grayscale images before image feature enhancement, thereby improving the accuracy and objectivity of the difference in residual performance of fingerprints on shells of the same material. For the specific scene description corresponding to image processing after background extraction and uneven light source in the embodiment of the present application, please refer to the following Figures 7A-9A The corresponding embodiments are not described in detail in the embodiments of this application.

[0114] In a possible implementation, the image feature enhancement process includes: performing denoising on the corresponding grayscale image through image filtering; and performing morphological processing on the grayscale image after denoising. In the embodiment of the present application, image filtering can effectively reduce the noise in the image and improve the quality and clarity of the image; and morphological processing can further improve the structure and shape of the image and enhance the features of the fingerprint area in the image, so as to more accurately extract the fingerprint area in the subsequent image processing process, thereby improving the accuracy of the detection scheme of the fingerprint residue on the shell.

[0115] In a possible implementation, the morphological processing of the grayscale image after denoising includes: removing the uniform background area in the grayscale image after denoising to obtain the foreground area; removing the peripheral area in the foreground area to obtain the image after the peripheral area is removed; the uniform background includes uniform light source and / or uniform texture, and the peripheral area is the area in the foreground area except the connected area where the pixel values ​​are concentrated; the image after the peripheral area is removed is morphologically processed. In an embodiment of the present application, before the morphological processing of the grayscale image after denoising is performed, the uniform background area (for example, the background area with uniform light source and / or uniform texture) in the grayscale image after denoising can be removed, and more accurate fingerprint area recognition can be achieved based on the centroid concentration of the connected area in the grayscale image, that is, the area where the fingerprint lines are located is determined, and the large block noise outside the area is eliminated; further, if the connected area in the foreground area is not detected, it can be judged that the fingerprint residue is weak. In addition, the envelope of the area where the fingerprint lines are located can be determined by image segmentation or morphological processing, and the noise outside the envelope can be eliminated.

[0116] Step S102: Determine the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area.

[0117] Specifically, based on whether the material of the shell to be compared is the same, different pixel information of the target area and the fingerprint area can be compared. For example, if the material of the shell to be compared is the same, the fingerprint residual performance of the shell can be more accurately judged by comparing the grayscale values ​​of the target area and the fingerprint area; or, if the material of the shell to be compared is different, the fingerprint residual performance of the shell can be more accurately judged by comparing the RGB channel values ​​of the target area and the fingerprint area.

[0118] In a possible implementation, if the pixel information includes RGB channel values; the determination of the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area includes: determining the sum of each channel value in the RGB channel values ​​of the fingerprint area and the sum of each channel value in the RGB channel values ​​of the target area; comparing the sum of each channel value in the RGB channel values ​​of the fingerprint area with the sum of each channel value in the RGB channel values ​​of the target area to obtain the contrast of each channel. In the embodiment of the present application, the color difference information between the fingerprint area and the target area can be obtained by comparing the sum of each channel value in the RGB channel values ​​of the fingerprint area and the target area, thereby improving the accuracy of the shell fingerprint residue test result when comparing shells of different materials. Specifically, first, after obtaining the pixel information (i.e., RGB channel values) of the target area and the fingerprint area, determine the sum of each channel value in the RGB channel values ​​of the fingerprint area and the sum of each channel value in the RGB channel values ​​of the target area. The system can compare the sum of the same type of channel values ​​in the RGB channel values ​​of the fingerprint area and the target area to obtain the contrast of each of the three RGB channels. Based on the contrast, the degree of color difference between the fingerprint area and the target area can be judged (the greater the color difference between the fingerprint area and the target area, the higher the degree of fingerprint residue), so as to obtain more accurate results in the subsequent judgment of fingerprint residue performance. In addition, when testing shells of different materials, because shells of different materials usually have obvious color differences, the above-mentioned color difference information can be used to more accurately and objectively judge the difference in fingerprint residue performance between different shell materials. For a description of the specific scenario corresponding to the contrast of the RGB channel values ​​of the fingerprint area and the target area in the embodiment of the present application, please refer to the following. Figure 2A-Figure 5A The corresponding embodiments are not described in detail in the embodiments of this application.

[0119] In a possible implementation, if the pixel information includes a grayscale value; the determination of the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area includes: determining the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area; and determining the contrast as the result of comparing the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area. In the embodiment of the present application, the grayscale difference between the fingerprint area and the target area can be determined by comparing the sum of the grayscale values ​​of the fingerprint area with the sum of the grayscale values ​​of the target area. For example, when testing the same shell material, because the color difference between shells of the same material is small, and the grayscale information contains more feature information, the difference between the fingerprint residual performance can be judged by comparing the grayscale difference information between different shells, thereby improving the judgment accuracy of the shell fingerprint residual performance. Specifically, in the embodiments of the present application, the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area can be determined through the pixel information (i.e., grayscale values) of the target area and the fingerprint area in the fingerprint image, and compared to determine the degree of grayscale difference between the fingerprint area and the target area (for example, when testing the same shell material multiple times, the greater the grayscale difference between the fingerprint area and the target area, the higher the degree of fingerprint residue), thereby obtaining more accurate results in the subsequent judgment of fingerprint residue performance. In addition, when testing the same shell material, because the shells of the same material have smaller differences in color and more feature information in the grayscale information, the difference in fingerprint residue performance between the same shell materials can be more accurately and objectively judged through the above-mentioned grayscale difference information. For a description of the specific scenario corresponding to the grayscale value contrast between the fingerprint area and the target area in the embodiments of the present application, please refer to the following. Figures 6A-9A The corresponding embodiments are not described in detail in the embodiments of this application.

[0120] Step S103: judging the fingerprint residue performance of the target housing based on the area of ​​the fingerprint region and the contrast.

[0121] Specifically, in the embodiment of the present application, the system first obtains the area and contrast information of the fingerprint area. The area of ​​the fingerprint area can be calculated by the number of pixels of the fingerprint area extracted in the previous step, and the size of the area reflects the coverage of the fingerprint area in the entire target area; the contrast can be determined by calculating the difference in grayscale value or RGB channel value between the fingerprint area and the target area, and the contrast reflects the significance and clarity of the fingerprint area. After obtaining the area and contrast of the fingerprint area, the system can analyze these indicators to determine the fingerprint residual performance of the target shell. Exemplarily, the system can pre-set one or more thresholds or standards to evaluate the degree of fingerprint residue. For example, the area threshold and contrast threshold can be pre-set by the system or staff. When the system detects that the area and contrast of the fingerprint area exceed the predetermined threshold at the same time, it can be judged that the target shell has obvious fingerprint residue (that is, the fingerprint residue is high).

[0122] In one possible implementation, the fingerprint residue performance of the target shell is judged based on the area of ​​the fingerprint area and the contrast, including: if the area of ​​the fingerprint area is smaller than the preset area, and the contrast is smaller than the preset contrast, then the fingerprint residue of the target shell is judged to be low. In an embodiment of the present application, if the area of ​​the fingerprint area is smaller than the preset area, and the contrast between the fingerprint area and the target area (for example, if shells of the same material are compared, the contrast is the contrast of the grayscale value, or if shells of different materials are compared, the contrast is the contrast of the RGB channel value) is smaller than the preset contrast, then the fingerprint residue of the target shell is judged to be low. The size of the fingerprint area and the degree of color or grayscale difference with the target area can be used to more accurately evaluate the fingerprint residue situation, so as to improve the accuracy and objectivity of the detection scheme of the fingerprint residue on the shell. For example, see Figure 1C , Figure 1C This is a schematic diagram of judging the fingerprint residue performance of a housing of different materials provided in an embodiment of the present application, such as Figure 1C As shown, Figure 1C The fingerprint residue images of samples of different materials and the corresponding area and contrast standards are shown in Figure 1C There are three main material categories: PC shell material, touch panel and screen (such as a tablet flexible screen). The fingerprint images under each category show the fingerprint residue of the material sample under standard light source and shooting conditions; for PC shell material, fingerprint image 1 shows the fingerprint residue shot under standard light source conditions. The system can extract the fingerprint area through the image processing algorithm and calculate the area and contrast of the fingerprint area (such as the contrast of the RGB channel values ​​of the fingerprint area and the target area in fingerprint image 1); the fingerprint images 2 and 3 corresponding to the touch panel and screen respectively can refer to the description of the embodiment corresponding to fingerprint image 1, which will not be repeated here; Figure 1CAs shown, if the fingerprint residual area in one or more of the fingerprint images 1, 2 and 3 is detected to be less than 2000 square pixels and the contrast is less than 30%, then the shell corresponding to the fingerprint image is judged to have good anti-fingerprint and anti-fouling performance. Through the application on different shell materials, the examples provided in the embodiments of the present application can verify the universality and effectiveness of the detection method of shell fingerprint residue in a variety of practical application scenarios.

[0123] Optionally, in step S101 of the above method, when fingerprint residues are detected on multiple different housings, the image processing may include two different processes based on whether the housings are made of the same material. For details, see Figure 2A , Figure 2A A schematic diagram of the process of another housing fingerprint residue test solution provided in an embodiment of the present application; Figure 2A The method may include (i) image grayscale calculation 201 and (ii) image conversion grayscale calculation and background extraction 202. Based on different processing, the pixel information when judging the contrast between the fingerprint area and the target area is also different. For example, (i) image grayscale calculation 201 is to judge the fingerprint residue by the contrast of the sum of each channel value in the RGB channel value of the fingerprint area and the target area, and the area of ​​the fingerprint area when comparing the fingerprint residue of the shells of the same material; (ii) image conversion grayscale calculation and background extraction 202 is to obtain more grayscale information in the fingerprint area by an additional background extraction step when comparing the fingerprint residue of the shells of different materials, and judge the fingerprint residue by the contrast of the sum of the grayscale value of the fingerprint area and the target area, and the area of ​​the fingerprint area. In particular, (i) image grayscale calculation 201 and (ii) image conversion grayscale calculation and background extraction 202 may include in specific implementation. Figure 2A One or more of the four scenarios, namely, scenario 1, scenario 2, scenario 3 and scenario 4, may specifically include the following scenario descriptions:

[0124] (i) Image grayscale calculation 201.

[0125] Scene 1: The light source is uniform and the uniform background is not removed.

[0126] Specifically, see Figure 2B , Figure 2B This is a flowchart of an image grayscale calculation scenario 1 provided in an embodiment of the present application. The process may include the following steps S2001-S2004.

[0127] Step S2001: Fingerprint image capture and input.

[0128] Specifically, a fingerprint image is obtained, which is a fingerprint image obtained by photographing the fingerprint on the surface of the target shell. The fingerprint images corresponding to different shells can be images obtained by photographing under the same shooting conditions, such as the same shooting light source, shooting technique, shooting equipment and other conditions, so that a more objective and accurate comparison result can be obtained when comparing the fingerprint residual performance differences of different shells in the subsequent comparison, avoiding the influence of data anomalies caused by different shooting conditions.

[0129] Step S2002: Region of Interest (RIO) extraction.

[0130] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S2002 can include the following steps S2002A-S2002D.

[0131] Step S2002A: Image grayscale calculation.

[0132] Specifically, before the grayscale calculation of the image, the target area is first determined by the shooting parameters of the fingerprint image (for example, assuming that the pixel area of ​​the fingerprint image is 1200*1200, the staff or system can determine the area with the most concentrated fingerprints in the fingerprint image as the target area based on the shooting equipment, shooting distance and shooting conditions, such as an area with a pixel area of ​​500*500 in the fingerprint image, which includes the fingerprint area where the fingerprint lines are located). The grayscale calculation of the image is used to convert the fingerprint image from a color image to a grayscale image, which only contains brightness information and removes color information. Exemplarily, the grayscale calculation can use the weighted average method, that is, the grayscale value is calculated based on the brightness values ​​of the three RGB channels of the image. For example, the grayscale calculation formula can be: Grayscale value = 0.299 R + 0.587 G + 0.114*B, the grayscale calculation formula is obtained by weighted calculation based on the visibility of different colors to the human eye, so that the RGB channel information of each pixel in the fingerprint image (usually composed of three channels: red, green, and blue) is synthesized into a grayscale value, and the fingerprint image is converted into a grayscale image including only grayscale information based on the grayscale value. The above grayscale calculation formula is only one possible implementation method, and other implementation methods are also possible, which are not limited in the embodiments of this application. In addition, the target area can be determined by the shooting parameters of the fingerprint image. Figure 2C , Figure 2C is a schematic diagram of determining a target area provided in an embodiment of the present application, Figure 2CThe diagram may include a fingerprint image diagram 02-A and an image diagram 02-B of a target area. As shown in the fingerprint image diagram 02-A, it is assumed that the pixel area of ​​the fingerprint image diagram 02-A is 1500*1500, wherein the white line frame is the area where the fingerprint is located. The staff or the system may determine the area with the most concentrated fingerprints in the fingerprint image diagram 02-A as the target area based on the shooting device, shooting distance and shooting conditions, as shown in the image diagram 02-B of the target area. The pixel area of ​​the image diagram 02-B of the target area is 150*150, so that the image diagram 02-B of the target area also includes the white line frame (i.e., the area where the fingerprint is located), and greatly reduces other areas that do not contain valid information. Subsequently, the fingerprint area and the fingerprint residual performance may be more accurately determined based on the target area.

[0133] Step S2002B: Image filtering.

[0134] Specifically, after the image of the target area is converted into a grayscale image, the grayscale image can be denoised by image filtering. Exemplarily, in the embodiment of the present application, the grayscale image can be denoised by log-Gabor filter and / or median filter. The log-Gabor filter is used to extract fingerprint pattern features in the image and enhance the details and edge information in the image; the median filter is a nonlinear filtering method, which is mainly used to remove noise (such as salt and pepper noise) in the image while retaining the edge details of the image. Through the above-mentioned image filtering process, the interference and noise in the image can be preliminarily reduced, and the clarity and continuity of the fingerprint pattern can be improved.

[0135] Step S2002C: mathematical morphology calculation.

[0136] Specifically, after the grayscale image is denoised by image filtering, the denoised grayscale image can be subjected to morphological processing (i.e., mathematical morphological calculation), and the morphological processing can include corrosion, expansion, opening operation, closing operation, etc. For example, in the embodiment of the present application, the holes in the fingerprint lines in the denoised grayscale image can be filled by the expansion operation to make it more complete; at the same time, the small holes or breaks in the fingerprint lines can be eliminated by the closing operation, thereby improving the continuity and clarity of the grayscale image and further strengthening the fingerprint features in the image. The above-mentioned mathematical morphological calculation is only one possible implementation method, and other implementation methods can also be used, which are not limited in the embodiment of the present application.

[0137] Step S2002D: Adaptive Otsu's Method (OSTU) is used to binarize and extract the fingerprint position.

[0138] Specifically, after the grayscale image is processed by image filtering and mathematical morphology calculation, the system can use adaptive OSTU binarization to extract the fingerprint position (i.e., fingerprint area) in the grayscale image. Adaptive OSTU binarization is an automatic threshold selection technology based on grayscale histogram. Its principle is to determine the optimal segmentation threshold by maximizing the inter-class variance, thereby segmenting the image into two parts: foreground (fingerprint pattern) and background. This method can not only adapt to the grayscale distribution characteristics of different images, but also be flexibly adjusted according to the characteristics of the local area, so that the fingerprint location information can be extracted more accurately. In the embodiment of the present application, the purpose of adaptive OSTU binarization is to segment the image into two parts: foreground and background. Therefore, the output is an image containing only black and white pixel values, black (representing the background) and white (representing the foreground), that is, the grayscale image will become a binary image to indicate the presence or absence of an object. Through adaptive OSTU binarization, the system can dynamically adjust the threshold to ensure that the best segmentation effect can be obtained in different areas. Even if there is uneven illumination, noise interference, etc. in the image of the target area, the system can still accurately extract the fingerprint location information.

[0139] Step S2003: directly calculating the area of ​​the fingerprint region.

[0140] Specifically, in the embodiment of the present application, the area of ​​the fingerprint area can be calculated based on the binary fingerprint area (i.e., fingerprint position) extracted in step S2002, and the area of ​​the fingerprint area is output as the residual fingerprint area. For example, the system first scans the binary fingerprint area. Because the black pixels in the fingerprint area image represent the fingerprint lines, the area of ​​the fingerprint area can be obtained by counting the number of all black pixels in the fingerprint area, wherein the statistical method includes but is not limited to row-by-row scanning, column-by-column scanning, automatic extraction algorithm, and regional growth algorithm. In addition, in the process of calculating the area of ​​the fingerprint area, because the resolution of different images may be different, the number of pixels corresponding to the fingerprint area of ​​the same area in images of different resolutions is also different. Therefore, when calculating the area, the system can convert by introducing the resolution information of the image, for example, by converting the pixel area to the actual area through the pixel density (pixels per inch, DPI) to obtain the area of ​​the fingerprint area.

[0141] Step S2004: Place the fingerprint position into the original image and calculate the fingerprint contrast of the RGB channels respectively.

[0142] Specifically, the fingerprint position extracted in step S2002 can be placed in the image of the target area (i.e., the image of the target area in step S2001), the contrast between the RGB channel values ​​of the fingerprint area and the target area can be calculated, and the fingerprint residual contrast of the three RGB channels can be output; further, when detecting the fingerprint residual performance, after the user or staff touches the shell material with a finger (i.e., leaves a fingerprint mark on the shell material), the user or staff can wait for a certain time (e.g., 5 minutes) and wipe the area contacted by the finger (i.e., the fingerprint area), and then manually check and judge the fingerprint residual performance, or shoot the shell material, and judge the fingerprint residual performance of the fingerprint image shot this time through the embodiments described in steps S2001-S2005, so as to more accurately determine the fingerprint residual performance; or, in the embodiment of the present application, the user or staff touches the shell material with a finger (i.e., leaves a fingerprint mark on the shell material), and waits for a certain time (e.g., 3 minutes), and then manually check and judge the fingerprint residual performance, or shoot the shell material, and judge the fingerprint residual performance of the fingerprint image shot this time through the embodiments described in steps S2001-S2005, so as to more accurately determine the fingerprint residual performance. For example, when testing shells of different materials, because shells of different materials usually have obvious color differences, the color difference information (i.e., the contrast of RGB channel values) can be used to more accurately and objectively judge the difference in fingerprint residual performance between different shell materials. The contrast of the above three RGB channels can be calculated by the contrast formula. For details, see Figure 2D , Figure 2D Schematic diagram of an inversion calculation provided in an embodiment of the present application. Figure 2D The first inversion calculation diagram 02-C and the second inversion calculation diagram 02-D may be included; as shown in the first inversion calculation diagram 02-C, assuming that the overall area of ​​the target area is A, the area of ​​the fingerprint area within the target area is B, and the area of ​​other areas outside the fingerprint area is AB; the average R channel value in area B is β, and the average R channel value in area AB is α. Generally, the color depth of the fingerprint area is generally greater than that of the area other than the fingerprint area (that is, the color of area B is darker than that of area AB), and the dark grayscale statistics are that the darker the color, the lower the grayscale. Therefore, the image can be inverted as a whole, that is, the first inversion calculation diagram 02-C is converted into the second inversion calculation diagram 02-D. At this time, β is greater than α, and A is greater than B.

[0143] At this time, the calculated contrast index can be expressed as the sum of the R channel values ​​of the image in area B is greater than the sum of the R channel values ​​of the image in area A. The contrast formula can be expressed as:

[0144]

[0145]

[0146]

[0147] After determining the R channel value contrast between the fingerprint area and the target area (i.e., the R channel value contrast between the B area and the A area) based on the above contrast formula, the G channel value and the B channel value in the RGB channel can be substituted into the above contrast formula respectively to calculate the fingerprint residual contrast of the three RGB channels respectively.

[0148] First, the monotonicity analysis of the simplified formula is:

[0149] (1) When the area of ​​A is fixed (when taking photos in real life, the area of ​​A also needs to be fixed using fixed equipment and distance), contrast is positively correlated with B;

[0150] (2) When A and B (residual area) are fixed, contrast and Negative correlation, the larger β is, the smaller α is. The smaller it is, the greater the overall contrast (the greater the difference between β and α, the greater the contrast (significant contrast), which also conforms to the subjective meaning of contrast);

[0151] Secondly, analyze the influencing factors and correlations of several variables in the formula:

[0152] Overall area A: related to the shooting device, shooting conditions (distance L, notebook thickness d), and the selected fingerprint area ROI.

[0153] Fingerprint area (dirty area) B: B is the fingerprint area extracted by the automatic extraction algorithm. B is related to the fingerprint algorithm extraction accuracy. B is related to the fingerprint grayscale average depth β and the background grayscale average depth α.

[0154] Background average grayscale α and fingerprint average depth β: related to material (Material), shooting equipment (device), shooting light source (light-source), and fingerprint residue condition (condition).

[0155] Finally, in special cases, special values ​​are analyzed:

[0156] Assume that the fingerprint detection area B is fixed (if the fingerprint can be detected, β>α), the greater the difference between β and α, the greater the contrast.

[0157] Scene 2: The light source is uneven and the uniform background is not removed.

[0158] Specifically, see Figure 3A , Figure 3A This is a flowchart of an image grayscale calculation scenario 2 provided in an embodiment of the present application. The process may include the following steps S3001-S3004.

[0159] Step S3001: Fingerprint image capture and input.

[0160] Step S3002: Extracting the region of interest (RIO).

[0161] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S3002 can include the following steps S3002A-S3002H.

[0162] Step S3002A: Image grayscale calculation.

[0163] Step S3002B: adaptively partition the image of the target area.

[0164] Specifically, when it is detected that the light source of the image of the target area is uneven, the system will adaptively divide the image into multiple areas according to the characteristics of the image of the target area and the light source conditions to better adapt to the local characteristics of the image. For example, see Figure 3B , Figure 3B A schematic diagram of an uneven light source provided in an embodiment of the present application is shown in FIG. Figure 3B As shown, Figure 3B The black frame in the figure is the fingerprint area. Figure 3B There are different degrees of uneven reflections in the image. Normal calculation steps may affect the calculation results of the fingerprint area. Therefore, when the system detects that the brightness of the central area of ​​the image of the target area is higher than that of the surrounding area (that is, the area except the fingerprint area), the image of the target area can be divided into 3×3 and / or 4×4 grids to process each area more accurately, thereby minimizing processing errors.

[0165] Step S3002C: Image filtering.

[0166] Step S3002D: mathematical morphology calculation.

[0167] Step S3002E: Partition image threshold segmentation.

[0168] Specifically, after the image grayscale calculation, adaptive partitioning, image filtering and denoising and mathematical morphology calculation are performed on the image of the target area, multiple sub-areas of the grayscale image of the target area can be obtained, and the average brightness of each sub-area is calculated respectively, and an appropriate threshold is set based on the average brightness difference of each sub-area. Finally, based on the threshold, the pixels in each sub-area can be divided into two categories: the pixels above the threshold are classified as fingerprint features, and the pixels below the threshold are classified as background; the fingerprint area can be more accurately extracted from the image of the target area through the threshold segmentation of the above-mentioned binarization processing. Exemplarily, if the average brightness in a sub-area among the multiple sub-areas is high, it may mean that there are fingerprint lines in the sub-area, so a relatively low threshold can be selected for segmentation to ensure that the fingerprint area can be effectively extracted; and for the sub-area with a low average brightness, it may be a background area, so a higher threshold can be selected for segmentation to reduce the interference of the background. Through this method of partitioned image threshold segmentation, the unevenness of the light source can be handled more flexibly, and the accuracy and stability of subsequent fingerprint area extraction can be improved.

[0169] Step S3002F: Merge partition images.

[0170] Specifically, after performing the threshold segmentation of the partitioned image, it is necessary to merge the segmented regions to obtain the overall fingerprint region. Assuming that the grayscale image of the target area is partitioned into 3×3 and 4×4 (i.e., multiple grayscale images are partitioned one by one), the common connected regions in the 3×3 or 4×4 grids can be merged to merge the adjacent fingerprint regions in the partitioned image into a larger connected region, thereby obtaining a more complete fingerprint region.

[0171] Step S3002G: Fingerprint connected area determination.

[0172] Specifically, after the partition images are merged, the merged fingerprint area can be judged as a connected area to ensure the continuity of the extracted fingerprint area. Exemplarily, the system can judge the connected area of ​​the merged fingerprint area, identify and retain the connected fingerprint area, and then remove the disconnected parts. For example, the system will detect whether there are broken or discontinuous parts in the merged fingerprint area, and remove these parts, so as to ensure that the final extracted fingerprint area is continuous and improve the continuity and clarity of the extracted fingerprint area.

[0173] Step S3002H: directly remove non-fingerprint areas.

[0174] Specifically, after the fingerprint connected area judgment is performed, the system will directly eliminate the non-fingerprint area to reduce the amount of calculation for subsequent processing and improve processing efficiency. For example, assuming that in the process of fingerprint connected area judgment, the system has identified some areas that are not connected to the fingerprint, the above-mentioned unconnected areas will be eliminated, and only the part connected to the fingerprint (ie, the fingerprint area) will be retained. In summary, in the embodiment of the present application, multiple sub-areas can be obtained by adaptively partitioning the grayscale image of the target area, and a threshold can be determined based on the light source conditions in each sub-area in the grayscale image of the target area, and the common connected areas of each sub-area can be merged to determine the fingerprint area, which greatly reduces the error caused by the uneven light source, thereby improving the objectivity of the shell fingerprint residue test scheme and the accuracy of the results.

[0175] Step S3003: directly calculating the area of ​​the fingerprint region.

[0176] Step S3004: Place the fingerprint position into the original image and calculate the fingerprint contrast of the RGB channels respectively.

[0177] For detailed description of the above steps S3001, S3003 and S3004, please refer to the above Figure 2B For the embodiments corresponding to step S2001, step S2003 and step S2004, steps S3002A, step S3002C and step S3002D can refer to the embodiments corresponding to step S2002A-step S2002C, which will not be repeated here.

[0178] Scene 3: The light source is uniform and the uniform background has been removed.

[0179] Specifically, see Figure 4A , Figure 4A This is a flowchart of an image grayscale calculation scenario three provided in an embodiment of the present application. The process may include the following steps S4001-S4004.

[0180] Step S4001: Fingerprint image capture and input.

[0181] Step S4002: Region of Interest (RIO) extraction.

[0182] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S4002 can include the following steps S4002A-S4002E.

[0183] Step S4002A: Image grayscale calculation.

[0184] Step S4002B: Image filtering.

[0185] Step S4002C: remove the uniform background and eliminate the noise based on the centroid concentration of the connected area.

[0186] Specifically, after performing preliminary noise removal on the grayscale image of the target area through image filtering, the uniform background area in the grayscale image can be extracted, and the foreground area can be obtained after removing the uniform background area. The position of the fingerprint area is determined according to the concentration of the center of gravity of the connected area in the foreground area, and the large block of noise that is not in the fingerprint area is removed. Exemplarily, after performing preliminary noise removal on the grayscale image through image filtering, the system can determine the uniform background area by identifying the background area with uniform grayscale value in the grayscale image, and the uniform background area does not contain fingerprint features and the grayscale value changes slightly; when the system extracts the uniform background area, the system can remove these background areas from the image to obtain the foreground area, wherein the foreground area may include fingerprint features and other possible interference information (such as deeper noise); further, the system can identify all connected areas in the foreground area (referring to adjacent pixel blocks with similar grayscale values ​​in the image), and calculate the center of gravity position of each connected area (that is, the average position of all pixel points in the area) ), and judge the position of the fingerprint area based on the distribution of the centroid position. If the system detects that the centroid position of the connected area is concentrated in a certain area in the grayscale image, then the area is judged to be the fingerprint area; or, if the system detects that the centroid position of the connected area (i.e., the Euclidean distance) is scattered throughout the entire image, then the system can judge that there is no significant fingerprint feature in the area and it may be a noise area; after determining the fingerprint area and the noise area, the system can remove large blocks of noise that are not in the fingerprint area (for example, by marking and removing those connected areas with scattered centroid positions and large areas to clean up the noise in the image), so that the foreground area obtained after processing is purer and the fingerprint features are more obvious, which is convenient for subsequent feature extraction and recognition. See also Figure 4B , Figure 4B Schematic diagram of uniform background extraction provided in an embodiment of the present application. Figure 4BThe target area schematic diagram 04-A may include an inverted image 04-B, a filtered image 04-C, a uniform background extraction image 04-D and a binary fingerprint area 04-E. As shown in the target area schematic diagram 04-A, the target area schematic diagram 04-A is an image of the target area intercepted from the fingerprint image. Because the visible trace of the target area schematic diagram 04-A is low, it is impossible to accurately judge the shell fingerprint residual performance. Therefore, the target area schematic diagram 04-A can be inverted by calculation, that is, the target area schematic diagram 04-A is converted into an inverted image 04-B, and the pixel information and fingerprint pattern information in the inverted image 04-B become clearly visible; further, the system can reduce the noise in the inverted image 04-B by performing image filtering and morphological processing on the inverted image 04-B (that is, the above-mentioned steps S4002B and S4002D). The system can identify the background area with uniform grayscale value in the filtered image 04-C to determine the uniform background area, and remove the uniform background area to obtain the foreground area; further, the system can determine the position of the fingerprint area according to the concentration of the center of gravity of the connected area in the foreground area, and remove the large block of noise that is not in the fingerprint area to obtain a gray image with clearer fingerprint features, that is, the uniform background extraction image 04-D. The white noise in the uniform background extraction image 04-D is reduced, and the area where the fingerprint pattern is located is clearer. Finally, the uniform background extraction image 04-D can be binarized (that is, the following step S4002E) to obtain a binary fingerprint area 04-E, in which the noise and background area have been removed and only the fingerprint area extracted from the image of the target area is included.

[0187] Step S4002D: mathematical morphology calculation.

[0188] Step S4002E: Adaptively perform OSTU binarization to extract fingerprint positions.

[0189] Step S4003: directly calculating the area of ​​the fingerprint region.

[0190] Step S4004: Place the fingerprint position into the original image and calculate the fingerprint contrast of the RGB channels respectively.

[0191] For detailed description of the above steps S4001, S4003 and S4004, please refer to the above Figure 2B For the embodiments corresponding to step S2001, step S2003 and step S2004, the steps in steps S4002A-step S4002E except step S4002C can refer to the embodiments corresponding to step S2002A-step S2002D, which will not be repeated here.

[0192] Scene 4: The light source is uneven and the uniform background has been removed.

[0193] Specifically, see Figure 5A , Figure 5A This is a flowchart of an image grayscale calculation scenario four provided in an embodiment of the present application. The process may include the following steps S5001-S5004.

[0194] Step S5001: Fingerprint image capture and input.

[0195] Specifically, a fingerprint image is obtained, which is a fingerprint image obtained by photographing the fingerprint on the surface of the target shell. The fingerprint images corresponding to different shells can be images obtained by photographing under the same shooting conditions, such as the same shooting light source, shooting technique, shooting equipment and other conditions, so that a more objective and accurate comparison result can be obtained when comparing the fingerprint residual performance differences of different shells in the subsequent comparison, avoiding the influence of data anomalies caused by different shooting conditions.

[0196] Step S5002: extracting the region of interest (RIO).

[0197] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S5002 can include the following steps S5002A-S5002I.

[0198] Step S5002A: Image grayscale calculation.

[0199] Specifically, the image grayscale calculation is used to convert the image of the target area from a color image to a grayscale image. The above multiple grayscale images only contain brightness information and remove color information. For example, the grayscale calculation can use the weighted average method, that is, the grayscale value is calculated according to the brightness values ​​of the three RGB channels of the image. For example, the grayscale calculation formula can be: grayscale value = 0.299 R + 0.587 G + 0.114*B, the grayscale calculation formula is obtained by weighted calculation based on the visibility of different colors to the human eye, so that the RGB channel information (usually composed of three channels: red, green, and blue) of each pixel in the image of the target area is synthesized into a grayscale value, and based on the grayscale value, the image of the target area is converted into a grayscale image that only includes grayscale information.

[0200] Step S5002B: adaptively partition the image of the target area.

[0201] Specifically, when it is detected that the light source of the grayscale image of the target area is uneven, the system can adaptively divide the image into multiple sub-areas according to the area and light source conditions of the grayscale image of the target area to better adapt to the local characteristics of the image.

[0202] Step S5002C: Image filtering.

[0203] Specifically, after the grayscale image of the target area is adaptively partitioned into multiple sub-areas, the multiple sub-areas can be denoised by image filtering such as log-Gabor filter and / or median filter to preliminarily reduce interference and noise in the image and improve the clarity and continuity of the fingerprint lines.

[0204] Step S5002D: remove the uniform background and eliminate the noise based on the centroid concentration of the connected area.

[0205] Specifically, after preliminary noise removal is performed on multiple sub-regions in the grayscale image of the target area through image filtering, a uniform background region can be extracted from each sub-region, and the foreground region can be obtained after removing the uniform background region. The position of the fingerprint region is determined according to the concentration of the center of gravity of the connected regions in the foreground region, and large blocks of noise that are not in the fingerprint region are removed, so as to achieve secondary noise removal in the above-mentioned multiple grayscale images.

[0206] Step S5002E: mathematical morphology calculation.

[0207] Specifically, after preliminary noise removal through image filtering and deep noise removal based on the centroid concentration of connected areas, the system can perform morphological processing (i.e., mathematical morphological calculations) such as corrosion, dilation, opening and closing operations on each sub-area after denoising, thereby improving the continuity and clarity of multiple sub-areas in the grayscale image of the above-mentioned target area, and further strengthening the fingerprint features in the image.

[0208] Step S5002F: Partition image threshold segmentation.

[0209] Specifically, after performing image grayscale calculation, adaptive partitioning, image filtering and denoising processing, and mathematical morphology calculation on the target area, multiple sub-areas after grayscale calculation and denoising processing can be obtained, and the average brightness of each sub-area is calculated respectively, and an appropriate threshold is set based on the average brightness difference of each sub-area. Finally, binarization processing is performed using the threshold to more flexibly handle the non-uniformity of the light source and improve the accuracy and stability of subsequent fingerprint area extraction.

[0210] Step S5002G: Merge partition images.

[0211] Specifically, after performing threshold segmentation of the partitioned image, it is necessary to merge the segmented regions to obtain the overall fingerprint region. Assuming that the adaptive partitioning of the grayscale image of the above target area is 3×3 and 4×4 (i.e., multiple sub-regions), the common connected regions in the 3×3 or 4×4 grids can be merged to merge adjacent fingerprint regions in the partitioned image into larger connected regions, thereby obtaining a more complete fingerprint region.

[0212] Step S5002H: Fingerprint connected area determination.

[0213] Specifically, after the partition images are merged, a connected region judgment may be performed on the merged fingerprint region to ensure the continuity of the extracted fingerprint region.

[0214] Step S5002I: directly remove non-fingerprint areas.

[0215] Specifically, after determining the fingerprint connected area, the system will directly remove the non-fingerprint area and only retain the part connected to the fingerprint (i.e., the fingerprint area). In addition, the fingerprint area envelope in the image of the target area can be determined by image segmentation or morphological processing, and the grayscale value in the variance grayscale uniform area can be set to 0 (black) or 255 (white) to remove the non-fingerprint area outside the fingerprint area envelope.

[0216] Step S5003: directly calculating the area of ​​the fingerprint region.

[0217] Specifically, in the embodiment of the present application, the area of ​​the fingerprint region can be calculated based on the binary fingerprint region (i.e., fingerprint position) extracted in step S5002, and the area of ​​the fingerprint region is output as the residual fingerprint area. For example, the system first scans the binary fingerprint region, because in the binary fingerprint region image, black pixels represent fingerprint lines, so the area of ​​the fingerprint region can be obtained by counting the number of all black pixels in the fingerprint region.

[0218] Step S5004: Place the fingerprint position into the original image and calculate the fingerprint contrast of the RGB channels respectively.

[0219] Specifically, the fingerprint position extracted in step S5002 can be placed in the image of the target area (i.e., the image of the target area in step S5002), the contrast between the RGB channel values ​​of the fingerprint area and the target area can be calculated, and the fingerprint residual contrast of the three RGB channels can be output.

[0220] The embodiment description in the above steps S5001 to S5004 is a preliminary description. For a detailed description, please refer to the above Figure 2B-Figure 4A The corresponding embodiments in the above will not be described in detail here.

[0221] (ii) Image conversion to grayscale and background extraction 202.

[0222] Scene 1: The light source is uniform and the uniform background is not removed.

[0223] Specifically, see Fig. 6A , Fig. 6A This is a flowchart of an image to grayscale calculation and background extraction scenario 1 provided in an embodiment of the present application. The process may include the following steps S6001-S6004.

[0224] Step S6001: Fingerprint image capture and input.

[0225] Specifically, a fingerprint image is obtained, which is a fingerprint image obtained by photographing the fingerprint on the surface of the target shell. The fingerprint images corresponding to different shells can be images obtained by photographing under the same shooting conditions, such as the same shooting light source, shooting technique, shooting equipment and other conditions, so that a more objective and accurate comparison result can be obtained when comparing the fingerprint residual performance differences of different shells in the subsequent comparison, avoiding the influence of data anomalies caused by different shooting conditions.

[0226] Step S6002: extracting the region of interest (RIO).

[0227] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S6002 can include the following steps S6002A-S6002D.

[0228] Step S6002A: image conversion to grayscale calculation.

[0229] Specifically, the image grayscale calculation is used to convert the image of the target area from a color image to a grayscale image, which only contains brightness information and removes color information. For example, the grayscale calculation can use the weighted average method, that is, the grayscale value is calculated based on the brightness values ​​of the three RGB channels of the image. For example, the grayscale calculation formula can be: grayscale value = 0.299 R + 0.587G + 0.114*B, the grayscale calculation formula is obtained by weighted calculation based on the visibility of different colors to the human eye, so that the RGB channel information (usually composed of three channels: red, green, and blue) of each pixel in the image of the target area is synthesized into a grayscale value, and based on the grayscale value, the image of the target area is converted into a grayscale image that only includes grayscale information. The converted grayscale image only includes grayscale information converted from color information, so that the grayscale image can reflect the brightness distribution of the original color image. The above grayscale calculation formula is only a possible implementation method, and other implementation methods may also be used, which is not limited in the embodiments of this application. Among them, when performing the image conversion grayscale calculation in step S6002A, step S6002A1 may also be included.

[0230] Step S6002A1: Background extraction.

[0231] Specifically, if the shells of the same material are compared, since the color difference of the shells is small, more grayscale information can be determined by performing background extraction on the grayscale image to more accurately extract and analyze fingerprint features. Exemplarily, in the embodiment of the present application, after the image of the target area is converted to grayscale to obtain a grayscale image, the background area can be identified by analyzing the distribution and change of the grayscale value. For example, the system can use a histogram analysis method to determine the grayscale value range of the background area, and by counting the frequency of each grayscale value in the image, find the grayscale value interval that occupies a large proportion and has a small change, and determine these intervals as the background area; further, the system can perform threshold segmentation on the grayscale image to distinguish the background area from the foreground area. For example, the system can select one or more thresholds based on the pixel information or brightness information in the grayscale image, and determine the pixel points with grayscale values ​​below the threshold as the background area; after the threshold segmentation is completed, the system can mark and remove the identified background area, so that in the subsequent image processing process, the data processing process can be simplified, and the contrast of the shells of the same material can be highlighted, and the accuracy and efficiency of image processing can be improved.

[0232] Step S6002B: Image filtering.

[0233] Specifically, after the image of the target area is converted into a grayscale image and the background is extracted, the grayscale image can be denoised by image filtering. Exemplarily, in the embodiment of the present application, the grayscale image can be denoised by log-Gabor filter and / or median filter. The log-Gabor filter is used to extract the fingerprint pattern features in the image and enhance the details and edge information in the image; the median filter is a nonlinear filtering method, which is mainly used to remove noise (such as salt and pepper noise) in the image while retaining the edge details of the image. Through the above-mentioned image filtering process, the interference and noise in the image can be preliminarily reduced, and the clarity and continuity of the fingerprint pattern can be improved.

[0234] Step S6002C: mathematical morphology calculation.

[0235] Specifically, after the grayscale image is denoised by image filtering, the denoised grayscale image can be subjected to morphological processing (i.e., mathematical morphological calculation), and the morphological processing can include corrosion, expansion, opening operation, closing operation, etc. For example, in the embodiment of the present application, the holes in the fingerprint lines in the denoised grayscale image can be filled by the expansion operation to make it more complete; at the same time, the small holes or breaks in the fingerprint lines can be eliminated by the closing operation, thereby improving the continuity and clarity of the grayscale image and further strengthening the fingerprint features in the image. The above-mentioned mathematical morphological calculation is only one possible implementation method, and other implementation methods can also be used, which are not limited in the embodiment of the present application.

[0236] Step S6002D: Adaptively perform OSTU binarization to extract fingerprint position.

[0237] Specifically, after the grayscale image is processed by image filtering and mathematical morphology calculation, the system can use adaptive OSTU binarization to extract the fingerprint position (i.e., fingerprint area) in the grayscale image. Adaptive OSTU binarization is an automatic threshold selection technology based on grayscale histogram. Its principle is to determine the optimal segmentation threshold by maximizing the inter-class variance, thereby segmenting the image into two parts: foreground (fingerprint pattern) and background. This method can not only adapt to the grayscale distribution characteristics of different images, but also be flexibly adjusted according to the characteristics of the local area, so that the fingerprint location information can be extracted more accurately. In the embodiment of the present application, adaptive OSTU binarization is used to segment the image into two parts: foreground and background, so the output is an image containing only black and white pixel values, black (representing the background) and white (representing the foreground), that is, the grayscale image will become a binary image, which is used to indicate the presence or absence of an object. Through adaptive OSTU binarization, the system can dynamically adjust the threshold to ensure that the best segmentation effect can be obtained in different areas. Even if there is uneven lighting, noise interference, etc. in the image of the target area, the system can still accurately extract the fingerprint location information.

[0238] Step S6003: directly calculating the area of ​​the fingerprint region.

[0239] Specifically, in the embodiment of the present application, the area of ​​the fingerprint area can be calculated based on the binary fingerprint area (i.e., fingerprint position) extracted in step S6002, and the area of ​​the fingerprint area is output as the residual fingerprint area. For example, the system first scans the binary fingerprint area. Because in the binary fingerprint area image, black pixels represent fingerprint lines, the area of ​​the fingerprint area can be obtained by counting the number of all black pixels in the fingerprint area, wherein the statistical method includes but is not limited to row-by-row scanning, column-by-column scanning, automatic extraction algorithm, and regional growth algorithm. In addition, in the process of calculating the area of ​​the fingerprint area, because the resolution of different images may be different, the number of pixels corresponding to the fingerprint area of ​​the same area in images of different resolutions is also different. Therefore, when calculating the area, the system can convert by introducing the resolution information of the image, for example, by converting the pixel area to the actual area through the pixel density (pixels per inch, DPI) to obtain the area of ​​the fingerprint area.

[0240] Step S6004: Calculate the cumulative grayscale value of the fingerprint area.

[0241] Specifically, the fingerprint position extracted in step S6002 can be placed in the image of the target area (i.e., the image of the target area in step S6002), the contrast between the grayscale values ​​of the fingerprint area and the target area can be calculated, and the fingerprint residual contrast of the grayscale value can be output. Exemplarily, when testing a shell of the same material, because shells of the same material usually have a small color difference, the difference in fingerprint residual performance between different shell materials can be more accurately and objectively judged through grayscale difference information, and the contrast of the above grayscale value can be calculated by the contrast formula, assuming that the overall area of ​​the target area is A, the area of ​​the fingerprint area in the target area is B, and the surrounding area outside the fingerprint area is AB; the average grayscale value in area B is β, and the average grayscale value in area AB is α. In general, the color depth of the fingerprint area is generally greater than that of the area other than the fingerprint area (i.e., the color of area B is darker than that of area AB), but the dark grayscale statistics are that the darker the color, the lower the grayscale, so the image can be inverted for calculation, at this time β is greater than α, and A is greater than B.

[0242] At this time, the calculated contrast index can be expressed as the sum of the image grayscale values ​​in area B is greater than the sum of the image grayscale values ​​in area A. The contrast formula can be expressed as:

[0243]

[0244]

[0245]

[0246] First, the monotonicity analysis of the simplified formula is:

[0247] (1) When the area of ​​A is fixed (when taking photos in real life, the area of ​​A also needs to be fixed using fixed equipment and distance), contrast is positively correlated with B;

[0248] (2) When A and B (residual area) are fixed, contrast and Negative correlation, the larger β is, the smaller α is. The smaller it is, the greater the overall contrast (the greater the difference between β and α, the greater the contrast (significant contrast), which also conforms to the subjective meaning of contrast);

[0249] Secondly, analyze the influencing factors and correlations of several variables in the formula:

[0250] Overall area A: related to the shooting device, shooting conditions (distance L, notebook thickness d), and the selected fingerprint area ROI.

[0251] Fingerprint area (dirty area) B: B is the fingerprint area extracted by the automatic extraction algorithm. B is related to the fingerprint algorithm extraction accuracy. B is related to the fingerprint grayscale average depth β and the background grayscale average depth α.

[0252] Background average grayscale α and fingerprint average depth β: related to material (Material), shooting equipment (device), shooting light source (light-source), and fingerprint residue condition (condition).

[0253] Finally, in special cases, special values ​​are analyzed:

[0254] Assume that the fingerprint detection area B is fixed (if the fingerprint can be detected, β>α), the greater the difference between β and α, the greater the contrast.

[0255] Scene 2: The light source is uneven and the uniform background is not removed.

[0256] Specifically, see Fig. 7A , Fig. 7A This is a flowchart of a second image-to-grayscale calculation scenario provided in an embodiment of the present application. The process may include the following steps S7001-S7004.

[0257] Step S7001: Fingerprint image capture and input.

[0258] Step S7002: Region of Interest (RIO) extraction.

[0259] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S7002 can include the following steps S7002A-S7002H.

[0260] Step S7002A: image conversion to grayscale calculation.

[0261] Step S7002A1: Background extraction.

[0262] Step S7002B: adaptively partition the image of the target area.

[0263] Specifically, when the light source of the image of the target area is detected to be uneven, the system will adaptively divide the image into multiple areas according to the characteristics of the image of the target area and the light source conditions to better adapt to the local characteristics of the image. For example, if the image of the target area is detected to have uneven reflections of varying degrees, the calculation according to the normal steps may affect the calculation results of the fingerprint area. Therefore, when the image of the target area is detected to have uneven light sources such as the central area being brighter than the target area, the system can partition the image of the target area according to a 3×3 and / or 4×4 grid to process each area more accurately, thereby improving the accuracy of the image processing of the target area and minimizing the processing error.

[0264] Step S7002C: Image filtering.

[0265] Step S7002D: mathematical morphology calculation.

[0266] Step S7002E: Partition image threshold segmentation.

[0267] Specifically, after the image grayscale calculation, adaptive partitioning, image filtering and denoising processing, and mathematical morphology calculation are performed on the image of the target area, multiple sub-areas in the grayscale image of the target area can be obtained, and the average brightness of each sub-area can be calculated respectively, and an appropriate threshold can be set based on the average brightness difference of each sub-area. Based on the threshold, the pixels in the sub-area can be divided into two categories: the pixels above the threshold are classified as fingerprint features, and the pixels below the threshold are classified as background; the fingerprint area can be more accurately extracted from the image of the target area through the threshold segmentation of the above-mentioned binarization processing. Exemplarily, if the average brightness in a sub-area among the multiple sub-areas is high, it may mean that there is a fingerprint in the sub-area, so a relatively low threshold can be selected for segmentation to ensure that the fingerprint area can be effectively extracted; and for the area with low average brightness, it may be the background area, so a higher threshold can be selected for segmentation to reduce the interference of the background. Through this method of partitioned image threshold segmentation, the light source non-uniformity can be handled more flexibly, and the subsequent fingerprint area extraction accuracy and stability can be improved.

[0268] Step S7002F: Merge partition images.

[0269] Specifically, after performing the threshold segmentation of the partitioned image, it is necessary to merge the segmented regions to obtain the overall fingerprint region. Assuming that the image of the target region is partitioned into 3×3 and 4×4 (i.e., the above-mentioned multiple sub-regions), the common connected regions in the 3×3 or 4×4 grids can be merged to merge the adjacent fingerprint regions in the partitioned image into a larger connected region, thereby obtaining a more complete fingerprint region.

[0270] Step S7002G: Fingerprint connected area determination.

[0271] Specifically, after the partition images are merged, the merged fingerprint area can be judged as a connected area to ensure the continuity of the extracted fingerprint area. Exemplarily, the system can judge the connected area of ​​the merged fingerprint area, identify and retain the connected fingerprint area, and then remove the disconnected parts. For example, the system will detect whether there are broken or discontinuous parts in the merged fingerprint area, and remove these parts, so as to ensure that the final extracted fingerprint area is continuous and improve the continuity and clarity of the extracted fingerprint area.

[0272] Step S7002H: directly remove non-fingerprint areas.

[0273] Specifically, after the fingerprint connected area judgment is performed, the system will directly eliminate the non-fingerprint area to reduce the amount of calculation for subsequent processing and improve processing efficiency. For example, assuming that in the process of fingerprint connected area judgment, the system identifies some areas that are not connected to the fingerprint, the above-mentioned unconnected areas will be eliminated, and only the part connected to the fingerprint (i.e., the fingerprint area) will be retained. In summary, in the embodiment of the present application, multiple sub-areas can be obtained by adaptively partitioning the grayscale image of the target area, and a threshold is determined based on the light source situation in each sub-area, and the common connected area of ​​each sub-area is merged to determine the fingerprint area, which greatly reduces the error effect caused by the uneven light source, thereby improving the objectivity of the shell fingerprint residue test scheme and the accuracy of the results. In addition, the fingerprint area envelope in the image of the target area can also be determined by image segmentation or morphological processing, and the non-fingerprint area outside the fingerprint area envelope can be removed by setting the grayscale value in the variance grayscale uniform area to 0 (black) or 255 (white).

[0274] Step S7003: directly calculating the area of ​​the fingerprint region.

[0275] Step S7004: Calculate the cumulative grayscale value of the fingerprint area.

[0276] For detailed description of the above steps S7001, S7003 and S7004, please refer to the above Fig. 6A For the embodiments corresponding to step S6001, step S6003 and step S6004, steps S7002A, step S7002C and step S7002D can refer to the embodiments corresponding to step S6002A-step S6002C, which will not be repeated here.

[0277] Scene 3: The light source is uniform and the uniform background has been removed.

[0278] Specifically, see Fig. 8A , Fig. 8A This is a flowchart of an image to grayscale calculation scenario three provided in an embodiment of the present application. The process may include the following steps S8001-S8004.

[0279] Step S8001: Fingerprint image capture and input.

[0280] Step S8002: Region of Interest (RIO) extraction.

[0281] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S8002 can include the following steps S8002A-S8002E.

[0282] Step S8002A: image conversion to grayscale calculation.

[0283] Step S8002A1: Background extraction.

[0284] Step S8002B: Image filtering.

[0285] Step S8002C: remove the uniform background and eliminate the noise based on the centroid concentration of the connected area.

[0286] Specifically, after performing preliminary noise removal on the grayscale image of the target area through image filtering, the uniform background area in the grayscale image can be extracted, and the foreground area can be obtained after removing the uniform background area. The position of the fingerprint area is determined according to the concentration of the center of gravity of the connected area in the foreground area, and the large block of noise that is not in the fingerprint area is removed. Exemplarily, after performing preliminary noise removal on the grayscale image through image filtering, the system can determine the uniform background area by identifying the background area with uniform grayscale value in the grayscale image, and the uniform background area does not contain fingerprint features and the grayscale value changes slightly; when the system extracts the uniform background area, the system can remove these background areas from the image to obtain the foreground area, wherein the foreground area may include fingerprint features and other possible interference information (such as deeper noise); further, the system can identify all connected areas in the foreground area (referring to adjacent pixel blocks with similar grayscale values ​​in the image), and calculate the center of gravity position of each connected area (that is, the average position of all pixel points in the area) ), and judge the position of the fingerprint area based on the distribution of the centroid position. If the system detects that the centroid position of the connected area is concentrated in a certain area in the grayscale image, then the area is judged to be the fingerprint area; or, if the system detects that the centroid position (i.e., Euclidean distance) of the connected area is scattered throughout the entire image, then the system can judge that there is no significant fingerprint feature in the area and it may be a noise area; after determining the fingerprint area and the noise area, the system can remove large blocks of noise that are not in the fingerprint area (for example, by marking and removing those connected areas with scattered centroid positions and large areas to clean up the noise in the image), so that the foreground area obtained after processing is purer and the fingerprint features are more obvious, which is convenient for subsequent feature extraction and recognition.

[0287] Step S8002D: mathematical morphology calculation.

[0288] Step S8002E: Adaptively perform OSTU binarization to extract fingerprint positions.

[0289] Step S8003: directly calculating the area of ​​the fingerprint region.

[0290] Step S8004: Calculate the cumulative grayscale value of the fingerprint area.

[0291] For detailed description of the above steps S8001, S8003 and S8004, please refer to the above Fig. 6A For the embodiments corresponding to step S6001, step S6003 and step S6004, the steps in steps S8002A-step S8002E except step S8002C can refer to the embodiments corresponding to step S6002A-step S6002D, which will not be repeated here.

[0292] Scene 4: The light source is uneven and the uniform background has been removed.

[0293] Specifically, see Fig.9A , Fig.9A This is a flowchart of an image grayscale calculation scenario four provided in an embodiment of the present application. The process may include the following steps S9001-S9004.

[0294] Step S9001: Fingerprint image capture and input.

[0295] Specifically, a fingerprint image is obtained, which is a fingerprint image obtained by photographing the fingerprint on the surface of the target shell. The fingerprint images corresponding to different shells can be images obtained by photographing under the same shooting conditions, such as the same shooting light source, shooting technique, shooting equipment and other conditions, so that a more objective and accurate comparison result can be obtained when comparing the fingerprint residual performance differences of different shells in the subsequent comparison, avoiding the influence of data anomalies caused by different shooting conditions.

[0296] Step S9002: Region of Interest (RIO) extraction.

[0297] Specifically, after acquiring the fingerprint image, the target area and the fingerprint area with fingerprint patterns collected in the target area can be extracted from the fingerprint image by performing RIO area extraction on the fingerprint image, wherein step S9002 can include the following steps S9002A-S9002I.

[0298] Step S9002A: image conversion to grayscale calculation.

[0299] Specifically, the image grayscale calculation is used to convert the image of the target area from a color image to a grayscale image. The grayscale image only contains brightness information and removes color information. For example, the grayscale calculation can use the weighted average method, that is, the grayscale value is calculated based on the brightness values ​​of the three RGB channels of the image. For example, the grayscale calculation formula can be: grayscale value = 0.299 R + 0.587G + 0.114*B, the grayscale calculation formula is obtained by weighted calculation based on the visibility of different colors to the human eye, so that the RGB channel information (usually composed of three channels: red, green, and blue) of each pixel in the image of the target area is synthesized into a grayscale value, and based on the grayscale value, the image of the target area is converted into a grayscale image that only includes grayscale information.

[0300] Step S9002A1: Background extraction.

[0301] Specifically, when comparing shells of the same material, since the color difference of the shells is small, more grayscale information can be determined by performing background extraction on the grayscale image, so as to more accurately extract and analyze fingerprint features.

[0302] Step S9002B: adaptively partition the image of the target area.

[0303] Specifically, when it is detected that the light source of the grayscale image of the target area is uneven, the system will adaptively divide the grayscale image into a plurality of sub-areas according to the characteristics of the grayscale image and the light source conditions.

[0304] Step S9002C: Image filtering.

[0305] Specifically, after adaptively partitioning the grayscale image of the target area to obtain multiple sub-regions, the multiple sub-regions can be denoised by image filtering such as log-Gabor filter and / or median filter to preliminarily reduce interference and noise in the grayscale image and improve the clarity and continuity of the fingerprint lines.

[0306] Step S9002D: remove the uniform background and eliminate the noise based on the centroid concentration of the connected area.

[0307] Specifically, after preliminary noise removal of multiple sub-regions through image filtering, a uniform background area can be extracted from each sub-region, and the foreground area can be obtained after removing the uniform background area. The position of the fingerprint area is determined according to the concentration of the center of gravity of the connected area in the foreground area, and large blocks of noise that are not in the fingerprint area are removed, so as to achieve secondary noise removal in the above-mentioned multiple grayscale images.

[0308] Step S9002E: mathematical morphology calculation.

[0309] Specifically, after preliminary noise removal through image filtering and deep noise removal based on the centroid concentration of connected areas, the system can perform morphological processing (i.e., mathematical morphological calculations) such as corrosion, dilation, opening and closing operations on the multiple sub-areas after denoising, thereby improving the continuity and clarity of the above-mentioned multiple grayscale images and further strengthening the fingerprint features in the image.

[0310] Step S9002F: Partition image threshold segmentation.

[0311] Specifically, after performing image grayscale calculation, adaptive partitioning, image filtering and denoising processing, and mathematical morphology calculation on the image of the target area, multiple sub-regions in the grayscale image of the target area can be obtained. The average brightness of each sub-region is calculated separately, and an appropriate threshold is set based on the average brightness difference of each grayscale image. Finally, binarization processing is performed based on the threshold to more flexibly handle the non-uniformity of the light source and improve the accuracy and stability of subsequent fingerprint area extraction.

[0312] Step S9002G: Merge partition images.

[0313] Specifically, after performing the threshold segmentation of the partitioned image, it is necessary to merge the segmented regions to obtain the overall fingerprint region. Assuming that the grayscale image of the target area is partitioned into 3×3 and 4×4 (i.e., multiple grayscale images are partitioned one by one), the common connected regions in the 3×3 or 4×4 grids can be merged to merge the adjacent fingerprint regions in the partitioned image into a larger connected region, thereby obtaining a more complete fingerprint region.

[0314] Step S9002H: Fingerprint connected area determination.

[0315] Specifically, after the partition images are merged, a connected region judgment may be performed on the merged fingerprint region to ensure the continuity of the extracted fingerprint region.

[0316] Step S9002I: directly remove the non-fingerprint area.

[0317] Specifically, after determining the fingerprint connected area, the system will directly remove the non-fingerprint area and only retain the part connected to the fingerprint (i.e., the fingerprint area). In addition, the fingerprint area envelope in the image of the target area can be determined by image segmentation or morphological processing, and the grayscale value in the variance grayscale uniform area can be set to 0 (black) or 255 (white) to remove the non-fingerprint area outside the fingerprint area envelope.

[0318] Step S9003: directly calculating the area of ​​the fingerprint region.

[0319] Specifically, in the embodiment of the present application, the area of ​​the fingerprint region can be calculated based on the binary fingerprint region (i.e., fingerprint position) extracted in step S9002, and the area of ​​the fingerprint region is output as the residual fingerprint area. For example, the system first scans the binary fingerprint region, because in the fingerprint region image, black pixels represent fingerprint lines, so the area of ​​the fingerprint region can be obtained by counting the number of all black pixels in the fingerprint region.

[0320] Step S9004: Calculate the cumulative grayscale value of the fingerprint area.

[0321] Specifically, the fingerprint position extracted in step S9002 can be placed in the image of the original target area (ie, the image of the target area in step S9002), the contrast between the grayscale values ​​of the fingerprint area and the target area can be calculated, and the fingerprint residual contrast of the three RGB channels can be output.

[0322] The embodiment description in the above steps S9001 to S9004 is a preliminary description. For a detailed description, please refer to the above Figures 6A-8A The corresponding embodiment description in will not be repeated here.

[0323] The method of the embodiment of the present application is described in detail above, and the related device of the embodiment of the present application is provided below.

[0324] See also Fig.10 , Fig.10 It is a structural schematic diagram of a detection device for fingerprint residue on a shell provided in an embodiment of the present application. The detection device 1000 for fingerprint residue on a shell may include a fingerprint image acquisition unit 1001, a fingerprint area determination unit 1002, a contrast determination unit 1003 and a fingerprint residue performance judgment unit 1004, wherein each unit is described in detail as follows.

[0325] The fingerprint image acquisition unit 1001 is used to acquire a fingerprint image, where the fingerprint image is an image obtained by photographing the fingerprint on the surface of the target housing;

[0326] A fingerprint area determination unit 1002 is used to perform image processing on the fingerprint image to determine a target area in the fingerprint image and a fingerprint area in the target area where fingerprint lines are collected;

[0327] In a possible implementation, the fingerprint area determination unit 1002 is specifically configured to:

[0328] Determining the target area based on shooting parameters of the fingerprint image;

[0329] Converting the image of the target area into a first grayscale image;

[0330] Performing image feature enhancement processing on the first grayscale image to obtain a second grayscale image;

[0331] The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature.

[0332] In a possible implementation, the fingerprint area determination unit 1002 is specifically configured to:

[0333] Determining the target area based on shooting parameters of the fingerprint image;

[0334] Converting the image of the target area into a third grayscale image;

[0335] Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas;

[0336] Performing image feature enhancement processing on each sub-region in the third grayscale image to obtain a fourth grayscale image;

[0337] The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

[0338] In a possible implementation, the fingerprint area determination unit 1002 is specifically configured to:

[0339] determining the target area based on shooting parameters;

[0340] Converting the image of the target area into a first grayscale image;

[0341] Extracting a background area from the first grayscale image, and removing the background area from the first grayscale image;

[0342] Performing image feature enhancement processing on the first grayscale image after removing the background area to obtain a second grayscale image;

[0343] The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature. In a possible implementation, the fingerprint region determination unit 1002 is specifically configured to:

[0344] determining the target area based on shooting parameters;

[0345] Converting the image of the target area into a third grayscale image;

[0346] Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas;

[0347] Extracting a background region from each sub-region in the third grayscale image, and removing the background region from each sub-region in the third grayscale image;

[0348] Performing image feature enhancement processing on each sub-region in the third grayscale image after removing the background region, to obtain a fourth grayscale image;

[0349] The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

[0350] In a possible implementation, the fingerprint area determination unit 1002 is specifically configured to:

[0351] De-noising the corresponding grayscale image by image filtering;

[0352] Perform morphological processing on the denoised grayscale image.

[0353] In a possible implementation, the fingerprint area determination unit 1002 is specifically configured to:

[0354] The uniform background area in the denoised grayscale image is removed to obtain the foreground area;

[0355] Removing the peripheral area in the foreground area to obtain an image after the peripheral area is removed; the uniform background includes uniform light source and / or uniform texture, and the peripheral area is an area in the foreground area excluding the connected area where the pixel values ​​are concentrated;

[0356] Morphological processing is performed on the image after the peripheral area is removed.

[0357] A contrast determination unit 1003, which determines the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area;

[0358] In a possible implementation, if the pixel information includes RGB channel values, the contrast determination unit 1003 is specifically configured to:

[0359] Determine the sum of each channel value in the RGB channel values ​​of the fingerprint area and the sum of each channel value in the RGB channel values ​​of the target area;

[0360] The sum of each channel value in the RGB channel values ​​of the fingerprint area is compared with the sum of each channel value in the RGB channel values ​​of the target area to obtain the contrast of each channel.

[0361] In a possible implementation, if the pixel information includes a grayscale value, the contrast determination unit 1003 is specifically configured to:

[0362] Determining the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area;

[0363] A comparison result of the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area is determined as the contrast.

[0364] The fingerprint residual performance judging unit 1004 judges the fingerprint residual performance of the target housing based on the area of ​​the fingerprint region and the contrast.

[0365] In a possible implementation, the fingerprint residual performance determination unit 1004 is specifically configured to:

[0366] If the area of ​​the fingerprint region is smaller than the preset area, and the contrast is smaller than the preset contrast, it is determined that the fingerprint residue of the target housing is low.

[0367] To facilitate understanding of the embodiments of the present application, an exemplary electronic device provided in the embodiments of the present application is first introduced below.

[0368] See also Fig.11 , Fig.11 1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device 100 can be various types of electronic devices, and the embodiment of the present application does not limit its specific type. For example, the electronic device 100 can be a mobile phone, and can also include a tablet computer, a desktop computer, a desktop computer with a touch-sensitive surface or a touch panel, a laptop computer (laptop), a handheld computer, a notebook computer, a smart screen, a wearable device (such as a smart watch, a smart bracelet, etc.), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a car computer, a game console, and an Internet of Things (IOT) device, etc. Please refer to Fig.11 , the following combination Fig.11 The components of the electronic device 100 are described in detail:

[0369] The electronic device 100 may include a processor 101, a memory 102, a wireless communication module 103, a mobile communication module 104, an antenna 103A, an antenna 104A, a power switch 105, a sensor module 106, a focus motor 107, a camera 108, a display screen 109, etc. Among them, the sensor module 106 may include a gyroscope sensor 106A, an acceleration sensor 106B, an ambient light sensor 106C, an image sensor 106D, a distance sensor 106E, etc. Among them, the wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. The above multiple parts can transmit data through a bus.

[0370] The processor 101 may include one or more processing units, for example: the processor 101 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. In the embodiment of the present application, the processor 101 is responsible for executing various instructions in the detection of fingerprint residues on the shell. For example, when a fingerprint image (i.e., a fingerprint image) is obtained, the processor 101 executes various instructions in the detection of fingerprint residues on the shell. Figure 1A After obtaining the fingerprint image in the corresponding embodiment description), the processor 101 can execute the image processing function to extract the target area and the fingerprint area with fingerprint patterns collected in the target area from the fingerprint image, and determine the area of ​​the fingerprint area and the fingerprint residual contrast (such as the contrast of the RGB channel value or grayscale value of the fingerprint area and the target area in the fingerprint image) based on the fingerprint area to determine the fingerprint residual performance of the shell.

[0371] The memory 102 may be used to store computer executable program codes, and the executable program codes may include instructions. The processor 101 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the memory 102. The memory 102 may include a program storage area and a data storage area. In a specific implementation, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.

[0372] The wireless communication function of the electronic device 100 can be implemented through the antenna 103A, the antenna 104A, the mobile communication module 104, the wireless communication module 103, the modem processor and the baseband processor.

[0373] Antenna 103A and antenna 104A can be used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.

[0374] The mobile communication module 104 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 104 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 104 can receive electromagnetic waves through the antenna 104A, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 104 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 104A.

[0375] The modulation and demodulation processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is transmitted to the application processor. The application processor outputs a sound signal through an audio device, or displays an image or video through the display screen 109.

[0376] The wireless communication module 103 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the electronic device 100. The wireless communication module 103 can be one or more devices integrating at least one communication processing module. The wireless communication module 103 receives electromagnetic waves via the antenna 103A, modulates the frequency of the electromagnetic wave signal and performs filtering processing, and sends the processed signal to the processor 101. The wireless communication module 103 can also receive the signal to be sent from the processor 101, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 103A. In the embodiment of the present application, files transmitted from other devices can be received based on Bluetooth or other communication technologies in the wireless communication module 103, and after receiving the file, the file can be received, refused to be received, or sent to the target application window based on the user's choice.

[0377] The power switch 105 may be used to control the supply of power to the electronic device 100 .

[0378] The gyro sensor 106A can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 106A. The gyro sensor 106A can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 106A detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 106A can also be used for navigation and somatosensory game scenes.

[0379] The acceleration sensor 106B can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device. For example, the acceleration sensor 106B can be applied to applications such as horizontal and vertical screen switching, pedometers, etc.

[0380] The ambient light sensor 106C is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 109 according to the sensed brightness of the ambient light. The ambient light sensor 106C can also be used to automatically adjust the white balance when taking pictures.

[0381] Image sensor 106D, also known as a photosensitive element, can utilize the photoelectric conversion function of a photoelectric device to convert the light image on the photosensitive surface into an electrical signal that is proportional to the light image. The image sensor can be a charge coupled device (CCD) sensor or a complementary metal-oxide-semiconductor (CMOS) sensor. Exemplarily, when the shutter is pressed, under a fixed light source and shooting technique, the image sensor 106D can convert the captured light signal into an electrical signal and pass it to the ISP for processing, so as to further process the fingerprint image (i.e. Figure 1A Analysis and processing of the fingerprint image in the corresponding embodiment description).

[0382] The distance sensor 106E can be used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some shooting scenarios, the electronic device 100 can use the distance sensor 106E to measure the distance to achieve fast focusing.

[0383] The focus motor 107 can be used for fast focusing. The electronic device 100 can control the movement of the lens through the focus motor 107 to achieve automatic focusing.

[0384] The electronic device 100 can realize the shooting function through the ISP, the camera 108, the video codec, the GPU, the display screen 109 and the application processor.

[0385] The ISP is used to process the fingerprint image data fed back by the camera 108. For example, when taking a photo, light is transmitted to the image sensor 106D through the lens, and the light signal is converted into an electrical signal. The image sensor 106D transmits the electrical signal to the ISP for processing and converts it into a digital image signal. The ISP can also optimize the noise, brightness, and color of the image to ensure the quality and recognizability of the fingerprint image.

[0386] The camera 108 can be used to capture a static image of the residual fingerprint. The object generates an optical image through the lens and projects it onto the image sensor 106D. The image sensor 106D converts the optical signal into an electrical signal and transmits it to the ISP to convert it into a digital image signal for fingerprint area (i.e. Figure 1A The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 108, where N is a positive integer greater than 1.

[0387] The video codec is used to compress or decompress digital images. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can open or save pictures or videos in multiple coding formats.

[0388] The electronic device 100 can realize the display function through a GPU, a display screen 109, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 109 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 101 may include one or more GPUs, which execute program instructions to generate or change display information.

[0389] The display screen 109 is used to display images, videos, etc. The display screen 109 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 109, where N is a positive integer greater than 1.

[0390] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0391] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0392] The present application also provides an electronic device, which may include: a memory and a processor. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory so that the electronic device executes the method executed by the electronic device side in any of the above embodiments.

[0393] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the electronic device side in any of the above embodiments.

[0394] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0395] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0396] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0397] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

[0398] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit, a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0399] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute the method executed by the electronic device side in any of the above embodiments.

[0400] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the electronic device side in any of the above embodiments.

[0401] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0402] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0403] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by a computer program to instruct the relevant hardware to complete the process, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes. In short, the above is only an embodiment of the technical solution of the present application, and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made according to the disclosure of the present application should be included in the scope of protection of the present application.

Claims

1. A method for detecting fingerprint residue on a housing, characterized in that: The method comprises: Acquire a fingerprint image, where the fingerprint image is an image obtained by photographing the fingerprint on the surface of the target housing; Performing image processing on the fingerprint image to determine a target area in the fingerprint image and a fingerprint area in the target area where fingerprint patterns are collected; Based on the pixel information of the fingerprint area and the pixel information of the target area, determining the contrast between the fingerprint area and the target area; wherein, if the material of the target shell and the shell to be compared is the same, the pixel information includes a grayscale value; if they are different, the pixel information includes an RGB channel value; Based on the area of ​​the fingerprint region and the contrast, the fingerprint residual performance of the target housing is determined.

2. The method according to claim 1, characterized in that If the pixel information includes RGB channel values; determining the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area includes: Determine the sum of each channel value in the RGB channel values ​​of the fingerprint area and the sum of each channel value in the RGB channel values ​​of the target area; The sum of each channel value in the RGB channel values ​​of the fingerprint area is compared with the sum of each channel value in the RGB channel values ​​of the target area to obtain the contrast of each channel.

3. The method according to claim 2, characterized in that The performing image processing on the fingerprint image to determine the target area in the fingerprint image and the fingerprint area where the fingerprint pattern is collected in the target area includes: Determining the target area based on shooting parameters of the fingerprint image; Converting the image of the target area into a first grayscale image; Performing image feature enhancement processing on the first grayscale image to obtain a second grayscale image; The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature.

4. The method according to claim 2, characterized in that: The performing image processing on the fingerprint image to determine the target area in the fingerprint image and the fingerprint area where the fingerprint pattern is collected in the target area includes: Determining the target area based on shooting parameters of the fingerprint image; Converting the image of the target area into a third grayscale image; Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas; Performing image feature enhancement processing on each sub-region in the third grayscale image to obtain a fourth grayscale image; The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

5. The method according to claim 1, characterized in that If the pixel information includes a grayscale value, determining the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area includes: Determine the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area; A comparison result of the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area is determined as the contrast.

6. The method according to claim 5, characterized in that The performing image processing on the fingerprint image to determine the target area in the fingerprint image and the fingerprint area where the fingerprint pattern is collected in the target area includes: determining the target area based on shooting parameters; Converting the image of the target area into a first grayscale image; Extracting a background area from the first grayscale image, and removing the background area from the first grayscale image; Performing image feature enhancement processing on the first grayscale image after removing the background area to obtain a second grayscale image; The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature.

7. The method according to claim 5, characterized in that The performing image processing on the fingerprint image to determine the target area in the fingerprint image and the fingerprint area where the fingerprint pattern is collected in the target area includes: determining the target area based on shooting parameters; Converting the image of the target area into a third grayscale image; Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas; Extracting a background region from each sub-region in the third grayscale image, and removing the background region from each sub-region in the third grayscale image; Performing image feature enhancement processing on each sub-region in the third grayscale image after removing the background region, to obtain a fourth grayscale image; The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

8. The method according to claim 3, 4, 6 or 7, characterized in that: The image feature enhancement process comprises: De-noising the corresponding grayscale image by image filtering; Perform morphological processing on the denoised grayscale image.

9. The method according to claim 8, characterized in that The morphological processing of the grayscale image after the denoising process comprises: The uniform background area in the denoised grayscale image is removed to obtain the foreground area; Removing the peripheral area in the foreground area to obtain an image after the peripheral area is removed; the uniform background includes uniform light source and / or uniform texture, and the peripheral area is the area in the foreground area except the connected area where the pixel values ​​are concentrated; Morphological processing is performed on the image after the peripheral area is removed.

10. The method according to any one of claims 1 to 7, characterized in that The step of judging the fingerprint residual performance of the target housing based on the area of ​​the fingerprint region and the contrast includes: If the area of ​​the fingerprint region is smaller than the preset area, and the contrast is smaller than the preset contrast, it is determined that the fingerprint residue of the target housing is low.

11. A device for detecting fingerprint residue on a housing, characterized in that: The device comprises: A fingerprint image acquisition unit, used to acquire a fingerprint image, wherein the fingerprint image is an image obtained by photographing the fingerprint on the surface of the target housing; A fingerprint area determination unit is used to perform image processing on the fingerprint image to determine a target area in the fingerprint image and a fingerprint area in the target area where fingerprint patterns are collected; A contrast determination unit is configured to determine the contrast between the fingerprint area and the target area based on the pixel information of the fingerprint area and the pixel information of the target area; wherein if the target shell and the shell to be compared are made of the same material, the pixel information includes a grayscale value; if they are different, the pixel information includes an RGB channel value; The fingerprint residual performance judging unit judges the fingerprint residual performance of the target housing based on the area of ​​the fingerprint region and the contrast.

12. The device according to claim 11, characterized in that If the pixel information includes RGB channel values; the contrast determination unit is specifically used to: Determine the sum of each channel value in the RGB channel values ​​of the fingerprint area and the sum of each channel value in the RGB channel values ​​of the target area; The sum of each channel value in the RGB channel values ​​of the fingerprint area is compared with the sum of each channel value in the RGB channel values ​​of the target area to obtain the contrast of each channel.

13. The device according to claim 12, characterized in that The fingerprint area determination unit is specifically used for: Determining the target area based on shooting parameters of the fingerprint image; Converting the image of the target area into a first grayscale image; Performing image feature enhancement processing on the first grayscale image to obtain a second grayscale image; The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature.

14. The device according to claim 12, characterized in that The fingerprint area determination unit is specifically used for: Determining the target area based on shooting parameters of the fingerprint image; Converting the image of the target area into a third grayscale image; Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas; Performing image feature enhancement processing on each sub-region in the third grayscale image to obtain a fourth grayscale image; The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

15. The device according to claim 11, characterized in that If the pixel information includes a grayscale value, the contrast determination unit is specifically configured to: Determine the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area; A comparison result of the sum of the grayscale values ​​of the fingerprint area and the sum of the grayscale values ​​of the target area is determined as the contrast.

16. The device according to claim 15, characterized in that The fingerprint area determination unit is specifically used for: determining the target area based on shooting parameters; Converting the image of the target area into a first grayscale image; Extracting a background area from the first grayscale image, and removing the background area from the first grayscale image; Performing image feature enhancement processing on the first grayscale image after removing the background area to obtain a second grayscale image; The second grayscale image is binarized to determine a fingerprint region in the target region that meets the fingerprint feature.

17. The device according to claim 15, characterized in that The fingerprint area determination unit is specifically used for: determining the target area based on shooting parameters; Converting the image of the target area into a third grayscale image; Performing partition processing on the third grayscale image based on the shooting light source and the area of ​​the third grayscale image to obtain a plurality of sub-areas; Extracting a background region from each sub-region in the third grayscale image, and removing the background region from each sub-region in the third grayscale image; Performing image feature enhancement processing on each sub-region in the third grayscale image after removing the background region, to obtain a fourth grayscale image; The fingerprint region is determined by binarizing the fourth grayscale image and merging the connected regions shared by each subregion in the fourth grayscale image after the binarization process.

18. The device according to claim 13, 14, 16 or 17, characterized in that The fingerprint area determination unit is specifically used for: De-noising the corresponding grayscale image by image filtering; Perform morphological processing on the denoised grayscale image.

19. The device according to claim 18, characterized in that The fingerprint area determination unit is specifically used for: The uniform background area in the denoised grayscale image is removed to obtain the foreground area; Removing the peripheral area in the foreground area to obtain an image after the peripheral area is removed; the uniform background includes uniform light source and / or uniform texture, and the peripheral area is the area in the foreground area except the connected area where the pixel values ​​are concentrated; Morphological processing is performed on the image after the peripheral area is removed.

20. The device according to any one of claims 11 to 17, characterized in that The fingerprint residual performance determination unit is specifically used for: If the area of ​​the fingerprint region is smaller than the preset area, and the contrast is smaller than the preset contrast, it is determined that the fingerprint residue of the target housing is low.

21. A computer storage medium, characterized in that The computer storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 10.

22. A computer program, characterized in that The computer program comprises instructions, and when the computer program is executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 10.