Fingerprint image segmentation method and device, electronic equipment and storage medium
By combining local and global segmentation thresholds to segment fingerprint images, the problem of poor fingerprint ridge segmentation in existing technologies is solved, achieving clear segmentation of fingerprint regions and ridges and improving the accuracy of fingerprint recognition.
Patent Information
- Application Number
- CN202210762880.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-06-30
AI Technical Summary
Existing fingerprint image segmentation methods cannot effectively segment fingerprint ridges, resulting in poor segmentation results.
A method combining local and global segmentation thresholds is used to segment fingerprint images. First, the image is divided into multiple image blocks, and the classification result of each block is identified. Then, fingerprint blocks and non-fingerprint blocks are segmented using local and global segmentation thresholds respectively, and finally merged to obtain fingerprint ridges.
It improves the segmentation effect of fingerprint images, ensures the integrity of fingerprint areas and ridges, and improves the accuracy of fingerprint recognition.
Smart Images

Figure CN115131831B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a fingerprint image segmentation method and apparatus, electronic device and storage medium. Background Technology
[0002] With the rapid development of information technology, the use of electronic devices such as mobile phones and tablets is becoming increasingly widespread. Currently, some electronic devices support fingerprint recognition technology, which enables unlocking, waking up, and mobile payments.
[0003] Fingerprint image segmentation is a crucial step in fingerprint recognition technology, and its results significantly impact the accuracy of fingerprint identification. However, current fingerprint image segmentation methods often fail to effectively segment fingerprint ridges, leading to poor segmentation outcomes. Summary of the Invention
[0004] In view of the above problems, embodiments of this application provide a fingerprint image segmentation method and apparatus, electronic device and storage medium, which can effectively segment fingerprint ridges in fingerprint images.
[0005] To achieve the above objectives, the embodiments of this application provide the following technical solutions:
[0006] A first aspect of this application provides a fingerprint image segmentation method, comprising: dividing an acquired fingerprint image into multiple fingerprint image blocks; identifying the classification result of each fingerprint image block, wherein the classification result of the fingerprint image block includes fingerprint blocks or non-fingerprint blocks; segmenting the corresponding fingerprint blocks using a local segmentation threshold to obtain fingerprint ridges in the fingerprint blocks; segmenting the non-fingerprint blocks using a global segmentation threshold to obtain fingerprint ridges in the non-fingerprint blocks; and merging the fingerprint ridges in each fingerprint image block to obtain the fingerprint ridges of the fingerprint image.
[0007] In this way, the present application combines local segmentation threshold and global segmentation threshold to segment fingerprint images. Local segmentation threshold is used to segment the identified fingerprint blocks, while global segmentation threshold is used to segment the identified non-fingerprint blocks. In this way, the fingerprint region in the fingerprint image can be segmented, and the fingerprint ridges in the fingerprint region can be segmented well, which improves the integrity of fingerprint segmentation and thus improves the segmentation effect of fingerprint images.
[0008] In one feasible implementation, before segmenting the corresponding fingerprint block using a local segmentation threshold to obtain the fingerprint ridges in the fingerprint block, the method further includes: obtaining a first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to a target grayscale value, and a second number of second pixels in the target fingerprint block whose grayscale value is less than the target grayscale value, wherein the target fingerprint block is any fingerprint block; and determining the local segmentation threshold corresponding to the target fingerprint block based on the first and second numbers. In this way, the local segmentation threshold can be determined by counting the first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the target grayscale value, and the second number of second pixels whose grayscale value is less than the target grayscale value, making the determination of the local segmentation threshold relatively simple.
[0009] In one feasible implementation, determining the local segmentation threshold corresponding to the target fingerprint block based on a first quantity and a second quantity includes: when the absolute value of the difference between the first quantity and the second quantity is less than or equal to a preset quantity, determining the target grayscale value as the local segmentation threshold corresponding to the target fingerprint block, where the target grayscale value is the average grayscale value of each pixel in the target fingerprint block; when the absolute value of the difference between the first quantity and the second quantity is greater than the preset quantity, continuously adjusting the target grayscale value until the absolute value of the difference between the first quantity and the second quantity obtained after adjustment is less than or equal to the preset quantity, and determining the target grayscale value after the last adjustment as the local segmentation threshold corresponding to the target fingerprint block. In this way, by continuously adjusting the target grayscale value, the finally determined local segmentation threshold becomes more accurate.
[0010] In one feasible implementation, when the absolute value of the difference between the first quantity and the second quantity is greater than a preset quantity, and the first quantity is greater than the second quantity, the difference between the target grayscale value after the Mth adjustment and the target grayscale value before the Mth adjustment is the first preset grayscale value, where the first preset grayscale value is a positive number and M is a positive integer; when the absolute value of the difference between the first quantity and the second quantity is greater than the preset quantity, and the first quantity is less than the second quantity, the difference between the target grayscale value before the Nth adjustment and the target grayscale value after the Nth adjustment is the second preset grayscale value, where the second preset grayscale value is a positive number and N is a positive integer. Thus, when the first quantity is greater than the second quantity, the local segmentation threshold is determined by continuously increasing the target grayscale value, reducing the time required to finally determine the local segmentation threshold; correspondingly, when the first quantity is less than the second quantity, the local segmentation threshold is determined by continuously decreasing the target grayscale value, reducing the time required to finally determine the local segmentation threshold.
[0011] In one feasible implementation, before segmenting the non-fingerprint blocks using a global segmentation threshold to obtain the fingerprint ridges in the non-fingerprint blocks, the method further includes: calculating the global segmentation threshold based on the grayscale value of each pixel in the fingerprint image using a preset maximum inter-class variance (MOL) method. This allows the global segmentation threshold to be calculated based on the MOL method, improving the accuracy of the global segmentation threshold.
[0012] In one feasible implementation, a local segmentation threshold is used to segment the corresponding fingerprint block to obtain fingerprint ridges within the fingerprint block. This includes: identifying pixels in the fingerprint block with grayscale values greater than or equal to the local segmentation threshold as fingerprint ridges within the fingerprint block; and a global segmentation threshold is used to segment non-fingerprint blocks to obtain fingerprint ridges within the non-fingerprint blocks. This includes: identifying pixels in the non-fingerprint blocks with grayscale values greater than or equal to the global segmentation threshold as fingerprint ridges within the non-fingerprint blocks. Thus, by comparing the grayscale values of pixels with the corresponding segmentation thresholds, fingerprint ridges and other regions besides fingerprint ridges can be easily identified.
[0013] In one feasible implementation, identifying the classification result of each fingerprint image patch includes: using a neural network model to identify the classification result of each fingerprint image patch; wherein the neural network model is trained based on multiple sample fingerprint images, each sample fingerprint image including a first sample image corresponding to the fingerprint region and a second sample image corresponding to the non-fingerprint region. Thus, by using a pre-trained neural network model to identify the classification result of each fingerprint image patch, the accuracy of the identified classification result for each fingerprint image patch is improved.
[0014] A second aspect of this application provides a fingerprint image segmentation apparatus, comprising: an image division module for dividing an acquired fingerprint image into multiple fingerprint image blocks; an image recognition module for recognizing the classification result of each fingerprint image block, wherein the classification result of the fingerprint image block includes fingerprint blocks or non-fingerprint blocks; a first segmentation module for segmenting the corresponding fingerprint blocks using a local segmentation threshold to obtain fingerprint ridges in the fingerprint blocks; a second segmentation module for segmenting the non-fingerprint blocks using a global segmentation threshold to obtain fingerprint ridges in the non-fingerprint blocks; and a merging module for merging the fingerprint ridges in each fingerprint image block to obtain the fingerprint ridges of the fingerprint image.
[0015] In one feasible implementation, the fingerprint image segmentation device further includes: a pixel count acquisition module and a local segmentation threshold determination module. The pixel count acquisition module is used to acquire a first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the target grayscale value, and a second number of second pixels in the target fingerprint block whose grayscale value is less than the target grayscale value, wherein the target fingerprint block is any fingerprint block; the local segmentation threshold determination module is used to determine a local segmentation threshold corresponding to the target fingerprint block based on the first and second counts.
[0016] In one feasible implementation, the local segmentation threshold determination module includes a first determination submodule and a second determination submodule. The first determination submodule is used to determine the target grayscale value as the local segmentation threshold corresponding to the target fingerprint block when the absolute value of the difference between a first quantity and a second quantity is less than or equal to a preset quantity, wherein the target grayscale value is the average grayscale value of each pixel in the target fingerprint block. The second determination submodule is used to continuously adjust the target grayscale value until the absolute value of the difference between the first quantity and the second quantity obtained after adjustment is less than or equal to the preset quantity, and then determine the target grayscale value after the last adjustment as the local segmentation threshold corresponding to the target fingerprint block.
[0017] In one feasible implementation, when the absolute value of the difference between the first quantity and the second quantity is greater than a preset quantity, and the first quantity is greater than the second quantity, the difference between the target grayscale value after the Mth adjustment and the target grayscale value before the Mth adjustment is a first preset grayscale value, where the first preset grayscale value is a positive number and M is a positive integer. When the absolute value of the difference between the first quantity and the second quantity is greater than a preset quantity, and the first quantity is less than the second quantity, the difference between the target grayscale value before the Nth adjustment and the target grayscale value after the Nth adjustment is a second preset grayscale value, where the second preset grayscale value is a positive number and N is a positive integer.
[0018] In one feasible implementation, the fingerprint image segmentation device further includes a global segmentation threshold determination module, used to calculate the global segmentation threshold based on the grayscale value of each pixel in the fingerprint image using a preset maximum inter-class variance method.
[0019] In one feasible implementation, the first segmentation module includes a first segmentation submodule, used to identify pixels in the fingerprint block whose grayscale value is greater than or equal to a local segmentation threshold as fingerprint ridges in the fingerprint block; the second segmentation module includes a second segmentation submodule, used to identify pixels in non-fingerprint blocks whose grayscale value is greater than or equal to a global segmentation threshold as fingerprint ridges in non-fingerprint blocks.
[0020] In one feasible implementation, the image recognition module includes an image recognition submodule for recognizing the classification result of each fingerprint image block using a neural network model; wherein the neural network model is trained based on multiple sample fingerprint images, and each sample fingerprint image includes a first sample image corresponding to the fingerprint region and a second sample image corresponding to the non-fingerprint region.
[0021] A third aspect of this application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor invokes the computer program to execute the fingerprint image segmentation method described above.
[0022] A fourth aspect of this application provides a computer-readable storage medium storing a computer program or instructions that, when executed, implement the fingerprint image segmentation method described above.
[0023] The possible implementations of aspects two through four have similar effects to those of aspect one and the possible designs of aspect one, and will not be elaborated upon here.
[0024] The structure of this application, as well as its other objects and beneficial effects, will become more apparent from the description of the preferred embodiments taken in conjunction with the accompanying drawings. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram illustrating the segmentation of a fingerprint image using only global and local segmentation thresholds in related technologies.
[0027] Figure 2 A flowchart of a fingerprint image segmentation method provided in this application embodiment;
[0028] Figure 3 An example diagram illustrating a fingerprint image segmentation process provided in this application embodiment;
[0029] Figure 4 A schematic diagram of a residual convolutional neural network model provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram showing a fingerprint image segmented using the fingerprint image segmentation method provided in this application embodiment.
[0031] Figure 6 A detailed flowchart of a fingerprint image segmentation method provided in this application embodiment;
[0032] Figure 7 A structural block diagram of a fingerprint image segmentation device provided in an embodiment of this application;
[0033] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0034] With the rapid development of information technology, fingerprint recognition technology has also been applied to electronic devices. Electronic devices can use fingerprint recognition technology to unlock, wake up, and make mobile payments.
[0035] For example, when an electronic device is in a screen-off state, fingerprint recognition technology can be used to wake up the device and turn on the screen; or, when the electronic device is in a screen-on state, fingerprint recognition technology can be used to unlock the device.
[0036] In some embodiments, fingerprint recognition technology mainly includes several steps such as fingerprint image acquisition, fingerprint image segmentation, fingerprint image enhancement, fingerprint image feature extraction, and fingerprint image matching.
[0037] After a fingerprint image is acquired using a fingerprint sensor, it consists of two parts: a foreground region (also called the fingerprint region) and a background region (also called the non-fingerprint region). The foreground region refers to the area in the fingerprint image containing clear fingerprint ridges, while the background region refers to the area without fingerprint ridges or with very blurry fingerprint ridges. Since the acquired fingerprint image may contain a background region, fingerprint image segmentation is necessary to remove the background region and segment the fingerprint ridges from the foreground region.
[0038] The main purpose of fingerprint image segmentation is to separate the foreground and background regions of a fingerprint image and extract the fingerprint ridges from the foreground region. By eliminating the influence of the background region on fingerprint feature extraction, the accuracy of fingerprint feature extraction is improved, fingerprint processing time is saved, and ultimately the performance and effectiveness of fingerprint recognition are enhanced.
[0039] Fingerprint image enhancement can increase the ridge structure in the fingerprint region, improving the accuracy of subsequent fingerprint feature extraction; fingerprint image feature extraction involves checking the feature points of the fingerprint ridges and extracting relevant information such as the type, location, number, and ridge direction of various feature points in the region; finally, fingerprint image matching is used to match the extracted fingerprint ridge feature points with pre-recorded fingerprint feature information to identify the user's identity information holding the fingerprint.
[0040] It can be seen that fingerprint image segmentation, as a key step in fingerprint recognition technology, affects the accuracy of fingerprint recognition.
[0041] Image thresholding segmentation typically includes local thresholding segmentation and global thresholding segmentation, with different focuses depending on the image scene. Local thresholding segmentation is mainly suitable for images where details need to be segmented, while global thresholding segmentation is mainly suitable for images with large target scenes.
[0042] In some related technologies, a global segmentation threshold can be used to segment fingerprint images. However, due to the uneven grayscale distribution of fingerprint images, using a global segmentation threshold can result in some fingerprint ridges not being segmented, leading to poor fingerprint ridge segmentation results.
[0043] like Figure 1 Image (a) is a fingerprint image, which is processed using a global segmentation threshold. Figure 1 After segmenting the fingerprint image shown in (a), the following can be obtained: Figure 1 As shown in image (b), it can be seen that some fingerprint ridges in the middle of the fingerprint area are not segmented.
[0044] In other related technologies, local segmentation thresholds can be used to segment fingerprint images. However, background interference may exist between the segmented fingerprint ridges, which may lead to misidentification of interfering ridges, resulting in unclear segmented fingerprint ridges and poor fingerprint ridge segmentation.
[0045] like Figure 1 Image (a) is a fingerprint image. When a local segmentation threshold is applied... Figure 1 After segmenting the fingerprint image shown in (a), the following can be obtained: Figure 1 As shown in image (c), there is significant interference between fingerprint ridges.
[0046] Therefore, for complex images like fingerprint images, the relevant technologies cannot effectively segment the fingerprint ridges when using either a global segmentation threshold or a local segmentation threshold alone, resulting in poor segmentation performance.
[0047] To address the aforementioned technical problems, this application provides a fingerprint image segmentation method, apparatus, electronic device, and storage medium. The method involves dividing a fingerprint image into multiple fingerprint image blocks, identifying the classification result of each fingerprint image block (which may include fingerprint regions or non-fingerprint regions), segmenting the corresponding fingerprint regions using a local segmentation threshold to obtain fingerprint ridges, and segmenting the non-fingerprint regions using a global segmentation threshold to obtain fingerprint ridges. Finally, the fingerprint ridges from each fingerprint image block are merged to obtain the fingerprint ridges of the fingerprint image. Therefore, this application combines local and global segmentation thresholds for fingerprint image segmentation. Local segmentation thresholds are used to segment the identified fingerprint regions, while global segmentation thresholds are used to segment the identified non-fingerprint regions. This approach effectively segments both the fingerprint regions and the fingerprint ridges within them, improving the completeness of fingerprint segmentation and thus enhancing the segmentation effect.
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar components or components having the same or similar functions throughout. The described embodiments are some, but not all, of the embodiments of this application. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0049] Reference Figure 2 As shown, in a first aspect, embodiments of this application provide a flowchart of a fingerprint image segmentation method, which may specifically include the following steps:
[0050] Step 201: Divide the acquired fingerprint image into multiple fingerprint image blocks.
[0051] In some embodiments, an electronic device may be equipped with a fingerprint sensor. When a user needs to unlock, wake up, or perform mobile payments on the electronic device, the user can touch the area where the fingerprint sensor is located on the electronic device with their finger. The fingerprint sensor can then capture the user's fingerprint image. This fingerprint image refers to an image containing the user's finger fingerprint.
[0052] After acquiring a fingerprint image, it can be divided into multiple fingerprint image blocks according to a preset division method. The area of each of the divided fingerprint image blocks can be equal.
[0053] For example, a fingerprint image can be divided into 16×16 fingerprint image blocks of equal area. The fingerprint image has an image width of W and an image height of H. Each fingerprint image block has a width of W / 16 and a height of H / 16.
[0054] Step 202: Identify the classification result of each fingerprint image block; the classification result of the fingerprint image block includes fingerprint blocks or non-fingerprint blocks.
[0055] For each fingerprint image block that is divided, the classification result of each fingerprint image block is identified in turn, that is, whether each fingerprint image block belongs to a fingerprint block or a non-fingerprint block.
[0056] In some embodiments, a neural network model can be used to identify the classification result of each fingerprint image patch. The neural network model is trained based on multiple sample fingerprint images, each sample fingerprint image including a first sample image corresponding to the fingerprint region and a second sample image corresponding to the non-fingerprint region.
[0057] like Figure 3 As shown, before using a neural network model to identify the classification results of each fingerprint image block, the neural network model can be pre-trained. The specific training process of the neural network model can be as follows: acquire multiple sample fingerprint images, such as acquiring 1000 sample fingerprint images collected by a fingerprint sensor; manually identify the fingerprint region and non-fingerprint region in each sample fingerprint image, and cut out the fingerprint region and non-fingerprint region in each sample fingerprint image to form the first sample image corresponding to the fingerprint region in the 1000 sample fingerprint images, and the second sample image corresponding to the non-fingerprint region in the 1000 sample fingerprint images, thus obtaining a sample training image set; then, input each sample image (first sample image or second sample image) in the sample training image set into the initially constructed neural network model for training, obtain the training result of each sample image, calculate the loss value between the training result and the actual result of the sample image, update the neural network parameters in the neural network model according to the loss value, until the finally determined loss value meets the requirements, thus obtaining the trained neural network model.
[0058] Therefore, as Figure 3 As shown, after dividing the fingerprint image into 16×16 fingerprint image blocks, each fingerprint image block is sequentially input into the trained neural network model, and the neural network model outputs the classification results of these 16×16 fingerprint image blocks.
[0059] In some embodiments, the neural network model can be a convolutional neural network model, such as a residual convolutional neural network model. The residual convolutional neural network model includes multiple cascaded convolutional layers, as well as pooling layers and fully connected layers.
[0060] like Figure 4 As shown in the embodiment of this application, a 17-layer residual convolutional neural network model can be constructed and trained, which includes 16 cascaded convolutional layers and 1 pooling layer. These 16 cascaded convolutional layers are referred to as the first convolutional layer, the second convolutional layer, and the sixteenth convolutional layer, respectively. In addition, the residual convolutional neural network model also includes a fully connected layer.
[0061] Each convolutional layer has a kernel, which is a filter used to extract feature maps from the fingerprint image. The kernel size includes width and height. In the first, second, up to the sixteenth convolutional layer, the kernel size in each convolutional layer can be 3×3.
[0062] In the first to fourth convolutional layers, each convolutional layer has 16 convolutional kernels; in the fifth to eighth convolutional layers, each convolutional layer has 32 convolutional kernels; in the ninth to twelfth convolutional layers, each convolutional layer has 64 convolutional kernels; and in the thirteenth to sixteenth convolutional layers, each convolutional layer has 128 convolutional kernels.
[0063] Furthermore, the fingerprint image patch is input into the first convolutional layer for convolution processing. The result of the first convolutional layer is input into the second convolutional layer. The residual result between the result of the second convolutional layer and the fingerprint image patch is input into the third convolutional layer. The result of the third convolutional layer is input into the fourth convolutional layer. The residual result between the result of the fourth convolutional layer and the result of the second convolutional layer is input into the fifth convolutional layer. The result of the fifth convolutional layer is input into the sixth convolutional layer. The residual result between the result of the sixth convolutional layer and the result of the fourth convolutional layer is input into the seventh convolutional layer. The result of the seventh convolutional layer is input into the eighth convolutional layer. The residual result between the result of the eighth convolutional layer and the result of the sixth convolutional layer is input into the ninth convolutional layer. The result of the convolutional processing of the ninth convolutional layer is input to the tenth convolutional layer. The residual result between the result of the convolutional processing of the tenth convolutional layer and the result of the convolutional processing of the eighth convolutional layer is input to the eleventh convolutional layer. The result of the convolutional processing of the eleventh convolutional layer is input to the twelfth convolutional layer. The residual result between the result of the convolutional processing of the twelfth convolutional layer and the result of the convolutional processing of the tenth convolutional layer is input to the thirteenth convolutional layer. The result of the convolutional processing of the thirteenth convolutional layer is input to the fourteenth convolutional layer. The residual result between the result of the convolutional processing of the fourteenth convolutional layer and the result of the convolutional processing of the twelfth convolutional layer is input to the fifteenth convolutional layer. The result of the convolutional processing of the fifteenth convolutional layer is input to the sixteenth convolutional layer. The residual result between the result of the convolutional processing of the sixteenth convolutional layer and the result of the convolutional processing of the fourteenth convolutional layer is input to the pooling layer.
[0064] After performing convolution processing on the fingerprint image using the aforementioned 16 cascaded convolutional layers, the convolution result can be input into a pooling layer for pooling to obtain the pooling result. Typically, two common pooling methods are average pooling and max pooling; this embodiment uses average pooling.
[0065] After the pooling layer performs pooling processing on the convolutional result output by the convolutional layer, the pooling result is input into the fully connected layer. The fully connected layer performs fully connected processing on the pooling result and outputs the classification result of the fingerprint image patch.
[0066] Of course, it is understood that the neural network model can also be other types of neural network models, and the specific type of neural network model is not limited in the embodiments of this application.
[0067] It should be noted that the classification result of each fingerprint image block identified by the above neural network model is a prediction result. In real-world scenarios, an identified fingerprint block may only include the fingerprint region. Therefore, step 203 is required to segment the fingerprint ridges and valleys within the fingerprint ridges. Alternatively, the fingerprint block may contain a small non-fingerprint region in addition to the fingerprint region. Therefore, step 203 is required to segment the fingerprint region and the non-fingerprint region, as well as to segment the fingerprint ridges and valleys within the fingerprint ridges. Correspondingly, for a non-fingerprint block, it may include both a non-fingerprint region and a small portion of the fingerprint region. Therefore, step 204 is required to segment the fingerprint region and the non-fingerprint region, as well as to segment the fingerprint ridges and valleys within the fingerprint ridges.
[0068] Step 203: The corresponding fingerprint block is segmented using a local segmentation threshold to obtain the fingerprint ridges in the fingerprint block.
[0069] In some embodiments, since fingerprint blocks mainly consist of fingerprint ridges, they require local thresholding for segmentation of detail features. Therefore, after identifying the classification result of each fingerprint image block, the corresponding local segmentation threshold can be applied to segment the fingerprint block to obtain the fingerprint ridges within that block.
[0070] Each fingerprint block corresponds to a local segmentation threshold, meaning there is a one-to-one correspondence between fingerprint blocks and local segmentation thresholds.
[0071] Specifically, pixels with gray values greater than or equal to the local segmentation threshold in the fingerprint block can be identified as fingerprint ridges in the fingerprint block; pixels with gray values less than the local segmentation threshold in the fingerprint block can be identified as areas other than fingerprint ridges in the fingerprint block (which may include fingerprint valleys and / or non-fingerprint areas).
[0072] In one optional implementation, a local segmentation threshold can be used to binarize the fingerprint block to segment the fingerprint ridges and the areas outside the ridges. Pixels in the fingerprint block with grayscale values greater than or equal to the local segmentation threshold have their grayscale values reduced to 1 after binarization, representing fingerprint ridges; while pixels with grayscale values less than the local segmentation threshold have their grayscale values reduced to 0, representing areas outside the ridges. Alternatively, pixels in the fingerprint block with grayscale values greater than or equal to the local segmentation threshold have their grayscale values reduced to 0 after binarization, representing fingerprint ridges; while pixels with grayscale values less than the local segmentation threshold have their grayscale values reduced to 1, representing areas outside the ridges.
[0073] Step 204: Use a global segmentation threshold to segment the non-fingerprint area to obtain the fingerprint ridges in the non-fingerprint area.
[0074] In some embodiments, since non-fingerprint blocks mainly consist of non-fingerprint regions, they require segmentation using a global thresholding method typically used for segmenting large target scenes. Therefore, after identifying the classification results of each fingerprint image block, a global segmentation threshold can be applied to the non-fingerprint blocks to obtain the fingerprint ridges within those blocks.
[0075] Each non-fingerprint block corresponds to the same global segmentation threshold, meaning that the global segmentation thresholds for each non-fingerprint block are equal.
[0076] Specifically, pixels in the non-fingerprint area with a gray value greater than or equal to the global segmentation threshold can be identified as fingerprint ridges in the non-fingerprint area; pixels in the non-fingerprint area with a gray value less than the global segmentation threshold can be identified as regions in the non-fingerprint area other than fingerprint ridges (which may include fingerprint valleys and / or non-fingerprint regions).
[0077] In one optional implementation, a global segmentation threshold can be used to binarize the non-fingerprint block to segment the fingerprint ridges and the area outside the fingerprint ridges within the non-fingerprint block. Pixels in the non-fingerprint block with grayscale values greater than or equal to the local segmentation threshold have their grayscale values reduced to 1 after binarization, representing fingerprint ridges within the non-fingerprint block; while pixels in the non-fingerprint block with grayscale values less than the local segmentation threshold have their grayscale values reduced to 0 after binarization, representing areas outside the fingerprint ridges within the non-fingerprint block. Alternatively, pixels in the non-fingerprint block with grayscale values greater than or equal to the local segmentation threshold have their grayscale values reduced to 0 after binarization, representing fingerprint ridges within the non-fingerprint block; while pixels in the non-fingerprint block with grayscale values less than the local segmentation threshold have their grayscale values reduced to 1 after binarization, representing areas outside the fingerprint ridges within the non-fingerprint block.
[0078] It is understandable that the order of steps 203 and 204 can be changed. Step 203 can be executed first and then step 204, or step 204 can be executed first and then step 203. The specific execution order can be set according to the actual situation and is not limited here.
[0079] Step 205: Merge the fingerprint ridges in each fingerprint image block to obtain the fingerprint ridges of the fingerprint image.
[0080] After segmenting each fingerprint block in the fingerprint image to obtain fingerprint ridges using step 203 and segmenting each non-fingerprint block in the fingerprint image to obtain fingerprint ridges using step 204, the fingerprint ridges in all fingerprint image blocks (fingerprint blocks and non-fingerprint blocks) can be stitched together to obtain the complete fingerprint ridges in the fingerprint image.
[0081] like Figure 5 Image (a) shown in the figure is a fingerprint image. The fingerprint image segmentation method described above is used to... Figure 5 After segmenting the fingerprint image shown in (a), the following can be obtained: Figure 5 Image (b) shows the image. It can be seen that the fingerprint ridges in the segmented fingerprint image are clear, and all fingerprint ridges in the fingerprint image can be segmented.
[0082] Therefore, this embodiment of the application uses local segmentation threshold and global segmentation threshold to segment the fingerprint image. The local segmentation threshold is used to segment the identified fingerprint blocks, while the global segmentation threshold is used to segment the identified non-fingerprint blocks. In this way, the overall fingerprint region in the fingerprint image can be segmented, and the fingerprint ridges in the fingerprint region can also be segmented well. This allows for better segmentation of the overall fingerprint region and the fingerprint details, improving the integrity of fingerprint segmentation and thus improving the segmentation effect of the fingerprint image.
[0083] Reference Figure 6 As shown in the first aspect, a specific flowchart of a fingerprint image segmentation method provided in this application embodiment may include the following steps:
[0084] Step 601: Divide the acquired fingerprint image into multiple fingerprint image blocks.
[0085] The specific implementation method of this step is similar to that of step 201, and will not be repeated here to avoid repetition.
[0086] Step 602: Identify the classification result of each fingerprint image block; the classification result of the fingerprint image block includes fingerprint blocks or non-fingerprint blocks.
[0087] The specific implementation method of this step is similar to that of step 202, and will not be repeated here to avoid repetition.
[0088] Step 603: Obtain the first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the target grayscale value, and the second number of second pixels in the target fingerprint block whose grayscale value is less than the target grayscale value; the target fingerprint block is any fingerprint block.
[0089] Step 604: Determine the local segmentation threshold corresponding to the target fingerprint block based on the first quantity and the second quantity.
[0090] In some embodiments, after identifying the classification result of each fingerprint image block, a local segmentation threshold corresponding to each fingerprint block can be determined first. Any fingerprint block in the fingerprint image is referred to as the target fingerprint region. For each fingerprint block in the fingerprint image, steps 603 and 604 are performed to calculate its corresponding local segmentation threshold.
[0091] An optional implementation may employ the following method to determine the local segmentation threshold corresponding to the target fingerprint block based on a first quantity and a second quantity: when the absolute value of the difference between the first quantity and the second quantity is less than or equal to a preset quantity, the target grayscale value is determined as the local segmentation threshold corresponding to the target fingerprint block, and the target grayscale value is the average grayscale value of each pixel in the target fingerprint block; when the absolute value of the difference between the first quantity and the second quantity is greater than the preset quantity, the target grayscale value is continuously adjusted until the absolute value of the difference between the first quantity and the second quantity obtained after adjustment is less than or equal to the preset quantity, and the target grayscale value after the last adjustment is determined as the local segmentation threshold corresponding to the target fingerprint block.
[0092] For a target fingerprint block, first determine the average grayscale value of each pixel in the target fingerprint block; then, compare the grayscale value of each pixel in the target fingerprint block with the average grayscale value to determine the first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the target grayscale value, and the second number of second pixels in the target fingerprint block whose grayscale value is less than the target grayscale value.
[0093] When the absolute value of the difference between the first quantity and the second quantity is less than or equal to a preset quantity, the average grayscale value is determined as the local segmentation threshold corresponding to the target fingerprint block. Let the first quantity be N. h The second quantity is N l Taking a preset quantity of δ as an example, if |N h -N l When |≤δ, the average grayscale value is determined as the local segmentation threshold corresponding to the target fingerprint block.
[0094] The preset quantity can be determined by the number of fingerprint image blocks into which the fingerprint image is divided. For example, if the number of fingerprint image blocks into which the fingerprint image is divided is 16×16, then the preset quantity δ can be 16×16×10%=25.6. That is, the preset quantity is the product of the number of fingerprint image blocks into which the fingerprint image is divided and the preset ratio. This preset ratio can be set according to an empirical value, such as a preset ratio of 10%.
[0095] When the absolute value of the difference between the first quantity and the second quantity is greater than the preset quantity, i.e., |Nh -N l When |>δ, the target grayscale value is continuously adjusted until the absolute value of the difference between the first quantity and the second quantity obtained after adjustment is less than or equal to the preset quantity, and the target grayscale value after the last adjustment is determined as the local segmentation threshold corresponding to the target fingerprint block.
[0096] In one scenario, when the absolute value of the difference between the first quantity and the second quantity is greater than the preset quantity, and the first quantity is greater than the second quantity, the difference between the target grayscale value after the Mth adjustment and the target grayscale value before the Mth adjustment is the first preset grayscale value; the first preset grayscale value is a positive number, and M is a positive integer.
[0097] Using the average grayscale value as the initial target grayscale value, if the absolute value of the difference between the first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the initial target grayscale value and the second number of second pixels in the target fingerprint block whose grayscale value is less than the initial target grayscale value is greater than a preset number, and the first number is greater than the second number, then the sum of the average grayscale value and the first preset grayscale value can be used as the target grayscale value after the first adjustment.
[0098] Next, the first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the target grayscale value after the first adjustment, and the second number of second pixels in the target fingerprint block whose grayscale value is less than the target grayscale value after the first adjustment, are obtained, and it is determined whether the absolute value of the difference between the first number and the second number corresponding to the target grayscale value after the first adjustment is less than or equal to a preset number.
[0099] If the absolute value of the difference between the first and second quantities corresponding to the first adjusted target grayscale value is less than or equal to the preset quantity, then the first adjusted target grayscale value is used as the local segmentation threshold corresponding to the target fingerprint block. However, if the absolute value of the difference between the first and second quantities corresponding to the first adjusted target grayscale value is still greater than the preset quantity, and the first quantity corresponding to the first adjusted target grayscale value is still greater than the second quantity corresponding to the first adjusted target grayscale value, then the sum of the first adjusted target grayscale value and the first preset grayscale value can be used as the second adjusted target grayscale value.
[0100] Continue to increase the target gray value in the above manner until the absolute value of the difference between the first quantity and the second quantity corresponding to the adjusted target gray value is less than or equal to the preset quantity, and then determine the target gray value after the last adjustment as the local segmentation threshold corresponding to the target fingerprint block.
[0101] In another scenario, when the absolute value of the difference between the first quantity and the second quantity is greater than the preset quantity, and the first quantity is less than the second quantity, the difference between the target grayscale value before the Nth adjustment and the target grayscale value after the Nth adjustment is the second preset grayscale value; the second preset grayscale value is a positive number, and N is a positive integer.
[0102] Using the average grayscale value as the initial target grayscale value, if the absolute value of the difference between the first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the initial target grayscale value and the second number of second pixels in the target fingerprint block whose grayscale value is less than the initial target grayscale value is greater than a preset number, and the first number is less than the second number, then the difference between the average grayscale value and the second preset grayscale value can be used as the target grayscale value after the first adjustment.
[0103] Next, the first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the target grayscale value after the first adjustment, and the second number of second pixels in the target fingerprint block whose grayscale value is less than the target grayscale value after the first adjustment, are obtained, and it is determined whether the absolute value of the difference between the first number and the second number corresponding to the target grayscale value after the first adjustment is less than or equal to a preset number.
[0104] If the absolute value of the difference between the first and second quantities corresponding to the target grayscale values after the first adjustment is less than or equal to a preset quantity, then the target grayscale values after the first adjustment are used as the local segmentation threshold corresponding to the target fingerprint block. However, if the absolute value of the difference between the first and second quantities corresponding to the target grayscale values after the first adjustment is still greater than the preset quantity, and the first quantity corresponding to the target grayscale values after the first adjustment is still less than the second quantity corresponding to the target grayscale values after the first adjustment, then the difference between the target grayscale values after the first adjustment and the second preset grayscale value can be used as the target grayscale value after the second adjustment.
[0105] Continue to reduce the target gray value in the above manner until the absolute value of the difference between the first quantity and the second quantity corresponding to the adjusted target gray value is less than or equal to the preset quantity, and then determine the target gray value after the last adjustment as the local segmentation threshold corresponding to the target fingerprint block.
[0106] In some embodiments, the first preset grayscale value and the second preset grayscale value may be equal or unequal. For example, both the first preset grayscale value and the second preset grayscale value may be 1.
[0107] Step 605: The corresponding fingerprint block is segmented using a local segmentation threshold to obtain the fingerprint ridges in the fingerprint block.
[0108] The specific implementation method of this step is similar to that of step 203, and will not be repeated here to avoid repetition.
[0109] Step 606: Calculate the global segmentation threshold based on the grayscale value of each pixel in the fingerprint image using the preset maximum inter-class variance method.
[0110] In some embodiments, after acquiring the fingerprint image, the global segmentation threshold corresponding to the non-fingerprint block can be determined. Specifically, the global segmentation threshold corresponding to the non-fingerprint block can be calculated based on the grayscale value of each pixel in the fingerprint image using a preset maximum inter-class variance method (OTSU).
[0111] The specific implementation process of the Otsu's method is as follows: First, the number of pixels with gray values less than the gray threshold in the fingerprint image, M0, is denoted as W0, representing the first proportion of the total number of pixels (x×y) in the fingerprint image, i.e., W0 = M0 / (x×y). The average gray value of these M0 pixels is μ0. The number of pixels with gray values greater than or equal to the gray threshold in the fingerprint image, M1, is denoted as W1, representing the first proportion of the total number of pixels (x×y) in the fingerprint image, i.e., W1 = M1 / (x×y). The average gray value of these M1 pixels is μ1. The inter-class variance of the fingerprint image is denoted as g, and the formula for calculating the inter-class variance is: g = W0 × W1 × (μ0 - μ1). 2 .
[0112] Based on the above formula for calculating inter-class variance, a traversal method is used to calculate the grayscale threshold corresponding to the maximum inter-class variance, and the grayscale threshold corresponding to the maximum inter-class variance is used as the global segmentation threshold for non-fingerprint blocks.
[0113] Step 607: Use a global segmentation threshold to segment the non-fingerprint blocks to obtain the fingerprint ridges in the non-fingerprint blocks.
[0114] The specific implementation method of this step is similar to that of step 204, and will not be repeated here to avoid repetition.
[0115] Step 608: Merge the fingerprint ridges in each fingerprint image block to obtain the fingerprint ridges of the fingerprint image.
[0116] The specific implementation method of this step is similar to that of step 205, and will not be repeated here to avoid repetition.
[0117] Therefore, this embodiment of the application selects local and global segmentation thresholds reasonably based on the distribution of gray values of pixels in each fingerprint image block. Subsequently, the identified fingerprint blocks can be segmented using the local segmentation threshold, while the identified non-fingerprint blocks can be segmented using the global segmentation threshold. In this way, the overall fingerprint region in the fingerprint image can be segmented, and the fingerprint ridges in the fingerprint region can also be segmented well. This allows for better segmentation of the overall fingerprint region and fingerprint details, improving the integrity of fingerprint segmentation and thus improving the segmentation effect of the fingerprint image.
[0118] The fingerprint image segmentation method according to the embodiments of this application has been described above. The apparatus for performing the above-described fingerprint image segmentation method, provided in the embodiments of this application, will now be described. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced in relation to each other, and the fingerprint image segmentation apparatus provided in the embodiments of this application can perform the steps of the above-described fingerprint image segmentation method.
[0119] Reference Figure 7 As shown in the second aspect, this application provides a structural block diagram of a fingerprint image segmentation device. The fingerprint image segmentation device includes: an image division module 701, an image recognition module 702, a first segmentation module 703, a second segmentation module 704, and a merging module 705.
[0120] The system includes an image segmentation module 701 for dividing the acquired fingerprint image into multiple fingerprint image blocks; an image recognition module 702 for recognizing the classification result of each fingerprint image block, where the classification result includes fingerprint blocks or non-fingerprint blocks; a first segmentation module 703 for segmenting the corresponding fingerprint blocks using a local segmentation threshold to obtain fingerprint ridges in the fingerprint blocks; a second segmentation module 704 for segmenting non-fingerprint blocks using a global segmentation threshold to obtain fingerprint ridges in the non-fingerprint blocks; and a merging module 705 for merging the fingerprint ridges in each fingerprint image block to obtain the fingerprint ridges of the fingerprint image.
[0121] In one feasible implementation, the fingerprint image segmentation device further includes: a pixel count acquisition module and a local segmentation threshold determination module. The pixel count acquisition module is used to acquire a first number of first pixels in the target fingerprint block whose grayscale value is greater than or equal to the target grayscale value, and a second number of second pixels in the target fingerprint block whose grayscale value is less than the target grayscale value, wherein the target fingerprint block is any fingerprint block; the local segmentation threshold determination module is used to determine a local segmentation threshold corresponding to the target fingerprint block based on the first and second counts.
[0122] In one feasible implementation, the local segmentation threshold determination module includes a first determination submodule and a second determination submodule. The first determination submodule is used to determine the target grayscale value as the local segmentation threshold corresponding to the target fingerprint block when the absolute value of the difference between a first quantity and a second quantity is less than or equal to a preset quantity, wherein the target grayscale value is the average grayscale value of each pixel in the target fingerprint block. The second determination submodule is used to continuously adjust the target grayscale value until the absolute value of the difference between the first quantity and the second quantity obtained after adjustment is less than or equal to the preset quantity, and then determine the target grayscale value after the last adjustment as the local segmentation threshold corresponding to the target fingerprint block.
[0123] In one feasible implementation, when the absolute value of the difference between the first quantity and the second quantity is greater than a preset quantity, and the first quantity is greater than the second quantity, the difference between the target grayscale value after the Mth adjustment and the target grayscale value before the Mth adjustment is a first preset grayscale value, where the first preset grayscale value is a positive number and M is a positive integer. When the absolute value of the difference between the first quantity and the second quantity is greater than a preset quantity, and the first quantity is less than the second quantity, the difference between the target grayscale value before the Nth adjustment and the target grayscale value after the Nth adjustment is a second preset grayscale value, where the second preset grayscale value is a positive number and N is a positive integer.
[0124] In one feasible implementation, the fingerprint image segmentation device further includes a global segmentation threshold determination module, used to calculate the global segmentation threshold based on the grayscale value of each pixel in the fingerprint image using a preset maximum inter-class variance method.
[0125] In one feasible implementation, the first segmentation module 703 includes a first segmentation submodule, used to determine the pixels in the fingerprint block whose grayscale value is greater than or equal to the local segmentation threshold as fingerprint ridges in the fingerprint block; the second segmentation module 704 includes a second segmentation submodule, used to determine the pixels in the non-fingerprint block whose grayscale value is greater than or equal to the global segmentation threshold as fingerprint ridges in the non-fingerprint block.
[0126] In one feasible implementation, the image recognition module 702 includes an image recognition submodule for recognizing the classification result of each fingerprint image block using a neural network model; wherein the neural network model is trained based on multiple sample fingerprint images, and each sample fingerprint image includes a first sample image corresponding to the fingerprint region and a second sample image corresponding to the non-fingerprint region.
[0127] The fingerprint image segmentation device can be an electronic device such as a mobile phone, laptop, or tablet.
[0128] The fingerprint image segmentation device of this application embodiment can be used to perform the steps executed in the above method embodiments, and its implementation principle and technical effect are similar, so they will not be repeated here. Furthermore, each module in the above fingerprint image segmentation device can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. Each module can be embedded in or independent of the processor of the electronic device in hardware form, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.
[0129] Reference Figure 8 As shown, in a third aspect, embodiments of this application provide an electronic device 800, which may include: a memory 801, a processor 802, and a communication interface 803, wherein the memory 801, the processor 802, and the communication interface 803 can communicate; for example, the memory 801, the processor 802, and the communication interface 803 can communicate via a communication bus.
[0130] The memory 801 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 801 can store computer programs, which are controlled and executed by the processor 802 and communicated through the communication interface 803, thereby implementing the fingerprint image segmentation method provided in the above embodiments of this application.
[0131] In some embodiments, the electronic device 800 may further include a fingerprint sensor, which acquires a fingerprint image of the user to be identified based on the fingerprint sensor disposed on the electronic device 800.
[0132] In some embodiments, the electronic device 800 may not include a fingerprint sensor. After a fingerprint sensor on another device acquires a fingerprint image of the user to be identified, it can send the fingerprint image to the electronic device 800, which then processes it using the fingerprint image segmentation method described above.
[0133] Fourthly, embodiments of this application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted on a computer-readable medium. A computer-readable medium can include computer storage media and communication media, and can also include any medium capable of transferring a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0134] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0135] In the description of the embodiments of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, an indirect connection through an intermediate medium, or the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0136] In the description of the embodiments of this application, it should be understood that the terms "upper," "lower," "front," "rear," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this application. In the description of this application, "a plurality of" means two or more, unless otherwise precisely specified.
[0137] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method of segmenting a fingerprint image, characterized by, Comprise; Divide the acquired fingerprint image into a plurality of fingerprint image blocks; Adopt a neural network model to identify a classification result of each of the fingerprint image blocks; the classification result of the fingerprint image block comprises a fingerprint block or a non-fingerprint block, wherein the neural network model is a 17-layer residual convolutional neural network model trained according to a plurality of sample fingerprint images, comprising 16 cascaded convolutional layers and 1 pooling layer, the number of convolution kernels in each of the first to fourth convolutional layers in the 16 cascaded convolutional layers is 16, the number of convolution kernels in each of the fifth to eighth convolutional layers is 32, the number of convolution kernels in each of the ninth to twelfth convolutional layers is 64, and the number of convolution kernels in each of the thirteenth to sixteenth convolutional layers is 128; Adopt a local segmentation threshold to segment the corresponding fingerprint block to obtain a fingerprint ridge in the fingerprint block, wherein the local segmentation threshold is determined by: acquiring a first number of first pixel points in the fingerprint block whose gray value is greater than or equal to a target gray value, and a second number of second pixel points in the fingerprint block whose gray value is less than the target gray value, the target gray value being an average of the gray values of all pixel points in the fingerprint block; when the absolute value of the difference between the first number and the second number is less than or equal to a preset number, the target gray value is determined as the local segmentation threshold corresponding to the fingerprint block; when the absolute value of the difference between the first number and the second number is greater than the preset number, the target gray value is adjusted until the absolute value of the difference between the first number and the second number after adjustment is less than or equal to the preset number, and the target gray value after the last adjustment is determined as the local segmentation threshold corresponding to the fingerprint block; the preset number being the product of the number of fingerprint image blocks divided from the fingerprint image and a preset proportion; The non-fingerprint block is segmented by using a global segmentation threshold to obtain a fingerprint line in the non-fingerprint block, wherein the global segmentation threshold is calculated according to a gray value of each pixel point in the fingerprint image by using a preset maximum inter-class variance method, and an implementation process of the maximum inter-class variance method is as follows: a number of pixel points with a gray value less than a gray threshold in the fingerprint image is recorded as a first proportion of a total number of pixel points in the fingerprint image , a number of pixel points with a gray value greater than or equal to the gray threshold in the fingerprint image is recorded as a second proportion of the total number of pixel points in the fingerprint image , , and an average gray value of the pixel points is ; the first proportion of the total number of pixel points in the fingerprint image is recorded as , , and an average gray value of the pixel points is ; and a calculation formula of an inter-class variance of the fingerprint image is . Merge the fingerprint ridges in each of the fingerprint image blocks to obtain a fingerprint ridge of the fingerprint image.
2. The method of claim 1, wherein, When the absolute value of the difference between the first number and the second number is greater than the preset number, and the first number is greater than the second number, the difference between the target gray value after the Mth adjustment and the target gray value before the Mth adjustment is a first preset gray value; the first preset gray value is a positive number, and M is a positive integer; When the absolute value of the difference between the first number and the second number is greater than the preset number, and the first number is less than the second number, the difference between the target gray value before the Nth adjustment and the target gray value after the Nth adjustment is a second preset gray value; the second preset gray value is a positive number, and N is a positive integer.
3. The method of claim 1, wherein, The method comprises the following steps: Determine the pixel points in the fingerprint block whose gray value is greater than or equal to the local segmentation threshold as the fingerprint ridge line in the fingerprint block; The method comprises the following steps: The pixel points in the non-fingerprint block with a gray value greater than or equal to the global segmentation threshold are determined as the fingerprint ridge lines in the non-fingerprint block.
4. The method of claim 1, wherein, Wherein, The neural network model is obtained according to a plurality of sample fingerprint images, and each sample fingerprint image includes a first sample image corresponding to a fingerprint region and a second sample image corresponding to a non-fingerprint region.
5. A fingerprint image segmentation apparatus characterized by comprising: Including: The image division module is configured to divide the obtained fingerprint image into a plurality of fingerprint image blocks. The image recognition module is configured to recognize a classification result of each fingerprint image block by using a neural network model, and the classification result of the fingerprint image block includes a fingerprint block or a non-fingerprint block. The first segmentation module is configured to segment the corresponding fingerprint block by using a local segmentation threshold to obtain fingerprint lines in the fingerprint block. The second segmentation module is used to segment the non-fingerprint area using a global segmentation threshold to obtain the fingerprint ridges in the non-fingerprint area. The global segmentation threshold is calculated based on the grayscale value of each pixel in the fingerprint image using a preset maximum inter-class variance (MOL) method. The MOL method is implemented by counting the number of pixels in the fingerprint image whose grayscale value is less than a grayscale threshold. The first proportion of the total number of pixels in the fingerprint image is denoted as , The average grayscale value of each pixel is The number of pixels in the fingerprint image whose grayscale value is greater than or equal to the grayscale threshold. The first proportion of the total number of pixels in the fingerprint image is denoted as W1, and the average gray value of the M1 pixels is μ1; the formula for calculating the inter-class variance of the fingerprint image is: ; The merging module is configured to merge the fingerprint lines in each fingerprint image block to obtain fingerprint lines of the fingerprint image.
6. An electronic device, comprising: The computer readable storage medium stores a computer program or instructions, and when the computer program or instructions are executed, the fingerprint image segmentation method in any one of claims 1-4 is implemented.
7. A computer readable storage medium characterized by The computer readable storage medium stores a computer program or instructions, and when the computer program or instructions are executed, the fingerprint image segmentation method in any one of claims 1-4 is implemented.
Citation Information
Patent Citations
Fingerprint image processing method and device and computer readable storage medium
CN111353332A