Image processing method, computer program product, device and storage medium

By adjusting the exposure time and judging the brightness and overexposure area of ​​the exposed image, the problem of low recognition rate under the fixed exposure method is solved, efficient image recognition is achieved, and the exposure success rate is ensured.

CN114694191BActive Publication Date: 2024-11-15BEIJING JIIOV TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210238358.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2024-11-15
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

In the existing image identity recognition system, the fixed exposure method is greatly affected by the environment, has a low recognition rate, and cannot guarantee the success of one exposure.

Method used

By adjusting the exposure time, an exposure image that meets the image recognition requirements is collected according to the brightness and overexposure area of ​​the exposed image. If it is not met, the exposure time is adjusted and the image is reacquired until a high-quality image is achieved.

Benefits of technology

It improves the success rate of image recognition, ensures successful recognition with one exposure, enhances image processing efficiency, and reduces dependence on the environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114694191B_ABST
    Figure CN114694191B_ABST
Patent Text Reader

Abstract

The present application provides an image processing method, a computer program product, a device and a storage medium. The image processing method includes: acquiring an exposure image according to an exposure time; determining whether the exposure image meets image recognition requirements; if so, performing image recognition on the exposure image; if not, adjusting the exposure time to obtain an updated exposure time, and returning to the step of acquiring the exposure image according to the exposure time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, a computer program product, a device, and a storage medium. Background Art

[0002] In image identity recognition systems, recognition speed and recognition rate are two key indicators.

[0003] Existing methods include fixed exposure methods: setting a fixed exposure time, then using the fixed exposure time to expose the fingerprint to obtain a fingerprint image, and then identifying the obtained fingerprint image to obtain a recognition result. The fixed exposure method exposes once and the image acquisition time is short. However, the fixed exposure method is greatly affected by the environment and the recognition rate is usually not high. Summary of the invention

[0004] Based on this, an image processing method, a computer program product, a device and a storage medium are proposed.

[0005] In a first aspect, an image processing method is provided, comprising:

[0006] Acquire an exposure image according to the exposure time;

[0007] Determining whether the exposure image meets image recognition requirements;

[0008] If the conditions are met, performing image recognition on the exposure image;

[0009] If not, the exposure time is adjusted to obtain an updated exposure time, and the process returns to the step of acquiring an exposure image according to the exposure time.

[0010] In the above-mentioned image processing method, if the exposure image meets the image recognition requirements, image recognition is directly performed on the exposure image, so that image recognition success can be guaranteed in one exposure, thereby ensuring the image recognition success rate of one exposure. If the exposure image does not meet the image recognition requirements, it means that the current exposure time cannot obtain a higher quality image. Therefore, the exposure time is adjusted to obtain an updated exposure time, and then the exposure image is captured using the updated exposure time. At this time, the captured exposure image will have a higher image quality, which can improve the image recognition success rate to a certain extent.

[0011] In some embodiments of the present application, determining whether the exposure image meets the image recognition requirements includes: determining whether the brightness of the target area in the exposure image reaches a specified brightness; if so, the image recognition requirements are met, and the target area is the area of ​​focus of the image recognition requirements; otherwise, the image recognition requirements are not met.

[0012] In the above embodiment, the image recognition requirement includes the requirement on brightness, so it is determined whether the brightness of the target area in the exposure image reaches the specified brightness. If so, the image recognition requirement is met; otherwise, the image recognition requirement is not met.

[0013] In some embodiments of the present application, determining whether the exposure image meets the image recognition requirements further includes: obtaining an overexposed area in the exposure image; determining whether at least a portion of the overexposed area exists in the target area in the exposure image; if so, the image recognition requirements are not met; if not, determining whether the brightness of the target area in the exposure image reaches a specified brightness; if so, the image recognition requirements are met; otherwise, the image recognition requirements are not met.

[0014] In the above embodiment, as long as at least a part of the overexposed area exists in the target area, it is considered that the image quality of the target area is not very high. Therefore, in order to improve the image processing efficiency, it is directly determined that the image recognition requirement is not met. If at least a part of the overexposed area does not exist in the target area, it is continued to be judged whether the brightness of the target area in the exposed image reaches the specified brightness. It can be understood that if the brightness of the target area in the exposed image does not reach the specified brightness, the image recognition may not be successful. Therefore, in order to improve the success rate of image recognition, it is necessary to continue to judge whether the brightness of the target area reaches the specified brightness.

[0015] In some embodiments of the present application, obtaining the overexposed area in the exposure image includes: obtaining the gradient value of the pixel to be determined based on the pixel value of the pixel to be determined in the exposure image and the pixel values ​​of the pixels in the neighborhood of the pixel to be determined; if the gradient value of the pixel to be determined is less than the target gradient value, and the pixel value of the pixel to be determined is greater than the specified pixel value, then the pixel to be determined is an overexposed pixel; based on the overexposed pixel in the exposure image, obtaining the overexposed area of ​​the exposure image.

[0016] In the above embodiment, simply relying on the designated pixel value to judge the pixel to be determined may not be so accurate. Therefore, the gradient value of the pixel to be determined is also determined. The gradient value and the designated pixel value are combined to realize the determination of the overexposed pixel and the overexposed area, thereby improving the determination accuracy of the overexposed area.

[0017] In some embodiments of the present application, adjusting the exposure time to obtain an updated exposure time includes: adjusting the exposure time to a production line calibration time to obtain an updated exposure time.

[0018] In the above embodiment, the production line calibration time is obtained after the production line calibration. Usually, a higher quality exposure image can be obtained through the production line calibration time. Therefore, in order to quickly adjust the exposure time, the exposure time is directly adjusted to the production line calibration time.

[0019] In some embodiments of the present application, adjusting the exposure time to obtain an updated exposure time includes: adjusting the exposure time according to the brightness of the target area and a specified brightness to obtain an updated exposure time.

[0020] In the above embodiment, when the image recognition requirement is not met, the exposure time is adjusted according to the brightness of the target area and the specified brightness, so that the adjusted exposure time can match the brightness of the target area with the specified brightness.

[0021] In some embodiments of the present application, the exposure time is adjusted according to the brightness of the target area and the specified brightness to obtain an updated exposure time, including: dividing the specified brightness by the brightness of the target area to obtain a brightness ratio; multiplying the brightness ratio by the exposure time to obtain an updated exposure time.

[0022] In the above embodiment, the specified brightness is divided by the brightness of the target area to obtain a brightness ratio, and the brightness ratio is greater than 1. Then, the brightness ratio is multiplied by the exposure time to obtain an updated exposure time, thereby increasing the exposure time. Moreover, since the exposure time is adjusted according to the brightness ratio, the updated exposure time can be more accurate to a certain extent.

[0023] In some embodiments of the present application, before acquiring the exposure image according to the exposure time, it also includes: when acquiring the exposure image for the first time according to the exposure time, the exposure time is the production line calibration time.

[0024] In the above embodiment, if the user is performing image acquisition for the first time after the device leaves the factory, the production line calibration time is directly used for exposure.

[0025] In some embodiments of the present application, the exposure image is a fingerprint image collected from a fingerprint carrier.

[0026] The above embodiments illustrate application scenarios.

[0027] In a second aspect, a computer program product is provided, comprising computer program instructions, wherein when the computer program instructions are read and executed by a processor, the image processing method as described in the first aspect is executed.

[0028] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the image processing method described in the first aspect when executing the computer program.

[0029] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the steps of the image processing method described in the first aspect are executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 Schematic diagram of the implementation process of the image processing method in the embodiment of the present application;

[0032] Figure 2 This is a schematic diagram showing that the target area in the embodiment of the present application is the center of the image;

[0033] Figure 3 This is a schematic diagram of an embodiment of the present application in which the target area is not the center of the image;

[0034] Figure 4 A schematic diagram of the intersection of the target area and the overexposed area in an embodiment of the present application;

[0035] Figure 5 It is a schematic diagram showing that the overexposed area is located at the edge of the exposed image in an embodiment of the present application;

[0036] Figure 6 This is a schematic diagram of pixel points in 8 neighborhoods in an embodiment of the present application;

[0037] Figure 7 This is a schematic diagram of the composition structure of the image processing device in the embodiment of the present application;

[0038] Figure 8 This is a block diagram of the internal structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] In one embodiment, an image processing method is provided. The execution subject of the image processing method described in the embodiment of the present invention is a computer device capable of implementing the image processing method described in the embodiment of the present invention, and the computer device may include but is not limited to a terminal and / or a server. Among them, the terminal includes a desktop terminal and a mobile terminal, and the desktop terminal includes but is not limited to a desktop computer and a car computer; the mobile terminal includes but is not limited to a mobile phone, a tablet, a laptop computer and a smart watch. The server includes a high-performance computer and a high-performance computer cluster. An exposure unit is provided in the computer device, and an exposure image is obtained by exposing the exposure unit. When the exposure unit includes an exposure module and a processing module, the image processing method described in the embodiment of the present invention is all executed by the exposure unit in the computer device. When the exposure unit includes an exposure module and the processing module is located in the processor in the computer device, the image processing method described in the embodiment of the present invention is partially executed by the exposure unit and partially executed by the processor in the computer device. When the exposure unit includes an exposure module and the image recognition submodule in the processing module is located in the processor in the computer device and other submodules in the processing module are located in the exposure unit, the image processing method described in the embodiment of the present invention is partially executed by the exposure unit and partially executed by the processor in the computer device. In the following, the embodiment of the present invention is mainly described by taking the under-screen fingerprint recognition scenario as an example.

[0041] like Figure 1 As shown, an image processing method is provided, comprising:

[0042] Step 100: Acquire an exposure image according to the exposure time.

[0043] The exposure image is an image obtained after exposure according to the exposure time. The computer device is provided with a display screen. For example, the display screen includes a face trigger area. When a face exposure event is detected, the exposure image is collected according to the exposure time, wherein the face exposure event may include an event in which a face is detected in the face trigger area. For another example, the display screen includes a fingerprint detection area. When a fingerprint carrier is detected above the fingerprint detection area, the exposure image is collected according to the exposure time, wherein the above of the fingerprint detection area includes the situation of directly pressing on the fingerprint detection area and the situation of not pressing but within a certain distance above the fingerprint detection area. The exposure image can be a grayscale image. In this case, the exposure image only contains one channel. Of course, the exposure image can also be a color image, for example, a color image containing R channel, G channel and B channel.

[0044] Step 200, determining whether the exposure image meets image recognition requirements.

[0045] Before determining whether the exposure image meets the image recognition requirement, the exposure image may be preprocessed to enhance the accuracy of the determination. For example, the preprocessing is image enhancement.

[0046] Image recognition requirements are requirements that the exposure image needs to meet when performing image recognition on the exposure image. For example, the image recognition requirements include that the brightness of the exposure image reaches a preset brightness, and / or that the image clarity of the exposure image reaches a preset clarity, and / or that the area of ​​the image region with biological features in the exposure image reaches a preset area. It is understandable that the image recognition algorithm has certain requirements for the image quality of the exposure image. If the requirements are not met, the image recognition will most likely fail. If the requirements are met, the image recognition will most likely succeed. Therefore, in order to improve the success rate of image recognition, it is necessary to determine whether the exposure image meets the image recognition requirements.

[0047] Step 300: If the conditions are met, image recognition is performed on the exposure image.

[0048] Since the exposed image meets the image recognition requirements, in order to improve the image processing efficiency, no other processing is performed on the exposed image, and image recognition can be directly performed on the exposed image. Moreover, since the exposed image meets the image recognition requirements, image recognition can be successfully performed in a single exposure with a high probability, thus ensuring the success rate of image recognition in a single exposure.

[0049] The exposure image may be recognized by an image recognition algorithm. For example, the image recognition algorithm first extracts features from the exposure image to obtain exposure features, then calculates similarity between the exposure features and preset features of multiple persons stored in the device to obtain similarities between the exposure features and the multiple preset features, and then selects a maximum similarity from the multiple similarities. If the maximum similarity is greater than or equal to the preset similarity, an image recognition result is obtained. If the maximum similarity is less than the preset similarity, the image recognition result is a recognition failure.

[0050] Step 400: If not satisfied, adjust the exposure time to obtain an updated exposure time, and return to step 100.

[0051] If the exposure image does not meet the image recognition requirements, it means that the current exposure time cannot obtain a higher quality image. Therefore, in order to obtain a high-quality exposure image and improve the success rate of image recognition, choose to adjust the exposure time, and return to the step of collecting the exposure image according to the exposure time to perform a new round of iteration (in the new round of iteration, the updated exposure time is used).

[0052] In one example, in order to send each exposure image obtained to the algorithm for processing, step 400 includes: if it is not satisfied, adjusting the exposure time to obtain an updated exposure time, performing image recognition on the exposure image, and returning to step 100.

[0053] In the above-mentioned image processing method, if the exposure image meets the image recognition requirements, image recognition is directly performed on the exposure image, so that image recognition success can be guaranteed in one exposure, thereby ensuring the image recognition success rate of one exposure. If the exposure image does not meet the image recognition requirements, it means that the current exposure time cannot obtain a higher quality image. Therefore, the exposure time is adjusted to obtain an updated exposure time, and then the exposure image is captured using the updated exposure time. At this time, the captured exposure image will have a higher image quality, which can improve the image recognition success rate to a certain extent.

[0054] In some embodiments of the present application, step 200 includes: step 201 and step 202.

[0055] Step 201 , determining whether the brightness of the target area in the exposure image reaches a specified brightness. If so, the image recognition requirement is met, and the target area is the area of ​​interest required for image recognition.

[0056] In many scenarios, the area that image recognition requires to focus on is not the entire exposure image, but may be just the target area in the exposure image. That is, the image quality of the target area largely determines whether the recognition can be successful. If the image quality of the target area is low, it is believed that image recognition will most likely fail. If the image quality of the target area is high, it is believed that image recognition will most likely succeed.

[0057] In some application scenarios, the area that affects the success of image recognition includes the central area of ​​the image. Therefore, in these application scenarios, it is necessary to at least ensure the image quality of the central area. Therefore, the target area may include the central area of ​​the exposed image, wherein the central area may be an area including the center of the image. Of course, the central area is not limited to the area including the center of the image. For example, the central area may also be an area near the center of the image. The following is an example in which the central area is an area including the center of the image. Figure 2 As shown, the center of the target area coincides with the center of the exposure image, and the length and width of the target area are 1 / N of the length and width of the exposure image, respectively. For example, N=3, the size of the exposure image is 150×150, and the size of the target area is 50×50; Figure 3 As shown, the area center of the target area and the image center of the exposure image may not coincide with each other, but the target area still includes the image center.

[0058] The specified brightness is a pre-specified brightness, for example, the specified brightness is M% of the maximum brightness, for example, M is 80, wherein the maximum brightness is the maximum pixel value, for example, if the number of bits of the image sensor is 8 bits, then the range of pixel values ​​is 0 to 255, so the maximum brightness is 255, for example, if the number of bits of the image sensor is 16 bits, then the range of pixel values ​​is 0 to 4096, so the maximum brightness is 4096.

[0059] The brightness of the target area reaches the specified brightness, including: the brightness of the target area is greater than or equal to the specified brightness. If the brightness of the target area reaches the specified brightness, it is considered that the image quality of the target area is high and meets the image recognition requirements.

[0060] Step 202: Otherwise, the image recognition requirement is not met.

[0061] When the brightness of the target area is less than the specified brightness, it is considered that the image quality of the target area is low and cannot meet the image recognition requirements.

[0062] In the above embodiment, the image recognition requirement includes the requirement on brightness, so it is determined whether the brightness of the target area in the exposure image reaches the specified brightness. If so, the image recognition requirement is met; otherwise, the image recognition requirement is not met.

[0063] In some embodiments of the present application, step 200 further includes: steps 20A to 20C.

[0064] Step 20A, obtaining an overexposed area in the exposure image.

[0065] The overexposed area is an area in the exposed image where overexposure occurs. The overexposure phenomenon may specifically be a phenomenon where the exposure time is too long. The overexposed area is composed of overexposed pixels. Due to overexposure, the brightness of the pixels will be relatively high. Therefore, the overall brightness of the overexposed area will be relatively high. Furthermore, whether a pixel is an overexposed pixel can be determined based on the brightness value of the pixel in the exposed image. For example, a specified pixel value is preset. When the pixel value of a pixel exceeds the specified pixel value, the pixel is considered to be an overexposed pixel. After obtaining the overexposed pixels, the overexposed pixels can be connected to obtain the overexposed area.

[0066] Step 20B: Determine whether at least a portion of the overexposed area exists in the target area in the exposure image.

[0067] like Figure 4 As shown, there is at least a portion of the overexposed area in the target area, including four situations: the overexposed area is located in the target area; the target area is located in the overexposed area; the target area and the overexposed area overlap; the overexposed area and the target area partially overlap.

[0068] Step 20C: If it exists, the image recognition requirement is not met.

[0069] If it exists, it is considered that the image quality of the target area is affected and image recognition is likely to fail. Therefore, it is directly determined that the exposure image does not meet the image recognition requirements.

[0070] Step 20D: if not, determine whether the brightness of the target area in the exposure image reaches the specified brightness; if so, the image recognition requirement is met; otherwise, the image recognition requirement is not met.

[0071] If it does not exist, then Figure 5 As shown, the overexposed area may exist at the edge of the exposed image (possibly caused by the finger pressing off-center), or there may be no overexposed area in the exposed image. At this time, it is preliminarily determined that the brightness of the target area is not affected. In order to further determine the brightness of the target area and to determine the image quality of the target area, it is further determined whether the brightness of the target area reaches the specified brightness. If so, it is considered that the image recognition requirements are met. If the result of further judgment is that the brightness of the target area does not reach the specified brightness, it is considered that the image recognition requirements are not met.

[0072] In the above embodiment, as long as at least a part of the overexposed area exists in the target area, it is considered that the image quality of the target area is not very high. Therefore, in order to improve the image processing efficiency, it is directly determined that the image recognition requirement is not met. If at least a part of the overexposed area does not exist in the target area, it is continued to be judged whether the brightness of the target area in the exposed image reaches the specified brightness. It can be understood that if the brightness of the target area in the exposed image does not reach the specified brightness, the image recognition may not be successful. Therefore, in order to improve the success rate of image recognition, it is necessary to continue to judge whether the brightness of the target area reaches the specified brightness.

[0073] In some embodiments of the present application, step 20A includes: steps 20A1 to 20A3.

[0074] Step 20A1, obtaining a gradient value of the pixel to be determined according to the pixel value of the pixel to be determined in the exposure image and the pixel values ​​of the pixels in the neighborhood of the pixel to be determined.

[0075] The pixel points to be determined are the pixel points in the exposure image for which it has not yet been determined whether there is an overexposure phenomenon.

[0076] like Figure 6 As shown, an 8-neighborhood is used as an example for explanation. The pixel to be determined is pixel A, and the pixel points of the 8-neighborhood of pixel A include B to I. In one example, the difference between A and B (C, D...I) is calculated respectively to obtain 8 differences, and the absolute values ​​of the 8 differences are calculated to obtain 8 absolute differences. The maximum value of the 8 absolute differences is taken as the gradient value of the pixel to be determined. In another example, the average value of the 8 absolute differences is taken as the gradient value of the pixel to be determined. In another example, the minimum value of the 8 absolute differences is taken as the gradient value of the pixel to be determined.

[0077] Step 20A2: If the gradient value of the pixel to be determined is less than the target gradient value, and the pixel value of the pixel to be determined is greater than the specified pixel value, then the pixel to be determined is an overexposed pixel.

[0078] The preset gradient value is a preset gradient value, for example, the preset gradient value is 10.

[0079] The purpose of judging the gradient value and pixel value of the pixel to be determined is to determine whether the pixel to be determined is located in the highlight area. When the gradient value of the pixel to be determined is less than the preset gradient value, and the pixel value of the pixel to be determined is greater than the specified pixel value, it is considered that the pixel to be determined is indeed located in the highlight area, and therefore, it is determined that the pixel to be determined is an overexposed pixel.

[0080] The specified pixel value can be set to a value close to the maximum brightness. For example, if the number of bits of the image sensor is 8 bits, the specified pixel value can be a value close to 255, such as 230. Or, if the number of bits of the image sensor is 16 bits, the specified pixel value can be a value close to 4096, such as 3885.

[0081] Step 20A3: Obtain an overexposed area of ​​the exposure image according to the overexposed pixels in the exposure image.

[0082] The overexposed area can be obtained by connecting the overexposed pixels in the exposed image.

[0083] In one example, in order to improve the accuracy of determining the overexposed area, when the number of continuous overexposed pixels reaches a preset number, it is considered that there is an overexposed area in the exposed image, wherein the preset number is, for example, set to 12, and the overexposed pixels within a certain distance from the current overexposed pixel are considered to be continuous with the current overexposed pixel, for example, the overexposed pixels in the 8-neighborhood or 16-neighborhood areas around the current overexposed pixel are considered to be continuous with the current overexposed pixel. This is to prevent the situation where there are only a few independent overexposed pixels in the exposed image.

[0084] In the above embodiment, simply relying on the designated pixel value to judge the pixel to be determined may not be so accurate. Therefore, the gradient value of the pixel to be determined is also determined. The gradient value and the designated pixel value are combined to realize the determination of the overexposed pixel and the overexposed area, thereby improving the determination accuracy of the overexposed area.

[0085] In some embodiments of the present application, adjusting the exposure time to obtain an updated exposure time in step 400 includes: adjusting the exposure time to a production line calibration time to obtain an updated exposure time.

[0086] The production line calibration time refers to the exposure time calibrated by the equipment manufacturer before the equipment leaves the factory. For example, a flesh-colored rubber finger is covered on the fingerprint spot on the mobile phone screen, and then exposed through the exposure unit in the mobile phone to find an exposure time that can obtain higher image quality. This exposure time is used as the production line calibration time.

[0087] In the above embodiment, the production line calibration time is obtained after the production line calibration. Usually, a higher quality exposure image can be obtained through the production line calibration time. Therefore, in order to quickly adjust the exposure time, the exposure time is directly adjusted to the production line calibration time.

[0088] In some embodiments of the present application, adjusting the exposure time to obtain an updated exposure time in step 400 includes: adjusting the exposure time according to the brightness of the target area and the specified brightness to obtain an updated exposure time.

[0089] When the exposure image does not meet the image recognition requirements, in addition to directly adjusting the exposure time to the production line calibration time, the exposure time can also be adjusted according to the brightness of the target area and the specified brightness. For example, when it is determined that the brightness of the target area does not reach the specified brightness, since the brightness of the target area is less than the specified brightness, it is considered that the exposure image does not meet the image recognition requirements due to insufficient brightness. Therefore, it is necessary to increase the brightness of the target area. For example, the current brightness difference between the specified brightness and the brightness of the target area is first calculated, and then the target exposure time difference is obtained based on the current brightness difference and the corresponding relationship between the brightness difference and the exposure time difference. Finally, the exposure time of the exposed image is added to the target exposure time difference to obtain the updated exposure time.

[0090] In the above embodiment, when the image recognition requirement is not met, the exposure time is adjusted according to the brightness of the target area and the specified brightness, so that the adjusted exposure time can match the brightness of the target area with the specified brightness.

[0091] In some embodiments of the present application, the exposure time is adjusted according to the brightness of the target area and the specified brightness to obtain an updated exposure time, including: dividing the specified brightness by the brightness of the target area to obtain a brightness ratio; multiplying the brightness ratio by the exposure time to obtain an updated exposure time.

[0092] For example, the designated brightness is A, the brightness of the target area is B, then the brightness ratio is A / B, the exposure time of the exposure image is T1, and the updated exposure time is T2, then T2=T1×A / B.

[0093] A method for calculating the brightness of a target area is provided, comprising: calculating the sum of pixel values ​​of pixel points in the target area to obtain a pixel sum; dividing the pixel sum by the total number of pixel points in the target area to obtain the brightness of the target area. For example, the target area has a total of 400 pixel points, so the pixel values ​​of the 400 pixel points are added to obtain the pixel sum, assuming that the pixel sum is U, then U / 400 is the brightness of the target area.

[0094] In the above embodiment, the specified brightness is divided by the brightness of the target area to obtain a brightness ratio, and the brightness ratio is greater than 1. Then, the brightness ratio is multiplied by the exposure time to obtain an updated exposure time, thereby increasing the exposure time. Moreover, since the exposure time is adjusted according to the brightness ratio, the updated exposure time can be more accurate to a certain extent.

[0095] In some embodiments of the present application, before step 100, it also includes: when an exposure image is first acquired according to the exposure time, the exposure time is a production line calibration time.

[0096] When the exposure image is first collected, no other exposure time is stored in the device except the production line calibration time. Therefore, when the exposure image is first collected, the exposure time is the production line calibration time. After collecting the exposure image and adjusting the corresponding exposure time, the updated exposure time can also be saved. In this way, when a fingerprint carrier is detected above the fingerprint detection area later, the exposure image can be collected according to the updated exposure time.

[0097] In the above embodiment, if the user is performing image acquisition for the first time after the device leaves the factory, the production line calibration time is directly used for exposure.

[0098] In some embodiments of the present application, the exposure image is a fingerprint image collected from a fingerprint carrier.

[0099] A fingerprint carrier, for example, a human finger, for example, a flesh-colored rubber finger.

[0100] The above embodiments illustrate application scenarios.

[0101] In one embodiment, Figure 7 As shown, an image processing device 700 is provided, comprising:

[0102] Exposure module 701, collecting exposure images according to exposure time;

[0103] A judgment module 702 is used to judge whether the exposure image meets the image recognition requirement;

[0104] If the conditions are met in module 703, image recognition is performed on the exposure image;

[0105] If not satisfied, the adjustment module 704 adjusts the exposure time to obtain an updated exposure time, and returns to the step of acquiring an exposure image according to the exposure time.

[0106] In some embodiments of the present application, the judgment module 702 is specifically used to: judge whether the brightness of the target area in the exposed image reaches the specified brightness. If so, the image recognition requirements are met, and the target area is the area of ​​interest required by the image recognition; otherwise, the image recognition requirements are not met.

[0107] In some embodiments of the present application, the judgment module 702 is further specifically used to: obtain the overexposed area in the exposure image; judge whether at least a part of the overexposed area exists in the target area in the exposure image; if so, the image recognition requirement is not met; if not, judge whether the brightness of the target area in the exposure image reaches the specified brightness, if so, the image recognition requirement is met, otherwise, the image recognition requirement is not met.

[0108] In some embodiments of the present application, the judgment module 702 is specifically used to: obtain the gradient value of the pixel to be determined according to the pixel value of the pixel to be determined in the exposure image and the pixel values ​​of the pixels in the neighborhood of the pixel to be determined; if the gradient value of the pixel to be determined is less than the target gradient value, and the pixel value of the pixel to be determined is greater than the specified pixel value, then the pixel to be determined is an overexposed pixel; and according to the overexposed pixel in the exposure image, obtain the overexposed area of ​​the exposure image.

[0109] In some embodiments of the present application, the adjustment module 704 is specifically used to: adjust the exposure time to the production line calibration time to obtain an updated exposure time.

[0110] In some embodiments of the present application, the adjustment module 704 is specifically used to: adjust the exposure time according to the brightness of the target area and the specified brightness to obtain an updated exposure time.

[0111] In some embodiments of the present application, the adjustment module 704 is specifically used to: divide the specified brightness by the brightness of the target area to obtain a brightness ratio; multiply the brightness ratio by the exposure time to obtain an updated exposure time.

[0112] In some embodiments of the present application, the image processing device 700 further includes: a first module, used to: when acquiring an exposure image for the first time according to an exposure time, the exposure time is a production line calibration time.

[0113] In some embodiments of the present application, the exposure image is a fingerprint image collected from a fingerprint carrier.

[0114] In some embodiments of the present application, Figure 8As shown, a computer device is provided, which can be a terminal or a server, and the computer device includes an exposure unit. The computer device includes a processor, a memory and a network interface connected through a system bus, and the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and can also store a computer program. When the computer program is executed by the processor, the processor can implement the image processing method. The non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM) or a flash memory. The volatile memory may include a random access memory (RAM) or an external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM). The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute the image processing method. Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0115] The image processing method provided in the present application can be implemented in the form of a computer program. The computer program can be Figure 8 The computer device shown in the figure is run. The memory of the computer device can store various program templates constituting the image processing device, such as the judgment module 702 and the adjustment module 704.

[0116] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:

[0117] Acquire an exposure image according to the exposure time;

[0118] Determining whether the exposure image meets image recognition requirements;

[0119] If the conditions are met, performing image recognition on the exposure image;

[0120] If not, the exposure time is adjusted to obtain an updated exposure time, and the process returns to the step of acquiring an exposure image according to the exposure time.

[0121] In some embodiments of the present application, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the processor performs the following steps:

[0122] Acquire an exposure image according to the exposure time;

[0123] Determining whether the exposure image meets image recognition requirements;

[0124] If the conditions are met, performing image recognition on the exposure image;

[0125] If not, the exposure time is adjusted to obtain an updated exposure time, and the process returns to the step of acquiring an exposure image according to the exposure time.

[0126] In some embodiments of the present application, a computer program product is further provided, including computer program instructions. When the computer program instructions are read and executed by a processor, the image processing method in each embodiment is executed, exemplarily including the following steps:

[0127] Acquire an exposure image according to the exposure time;

[0128] Determining whether the exposure image meets image recognition requirements;

[0129] If the conditions are met, performing image recognition on the exposure image;

[0130] If not, the exposure time is adjusted to obtain an updated exposure time, and the process returns to the step of acquiring an exposure image according to the exposure time.

[0131] It should be noted that the above-mentioned image processing method, image processing device, computer program product, computer equipment and computer-readable storage medium belong to a general inventive concept, and the contents in the embodiments of the image processing method, image processing device, computer program product, computer equipment and computer-readable storage medium are applicable to each other.

[0132] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0133] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0134] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0135] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0136] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An image processing method, characterized in that: include: Acquire an exposure image according to the exposure time; Determining whether the exposure image meets image recognition requirements; If the conditions are met, performing image recognition on the exposure image; If not, adjusting the exposure time to obtain an updated exposure time, and returning to the step of acquiring an exposure image according to the exposure time; The determining whether the exposure image meets the image recognition requirement includes: Determine whether the brightness of the target area in the exposure image reaches a specified brightness. If so, the image recognition requirement is met, and the target area is the area of ​​interest for the image recognition requirement; otherwise, the image recognition requirement is not met; The determining whether the exposure image meets the image recognition requirement further includes: Acquire an overexposed area in the exposure image; determining whether at least a portion of the overexposed area exists in a target area in the exposure image; If it exists, the image recognition requirements are not met; If not, it is determined whether the brightness of the target area in the exposure image reaches the specified brightness. If so, the image recognition requirement is met; otherwise, the image recognition requirement is not met.

2. The image processing method according to claim 1, characterized in that: The obtaining of the overexposed area in the exposure image includes: Obtaining a gradient value of the pixel to be determined according to a pixel value of the pixel to be determined in the exposure image and pixel values ​​of pixels in a neighborhood of the pixel to be determined; If the gradient value of the pixel to be determined is less than the target gradient value, and the pixel value of the pixel to be determined is greater than the specified pixel value, then the pixel to be determined is an overexposed pixel; An overexposed area of ​​the exposure image is obtained according to the overexposed pixels in the exposure image.

3. The image processing method according to any one of claims 1 to 2, characterized in that: The adjusting the exposure time to obtain an updated exposure time includes: The exposure time is adjusted to the production line calibration time to obtain an updated exposure time.

4. The image processing method according to any one of claims 2 to 3, characterized in that: The adjusting the exposure time to obtain an updated exposure time includes: The exposure time is adjusted according to the brightness of the target area and the specified brightness to obtain an updated exposure time.

5. The image processing method according to claim 4, characterized in that: The step of adjusting the exposure time according to the brightness of the target area and the specified brightness to obtain an updated exposure time includes: Dividing the specified brightness by the brightness of the target area to obtain a brightness ratio; The brightness ratio is multiplied by the exposure time to obtain an updated exposure time.

6. The image processing method according to any one of claims 1 to 5, characterized in that: Before acquiring the exposure image according to the exposure time, the method further includes: When the exposure image is first acquired according to the exposure time, the exposure time is the production line calibration time.

7. The image processing method according to any one of claims 1 to 6, characterized in that: The exposure image is a fingerprint image collected from the fingerprint carrier.

8. A computer program product, characterized in that The method comprises computer program instructions, which, when read and executed by a processor, execute the image processing method according to any one of claims 1 to 7.

9. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the image processing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are executed.