CN110348425B - Method, device and equipment for removing shading and computer readable storage medium - Google Patents

Method, device and equipment for removing shading and computer readable storage medium Download PDF

Info

Publication number
CN110348425B
CN110348425B CN201910656035.3A CN201910656035A CN110348425B CN 110348425 B CN110348425 B CN 110348425B CN 201910656035 A CN201910656035 A CN 201910656035A CN 110348425 B CN110348425 B CN 110348425B
Authority
CN
China
Prior art keywords
image
modeling
error
screen fingerprint
under
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910656035.3A
Other languages
Chinese (zh)
Other versions
CN110348425A (en
Inventor
许姜严
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Megvii Technology Co Ltd
Original Assignee
Beijing Megvii Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Megvii Technology Co Ltd filed Critical Beijing Megvii Technology Co Ltd
Priority to CN201910656035.3A priority Critical patent/CN110348425B/en
Publication of CN110348425A publication Critical patent/CN110348425A/en
Application granted granted Critical
Publication of CN110348425B publication Critical patent/CN110348425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/1347Preprocessing; Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/1365Matching; Classification

Abstract

The embodiment of the application provides a method, a device, equipment and a computer readable storage medium for removing shading, wherein the method comprises the following steps: acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired; performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image; determining an error image according to the under-screen fingerprint modeling image and the modeled background image; when the average error value of the error image is not less than a preset first threshold value, denoising the error image to obtain a denoised error image; obtaining an updated under-screen fingerprint modeling image according to the under-screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated under-screen fingerprint modeling image as the under-screen fingerprint modeling image; and repeating the steps except the obtaining step until the average error value of the error image is smaller than a preset first threshold value, and performing the shading removing operation on the target under-screen fingerprint image according to the modeled background image.

Description

Method, device and equipment for removing shading and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for removing shading.
Background
In the prior art, in order to obtain a fingerprint image of a current user, a plurality of original (sample) underscreen fingerprint images are generally directly used for modeling to obtain a background image after modeling, the background image after modeling contains different sample fingerprint images (error images), and a shading removing operation is performed according to the background image after modeling containing different sample fingerprint images.
Disclosure of Invention
The application provides a method, a device, equipment and a computer readable storage medium for removing shading aiming at the defects of the existing mode, and is used for solving the problem of how to avoid bringing error images in shading removing operation.
In a first aspect, the present application provides a method of removing shading, comprising:
acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired;
a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image;
determining, namely determining an error image according to the under-screen fingerprint modeling image and the modeled background image;
a denoising step, namely when the average error value of the error image is not less than a preset first threshold, denoising the error image to obtain a denoised error image;
an updating step, namely obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image;
and repeatedly executing the modeling step, the determining step, the denoising step and the updating step until the background image after modeling is subjected to the shading removing operation on the target fingerprint image under the screen according to the modeled background image when the average error value of the error image is smaller than a preset first threshold value.
In a second aspect, the present application provides an apparatus for removing shading, comprising:
the first processing module is used for acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired in the acquiring step;
the second processing module is used for modeling, and performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image;
the second processing module is used for determining an error image according to the under-screen fingerprint modeling image and the modeled background image;
the second processing module is used for performing denoising processing on the error image when the average error value of the error image of the under-screen fingerprint modeling image is not less than a preset first threshold value, so as to obtain a denoised error image;
the second processing module is used for updating, obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image;
the second processing module is used for repeatedly executing the modeling step, the determining step, the denoising step and the updating step until the average error value of the error image is smaller than a preset first threshold value, and the second processing module is used for performing the shading removing operation on the target under-screen fingerprint image according to the modeled background image.
In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and a bus;
a bus for connecting the processor and the memory;
a memory for storing operating instructions;
and the processor is used for executing the method for removing the shading according to the first aspect of the application by calling the operation instruction.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program for performing the method of removing shading of the first aspect of the present application.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired; a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image; determining, namely determining an error image according to the under-screen fingerprint modeling image and the modeled background image; a denoising step, namely when the average error value of the error image is not less than a preset first threshold, denoising the error image to obtain a denoised error image; an updating step, namely obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image; repeatedly executing the modeling step, the determining step, the denoising step and the updating step until the background image after modeling is subjected to the shading removing operation on the target fingerprint image under the screen according to the modeled background image when the average error value of the error image is smaller than a preset first threshold value; therefore, the error image in the background image after modeling is removed through cyclic iteration, the error image is prevented from being brought in during the background removal operation, the target under-screen fingerprint image after background removal only comprises the fingerprint image of the current user, and the accuracy of fingerprint identification of the current user is improved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a schematic flow chart illustrating a method for removing shading according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart illustrating another method for removing shading according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an apparatus for removing shading according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example one
The embodiment of the application provides a method for removing shading, a flow schematic diagram of the method is shown in fig. 1, and the method comprises the following steps:
s101, an obtaining step, namely obtaining an under-screen fingerprint modeling image and a collected target under-screen fingerprint image.
Optionally, the camera of the terminal is below the terminal screen, and when the user touches the terminal screen with a finger, the camera of the terminal captures a superimposed image of a fingerprint image and a fingerprint background image of the user, where the fingerprint background image includes a background of a screen image and noise, that is, the acquired target under-screen fingerprint image is a superimposed image of a fingerprint image, a screen image, and a background of noise of the current user.
Optionally, M under-screen fingerprint modeling images matched with the target under-screen fingerprint image are screened from the set of sample under-screen fingerprint images, where M is a positive integer and M is smaller than N. The sample underscreen fingerprint image is an image collected aiming at a sample fingerprint, and can be directly used as an underscreen fingerprint modeling image or screened from the sample underscreen fingerprint image to obtain the underscreen fingerprint modeling image.
And S102, a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image.
Optionally, according to the screen fingerprint modeling image, performing background modeling by using at least one of a Gaussian Mixture model (Mixture of Gaussian model), a Single Gaussian model (Single Gaussian), a codebook model, Self-organization background detection (SOBS-Self-organization background), a sample consistency background modeling algorithm (SACON), a statistical average method, a Median filter method (Temporal media filter), an intrinsic background method, and a kernel density estimation method (kernel density estimation), to obtain a modeled background image.
The gaussian mixture model is a model that accurately quantifies objects using a gaussian probability density function (normal distribution curve), and is a model that decomposes objects into a plurality of objects based on the gaussian probability density function (normal distribution curve).
The single Gaussian model is a processing method for extracting the image processing background, is suitable for occasions with single and unchangeable background, and other methods such as a mixed Gaussian model and the like are all used for expanding the single Gaussian model, but the single Gaussian model is the simplest and most convenient, and a parameter iteration mode is adopted, so that modeling processing is not required to be carried out every time.
The codebook model is used for expressing background pixels by a codebook according to the color distortion degree and the brightness range of continuous sampling values of pixel points aiming at a color video image sequence, and then the new input pixel value and the corresponding codebook are compared and judged by utilizing the idea of a background difference method, so that a foreground target pixel is extracted.
The kernel density estimation is used for estimating an unknown density function in probability theory, and belongs to one of nonparametric inspection methods.
S103, determining, namely determining an error image according to the under-screen fingerprint modeling image and the modeled background image.
Optionally, the pixel value of each pixel point of the under-screen fingerprint modeling image is subtracted from the pixel value of each pixel point corresponding to the modeled background image to obtain an error image. The error image is a sample fingerprint image comprised by the sample underscreen fingerprint image. The sample fingerprint image reflects the difference between the pixel points of the under-screen fingerprint modeling image and the corresponding pixel points of the modeled background image.
S104, a denoising step, namely when the average error value of the error image is not less than a preset first threshold value, denoising the error image to obtain a denoised error image.
Optionally, denoising the error image; image denoising refers to a process of reducing noise in a digital image; in reality, digital images are often affected by noise interference between an imaging device and the external environment during digitization and transmission, and are called noisy images or noisy images, and the noise is an important cause of the image interference.
And S105, an updating step, namely obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image.
Optionally, the under-screen fingerprint modeling image corresponds to the error image one by one, and according to the corresponding relationship, the pixel value of each pixel point of the under-screen fingerprint modeling image is subtracted from the pixel value of each pixel point corresponding to the denoised error image, so as to obtain an updated under-screen fingerprint modeling image. And using the updated under-screen fingerprint modeling image as the under-screen fingerprint modeling image for background modeling.
And S106, repeatedly executing S102, S103, S104 and S105 until the background image after modeling is subjected to the shading removing operation on the target fingerprint image under the screen when the average error value of the error image is smaller than a preset first threshold value.
Optionally, because the fingerprint background image and the sample fingerprint image in the screen fingerprint modeling image are unknown, and the actual values of the fingerprint background image and the sample fingerprint image in the screen fingerprint modeling image cannot be accurately calculated, the background image after modeling is fitted in a mode of circularly removing the sample fingerprint image; and when the average error value of the error image is smaller than a preset first threshold value, subtracting the pixel value of each pixel point of the target under-screen fingerprint image from the pixel value of each corresponding pixel point of the modeled background image, removing the fingerprint background image of the terminal in the target under-screen fingerprint image, and obtaining the fingerprint image of the current client in the target under-screen fingerprint image.
In the embodiment of the application, the error image in the background image after modeling is removed through loop iteration, the error image is prevented from being brought in during the background removal operation, the fingerprint image under the target screen after background removal only comprises the fingerprint image of the current user, and the accuracy of fingerprint identification of the current user is improved.
Alternatively, ScurRepresenting the acquired target underscreen fingerprint image, BcurRepresenting a background image of the fingerprint contained in the acquired target under-screen fingerprint image, FcurRepresenting the fingerprint image contained in the acquired target under-screen fingerprint image, and formula (1) representing the acquired target under-screen fingerprint image ScurIs the fingerprint image F of the current usercurFingerprint background image B of terminalcurThe formula (1) is as follows:
Scur=Bcur+Fcurformula (1)
Optionally, the set of preset sample underscreen fingerprint images includes N preset sample underscreen fingerprint images, where N is a positive integer; sbase1Representing the first preset sample of the finger-print image under the screen, Bbase1Representing the background image of the fingerprint contained in the first preset sample under-screen fingerprint image, Fbase1Representing a sample fingerprint image contained in a first preset sample under-screen fingerprint image, for the same reason, SbaseNRepresenting the Nth preset sample underscreen fingerprint image, BbaseNRepresenting the fingerprint background image contained in the Nth preset sample underscreen fingerprint image, FbaseNRepresents a sample fingerprint image contained in the Nth preset sample underscreen fingerprint image, and formula (2) represents a preset sample underscreen fingerprint image SbaseNIs a sample fingerprint image FbaseNFingerprint background image B of terminalbaseNN is a positive integer, and formula (2) is as follows:
SbaseN=BbaseN+FbaseNformula (2)
Optionally, acquiring an under-screen fingerprint modeling image, and screening out at least one under-screen fingerprint modeling image matched with the target under-screen fingerprint image from the sample under-screen fingerprint image set; further, it comprises:
calculating the pixel average difference value after the brightness normalization of each sample under-screen fingerprint image in a preset sample under-screen fingerprint image set and the target under-screen fingerprint image;
and taking the sample under-screen fingerprint image with the pixel average difference value smaller than a preset second threshold value with the target under-screen fingerprint image as an under-screen fingerprint modeling image matched with the target under-screen fingerprint image.
Optionally, the preset sample under-screen fingerprint image is a superimposed image of the sample fingerprint image and the fingerprint background image.
Optionally, 6 pixel values respectively corresponding to six pixel points of the image 1 are: 1, 1, 1, 1, 1, 1; the 6 pixel values respectively corresponding to the six pixel points of the image 2 are as follows: 0, 3, 1, 2, 0, 1; the 6 pixel values respectively corresponding to the six pixel points of the image 3 are as follows: 3,3,4,2,3,3. The difference between the pixel values of the corresponding pixel points of the two images is a pixel error value, and the 6 pixel error values of the image 1 and the image 2 are respectively as follows: 1-0, 1-3, 1-1, 1-2, 1-0, 1-1, i.e., 1, -2, 0, -1, 1, 0; the 6 pixel error values of image 1 and image 3 are: 1-3, 1-3, 1-4, 1-2, 1-3, 1-3, i.e., -2, -2, -3, -1, -2, -2.
The average error value of image 1 and image 2 is the sum of the 6 pixel error values of image 1 and image 2 divided by 6, i.e., (1+ -2+0+ -1+1+ 0)/6-1/6; the pixel difference value after brightness normalization of the image 1 and the image 2 is as follows: the difference between the 6 pixel error values of image 1 and image 2, respectively, and the average error value-1/6, specifically 1-1/6, -2-1/6, 0-1/6, -1-1/6, 1-1/6, 0-1/6, i.e., 5/6, -13/6, -1/6, -7/6, 5/6, -1/6. The sum of the absolute values of the pixel difference values after the brightness normalization of image 1 and image 2 is: 5/6+13/6+1/6+7/6+5/6+1/6 is 32/6. The average difference between the luminance of image 1 and the luminance of image 2 after normalization was 32/6.
The average error value of image 1 and image 3 is the sum of the 6 pixel error values of image 1 and image 3 divided by 6, i.e., (-2+ -2+ -3+ -1+ -2+ -2)/6 ═ 2; the pixel difference values after brightness normalization of the image 1 and the image 3 are as follows: the 6 pixel error values for image 1 and image 3 are each the difference from the average error value of-2, i.e., 0, 0, -1, 1, 0, 0. The sum of the absolute values of the pixel difference values after the brightness normalization of image 1 and image 3 is: 0+0+1+1+0+0 ═ 2. The average difference value between the pixels of the image 1 and the image 3 after the brightness normalization is 2.
The average difference value of the pixels after the brightness normalization of the images 1 and 3 is smaller than that of the pixels after the brightness normalization of the images 1 and 2, that is, the average difference value of the pixels after the brightness normalization of the images 3 and 1 is smaller, and the image 3 is closer to the image 1 than the image 2. The target underscreen fingerprint image is an image 1, and each sample underscreen fingerprint image in the set of sample underscreen fingerprint images is an image 2 and an image 3 respectively; image 3 is taken as the infra-screen fingerprint modeling image that matches image 1.
Optionally, performing background modeling by using a gaussian mixture model according to the screen fingerprint modeling image to obtain a background image of the terminal included in the screen fingerprint modeling image, namely the modeled background image. The Gaussian mixture model is a model which is formed by decomposing the under-screen fingerprint modeling image into a plurality of Gaussian probability density functions (normal distribution curves).
Optionally, determining an error image according to the under-screen fingerprint modeling image and the modeled background image, including:
and subtracting the pixel value of each pixel point of the under-screen fingerprint modeling image from the pixel value of each pixel point corresponding to the background image after modeling to obtain an error image.
The error image is a sample fingerprint image included in the sample under-screen fingerprint image, and the average error value of the error image is used for representing the size of the sample fingerprint image.
Optionally, the under-screen fingerprint modeling image is a superimposed image of the sample fingerprint image and the fingerprint background image, the modeled background image is a fingerprint background image of the terminal, the pixel value of each pixel point of the under-screen fingerprint modeling image is subtracted from the pixel value of each corresponding pixel point of the modeled background image, the fingerprint background image of the terminal included in the under-screen fingerprint modeling image is removed, and the sample fingerprint image included in the under-screen fingerprint modeling image is obtained.
Optionally, obtaining an updated under-screen fingerprint modeling image according to the under-screen fingerprint modeling image and the denoised error image, including:
and subtracting the pixel value of each pixel point of the under-screen fingerprint modeling image from the pixel value of each pixel point corresponding to the denoised error image to obtain an updated under-screen fingerprint modeling image.
Optionally, S101, S102, S103, S104, and S105 are executed for the first time, the under-screen fingerprint modeling image is a superimposed image of the sample fingerprint image and the fingerprint background image of the terminal, the denoised error image is smaller than the target fingerprint image included in the under-screen fingerprint modeling image, a pixel value of each pixel point of the under-screen fingerprint modeling image is subtracted from a pixel value of each corresponding pixel point of the denoised error image to obtain an updated under-screen fingerprint modeling image, and the updated under-screen fingerprint modeling image includes the fingerprint background image of the terminal and the reduced sample fingerprint image; s102, S103, S104, and S105 are repeatedly performed until the average error value of the error image is less than the preset first threshold.
Optionally, the background image after modeling is used for performing a shading operation on the target fingerprint image under the screen, including:
and subtracting the pixel value of each pixel point of the target underscreen fingerprint image from the pixel value of each corresponding pixel point of the modeled background image to obtain the target underscreen fingerprint image with the shading removed.
The target underscreen fingerprint image comprises a fingerprint image and a fingerprint background image, and the target underscreen fingerprint image after the background is removed comprises the fingerprint image.
Optionally, the means for determining the average error value of the error image comprises:
respectively subtracting the pixel values of N pixel points of the under-screen fingerprint modeling image from the pixel values of the corresponding N pixel points of the modeled background image to obtain N pixel error values, wherein N is a positive integer;
the sum of the N pixel error values is divided by N to obtain an average error value for the error image.
In the embodiment of the present application, another method for removing shading is provided, a flow chart of the method is shown in fig. 2, and the method includes:
s201, acquiring a preset sample under-screen fingerprint image set and a collected target under-screen fingerprint image.
Optionally, the camera of the terminal is below the terminal screen, and when a finger of a user touches the screen of the terminal, the camera of the terminal captures a superimposed image of a fingerprint image and a fingerprint background image of the user, where the fingerprint background image includes a screen image and a noise background, that is, the acquired fingerprint image under the target screen is a superimposed image of the fingerprint image of the current user, the screen image of the terminal and the noise background; the preset sample under-screen fingerprint image is a superimposed image of the sample fingerprint image and the fingerprint background image. The preset sample underscreen fingerprint image set comprises N sample underscreen fingerprint images, wherein N is a positive integer.
S202, screening a plurality of under-screen fingerprint modeling images matched with the target under-screen fingerprint image from the sample under-screen fingerprint image set.
Optionally, M under-screen fingerprint modeling images matched with the target under-screen fingerprint image are screened from the set of sample under-screen fingerprint images, where M is a positive integer and M is smaller than N.
And S203, carrying out background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image.
Optionally, the means for background modeling comprises at least one of: gaussian Mixture Model (Mixture of Gaussian Model), Single Gaussian Model (Single Gaussian), codebook Model, Self-organizing background detection (SOBS-Self-organizing background subtraction), sample consistency background modeling algorithm (SACON), statistical averaging, Median filtering (Temporal media filter), eigenbackground method, and kernel density estimation.
And S204, determining an error image according to the under-screen fingerprint modeling image and the modeled background image.
Optionally, the pixel value of each pixel point of the under-screen fingerprint modeling image is subtracted from the pixel value of each pixel point corresponding to the modeled background image to obtain an error image. The error image is a sample fingerprint image comprised by the sample underscreen fingerprint image.
S205, judging whether the average error value of the error image is smaller than a preset first threshold value; when the average error value of the error image is not less than the preset first threshold, go to step S206; when the average error value of the error image is not less than the preset first threshold, go to step S208.
Optionally, the average error value of the error image is used to characterize the size of the sample fingerprint image.
S206, denoising the error image to obtain a denoised error image.
Denoising the error image; image denoising refers to a process of reducing noise in a digital image; in reality, digital images are often affected by noise interference between an imaging device and the external environment during digitization and transmission, and are called noisy images or noisy images, and the noise is an important cause of the image interference.
S207, obtaining an updated under-screen fingerprint modeling image according to the under-screen fingerprint modeling image and the denoised error image; turning to step S203 for execution, background modeling is carried out by replacing the screen fingerprint modeling image with the updated screen fingerprint modeling image.
Optionally, since the fingerprint background image and the sample fingerprint image in the screen fingerprint modeling image are unknown, the actual values of the fingerprint background image and the sample fingerprint image in the screen fingerprint modeling image cannot be accurately calculated, and therefore, the fingerprint background image of the terminal is fitted in a manner of circularly removing the sample fingerprint image. In the first cycle, the under-screen fingerprint modeling image is AbaseThe background image after modeling is B'baseThe error image is F'baseCalculating B'baseEquation (3) of (a) is as follows:
B′base=(Abase1+Abase2+...+AbaseM) /M formula (3)
Equation (4) for calculating the sample fingerprint image (error image) included in the M off-screen fingerprint modeling images is as follows:
F′base1=Abase1-B′base
F′base2=Abase2-B′base,...
F′baseM=AbaseM-B′baseformula (4)
Optionally, in order to reduce the influence of the error image on the on-screen fingerprint modeling image, each error image is divided by a preset value, the preset value may be any value greater than 1, and since more noise cannot be removed when the preset value is larger, the preset value is recommended to be selected from 1 to 10. Optionally, the preset value is 2, and M images a 'with certain sample fingerprints removed are obtained through calculation according to a formula (5)'base1,A′base2,...A′baseMAnd obtaining an updated under-screen fingerprint modeling image, wherein the formula (5) is as follows:
A′base1=Abase1-F′base1/2,
A′base2=Abase2-F′base2/2,...
A′baseM=AbaseM-F′baseMformula/2 (5)
And modeling image A 'by using updated under-screen finger print'base1,A′base2,…A′baseMAnd calculating to obtain an error image, and repeating the steps in the same way until the background image after modeling is used for removing the shading of the fingerprint image under the target screen according to the background image after modeling when the average error value of the error image is smaller than a preset threshold value.
And S208, performing shading removal operation on the target fingerprint image under the screen according to the modeled background image.
Optionally, subtracting the pixel value of each pixel point of the target underscreen fingerprint image from the pixel value of each pixel point corresponding to the modeled background image to obtain the target underscreen fingerprint image with the shading removed. The target under-screen fingerprint image comprises a fingerprint image and a fingerprint background image, and the target under-screen fingerprint image after the background image is removed comprises the fingerprint image, namely the fingerprint image of the current client in the target under-screen fingerprint image is obtained.
The application of the embodiment of the application has at least the following beneficial effects:
and screening an image closest to the target underscreen fingerprint image from the set of sample underscreen fingerprint images for background modeling, and circularly and iteratively removing the sample fingerprint image in the modeled background image, so that the sample fingerprint image is prevented from being brought in during the background removal operation, the target underscreen fingerprint image after the background removal only comprises the fingerprint image of the current user, and the accuracy of fingerprint identification of the current user is improved.
Example two
Based on the same inventive concept, the embodiment of the present application further provides a device for removing shading, which has a schematic structural diagram as shown in fig. 3, and the device for removing shading 30 includes a first processing module 301 and a second processing module 302.
The first processing module 301 is configured to perform an obtaining step of obtaining an under-screen fingerprint modeling image and a target under-screen fingerprint image obtained by collection;
the second processing module 302 is used for performing a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image;
the second processing module 302 is configured to determine a step of determining an error image according to the on-screen fingerprint modeling image and the modeled background image;
the second processing module 302 is configured to perform denoising processing on an error image of the on-screen fingerprint modeling image when an average error value of the error image is not less than a preset first threshold, so as to obtain a denoised error image;
the second processing module 302 is configured to perform an updating step, obtain an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and perform background modeling by using the updated screen fingerprint modeling image as the screen fingerprint modeling image;
the second processing module 302 is configured to repeatedly perform the modeling step, the determining step, the denoising step, and the updating step until the average error value of the error image is smaller than a preset first threshold, and perform a shading removal operation on the target under-screen fingerprint image according to the modeled background image.
Optionally, the first processing module 301 is specifically configured to calculate an average difference value of pixels after brightness normalization of each sample underscreen fingerprint image in a preset set of sample underscreen fingerprint images and a target underscreen fingerprint image; and taking the sample under-screen fingerprint image with the pixel average difference value smaller than a preset second threshold value of the target under-screen fingerprint image as an under-screen fingerprint modeling image matched with the target under-screen fingerprint image.
Optionally, the means for background modeling comprises at least one of:
the method comprises a Gaussian mixture model, a single Gaussian model, a codebook model, self-organization background detection, a sample consistency background modeling algorithm, a statistical average method, a median filtering method, an intrinsic background method and a nuclear density estimation method.
Optionally, the second processing module 302 is specifically configured to subtract the pixel value of each pixel point of the under-screen fingerprint modeling image from the pixel value of each pixel point of the modeled background image to obtain an error image.
Optionally, the second processing module 302 is specifically configured to subtract the pixel value of each pixel point of the under-screen fingerprint modeling image from the pixel value of each pixel point of the denoised error image, so as to obtain an updated under-screen fingerprint modeling image.
Optionally, the second processing module 302 is specifically configured to subtract the pixel value of each pixel point of the target underscreen fingerprint image from the pixel value of each pixel point of the modeled background image, so as to obtain the target underscreen fingerprint image with the shading removed.
Optionally, the second processing module 302 is specifically configured to separately subtract pixel values of N pixel points of the under-screen fingerprint modeling image from pixel values of N pixel points of the modeled background image to obtain N pixel error values, where N is a positive integer; the sum of the N pixel error values is divided by N to obtain an average error value for the error image.
The application of the embodiment of the application has at least the following beneficial effects:
acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired; a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image; determining, namely determining an error image according to the under-screen fingerprint modeling image and the modeled background image; a denoising step, namely when the average error value of the error image is not less than a preset first threshold, denoising the error image to obtain a denoised error image; an updating step, namely obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image; repeatedly executing the modeling step, the determining step, the denoising step and the updating step until the background image after modeling is subjected to the shading removing operation on the target fingerprint image under the screen according to the modeled background image when the average error value of the error image is smaller than a preset first threshold value; therefore, the error image in the background image after modeling is removed through cyclic iteration, the error image is prevented from being brought in during the background removal operation, the target under-screen fingerprint image after background removal only comprises the fingerprint image of the current user, and the accuracy of fingerprint identification of the current user is improved.
For the content that is not described in detail in the apparatus for removing shading provided in the embodiment of the present application, reference may be made to the method for removing shading provided in the first embodiment of the present application, and the beneficial effects that can be achieved by the apparatus for removing shading provided in the embodiment of the present application are the same as the method for removing shading provided in the first embodiment of the present application, and are not described herein again.
EXAMPLE III
Based on the same inventive concept, the embodiment of the present application further provides an electronic device, a schematic structural diagram of the electronic device is shown in fig. 4, the electronic device 7000 includes at least one processor 7001, a memory 7002 and a bus 7003, and the at least one processor 7001 is electrically connected to the memory 7002; the memory 7002 is configured to store at least one computer executable instruction, and the processor 7001 is configured to execute the at least one computer executable instruction so as to execute the steps of any one of the methods for removing shading as provided in any one of the embodiments or any one of the alternative embodiments of the present application.
Further, the processor 7001 may be an FPGA (Field-Programmable Gate Array) or other devices having logic processing capability, such as an MCU (micro controller Unit) and a CPU (Central processing Unit).
The application of the embodiment of the application has at least the following beneficial effects:
acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired; a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image; determining, namely determining an error image according to the under-screen fingerprint modeling image and the modeled background image; a denoising step, namely when the average error value of the error image is not less than a preset first threshold, denoising the error image to obtain a denoised error image; an updating step, namely obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image; repeatedly executing the modeling step, the determining step, the denoising step and the updating step until the background image after modeling is subjected to the shading removing operation on the target fingerprint image under the screen according to the modeled background image when the average error value of the error image is smaller than a preset first threshold value; therefore, the error image in the background image after modeling is removed through cyclic iteration, the error image is prevented from being brought in during the background removal operation, the target under-screen fingerprint image after background removal only comprises the fingerprint image of the current user, and the accuracy of fingerprint identification of the current user is improved.
Example four
Based on the same inventive concept, the present application further provides a computer-readable storage medium storing a computer program, where the computer program is used to implement, when executed by a processor, any one of the embodiments of the present application or any one of the steps of the method for removing the shading.
The computer-readable storage medium provided by the embodiments of the present application includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROMs (Read-Only memories), RAMs (random access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a readable storage medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
The application of the embodiment of the application has at least the following beneficial effects:
acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired; a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image; determining, namely determining an error image according to the under-screen fingerprint modeling image and the modeled background image; a denoising step, namely when the average error value of the error image is not less than a preset first threshold, denoising the error image to obtain a denoised error image; an updating step, namely obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image; repeatedly executing the modeling step, the determining step, the denoising step and the updating step until the background image after modeling is subjected to the shading removing operation on the target fingerprint image under the screen according to the modeled background image when the average error value of the error image is smaller than a preset first threshold value; therefore, the error image in the background image after modeling is removed through cyclic iteration, the error image is prevented from being brought in during the background removal operation, the target under-screen fingerprint image after background removal only comprises the fingerprint image of the current user, and the accuracy of fingerprint identification of the current user is improved.
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. Those skilled in the art will appreciate that the computer program instructions may be implemented by a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the aspects specified in the block or blocks of the block diagrams and/or flowchart illustrations disclosed herein.
Those of skill in the art will appreciate that the various operations, methods, steps in the processes, acts, or solutions discussed in this application can be interchanged, modified, combined, or eliminated. Further, other steps, measures, or schemes in various operations, methods, or flows that have been discussed in this application can be alternated, altered, rearranged, broken down, combined, or deleted. Further, steps, measures, schemes in the prior art having various operations, methods, procedures disclosed in the present application may also be alternated, modified, rearranged, decomposed, combined, or deleted.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (9)

1. A method of removing shading, comprising:
acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired;
a modeling step, namely performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image;
determining, namely determining an error image according to the under-screen fingerprint modeling image and the modeled background image;
a denoising step, namely when the average error value of the error image is not less than a preset first threshold, denoising the error image to obtain a denoised error image;
an updating step, namely obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by taking the updated screen fingerprint modeling image as the screen fingerprint modeling image;
repeatedly executing the modeling step, the determining step, the denoising step and the updating step until the background image after modeling is subjected to the shading removing operation according to the background image after modeling when the average error value of the error image is smaller than a preset first threshold value;
determining an error image according to the under-screen fingerprint modeling image and the modeled background image, including:
and subtracting the pixel value of each pixel point of the under-screen fingerprint modeling image from the pixel value of each pixel point corresponding to the background image after modeling to obtain the error image.
2. The method of claim 1, wherein the obtaining an infra-screen fingerprint modeling image comprises:
carrying out brightness normalization on each sample underscreen fingerprint image in a preset sample underscreen fingerprint image set and the target underscreen fingerprint image to obtain an average error value;
calculating pixel average difference values after brightness normalization of each sample underscreen fingerprint image in a preset sample underscreen fingerprint image set and the target underscreen fingerprint image according to the average error values; and taking the sample under-screen fingerprint image with the pixel average difference value of the target under-screen fingerprint image smaller than a preset second threshold value as an under-screen fingerprint modeling image matched with the target under-screen fingerprint image.
3. The method of claim 1, wherein the manner of background modeling comprises at least one of:
the method comprises a Gaussian mixture model, a single Gaussian model, a codebook model, self-organization background detection, a sample consistency background modeling algorithm, a statistical average method, a median filtering method, an intrinsic background method and a nuclear density estimation method.
4. The method of claim 1, wherein obtaining an updated infra-screen fingerprint modeling image from the infra-screen fingerprint modeling image and the denoised error image comprises:
and subtracting the pixel value of each pixel point of the under-screen fingerprint modeling image from the pixel value of each pixel point corresponding to the denoised error image to obtain an updated under-screen fingerprint modeling image.
5. The method of claim 1, wherein the removing the background image from the modeled background image comprises:
and subtracting the pixel value of each pixel point of the target underscreen fingerprint image from the pixel value of each pixel point corresponding to the modeled background image to obtain the target underscreen fingerprint image with the shading removed.
6. The method of claim 1, wherein determining the average error value of the error image comprises:
respectively subtracting the pixel values of N pixel points of the under-screen fingerprint modeling image from the pixel values of the corresponding N pixel points of the modeled background image to obtain N pixel error values, wherein N is a positive integer;
the sum of the N pixel error values is divided by N to obtain an average error value for the error image.
7. A device for removing shading, comprising:
the first processing module is used for acquiring an under-screen fingerprint modeling image and a target under-screen fingerprint image acquired in the acquiring step;
the second processing module is used for modeling, and performing background modeling according to the under-screen fingerprint modeling image to obtain a modeled background image;
the second processing module is used for determining an error image according to the under-screen fingerprint modeling image and the modeled background image;
the second processing module is used for performing denoising processing on the error image when the average error value of the error image of the under-screen fingerprint modeling image is not less than a preset first threshold value, so as to obtain a denoised error image;
the second processing module is used for performing an updating step, obtaining an updated screen fingerprint modeling image according to the screen fingerprint modeling image and the denoised error image, and performing background modeling by using the updated screen fingerprint modeling image as the screen fingerprint modeling image;
the second processing module is configured to repeatedly perform the modeling step, the determining step, the denoising step and the updating step until when the average error value of the error image is smaller than a preset first threshold, and the second processing module is configured to perform a shading removing operation on the target under-screen fingerprint image according to the modeled background image;
the second processing module is specifically configured to subtract the pixel value of each pixel point of the under-screen fingerprint modeling image from the pixel value of each pixel point of the background image after modeling, so as to obtain the error image.
8. An electronic device, comprising: a processor, a memory;
the memory for storing a computer program;
the processor is configured to execute the method for removing the shading according to any one of the claims 1 to 6 by calling the computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the method of removing shading according to any one of claims 1 to 6.
CN201910656035.3A 2019-07-19 2019-07-19 Method, device and equipment for removing shading and computer readable storage medium Active CN110348425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910656035.3A CN110348425B (en) 2019-07-19 2019-07-19 Method, device and equipment for removing shading and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910656035.3A CN110348425B (en) 2019-07-19 2019-07-19 Method, device and equipment for removing shading and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110348425A CN110348425A (en) 2019-10-18
CN110348425B true CN110348425B (en) 2020-06-05

Family

ID=68179454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910656035.3A Active CN110348425B (en) 2019-07-19 2019-07-19 Method, device and equipment for removing shading and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110348425B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111028176B (en) * 2019-12-10 2023-12-08 天津极豪科技有限公司 Fingerprint image processing method, fingerprint image processing device, electronic equipment and computer readable medium
CN111340188A (en) * 2020-02-21 2020-06-26 北京集创北方科技股份有限公司 Image processing method and device, electronic equipment and readable storage medium
CN112257571A (en) * 2020-10-20 2021-01-22 北京集创北方科技股份有限公司 Biological characteristic image acquisition method and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284742A (en) * 2018-10-30 2019-01-29 Oppo广东移动通信有限公司 Shield lower fingerprint mould group, electronic equipment and fingerprint image processing method
CN109858227A (en) * 2019-02-02 2019-06-07 Oppo广东移动通信有限公司 Fingerprint input method, device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9454259B2 (en) * 2016-01-04 2016-09-27 Secugen Corporation Multi-level command sensing apparatus
CN106203365B (en) * 2016-07-14 2019-02-12 浙江赢视科技有限公司 The fingerprint imaging method of gain adjustment processing
CN109544474A (en) * 2018-11-16 2019-03-29 四川长虹电器股份有限公司 A kind of enhancement method of fingerprint image based on phase stretching conversion
CN110020622B (en) * 2019-04-02 2021-04-20 Oppo广东移动通信有限公司 Fingerprint identification method and related product

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284742A (en) * 2018-10-30 2019-01-29 Oppo广东移动通信有限公司 Shield lower fingerprint mould group, electronic equipment and fingerprint image processing method
CN109858227A (en) * 2019-02-02 2019-06-07 Oppo广东移动通信有限公司 Fingerprint input method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110348425A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN108229526B (en) Network training method, network training device, image processing method, image processing device, storage medium and electronic equipment
CN110516577B (en) Image processing method, image processing device, electronic equipment and storage medium
CN110348425B (en) Method, device and equipment for removing shading and computer readable storage medium
CN110706174B (en) Image enhancement method, terminal equipment and storage medium
US9159121B2 (en) Method for image denoising
AU2017232186A1 (en) Fast and robust image alignment for burst mode
CN108337551B (en) Screen recording method, storage medium and terminal equipment
CN110428450B (en) Scale-adaptive target tracking method applied to mine tunnel mobile inspection image
WO2014070489A1 (en) Recursive conditional means image denoising
US7570831B2 (en) System and method for estimating image noise
JP7362297B2 (en) Image processing device, image processing method, and program
CN110555863A (en) moving object detection method and device and computer readable storage medium
Srinivas et al. Remote sensing image segmentation using OTSU algorithm
CN110866872A (en) Pavement crack image preprocessing intelligent selection method and device and electronic equipment
TW201032180A (en) Method and device for keeping image background by multiple gauss models
CN109660814B (en) Method for detecting deletion tampering of video foreground
CN113379789B (en) Moving target tracking method in complex environment
CN112862753A (en) Noise intensity estimation method and device and electronic equipment
CN110766614B (en) Image preprocessing method and system of wireless scanning pen
JPWO2011033744A1 (en) Image processing apparatus, image processing method, and image processing program
JP2017085570A (en) Image correction method and image correction device
CN110580706A (en) Method and device for extracting video background model
CN114298992A (en) Video frame duplication removing method and device, electronic equipment and storage medium
CN114418848A (en) Video processing method and device, storage medium and electronic equipment
Zhai et al. Progressive image restoration through hybrid graph Laplacian regularization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant