Image quality threshold setting method, device and electronic equipment

By calculating the mean and variance of the image quality value and inputting the Gaussian model, and setting the image quality threshold dynamically, the problem of low face filtering accuracy in the access control system is solved, and higher filtering accuracy and adaptability are achieved.

CN112560564BActive Publication Date: 2024-12-03SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910945354.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-09-24
Filing Date
2019-09-30
Publication Date
2024-12-03
Estimated Expiration
2039-09-30

AI Technical Summary

Technical Problem

The existing access control system has low accuracy when filtering faces, and fixed thresholds cannot meet different image quality requirements, resulting in excessive or insufficient filtering.

Method used

By obtaining multiple image information, the mean and variance values ​​of image quality values ​​are calculated, and the Gaussian model is input to calculate the target threshold, and the image quality threshold is dynamically set to improve filtering accuracy.

Benefits of technology

It improves the accuracy of image filtering, avoids the problem of inaccuracy caused by fixed thresholds, and adapts to different time periods and environmental conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112560564B_ABST
    Figure CN112560564B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and in particular to an image quality threshold setting method, device and electronic device, wherein the image quality threshold setting method comprises the steps of: obtaining multiple image information within a first preset time period; performing image quality calculation on the multiple image information through a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information; calculating the mean and variance value of the multiple image quality values; inputting the mean and variance value into a Gaussian model for calculation to obtain a target threshold; and setting the image quality threshold within a second preset time period based on the target threshold. The present invention can improve the accuracy of filtering images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an image quality threshold setting method, device and electronic equipment. Background Art

[0002] In the design process of automatic access control, there is a quality optimization process, that is, it is necessary to select pictures with better quality from a certain number of collected samples and then match this picture. The quality optimization process includes: processing the collected samples through the quality model and calculating the quality value of each picture. Assuming that the threshold of the quality value is r, pictures with a quality value greater than r can be used for database matching, and pictures with a quality value less than r are judged to be of poor quality and are discarded.

[0003] In the prior art, it has always been difficult to select an appropriate quality threshold. The usual practice is to use a fixed threshold, such as 0.7. In fact, due to the quality model, the quality values ​​of different images vary greatly, and a fixed threshold cannot meet the needs of all images. For example, the best quality of some images is 0.6, while that of others is 0.9. In the former case, a threshold of 0.7 will result in over-filtering. It can be seen that in the existing access control system technology, there is a problem of low accuracy when filtering faces. Summary of the invention

[0004] The embodiments of the present invention provide a method, a device and an electronic device for setting an image quality threshold, aiming to solve the problem of low accuracy in face filtering.

[0005] In a first aspect, an embodiment of the present invention provides a method for setting an image quality threshold, the method comprising the following steps:

[0006] Acquire multiple image information within a first preset time period;

[0007] Performing image quality calculation on the plurality of image information by using a preset image quality model to obtain a plurality of image quality values ​​corresponding to the plurality of image information;

[0008] Calculating the mean and variance of the multiple image quality values;

[0009] The mean and variance values ​​are input into a Gaussian model for calculation to obtain a target threshold;

[0010] An image quality threshold within a second preset time period is set based on the target threshold.

[0011] In a second aspect, an embodiment of the present invention provides a device for setting a face quality threshold, comprising:

[0012] An acquisition module, used for acquiring a plurality of image information within a first preset time period;

[0013] A first calculation module, configured to perform image quality calculation on the plurality of image information by using a preset image quality model to obtain a plurality of image quality values ​​corresponding to the plurality of image information;

[0014] A second calculation module, used for calculating the mean and variance of the multiple image quality values;

[0015] A third calculation module is used to input the mean and variance value into a Gaussian model for calculation to obtain a target threshold;

[0016] The first setting module is used to set an image quality threshold within a second preset time period based on the target threshold.

[0017] In a third aspect, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the image quality threshold setting method provided in an embodiment of the present invention when executing the computer program.

[0018] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the image quality threshold setting method provided in an embodiment of the present invention are implemented.

[0019] In an embodiment of the present invention, multiple image information within a first preset time period is obtained; image quality calculation is performed on the multiple image information using a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information; the mean and variance values ​​of the multiple image quality values ​​are calculated; the mean and variance values ​​are input into a Gaussian model for calculation to obtain a target threshold; and the image quality threshold within a second preset time period is set based on the target threshold. Since within the second preset time period, the image quality threshold is calculated based on the image quality values ​​of the multiple image information collected within the first preset time period, the present invention can improve the accuracy of filtering images. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 is a flow chart of a method for setting an image quality threshold provided by an embodiment of the present invention;

[0022] Figure 2 is a flow chart of another method for setting an image quality threshold provided by an embodiment of the present invention;

[0023] Figure 3 is a flow chart of another method for setting an image quality threshold provided by an embodiment of the present invention;

[0024] Figure 4 is a flow chart of another method for setting an image quality threshold provided by an embodiment of the present invention;

[0025] Figure 5 is a structural schematic diagram of an image quality threshold setting device provided by an embodiment of the present invention;

[0026] Figure 6 is a structural schematic diagram of another image quality threshold setting device provided by an embodiment of the present invention;

[0027] Figure 7 is a structural schematic diagram of another image quality threshold setting device provided by an embodiment of the present invention;

[0028] Figure 8 is a structural schematic diagram of another image quality threshold setting device provided by an embodiment of the present invention;

[0029] Fig. 9 is a structural schematic diagram of another image quality threshold setting device provided by an embodiment of the present invention;

[0030] Fig.10 is a structural schematic diagram of another image quality threshold setting device provided by an embodiment of the present invention;

[0031] Fig.11 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0033] See also Figure 1 , Figure 1 is a flow chart of a method for setting an image quality threshold provided by an embodiment of the present invention. Figure 1 As shown, the following steps are included:

[0034] S101. Acquire a plurality of image information within a first preset time period.

[0035] The first preset time period may be a randomly selected time period, or may be selected based on the flow of personnel in different occasions. For example, if there is a large flow of personnel in an office building, the first preset time period may be selected during working hours or after-get off work hours to obtain image information. Working hours may be from 8:30 to 9:00 in the morning, and after-get off work hours may be from 6:00 to 6:30 in the afternoon. The length of the first preset time period may be adjusted according to the specific usage scenario requirements, for example, it may be set to 1 hour, 1 day, or even 1 month.

[0036] Specifically, the acquisition of multiple image information may be performed through an access control camera, or the acquisition of image information of an image pre-entered manually, wherein the access control camera may be externally placed at one or more locations where image information needs to be acquired, for example, fixed on both sides of the outside of the door through a fixing. It may also be built-in at one or more locations where image information needs to be acquired, for example, during security inspection, the access control camera is built-in into the security inspection instrument, and the security inspection instrument is set on the security inspection column. Multiple image information may include image information of all persons who enter the field of view of the access control camera within the first preset time period. The access control camera will save all acquired image information, and finally form an image information set. The specific position of the access control camera can be set as needed, for example, set at a height of 1.2m and a position where the line of sight can be directly opposite, so that the access control camera can acquire image information of adults or children. In order to obtain more complete image information, multiple access control cameras can also be provided to shoot at multiple angles, or image information can be acquired by setting a multi-angle rotatable access control camera.

[0037] The image information may include at least one or more of image pixels, grayscale values, image size, etc. The image information may also include one or more of facial information (eyes, nose, face, ears, etc.), body information (such as height, body shape, etc.), clothing information (such as hats, glasses, clothes, hat colors, glasses styles, etc.), age information (infants, young people, middle-aged people, elderly people, etc.), gender information, etc. of the person entering the field of view of the access control camera.

[0038] It should be noted that the access control camera in this embodiment can be a webcam. A webcam (CAMERA or WEBCAM) is also called a computer camera, a computer eye, an electronic eye, etc. It is a video input device that is widely used in video conferencing, telemedicine, and real-time monitoring. The webcam can be a 2D (Dimension) webcam. 2D means two-dimensional space. The image in the webcam presents two dimensions, up and down and left and right. The webcam can also be a 3D webcam. 3D means three-dimensional space. The image in the webcam can present not only the two dimensions of up and down and left and right, but also the dimension of front and back, forming a visually three-dimensional image.

[0039] S102: Calculate image quality of multiple image information using a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information.

[0040] The image quality model may be called an image quality model, and at least one or more of the above-mentioned image pixels, grayscale values, image size, etc. may be used as image quality value calculation parameters of the image quality model, and the image quality model may calculate the corresponding image quality value according to the calculation parameters. The image quality value may be a numerical value, for example, the image quality value is distinguished by 0 to 1, and the image quality value may be 0.5, 0.8, 0.9, etc., and the closer the image quality value is to 1, the better.

[0041] After obtaining the image information, the image quality value calculation parameters in the image information can be extracted through image recognition technology to calculate the corresponding image quality value. For example, the image pixels and grayscale values ​​are used as image quality value parameters, the image quality value is 0 to 1, and when the image pixels are 500*500, the corresponding image quality value is 0.3, and the grayscale value is 100, the corresponding image quality value is 0.3. Finally, the image quality value of the entire image is 0.6.

[0042] S103: Calculate mean values ​​and variance values ​​of multiple image quality values.

[0043] The mean value may be the mean value of the image quality values ​​calculated for all the image information acquired within the 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 image information may be counted first, and the corresponding mean value may be calculated based on the number of images and the image quality value of each image information. The specific formula is as follows:

[0044]

[0045] Among them, ava(q) represents the average of multiple image quality values, n represents the acquired image quality, and q i Indicates the image quality value of the i-th image information.

[0046] Similarly, the variance value needs to be calculated based on the image quality value of each image information, the number of images and the calculated mean. The specific formula is as follows:

[0047]

[0048] Where ava(q) represents the average of multiple image quality values, n represents the number of images acquired, and q i represents the image quality value of the i-th image information, sigma(q) represents the variance value of multiple image quality values, and sprt represents the square root.

[0049] S104: Input the mean and variance values ​​into the Gaussian model for calculation to obtain a target threshold.

[0050] The first preset time period for acquiring the plurality of image information may be a time period having the characteristics of a Gaussian model, and the Gaussian model presents a Gaussian distribution N(μ,σ 2 ), which can also be called normal distribution. In this embodiment, μ represents the symmetry axis after the image quality values ​​calculated in the first preset time period are normally distributed, that is, the image quality value corresponding to the symmetry axis appears the most times, σ represents the standard deviation, σ 2 Represents the variance value. According to σ, the steepness of the image quality value distribution can be judged. The smaller σ is, the steeper it is in the first preset time period, which means that the image quality value changes greatly. The smaller σ is, the flatter it is, which means that the image quality value changes little in the first preset time period and the image quality value is relatively uniform. Gaussian distribution has the 3σ principle. When the image quality value is distributed between (μ—3σ, μ+3σ), the probability corresponding to the area formed by the normal distribution curve formed by the corresponding image quality value and the horizontal axis (μ) is 0.9974.

[0051] In addition, the target threshold represents a value calculated based on multiple image qualities within the first preset time period, and the target threshold may be a threshold that best matches the first preset time period, and facial images may be screened more accurately based on this threshold.

[0052] S105: Setting an image quality threshold within a second preset time period based on the target threshold.

[0053] The image quality threshold of the second preset time period refers to the target threshold calculated in the first preset time period. When the access control camera detects image information in the second preset time period, it will obtain the image information of the image through the image quality model, calculate the image quality value corresponding to the image information, and compare the calculated image quality value with the image quality threshold to determine the size of the image quality value and the image quality threshold.

[0054] When the image quality value is greater than or equal to the image quality threshold within the second preset time period, the image corresponding to the image quality value can be used for system database matching. For example, if the image quality value is 0.8 and the image quality threshold is 0.7, it is used for database matching.

[0055] When the image quality value is less than the image quality threshold, the image with the corresponding image quality value is directly discarded. For example, if the image quality value is 0.5 and the image quality threshold is 0.7, the image is discarded.

[0056] 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 a third preset time period appears, the third time period represents the second preset time period in the present invention, and the original second preset time period represents the first preset time period in the present invention. This embodiment can be applied not only to the acquisition of image information and the calculation of the corresponding image quality threshold within one time period, but also to the acquisition of image information and the calculation of the corresponding image quality threshold within multiple time periods, and then different image quality thresholds can be set for different preset time periods, forming a form of dynamic setting of image quality thresholds.

[0057] In an embodiment of the present invention, multiple image information within a first preset time period is obtained; image quality calculations are performed on the multiple image information using a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information; the mean and variance values ​​of the multiple image quality values ​​are calculated; the mean and variance values ​​are input into a Gaussian model for calculation to obtain a target threshold; and the image quality threshold within a second preset time period is set based on the target threshold. Since multiple image information from access control cameras is obtained within the first preset time period, and the image information is calculated using an image quality model to obtain multiple values, that is, multiple image quality values, and then the mean and variance values ​​of the multiple image quality values ​​are calculated, the final target threshold is calculated based on the mean and variance values, and the target threshold is used as the image quality threshold corresponding to the second time period, avoiding the problem of inaccurate filtering caused by directly setting a fixed image quality threshold for use in different time periods, which is beneficial to improving the accuracy of face filtering by the access control system.

[0058] See also Figure 2 , Figure 2 is a flow chart of another method for setting an image quality threshold provided by an embodiment of the present invention. Figure 2 As shown, the following steps are included:

[0059] S201. Acquire a plurality of image information within a first preset time period.

[0060] S202: Calculate image quality of multiple image information using a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information.

[0061] S203: Calculate the mean and variance of multiple image quality values.

[0062] S204, the Gaussian model includes an offset parameter. Based on the mean, variance value and offset parameter, the target threshold is calculated. The corresponding formula is:

[0063]

[0064] Among them, thresh represents the target threshold, ava(q) represents the mean, and sigma(q) represents the variance value. represents the offset parameter, and q represents the image quality value.

[0065] The above offset parameter can be set according to the environment in which the access control camera obtains the image information, and the value range can be preset, for example: the value range is set between 1 and 3. Select from 1 to 3 according to the specific environment, and then calculate the target threshold value in combination with the mean and variance values ​​calculated in step 103. The calculation formula of the target threshold value is as follows:

[0066] After multiplying the value of the offset parameter by the variance value and subtracting it from the mean, the target threshold can be obtained. For example, if the mean is 0.8, the offset parameter is 1, and the variance value is 0.1, then the target threshold is 0.8-1×0.1=0.7.

[0067] The offset parameter is adjusted based on the time period.

[0068] Specifically, the environment corresponding to different time periods may be different, so the offset parameter can be adjusted. For example, during peak traffic time periods, the crowds are crowded, and some interference information may appear in the field of view of the access control camera, affecting the accuracy of the image quality threshold. 2 can be selected as the offset parameter for calculation. The interference information may include camera movement information, image information of multiple faces, noisy sound information, occlusion information of the face such as hair, hats or hands, and body information other than the head. For another example, when there is no interference information or the interference information does not affect the image quality threshold, 1 can be selected as the offset parameter to calculate the image quality threshold. Of course, if the environment in different time periods does not basically change, 1.3 can be selected as the offset parameter to calculate the image quality threshold.

[0069] Optionally, the offset parameter can also be adjusted based on the external ambient light. The external ambient light can be dark or bright, and the light brightness threshold can be set. The light brightness threshold can include an upper threshold and a lower threshold. The light brightness within the lower threshold or the upper threshold, the corresponding offset parameter can take only a fixed value, for example: the lower threshold of the light brightness is 1000 candela, the upper threshold is 3000 candela, and the light brightness corresponding to the image information currently being acquired is 500 candela, then 3 is directly selected as the offset parameter, and when the light brightness corresponding to the image information currently being acquired is 3500 candela, 1 is directly selected as the offset parameter. When the light brightness is between the lower threshold and the upper threshold, there can be a corresponding relationship between the light brightness and the offset parameter, for example: the light brightness is 2000 candela, the offset parameter is 2, the light brightness is 2500 candela, the offset parameter is 1.5, the light brightness is 1200 candela, and the offset parameter is 2.8.

[0070] S205: Setting an image quality threshold within a second preset time period based on the target threshold.

[0071] Based on step 204, the target threshold value within 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 the image quality threshold value of the second preset time period. The first preset time period and the second preset time period can be continuous time periods, for example, the first preset time period is from 8 to 9 in the morning, and the second preset time period is from 9 to 10. Of course, the first preset time period and the second preset time period can also be discontinuous time periods, for example, the first preset time period is from 8 to 9 in the morning, and the second preset time period is from 6 to 6:30 in the afternoon. For another example, the first preset time period is from 8 to 9, and the second preset time period is from 8 to 9 the next day.

[0072] In this embodiment, since image information from multiple access control cameras is obtained within the first preset time period, and the image information is calculated through the image quality model to obtain the mean and variance values ​​of multiple image quality values, an offset parameter is determined according to the environment and / or light brightness corresponding to the obtained image information, and the final target threshold is calculated according to the offset parameter, the mean and the variance value. Adding the offset parameter can more accurately calculate the target threshold according to the specific environmental conditions, and the target threshold is used as the image quality threshold of the second time period, rather than directly setting a fixed image quality threshold and applying it in different time periods to avoid the problem of inaccurate filtering, which is conducive to improving the accuracy of the access control system in filtering image information.

[0073] See also Figure 3 , Figure 3is a flow chart of another method for setting an image quality threshold provided by an embodiment of the present invention. Figure 3 As shown, the following steps are included:

[0074] S301. The area for acquiring image information includes multiple location information, and the image information includes facial images. Based on a first preset time period, facial images of multiple persons are tracked and collected at each location information, and a facial image tracking chain for each person is formed.

[0075] Among them, the facial image may include one or more of eyes, nose, ears, face, mouth, pupil distance, face size, etc. The multiple position information may be a plurality of access control cameras for collecting facial images set at different angles / positions at the access control. In the process of people entering the access control, considering the different angles, speeds, etc. of each person, the quality of the collected facial images will be affected, and the facial image threshold will also be affected. Therefore, setting the access control at different angles / positions at the access control can collect facial images of the same person corresponding to different positions, so as to realize multiple collections of facial images of the same person, so that the calculated image quality value is more accurate.

[0076] When the corresponding access control camera detects a face image entering the field of view, it will track and collect the face image to obtain a tracking chain corresponding to the face image. Because the face image entering the access control camera may be in motion, the corresponding image frame is also in a moving state when the access control camera is tracking. Therefore, the face image tracking chain corresponding to any person will include multiple face images of the person.

[0077] S302: Generate a facial image set corresponding to each person according to the facial image tracking chain of each person formed at each position information.

[0078] Among them, each access control camera can collect the face images in each person's face image tracking chain to form a corresponding face image set. Therefore, in each access control camera, a face image set of multiple people who entered the field of view of the access control camera within the first preset time period will be saved. When calculating the image quality threshold, it can be calculated based on all images in the face image set.

[0079] S303: Input the face image set of multiple persons acquired at each position information into the image quality model for calculation to obtain the image quality value of each person at different position information.

[0080] By inputting a set of facial images of multiple people into the image quality model for calculation in different access control cameras, the image quality threshold of each person can be obtained, which means that each access control camera will get an image quality threshold, and based on the different position angles of each access control camera, each image quality threshold can be a different threshold.

[0081] S304: Calculate mean values ​​and variance values ​​of multiple image quality values.

[0082] Among them, the mean can be calculated based on the image quality value of each person to obtain the final image quality value, and the above image information includes face images, that is, the calculated image quality value is the image quality value of the face image, and the mean and variance values ​​calculated based on the image quality value can avoid the appearance of interference information such as multiple faces, clothes, etc. in the camera field of view.

[0083] 305. Input the mean and variance values ​​into the Gaussian model for calculation to obtain the target threshold.

[0084] In this embodiment, within the first preset time period, it can be considered that the distribution of the calculated image quality values ​​presents Gaussian model characteristics. All image quality values ​​calculated corresponding to each access control camera can be counted. After the mean and variance of all image quality values ​​are calculated, the Gaussian distribution function N(μ,σ 2 ) The distribution curve of the image quality value is analyzed. According to the characteristics of Gaussian distribution 3σ, it can be determined that an image quality value has the highest probability of occurrence. At this time, this image quality value can be used as the target threshold of the corresponding access control camera.

[0085] In addition, the target threshold can be directly calculated based on the mean and variance values ​​of the face image, without considering the impact of the environment on the face image information. Of course, as shown in step 205, the offset parameter can also be brought into the calculation of the target threshold to make a holistic, multi-factor comprehensive judgment. In this way, the calculated target threshold will be a threshold that is more practical within the first preset time period.

[0086] 306. Set an image quality threshold within a second preset time period based on the target threshold.

[0087] The image quality threshold may be a target threshold calculated based on the face image within the 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 faces passing through the access control camera is uniform within a continuous time period, the first preset time period and the second preset time period may be set as continuous time periods.

[0088] Optionally, after obtaining the image quality threshold within the second preset time period, the method may further include:

[0089] The face images appearing at each position information within the second preset time period are collected.

[0090] Among them, when the image quality threshold of the second preset time period is set, the face image appearing in the access control camera within the second preset time period can be obtained. Of course, each access control camera can obtain the face image appearing in the access control camera.

[0091] The face image is input into the corresponding image quality model for calculation to obtain the image quality value of each person in the second preset time period.

[0092] Among them, the facial images that appear in each access control camera within the second preset time period can be input into the image quality model of the corresponding access control camera for calculation to obtain the image quality value of each person within the second preset time period.

[0093] The image quality value of each person in the second time period is compared with the image quality threshold, and the face images that meet the image quality threshold are screened out for database matching.

[0094] Among them, when the image quality value of a person in the second preset time period is less than the image quality threshold, the facial image of the person can be discarded, for example: if the image quality value of a person is 0.6 and the image quality threshold is 0.7, then it is discarded. When the image quality value of a person in the second preset time period is greater than or equal to the image quality threshold, the facial image of the person can be used to match the system database, for example: if the image quality value of a person is 0.8 and the image quality threshold is 0.7, then it is used to match the system database.

[0095] In this embodiment, since multiple access control cameras are set up, multiple facial images entering the corresponding access control cameras are obtained in the first preset time period, and the facial images are calculated through the image quality model in each access control camera to obtain the mean and variance values ​​of multiple image quality values, and the target threshold of the corresponding facial image is calculated according to the mean and variance values, and the target threshold is used as the facial image quality threshold of the second time period, instead of directly setting a fixed facial image quality threshold for use in different time periods. In this way, it is beneficial to improve the accuracy of facial image filtering by the access control system.

[0096] See also Figure 4 , Figure 4 is a flowchart of another method for setting an image quality threshold provided by an embodiment of the present invention. Figure 1 On the basis of, the setting method also includes the following steps:

[0097] 400. Determine whether there is image information within a first preset time period.

[0098] Among them, judging the image information within the first preset time period can be judging whether the image information is obtained within the first preset time period, and can also be judging how many images corresponding to the image are obtained, for example: 0 images, 1 image or 1000 images, etc.

[0099] 401. If no image information is acquired within a first preset time period, the image quality threshold is set to an initial threshold, where the initial threshold includes a preset fixed threshold or 0.

[0100] Among them, the fact that image information is not obtained within the first preset time period can be expressed as the first preset time period is a time period in which image information can be obtained, but no face image appears in the field of view of the access control camera during the first preset time period, so no image information can be obtained. Of course, it can also be expressed that the first preset time period at this time is a time period in which image information is not obtained, and no matter whether a face image appears in the field of view of the access control camera, no image information is obtained. Therefore, when image information is not obtained within the first preset time range, image information for calculating the image quality value cannot be obtained, and naturally the mean and variance values ​​of the image quality value will not appear, and there will be no target threshold. Therefore, it is impossible to set the image quality threshold of the second preset time period according to the target threshold calculated in the first preset time period, that is, an initial value state, and the above-mentioned setting of the image quality threshold to the initial threshold or 0 can represent such an initial value state.

[0101] As a feasible implementation method, when image information can be acquired during the first preset time period, but no facial image is acquired entering the field of view of the access control camera, there is no data basis for calculating the image quality threshold, and the image quality threshold for the corresponding second preset time period can be set to 0.

[0102] As another feasible implementation method, when image information needs to be acquired but is not acquired successfully in the first preset time period, a preset image quality threshold that conforms to common use can also be set and temporarily used as the image quality threshold for the second preset time period, that is, the fixed threshold mentioned above, for example: the fixed threshold is 0.8. In addition, when image information needs to be acquired in the first preset time period but is not acquired successfully, the image quality threshold applied to the first preset time period can also be applied to the second preset time period and used as the image quality threshold for the second preset time period. In this way, there will be no image quality threshold in the second preset time period due to the inability to acquire image information and the inability to obtain the image quality threshold, so that all faces that enter the camera's field of view can enter the system database for matching.

[0103] It should be noted that, in this embodiment, the image may also be referred to as a picture.

[0104] See also Figure 5 , Figure 5 is a module structure diagram of a face quality threshold acquisition device provided by an embodiment of the present invention, such as Figure 5 As shown, the setting device includes:

[0105] An acquisition module 501 is used to acquire a plurality of image information within a first preset time period;

[0106] A first calculation module 502 is used to perform image quality calculation on multiple image information using a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information;

[0107] A second calculation module 503, used to calculate the mean and variance of multiple image quality values;

[0108] The third calculation module 504 is used to input the mean and variance values ​​into the Gaussian model for calculation to obtain a target threshold;

[0109] The first setting module 505 is configured to set an image quality threshold within a second preset time period based on the target threshold.

[0110] Optionally, the Gaussian model includes an offset parameter, such as Figure 6 As shown, the third calculation module 504 includes:

[0111] The first calculation unit 5041 is used to calculate the target threshold based on the mean, variance value and offset parameter. The corresponding formula is:

[0112]

[0113] Where thresh is the target threshold, ava(q) is the mean of multiple image quality values, and sigma(q) is the variance of multiple image quality values. represents the offset parameter, and q is the image quality value.

[0114] Optionally, the area for acquiring image information includes multiple location information, and the image information includes a face image, such as Figure 7 As shown, the acquisition module 501 includes:

[0115] The collection unit 5011 is used to track and collect facial images of multiple persons at each location information within a first preset time period, and form a facial image tracking chain for each person;

[0116] The tracking unit 5012 is used to generate a set of face images corresponding to each person according to the face image tracking chain of each person formed at each position information.

[0117] Optional, such as Figure 8 As shown, the first calculation module 502 includes:

[0118] The second calculation unit 5021 is used to input the face image set of multiple persons obtained at each position information into the image quality model for calculation, so as to obtain the image quality value of each person at different position information.

[0119] Optional, such as Fig. 9 As shown, the device also includes:

[0120] A collection module 506, used for collecting the face image appearing at each position information within a second preset time period;

[0121] A fourth calculation module 507, configured to input the face image into the corresponding image quality model for calculation, and obtain the image quality value of each person in the second preset time period;

[0122] The comparison module 508 is used to compare the image quality value of each person in the second time period with the image quality threshold, and screen out the face images that meet the image quality threshold for database matching.

[0123] like Fig.10 As shown, the device also includes:

[0124] The second setting module 509 is configured to set the image quality threshold to an initial threshold if no image information is acquired within a first preset time period. The initial threshold includes a preset fixed threshold or 0.

[0125] It should be noted that the above device can be applied to various occasions where an access control system is installed, such as: office building clocking in, security inspection, shopping malls, etc.

[0126] The image quality threshold setting device provided by the embodiment of the present invention can achieve Figure 1-4 To avoid repetition, the various implementation methods and corresponding beneficial effects in the embodiment of the image quality threshold setting method are not described here.

[0127] like Fig.11 As shown, Fig.11 FIG. 1 is a structural diagram of an electronic device provided by an embodiment of the present invention. Fig.11 As shown, it includes: a memory 1102, a processor 1101, and a computer program stored in the memory 1102 and executable on the processor 1101, wherein:

[0128] The processor 1101 is used to call the computer program stored in the memory 1102 and execute the following steps:

[0129] Acquire multiple image information within a first preset time period;

[0130] Performing image quality calculation on the multiple image information by using a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information;

[0131] Calculate the mean and variance of multiple image quality values;

[0132] Input the mean and variance values ​​into the Gaussian model for calculation to obtain the target threshold;

[0133] An image quality threshold within a second preset time period is set based on the target threshold.

[0134] Optionally, the Gaussian model includes an offset parameter;

[0135] The processor 1101 inputs the mean and variance values ​​into the Gaussian model for calculation to obtain the target threshold, including:

[0136] Based on the mean, variance and offset parameters, the target threshold is calculated.

[0137] Optionally, when the area for acquiring image information includes multiple location information, and the image information includes a face image, the step of acquiring multiple image information within a first preset time period executed by the processor 1101 includes:

[0138] Based on the first preset time period, facial images of multiple persons are tracked and collected at each location information, and a facial image tracking chain of each person is formed;

[0139] According to the facial image tracking chain of each person formed at each position information, a facial image set corresponding to each person is generated.

[0140] Optionally, the processor 1101 performs image quality calculation on the multiple image information by using a preset image quality model to obtain multiple image quality values ​​corresponding to the multiple image information, including:

[0141] The face image set of multiple persons acquired at each position information is input into the image quality model for calculation to obtain the image quality value of each person at different position information.

[0142] Optionally, the processor 1101 is further configured to collect a face image appearing at each position information within a second preset time period;

[0143] Inputting the facial image into the corresponding image quality model for calculation to obtain the image quality value of each person in the second preset time period;

[0144] The image quality value of each person in the second time period is compared with the image quality threshold, and the face images that meet the image quality threshold are screened out for database matching.

[0145] Optionally, the processor 1101 is further configured to set the image quality threshold to an initial threshold if no image information is acquired within a first preset time period, where the initial threshold includes a preset fixed threshold or 0.

[0146] The electronic device provided in the embodiment of the present invention can implement various implementation methods in the embodiment of the push method based on reading content, as well as the corresponding beneficial effects, which will not be described here to avoid repetition.

[0147] It should be noted that the figure only shows 1101-1102 with components, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the electronic device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.

[0148] Electronic devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Electronic devices can interact with customers through keyboards, mice, remote controls, touch pads, or voice-controlled devices.

[0149] The memory 1102 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 1101 can be an internal storage unit of an electronic device, such as a hard disk or memory of the electronic device. In other embodiments, the memory 1101 can also be an external storage device of an electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 1101 can also include both the internal storage unit of the electronic device and its external storage device. In this embodiment, the memory 1101 is generally used to store the operating system and various application software installed in the electronic device, such as the program code of the image quality threshold setting method, etc. In addition, the memory 1101 can also be used to temporarily store various types of data that have been output or are to be output.

[0150] In some embodiments, the processor 1102 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 1102 is generally used to control the overall operation of the electronic device. In this embodiment, the processor 1102 is used to run the program code stored in the memory 1101 or process data, such as running the program code of the image quality threshold setting method.

[0151] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the image quality threshold setting method embodiment provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0152] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for setting an image quality threshold, characterized in that: The method comprises the following steps: Acquire multiple image information within a first preset time period; Performing image quality calculation on the plurality of image information by using a preset image quality model to obtain a plurality of image quality values ​​corresponding to the plurality of image information; Calculating the mean and variance of the multiple image quality values; The mean and variance values ​​are input into a Gaussian model for calculation to obtain a target threshold; Setting an image quality threshold within a second preset time period based on the target threshold; The Gaussian model includes an offset parameter, and the step of inputting the mean and variance value into the Gaussian model for calculation to obtain the target threshold comprises: calculating the target threshold based on the mean, variance value and offset parameter, wherein the offset parameter is determined according to the environment in which the image information is obtained; After the offset parameter is determined according to the environment in which the image information is acquired, the method further includes: The offset parameter is adjusted based on at least one of a time period during which the image information is acquired and external ambient light.

2. The method according to claim 1, wherein the area for acquiring the image information includes a plurality of position information, and the image information includes a face image, and the step of acquiring a plurality of image information within a first preset time period comprises: Based on the first preset time period, facial images of multiple persons are tracked and collected at each location information, and a facial image tracking chain of each person is formed; According to the facial image tracking chain of each person formed at each position information, a facial image set corresponding to each person is generated.

3. The method according to claim 2, characterized in that The step of calculating the image quality of the plurality of image information by using a preset image quality model to obtain a plurality of image quality values ​​corresponding to the plurality of image information comprises: The face image set of multiple persons acquired at each position information is input into the image quality model for calculation to obtain the image quality value of each person at different position information.

4. The method according to claim 2, characterized in that The method further comprises: Collecting a face image that appears at each location information within the second preset time period; Inputting the face image into the corresponding image quality model for calculation to obtain the image quality value of each person in the second preset time period; The image quality value of each person within the second preset time period is compared with the image quality threshold, and face images that meet the image quality threshold are screened out for database matching.

5. The method according to claim 1, characterized in that The method further comprises: If no image information is acquired within the first preset time period, the image quality threshold is set to an initial threshold, where the initial threshold includes a preset fixed threshold or 0.

6. An image quality threshold setting device, characterized in that: include: An acquisition module, used for acquiring a plurality of image information within a first preset time period; A first calculation module, configured to perform image quality calculation on the plurality of image information by using a preset image quality model to obtain a plurality of image quality values ​​corresponding to the plurality of image information; A second calculation module, used for calculating the mean and variance of the multiple image quality values; A third calculation module is used to input the mean and variance value into a Gaussian model for calculation to obtain a target threshold; A first setting module, configured to set an image quality threshold within a second preset time period based on the target threshold; The Gaussian model includes an offset parameter, and the third calculation module includes: A first calculation unit, configured to calculate a target threshold based on the mean value, the variance value, and an offset parameter, wherein the offset parameter is determined according to an environment in which the image information is acquired; After the offset parameter is determined according to the environment when the image information is acquired, the first calculation unit is further used to adjust the offset parameter based on at least one of the time period when the image information is acquired and the external environment light.

7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in a method for setting an image quality threshold as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for setting an image quality threshold value according to any one of claims 1 to 5 are implemented.