CN112560564A - Image quality threshold setting method and device and electronic equipment - Google Patents

Image quality threshold setting method and device and electronic equipment Download PDF

Info

Publication number
CN112560564A
CN112560564A CN201910945354.6A CN201910945354A CN112560564A CN 112560564 A CN112560564 A CN 112560564A CN 201910945354 A CN201910945354 A CN 201910945354A CN 112560564 A CN112560564 A CN 112560564A
Authority
CN
China
Prior art keywords
image quality
image
value
time period
preset time
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.)
Pending
Application number
CN201910945354.6A
Other languages
Chinese (zh)
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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies 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 Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Publication of CN112560564A publication Critical patent/CN112560564A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • 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/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00563Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys using personal physical data of the operator, e.g. finger prints, retinal images, voicepatterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

The invention relates to the technical field of data processing, in particular to a method and a device for setting an image quality threshold value and electronic equipment, wherein the method for setting the image quality threshold value comprises the following steps: acquiring a plurality of image information within a first preset time period; performing image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information; calculating a mean value and variance value of the plurality of image quality values; inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value; and setting an image quality threshold value in a second preset time period based on the target threshold value. The invention can improve the accuracy of filtering the image.

Description

Image quality threshold setting method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for setting an image quality threshold, and an electronic device.
Background
In the automatic entrance guard design process, a quality optimization process exists, namely, pictures with better quality are selected from a certain number of collected samples, and then the pictures are matched. Wherein, the process of quality optimization comprises: and carrying out picture processing on the collected samples through the quality model, and calculating the quality value of each picture. And assuming that the threshold of the quality value is r, pictures with the quality values larger than r can be used for database matching, and pictures with the quality values smaller than r are judged to be poor in quality and selected to be discarded.
In the prior art, it has been difficult to select a threshold value of suitable quality, and it is common practice to take a fixed threshold value, such as 0.7. In fact, due to the quality model, the quality values of different pictures are greatly different, and the fixed threshold cannot meet the requirements of all the pictures. For example, the best quality of a picture is 0.6, and some are 0.9, in which case the threshold of 0.7 would be over-filtered. Therefore, in the existing access control system technology, the problem of low accuracy rate in face filtering exists.
Disclosure of Invention
The embodiment of the invention provides an image quality threshold setting method and device and electronic equipment, and aims to solve the problem of low accuracy rate in face filtering.
In a first aspect, an embodiment of the present invention provides an image quality threshold setting method, where the method includes the following steps:
acquiring a plurality of image information within a first preset time period;
performing image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information;
calculating a mean value and variance value of the plurality of image quality values;
inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value;
and setting an image quality threshold value in a second preset time period based on the target threshold value.
In a second aspect, an embodiment of the present invention provides a face quality threshold setting device, including:
the acquisition module is used for acquiring a plurality of image information within a first preset time period;
the first calculation module is used for calculating the image quality of the image information through a preset image quality model to obtain a plurality of image quality values corresponding to the image information;
a second calculation module for calculating a mean value and a variance value of the plurality of image quality values;
the third calculation module is used for inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value;
and the first setting module is used for setting an image quality threshold value in a second preset time period based on the target threshold value.
In a third aspect, an electronic device includes: the image quality threshold setting method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the image quality threshold setting method provided by the embodiment of the invention.
In a fourth aspect, a computer-readable storage medium stores thereon a computer program, which when executed by a processor implements the steps in the image quality threshold setting method provided by the embodiment of the present invention.
In the embodiment of the invention, a plurality of image information in a first preset time period is acquired; performing image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information; calculating a mean value and variance value of the plurality of image quality values; inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value; and setting an image quality threshold value in a second preset time period based on the target threshold value. In the second preset time period, the image quality threshold is calculated according to the image quality values of the plurality of pieces of image information acquired in the first preset time period, so that the accuracy of image filtering can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an image quality threshold setting method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for setting an image quality threshold according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for setting an image quality threshold according to an embodiment of the present invention;
FIG. 4 is a flow chart of another method for setting an image quality threshold according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an image quality threshold setting apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another image quality threshold setting apparatus provided in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another image quality threshold setting apparatus provided in an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another image quality threshold setting apparatus provided in an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another image quality threshold setting apparatus provided in an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another image quality threshold setting apparatus provided in an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an image quality threshold setting method according to an embodiment of the present invention, as shown in fig. 1, including the following steps:
s101, acquiring a plurality of image information in a first preset time period.
The first preset time period may be a randomly selected time period, or may be selected according to the flowing situation of people on different occasions, for example: if the flow of the office building personnel is large, the first preset time period can be selected from the time of work at 8 am to 9 am or the time of work at 6 pm to 6 pm for image information acquisition. The length of the first preset time period may be specifically adjusted according to a specific usage scenario requirement, for example: may be set to 1 hour, 1 day, or even 1 month, etc.
Specifically, acquiring a plurality of image information may be acquiring through an access control camera, or acquiring image information of an image input in advance by a human, where the access control camera may be externally disposed at one or more positions where image information acquisition is required, for example: fixed at both sides of the outer side of the doorway through fixing pieces. Or may be built in one or more locations where image information acquisition is required, for example: during the security check, place entrance guard's camera in the security check appearance, set up the security check appearance on the security check post. The plurality of image information may include image information of all persons who enter the field of view of the door access camera within a first preset time period. The access control camera stores all the acquired image information, and finally an image information set can be formed. The specific position of entrance guard's camera can set up as required, for example: the setting is in the position that 1.2m height and sight can just be right, makes things convenient for entrance guard's camera can acquire adult or child's image information. In order to acquire more complete image information, a plurality of entrance guard cameras can be provided to shoot at a plurality of angles, or the image information can be acquired by arranging one entrance guard camera capable of rotating at multiple angles.
The image information may include at least one or more of image pixels, gray scale values, image sizes, and the like. The image information may further include one or more of face information (eyes, nose, face, ears, etc.), body shape information (e.g., height, body shape, etc.), wearing information (e.g., hat worn, glasses, clothing worn, color of hat, style of glasses, etc.), age information (e.g., young child, middle-aged year, old age, etc.), gender information, etc. entered into the field of view of the door entry camera.
It should be noted that the door access CAMERA in this embodiment may be a CAMERA, and the CAMERA (CAMERA or WEBCAM) is also called a computer CAMERA, a computer eye, an electronic eye, and the like, is a video input device, and is widely applied to video conferences, telemedicine, real-time monitoring, and the like. The camera can be a 2D (dimension) camera, where 2D represents a two-dimensional space, and an image frame in the camera has two dimensions, i.e., up and down, left and right. The camera can also be a 3D camera, the 3D represents a three-dimensional space, and an image picture in the camera can show up-down, left-right and front-back dimensions to form an image picture with three-dimensional vision.
S102, image quality calculation is carried out on the plurality of image information through a preset image quality model, and a plurality of image quality values corresponding to the plurality of image information are obtained.
The image quality model may be referred to as an image quality model, at least one or more of the image pixels, the gray-scale values, the image sizes, and the like may be used as an image quality value calculation parameter of the image quality model, and the image quality model may calculate a corresponding image quality value according to the calculation parameter. The image quality value may be a numerical value such as: the image quality values are distinguished by 0 to 1, and may be 0.5, 0.8, 0.9, etc., with the closer to 1 the better the image quality value.
After the image information is acquired, the image quality value calculation parameter in the image information may be extracted by an image recognition technique, and a corresponding image quality value is calculated, for example: and taking the image pixels and the gray value as image quality value parameters, wherein the image quality value is 0 to 1, when the image pixels are 500 × 500, the corresponding image quality value is 0.3, the gray value is 100, the corresponding image quality value is 0.3, and the image quality value of the whole image is 0.6 finally.
S103, calculating the mean value and variance value of the image quality values.
The average value may be an average value of image quality values calculated for all the acquired image information within a first preset time period. Before calculating the mean value, the number of images entering the camera field of view and the image quality value of each piece of image information may be counted, and the corresponding mean value is calculated according to the number of images and the image quality value of each piece of image information, and the specific formula is as follows:
Figure BDA0002223991080000051
where ava (q) represents the mean of multiple image quality values, n represents the acquired image quality, q represents the quality of the acquired imageiAn image quality value representing the ith image information.
Similarly, the variance value needs to be calculated according to the image quality value of each piece of image information, the number of images and the calculated mean value, and the specific formula is as follows:
Figure BDA0002223991080000052
wherein ava (q) represents the mean of multiple image quality values, n represents the number of acquired images, qiAn image quality value of the ith image information is represented, sigma (q) represents a variance value of the plurality of image quality values, and sprt represents a square root.
And S104, inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value.
Wherein the first preset time period for acquiring the plurality of image information may be a time period having a gaussian model characteristic, and the gaussian model exhibits a gaussian distribution N (μ, σ)2) It may also be called normal distribution. In this embodiment, μ represents a symmetry axis after the image quality value calculated in the first preset time period is normally distributed, that is, represents that the number of times of occurrence of the image quality value corresponding to the symmetry axis is the largest, σ represents a standard deviation, and σ represents a standard deviation2And expressing the variance value, and judging the steep degree of the distribution of the image quality values according to sigma, wherein the smaller sigma is, the steeper the distribution is in the first preset time period, the larger the variation degree of the image quality values can be expressed, and the smaller sigma is, the flatter the distribution is, the smaller the variation degree of the image quality values is, the smaller the distribution degree is, the flatter the distribution degree is, the smaller the variation. The gaussian distribution has a 3 σ rule, and when the image quality value numerical distribution is between (μ -3 σ, μ +3 σ), the probability that the area formed between the normal distribution curve formed by the corresponding image quality values and the horizontal axis (μ) corresponds is 0.9974.
In addition, the target threshold value is a value calculated according to the quality of the plurality of images within the first preset time period, and the target threshold value may be a threshold value most consistent with the first preset time period, and the face image may be more accurately screened according to the threshold value.
And S105, setting an image quality threshold value in a second preset time period based on the target threshold value.
The image quality threshold of the second preset time period represents a target threshold calculated in the first preset time period. And when the entrance guard camera detects image information in a second preset time period, acquiring the image information of the image through the image quality model, calculating an image quality value corresponding to the image information, comparing the calculated image quality value with an image quality threshold value, and judging the sizes of the image quality value and the image quality threshold value.
When the image quality value is greater than or equal to the image quality threshold within the second preset time period, the image of the corresponding image quality value may be used for system database matching, for example: and the image quality value is 0.8, and the image quality threshold value is 0.7, so that the image quality value is used for database matching.
When the image quality value is less than the image quality threshold, the image corresponding to the image quality value is directly discarded, for example: the image quality value is 0.5 and the image quality threshold is 0.7, and the image is discarded.
It should be noted that the first preset time period and the second preset time period in the present invention are relative time periods. When the third preset time period occurs, the third time period represents the second preset time period in the invention, and the original second preset time period represents the first preset time period in the invention. The embodiment can be applied to the acquisition of image information and the calculation of the corresponding image quality threshold value in one time period, and can also be applied to the acquisition of image information and the calculation of the corresponding image quality threshold value in a plurality of time periods, and then different image quality threshold values corresponding to different preset time periods can be obtained, so that a form of dynamic setting of the image quality threshold value is formed.
In the embodiment of the invention, a plurality of image information in a first preset time period is acquired; performing image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information; calculating a mean value and a variance value of a plurality of image quality values; inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value; and setting an image quality threshold value in a second preset time period based on the target threshold value. The method comprises the steps of obtaining a plurality of image information entering the access cameras in a first preset time period, calculating the image information through an image quality model to obtain a plurality of numerical values, namely a plurality of image quality values, then calculating the mean value and the variance value of the image quality values, and calculating a final target threshold value according to the mean value and the variance value, wherein the target threshold value is used as an image quality threshold value corresponding to a second time period, so that the problem of inaccurate filtering caused by directly and fixedly setting an image quality threshold value applied to different time periods is solved, and the accuracy of an access control system for filtering faces is improved.
Referring to fig. 2, fig. 2 is a flowchart of another image quality threshold setting method according to an embodiment of the present invention, as shown in fig. 2, including the following steps:
s201, acquiring a plurality of image information in a first preset time period.
S202, image quality calculation is carried out on the plurality of image information through a preset image quality model, and a plurality of image quality values corresponding to the plurality of image information are obtained.
S203, calculating the mean value and the variance of the image quality values.
S204, the Gaussian model comprises an offset parameter, and a target threshold is calculated and obtained based on the mean value, the variance value and the offset parameter, wherein the corresponding formula is as follows:
Figure BDA0002223991080000071
where thresh denotes a target threshold, ava (q) denotes a mean, sigma (q) denotes a variance value,
Figure BDA0002223991080000072
representing the offset parameter and q the image quality value.
The offset parameter can be evaluated according to the environment where the entrance guard camera is located when acquiring the image information, and the value range can be preset, for example: the specified value range is between 1 and 3. Selecting from 1-3 according to specific environmental conditions, and then calculating a target threshold value by combining the mean value and the variance value calculated in step 103. The calculation formula of the target threshold is as follows:
after the value of the offset parameter is multiplied by the variance value, the target threshold can be obtained by subtracting the mean value, for example: the mean value is 0.8, the offset parameter is 1, and the variance value is 0.1, and the target threshold is 0.8-1 × 0.1 — 0.7.
The offset parameter is adjusted based on the time period.
Specifically, the environments corresponding to different time periods may be different, so that the offset parameter may be adjusted, for example: in the peak people flow time period, people are crowded, some interference information may appear in the visual field of the access camera, the accuracy of the image quality threshold value is influenced, and 2 can be selected as an offset parameter for calculation. The interference information may include camera position information, image information of a plurality of faces, noisy sound information, blocking information for blocking faces such as hair, a hat, or hands, and body information other than the head. For another example: under the condition that no interference information exists or the interference information does not influence the image quality threshold, 1 can be selected as the offset parameter to calculate the image quality threshold. Of course, if there is no substantial change in the environment during different time periods, 1.3 may be selected as the offset parameter to calculate the image quality threshold.
Optionally, the offset parameter may also be adjusted based on external ambient light. The external ambient light is dark or bright, and the light brightness threshold value can be set by setting the light brightness threshold value, and the light brightness threshold value can include an upper limit threshold value and a lower limit threshold value, and the corresponding offset parameter can only take a fixed value, for example: the lower threshold of the light intensity is 1000candela, the upper threshold is 3000candela, and the light intensity corresponding to the currently acquired image information is 500candela, then 3 is directly selected as the offset parameter, and when the light intensity corresponding to the currently acquired image information is 3500candela, then 1 is directly selected as the offset parameter. When the light brightness is between the lower threshold and the upper threshold, there may be a correspondence between the light brightness and the offset parameter, for example: the luminance of the light is 2000candela, the offset parameter is 2, the luminance of the light is 2500candela, the offset parameter is 1.5, the luminance of the light is 1200candela, and the offset parameter is 2.8.
And S205, setting an image quality threshold value in a second preset time period based on the target threshold value.
Based on the step 204, a target threshold value in the first preset time period is calculated according to the offset parameter, the mean value and the variance value, and the target threshold value is used as an image quality threshold value in the second preset time. The first preset time period and the second preset time period may be consecutive time periods, for example: the first preset time period is from 8 to 9 am, and the second preset time period is from 9 to 10 am. Of course, the first preset time period and the second preset time period may also be discontinuous time periods, for example: the first preset time period is 8 to 9 am, and the second preset time period is 6 to 6 and a half pm. For another example: the first preset time period is from 8 to 9, and the second preset time period is from 8 to 9 on the next day.
In this embodiment, a plurality of pieces of image information entering the access camera are acquired within a first preset time period, the image information is calculated through an image quality model to obtain a mean value and a variance value of a plurality of image quality values, an offset parameter is determined according to an environment and/or light brightness corresponding to the acquired image information, and a final target threshold value is calculated according to the offset parameter, the mean value and the variance value. The target threshold value can be more accurately calculated according to specific environmental conditions by adding the offset parameter, and the target threshold value is used as the image quality threshold value of the second time period instead of directly and fixedly setting the problem of inaccurate filtering caused by applying one image quality threshold value to different time periods, so that the accuracy rate of filtering the image information by the access control system is improved.
Referring to fig. 3, fig. 3 is a flowchart of another image quality threshold setting method according to an embodiment of the present invention, as shown in fig. 3, including the following steps:
s301, the area for acquiring the image information comprises a plurality of pieces of position information, the image information comprises face images, the face images of a plurality of persons are respectively tracked and collected at each position information based on a first preset time period, and a face image tracking chain of each person is formed.
Wherein, the face image may include one or more of eyes, nose, ears, face, mouth, interpupillary distance, face size, etc. The plurality of position information may indicate that a plurality of entrance cameras for acquiring the face image are disposed at different angles/positions of the entrance. People are getting into entrance guard's in-process, consider that everyone's angle, speed etc. are different, and the quality of the facial image of gathering all can receive the influence, can influence the facial image threshold value simultaneously. Therefore, the entrance guard can acquire the face images of the same person corresponding to different positions by setting the entrance guard at different angles/positions of the entrance guard, the face images of the same person can be acquired for multiple times, and the calculated image quality value is more accurate.
When the corresponding access control camera detects that a face image enters the visual field range, the face image is tracked and collected to obtain a tracking chain corresponding to the face image. Because the face image entering the access camera may be in a motion state, and the corresponding image frame is also in a motion state when the access camera tracks, a plurality of face images of a person can be included in a face image tracking chain obtained by any person.
S302, generating a face image set corresponding to each person according to the face image tracking chain of each person formed at each position information.
Each entrance guard camera can collect the face images in the face image tracking chain of each person to form a corresponding face image set. Therefore, in each access control camera, a face image set of a plurality of people entering the visual field of the access control camera within a first preset time period is stored, and when the image quality threshold is calculated, calculation can be performed according to all images in the face image set.
And S303, inputting the face image sets of the multiple persons acquired at each position information into an image quality model for calculation to obtain the image quality values of the persons at different position information.
The method comprises the steps that a plurality of human face image sets are input into an image quality model in different entrance guard cameras for calculation, so that the image quality threshold of each person can be obtained, namely, each entrance guard camera can obtain one image quality threshold, and each image quality threshold can be different based on different position angles of each entrance guard camera.
S304, calculating the mean value and the variance value of the image quality values.
The image quality value of each person is calculated according to the image quality value of each person to obtain a final image quality value, the image information comprises a face image, the calculated image quality value is the image quality value of the face image, and interference information similar to a plurality of faces, clothes and the like in the camera visual field can be avoided according to the mean value and the variance value calculated according to the image quality value.
305. And inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value.
In this embodiment, in the first preset time period, it may be considered that the distribution of the calculated image quality values exhibits a gaussian model characteristic, all the image quality values calculated in each door access camera may be counted, and after the mean value and the variance value of all the image quality values are calculated, a gaussian distribution function N (μ, σ) may be fitted2) And analyzing a distribution curve formed by the image quality values, determining that the probability of the occurrence of one image quality value is the highest according to the characteristic of Gaussian distribution 3 sigma, and taking the image quality value as a target threshold value of a corresponding entrance guard camera.
In addition, the target threshold value can be directly calculated according to the mean value and the variance value of the face image without considering the influence of the environment on the face image information. Of course, as shown in step 205, the offset parameter may be substituted into the calculated target threshold to perform an overall multi-factor comprehensive judgment. Thus, the calculated target threshold will be a threshold that is more realistic in the first predetermined time period.
306. And setting an image quality threshold value in a second preset time period based on the target threshold value.
The image quality threshold may be a target threshold calculated from the face image within a first preset time period. In this embodiment, the second preset time period and the first preset time period may be discontinuous time periods or continuous time periods, for example: when the number of the faces passing through the entrance guard camera is uniform in a continuous time period, the first preset time period and the second preset time period can be set to be continuous time periods.
Optionally, after obtaining the image quality threshold within the second preset time period, the method may further include:
and acquiring the face image appearing at each position information within a second preset time period.
After the setting of the image quality threshold value in the second preset time period is completed, the face image appearing in the access cameras in the second preset time period can be acquired, and of course, each access camera can acquire the face image appearing in the access camera.
And inputting the face image into the corresponding image quality model for calculation to obtain the image quality value of each person in a second preset time period.
The face image appearing in each entrance guard camera within the second preset time period can be input into the image quality model of the corresponding entrance guard camera for calculation, and the image quality value of each person within the second preset time period is obtained.
And comparing the image quality value of each person in the second time period with the image quality threshold value, and screening out the face image meeting the image quality threshold value for database matching.
When the image quality value of a certain person in a second preset time period is smaller than the image quality threshold, the face image of the certain person may be discarded, for example: if the image quality value of a certain person is 0.6 and the image quality threshold value is 0.7, the person is discarded. When the image quality value of a person within a second preset time period is greater than or equal to the image quality threshold, the facial image of the person may be used to match the system database, for example: an image quality value of 0.8 for a person and an image quality threshold of 0.7 is used to match the system database.
In this embodiment, because a plurality of access cameras are arranged, a plurality of face images entering the corresponding access cameras are obtained within a first preset time period, the face images are calculated through an image quality model in each access camera to obtain a mean value and a variance value of a plurality of image quality values, a target threshold value corresponding to the face images is calculated according to the mean value and the variance value, and the target threshold value is used as a face image quality threshold value of a second time period, rather than directly and fixedly setting a face image quality threshold value to be applied to different time periods. Therefore, the accuracy rate of the access control system for filtering the face image is improved.
Referring to fig. 4, fig. 4 is a flowchart of another image quality threshold setting method according to an embodiment of the present invention, where on the basis of fig. 1, the setting method further includes the following steps:
400. and judging whether image information exists in the first preset time period.
The determining of the image information in the first preset time period may be determining whether the image information is acquired in the first preset time period, and may also determine how many pieces of image information corresponding to the image are acquired, for example: 0 image, 1 image, 1000 images, or the like.
401. And if the image information is not acquired within the first preset time period, setting the image quality threshold as an initial threshold, wherein the initial threshold comprises a preset fixed threshold or 0.
The fact that the image information is not acquired within the first preset time period can be indicated that the first preset time period is a time period within which the image information can be acquired, but no face image appears in the field of view of the entrance guard camera within the first preset time period, so that the image information cannot be acquired. Of course, the first preset time period at this time may also be a time period in which image information is not acquired, and no matter whether a face image appears in the field of view of the access camera or not, acquisition is not performed. Therefore, when the image information is not acquired within the first preset time range, the image information for calculating the image quality value cannot be acquired, the mean value and the variance value of the image quality value naturally do not occur, and the target threshold value does not exist. Therefore, the image quality threshold value of the second preset time period cannot be set according to the target threshold value calculated in the first preset time period, that is, an initial value state, and the setting of the image quality threshold value to the initial threshold value or 0 may indicate such an initial value state.
As a possible embodiment, when the image information can be acquired in the first preset time period, but the face image is not acquired and enters the field of view of the door access camera, no data base is available to calculate the image quality threshold, and the image quality threshold of the corresponding second preset time period may be set to 0.
As another possible embodiment, when the image information is not successfully acquired but acquired in the first preset time period because of the need to acquire the image information, a preset image quality threshold that meets the general use may be set, and temporarily used as the image quality threshold in the second preset time period, that is, the fixed threshold is, for example: the fixed threshold is 0.8. In addition, when the image information needs to be acquired in the first preset time period but cannot be acquired successfully, the image quality threshold applied to the first preset time period may be applied to the second preset time period and used as the image quality threshold of the second preset time period. Therefore, the situation that the image quality threshold value is not obtained due to the fact that the image information cannot be obtained, and then the image quality threshold value is not available in the second preset time period is avoided, and all the faces entering the camera view field can enter the system database to be matched.
In this embodiment, the image may also be referred to as a picture.
Referring to fig. 5, fig. 5 is a block diagram of a face quality threshold acquisition apparatus according to an embodiment of the present invention, and as shown in fig. 5, the setting apparatus includes:
an obtaining module 501, configured to obtain a plurality of pieces of image information within a first preset time period;
a first calculating module 502, configured to perform image quality calculation on a plurality of pieces of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of pieces of image information;
a second calculation module 503, configured to calculate a mean value and a variance value of the plurality of image quality values;
a third calculating module 504, configured to input the mean value and the variance value into a gaussian model for calculation to obtain a target threshold;
a first setting module 505, configured to set an image quality threshold within a second preset time period based on the target threshold.
Optionally, the gaussian model includes an offset parameter, as shown in fig. 6, and the third calculation module 504 includes:
a first calculating unit 5041, configured to calculate a target threshold based on the mean value, the variance value, and the offset parameter, where a corresponding formula is:
Figure BDA0002223991080000121
wherein thresh is a target threshold, ava (q) is a mean of a plurality of image quality values, and sigma (q) is a variance value of a plurality of image quality values,
Figure BDA0002223991080000122
representing the offset parameter, q is the image quality value.
Optionally, the region for acquiring the image information includes a plurality of position information, and the image information includes a face image, as shown in fig. 7, the acquiring module 501 includes:
the acquisition unit 5011 is configured to track and acquire face images of multiple persons at each position information based on a first preset time period, and form a face image tracking chain of each person;
a tracking unit 5012 for generating a set of face images corresponding to each person from the face image tracking chain for each person formed at each position information.
Optionally, as shown in fig. 8, the first calculating module 502 includes:
the second calculating unit 5021 is configured to input the face image sets of multiple persons acquired at each position information into the image quality model for calculation, so as to obtain an image quality value of each person at different position information.
Optionally, as shown in fig. 9, the apparatus further includes:
an acquisition module 506, configured to acquire a face image appearing at each position information within a second preset time period;
the fourth calculation module 507 is configured to input the face image into the corresponding image quality model for calculation to obtain an image quality value of each person in a second preset time period;
and the comparison module 508 is configured to compare the image quality value of each person in the second time period with the image quality threshold, and screen out a face image meeting the image quality threshold for database matching.
As shown in fig. 10, the apparatus further includes:
a second setting module 509, configured to set the image quality threshold as an initial threshold if the image information is not acquired within a first preset time period, where the initial threshold includes a preset fixed threshold or 0.
It should be noted that the above device can be applied to various occasions where an access control system is installed, for example: office building checking card, security check, shopping mall and the like.
The image quality threshold setting device provided by the embodiment of the present invention can implement each implementation manner in the image quality threshold setting method embodiments in fig. 1 to 4, and has corresponding beneficial effects, and for avoiding repetition, details are not repeated here.
As shown in fig. 11, fig. 11 is a structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 11, includes: a memory 1102, a processor 1101, and a computer program stored on the memory 1102 and executable on the processor 1101, wherein:
the processor 1101 is configured to call the computer program stored in the memory 1102, and perform the following steps:
acquiring a plurality of image information within a first preset time period;
performing image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information;
calculating a mean value and a variance value of a plurality of image quality values;
inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value;
and setting an image quality threshold value in a second preset time period based on the target threshold value.
Optionally, the gaussian model includes an offset parameter;
the input of the mean value and the variance value into the gaussian model for calculation performed by the processor 1101 to obtain a target threshold includes:
and calculating to obtain a target threshold value based on the mean value, the variance value and the offset parameter.
Optionally, the area where the image information is acquired includes a plurality of position information, and the image information includes a face image, and the step of acquiring the plurality of image information within the first preset time period executed by the processor 1101 includes:
respectively tracking and collecting the face images of a plurality of persons at each position information based on a first preset time period, and forming a face image tracking chain of each person;
from the face image tracking chain for each person formed at each position information, a face image set corresponding to each person is generated.
Optionally, the performing, by the processor 1101, an image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information includes:
and inputting the facial image sets of multiple persons acquired at each position information into an image quality model for calculation to obtain the image quality value of each person at different position information.
Optionally, the processor 1101 is further configured to perform acquiring a face image appearing at each position information within a second preset time period;
inputting the face image into a corresponding image quality model for calculation to obtain an image quality value of each person in a second preset time period;
and comparing the image quality value of each person in the second time period with the image quality threshold value, and screening out the face image meeting the image quality threshold value for database matching.
Optionally, the processor 1101 is further configured to set the image quality threshold to an initial threshold if the image information is not acquired within the first preset time period, where the initial threshold includes a preset fixed threshold or 0.
The electronic device provided by the embodiment of the invention can realize each implementation mode in the push method embodiment based on the reading content and corresponding beneficial effects, and in order to avoid repetition, the details are not repeated.
It is noted that only 1101 and 1102 with components are shown, but it is understood that not all of the shown components are required and that more or fewer components may alternatively be implemented. As will be understood by those skilled in the art, the electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be a desktop computer, a notebook, a palm top computer, a cloud server, or other computing device. The electronic equipment can be in man-machine interaction with a client in a keyboard, a mouse, a remote controller, a touch panel or a voice control device and the like.
The memory 1102 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 1101 may be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. In other embodiments, the memory 1101 may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device. Of course, the memory 1101 may also include both internal and external memory units of the electronic device. In this embodiment, the memory 1101 is generally used for storing an operating system installed in the electronic device and various types of application software, such as program codes of an image quality threshold setting method and the like. Further, the memory 1101 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 1102 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 1102 generally operates to control the overall operation of the electronic device. In this embodiment, the processor 1102 is configured to run program code stored in the memory 1101 or process data, for example, program code of an image quality threshold setting method.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the image quality threshold setting method provided in the embodiment of the present invention, and can achieve the same technical effect, and is not described herein again to avoid repetition.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (9)

1. An image quality threshold setting method, characterized by comprising the steps of:
acquiring a plurality of image information within a first preset time period;
performing image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information;
calculating a mean value and variance value of the plurality of image quality values;
inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value;
and setting an image quality threshold value in a second preset time period based on the target threshold value.
2. The method of claim 1, wherein the gaussian model includes an offset parameter, and wherein the step of inputting the mean and variance values into the gaussian model for calculation to obtain the target threshold comprises: and calculating to obtain a target threshold value based on the mean value, the variance value and the offset parameter.
3. The method of claim 1, wherein the image information includes a plurality of position information in an area where the image information is acquired, and the image information includes a face image, and the acquiring the plurality of image information within the first preset time period includes:
respectively tracking and collecting the face images of a plurality of persons at each position information based on a first preset time period, and forming a face image tracking chain of each person;
generating a set of face images corresponding to each person from the face image tracking chain for each person formed at the each position information.
4. The method of claim 3, wherein the step of performing image quality calculation on the plurality of image information through a preset image quality model to obtain a plurality of image quality values corresponding to the plurality of image information comprises:
and inputting the facial image sets of multiple persons acquired at each position information into an image quality model for calculation to obtain the image quality value of each person at different position information.
5. The method of claim 3, wherein the method further comprises:
acquiring the face image appearing at each position information within the second preset time period;
inputting the face image into a corresponding image quality model for calculation to obtain an image quality value of each person in the second preset time period;
and comparing the image quality value of each person in the second time period with the image quality threshold value, and screening out the face image meeting the image quality threshold value for database matching.
6. The method of claim 1, wherein the method further comprises:
and if the image information is not acquired within the first preset time period, setting the image quality threshold as an initial threshold, wherein the initial threshold comprises a preset fixed threshold or 0.
7. An image quality threshold setting apparatus, comprising:
the acquisition module is used for acquiring a plurality of image information within a first preset time period;
the first calculation module is used for calculating the image quality of the image information through a preset image quality model to obtain a plurality of image quality values corresponding to the image information;
a second calculation module for calculating a mean value and a variance value of the plurality of image quality values;
the third calculation module is used for inputting the mean value and the variance value into a Gaussian model for calculation to obtain a target threshold value;
and the first setting module is used for setting an image quality threshold value in a second preset time period based on the target threshold value.
8. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor implementing the steps of a method of setting an image quality threshold as claimed in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of a method of setting an image quality threshold as claimed in any one of claims 1 to 6.
CN201910945354.6A 2019-09-24 2019-09-30 Image quality threshold setting method and device and electronic equipment Pending CN112560564A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910907592 2019-09-24
CN2019109075928 2019-09-24

Publications (1)

Publication Number Publication Date
CN112560564A true CN112560564A (en) 2021-03-26

Family

ID=75030268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910945354.6A Pending CN112560564A (en) 2019-09-24 2019-09-30 Image quality threshold setting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112560564A (en)

Similar Documents

Publication Publication Date Title
CN109477951B (en) System and method for identifying persons and/or identifying and quantifying pain, fatigue, mood and intent while preserving privacy
CN106407914B (en) Method and device for detecting human face and remote teller machine system
US10621454B2 (en) Living body detection method, living body detection system, and computer program product
CN105612533B (en) Living body detection method, living body detection system, and computer program product
US20170169304A1 (en) Method and apparatus for liveness detection
CN108875452A (en) Face identification method, device, system and computer-readable medium
US10949692B2 (en) 3D dynamic structure estimation using synchronized images
CN109815813B (en) Image processing method and related product
CN105518708A (en) Method and equipment for verifying living human face, and computer program product
CN105426827A (en) Living body verification method, device and system
EP3241151A1 (en) An image face processing method and apparatus
CN103902958A (en) Method for face recognition
CN105659200A (en) Method, apparatus, and system for displaying graphical user interface
CN108108711B (en) Face control method, electronic device and storage medium
CN110889334A (en) Personnel intrusion identification method and device
AU2023222967A1 (en) Methods and systems for determining user liveness and verifying user identities
CN111008935B (en) Face image enhancement method, device, system and storage medium
US11651624B2 (en) Iris authentication device, iris authentication method, and recording medium
US20200210687A1 (en) Face recognition device, face recognition method, and computer readable storage medium
CN108875469A (en) In vivo detection and identity authentication method, device and computer storage medium
CN115841651B (en) Constructor intelligent monitoring system based on computer vision and deep learning
CN111259763A (en) Target detection method and device, electronic equipment and readable storage medium
CN112700568B (en) Identity authentication method, equipment and computer readable storage medium
CN110688878A (en) Living body identification detection method, living body identification detection device, living body identification detection medium, and electronic device
CN110543813B (en) Face image and gaze counting method and system based on scene

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