Image processing method, device, electronic device and storage medium
By obtaining multi-category evaluation values and weights in the image set, image quality assessment is performed, which solves the problem of uneven image quality in the existing technology and improves the accuracy and user experience of image management.
Patent Information
- Application Number
- CN202010917916.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-03
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-09-03
AI Technical Summary
Existing image management software lacks effective quality assessment methods when processing and managing image data stored in electronic devices, resulting in uneven image quality, poor user experience, and poor management effects.
Comprehensive management of image sets is achieved by obtaining multi-category evaluation values for each image in the image set, determining the weights of multi-category quality indicators, and conducting image quality assessments based on these weights and evaluation values.
It improves the accuracy and management effect of image quality assessment, reduces the user's reliance on manual judgment, and achieves accurate and efficient management of image sets.
Smart Images

Figure CN112070739B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and more specifically, to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the development of science and technology and the improvement of living standards, more and more users like to use electronic devices to take photos and record some things in life. A large amount of user image data is stored in electronic devices. In order to effectively manage these image data, a large number of album management software using new technologies have emerged. However, the image management method of related management software is usually simple and the image management effect is not good. Summary of the invention
[0003] In view of the above problems, the present application proposes an image processing method, device, electronic device and storage medium, which can improve the above problems.
[0004] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising: obtaining a set of images to be processed; obtaining multi-class evaluation values for each image in the image set, wherein the multi-class evaluation values are evaluation values corresponding to multi-class quality indicators, and the multi-class evaluation values correspond one-to-one to the multi-class quality indicators; determining the weights of the multi-class quality indicators corresponding to the image set based on the multi-class evaluation values of each image; obtaining the quality evaluation value of each image based on the weights of the multi-class quality indicators and the multi-class evaluation values of each image; and performing preset processing on the image set based on the quality evaluation values.
[0005] In a second aspect, an embodiment of the present application provides an image processing device, comprising: an image acquisition module, used to acquire a set of images to be processed; an indicator evaluation acquisition module, used to acquire multi-category evaluation values for each image in the image set, wherein the multi-category evaluation values are evaluation values corresponding to multi-category quality indicators, and the multi-category evaluation values correspond one-to-one to the multi-category quality indicators; an indicator weight acquisition module, used to determine the weights of the multi-category quality indicators corresponding to the image set according to the multi-category evaluation values of each image; a quality assessment acquisition module, used to acquire the quality assessment value of each image according to the weights of the multi-category quality indicators and the multi-category evaluation values of each image; and an image processing module, used to perform preset processing on the image set based on the quality assessment values.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the image processing method provided in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the image processing method provided in the first aspect above.
[0008] The solution provided by the present application obtains a set of images to be processed and obtains a multi-class evaluation value of each image in the set of images, wherein the multi-class evaluation value is an evaluation value corresponding to a multi-class quality index, and the multi-class evaluation value corresponds to the multi-class quality index one by one, so that the electronic device can determine the weight of the multi-class quality index corresponding to the set of images according to the multi-class evaluation value of each image in the set of images, and can obtain the quality evaluation value of each image according to the weight of the multi-class quality index and the multi-class evaluation value of each image, so as to obtain a more comprehensive image quality evaluation result, and then the electronic device can perform preset processing on the set of images based on the quality evaluation value. In this way, the weight of the multi-class quality index corresponding to the set of images is determined by the multi-class evaluation value of each image in the set of images, so that different sets of images can be realized, and the weight of the multi-class quality index corresponding to the set of images is also different. Then, the quality evaluation value of each image in the set of images is determined by the weight of the multi-class quality index corresponding to the set of images, so that the quality of each image in the set of images can be evaluated based on the comprehensive quality of the set of images, so as to achieve a more comprehensive image quality evaluation. Then, the electronic device can manage the image set accurately and efficiently according to the comprehensive quality evaluation value. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic flow chart of an image processing method provided by an embodiment of the present application is shown.
[0011] Figure 2 A schematic flow chart of an image processing method provided in another embodiment of the present application is shown.
[0012] Figure 3A flow chart of step S220 in an image processing method provided in another embodiment of the present application is shown.
[0013] Figure 4 A flowchart of step S223 in the image processing method provided in another embodiment of the present application is shown.
[0014] Figure 5 Another flowchart diagram of step S223 in the image processing method provided by another embodiment of the present application is shown.
[0015] Figure 6 A schematic flow chart of step S240 in an image processing method provided in another embodiment of the present application is shown.
[0016] Figure 7 A flowchart of step S260 in an image processing method provided in another embodiment of the present application is shown.
[0017] Figure 8 A flowchart of step S270 in an image processing method provided in another embodiment of the present application is shown.
[0018] Fig. 9 A block diagram of an image processing device according to an embodiment of the present application is shown.
[0019] Fig.10 A block diagram of an electronic device for executing an image processing method according to an embodiment of the present application is shown.
[0020] Fig.11 A storage unit for storing or carrying program codes for implementing the image processing method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0022] With the development of science and technology and the improvement of living standards, more and more users like to use electronic devices to take photos and record some things in life. As a result, a large amount of user image data is stored in electronic devices. In order to effectively manage these image data, a large number of album management software using new technologies have emerged to help users manage their albums intelligently and effectively.
[0023] The inventors found in their research on related image processing methods that the image management methods of related management software are single, for example, they only cluster the images in the album to obtain image groups of different categories. However, due to the influence of factors such as shooting equipment, shooting environment, shooting techniques, storage methods, etc., the quality of images in the album is usually uneven, and users often need to judge the quality of the image themselves before deciding whether to delete it, resulting in poor user experience and poor image management effect.
[0024] Therefore, after long-term research, the inventors have discovered and proposed the image processing method, device, electronic device, and storage medium provided in the embodiments of the present application, which can comprehensively evaluate the quality of each image in the image set by combining multiple types of quality indicators, and then the electronic device can accurately and efficiently manage the image set according to the comprehensive quality evaluation value. The specific image processing method is described in detail in the subsequent embodiments.
[0025] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of an image processing method provided by an embodiment of the present application. In a specific embodiment, the image processing method can be applied to Fig. 9 The image processing device 700 and the electronic device equipped with the image processing device 700 are shown in FIG. Fig.10 ). Figure 1 The process shown is described in detail, and the image processing method shown can specifically include the following steps:
[0026] Step S110: Obtain an image set to be processed.
[0027] In an embodiment of the present application, the electronic device can perform image quality assessment on the image set to be processed, so that the electronic device can appropriately process the image set according to the quality assessment result of the image set, thereby improving the management effect of the images stored in the electronic device. Specifically, the electronic device can first obtain the image set to be processed.
[0028] In some embodiments, the image set to be processed can be understood as a set of images that need to be processed. For example, it can be a set of images that need to be tested for image quality, or a set of images that need to be classified for image quality. It can be a set of images that need to be tested for overall quality, or a set of images that need to be tested for local quality. There is no limitation here.
[0029] In some embodiments, the electronic device may obtain the image set to be processed from the album management software for managing the pictures collected by the camera, or may receive the image set to be processed from the network terminal or other electronic devices. The specific acquisition method is not limited in the embodiments of the present application. Among them, the image set to be processed obtained by the electronic device may be one image set or multiple image sets. The specific number of image sets is not limited in the embodiments of the present application. If it is one image set, the electronic device can directly process the image set. If it is multiple image sets, the electronic device can process the multiple image sets in parallel, or can process the multiple image sets one by one. The specific image set processing method is not limited in the embodiments of the present application.
[0030] Among them, an image set can be obtained by combining multiple images, and the multiple images are associated with each other. Optionally, the association relationship may refer to that the multiple images in the image set are images of the same category. Among them, the same category can be the same person, or the same place, the same time, and the specific category is not limited. As a way, the electronic device can perform face recognition on the multiple stored images, and then the images of the same person can be divided into an image set, so that the electronic device can obtain the corresponding person image set. As another way, the electronic device can obtain the shooting locations corresponding to the multiple stored images, and then the images with associated shooting locations can be divided into an image set, so that the electronic device can obtain the corresponding environment image set. The specific image set generation method is not limited in the embodiment of the present application, and it is sufficient to have an association between the multiple images in the image set.
[0031] Step S120: obtaining multiple category evaluation values of each image in the image set.
[0032] In the embodiment of the present application, the quality of each image in the image set can be evaluated by multiple categories of quality indicators, so that multiple categories of evaluation values of each image can be obtained. In addition, the quality of the image can be comprehensively evaluated from different evaluation angles, avoiding the one-sidedness of the quality evaluation and improving the accuracy of the image quality evaluation. Among them, the multi-category evaluation value of an image is a set of evaluation values corresponding to an image under multiple categories of quality indicators, and the multi-category evaluation values correspond to the multi-category quality indicators one by one. In other words, the multi-category evaluation value includes the evaluation values corresponding to each quality indicator under the multi-category quality indicators.
[0033] In some embodiments, the above-mentioned multiple categories of quality indicators may include at least two of a posture indicator, an occlusion index, and a clarity index. Among them, the posture indicator can be used to evaluate whether the angle of an object in an image is abnormal, the occlusion index can be used to evaluate whether the occlusion state of an object in an image is abnormal, and the clarity index can be used to evaluate whether the clarity of an object in an image is abnormal. The specific type of quality indicator is not limited in the embodiments of the present application. For example, when the image set is a person image set, the above-mentioned multiple categories of quality indicators may also include at least two of a face posture indicator, an eye state indicator, a face occlusion index, and a face clarity index. Among them, the face posture indicator can be used to evaluate whether the angle of the face in the image is abnormal, the eye state indicator can be used to evaluate whether the open state of the eyes in the image is abnormal, the face occlusion index can be used to evaluate whether the occlusion state of the face in the image is abnormal, and the face clarity index can be used to evaluate whether the clarity of the face in the image is abnormal.
[0034] In some embodiments, the electronic device may evaluate each image in the image set according to multiple categories of quality indicators. Specifically, the electronic device may use an evaluation algorithm corresponding to multiple categories of quality indicators to evaluate each image in the image set in turn according to various quality indicators, so that the electronic device can obtain multiple categories of evaluation values for each image in the image set. In other embodiments, a server or other electronic device may evaluate each image in the image set according to multiple categories of quality indicators, and then send the multiple categories of evaluation values of each image in the image set to the electronic device, so that the electronic device can directly obtain the multiple categories of evaluation values for each image in the image set. The specific method for obtaining the multiple categories of evaluation values is not limited in the embodiments of the present application.
[0035] Step S130: Determine the weights of the multiple categories of quality indicators corresponding to the image set according to the multiple category evaluation values of each image.
[0036] In the embodiment of the present application, after obtaining the multi-class evaluation value of each image in the image set, the electronic device can determine the weight of the multi-class quality index corresponding to the image set according to the multi-class evaluation value of each image. Therefore, the weight distribution of the multi-class quality index in the image set can be specifically determined according to the overall evaluation of all images in the image set. In other words, for the same multi-class quality index, the weight distribution of each quality index is different in different image sets.
[0037] In some embodiments, the electronic device can determine the evaluation results of the image set as a whole under various quality indicators based on the multiple evaluation values of each image in the image set, and determine the overall evaluation results between various quality indicators based on the overall evaluation results corresponding to each quality indicator, so as to determine the weight value corresponding to each quality indicator based on the overall evaluation results.
[0038] As a method, the electronic device can determine the sum of the evaluation values of the image set as a whole under various quality indicators based on the multi-category evaluation values of each image in the image set, and then the electronic device can determine the weight value corresponding to each quality indicator based on the size of the sum of the evaluation values under various quality indicators. The larger the sum of the evaluation values, the higher the weight of the corresponding quality indicator, and the smaller the sum of the evaluation values, the lower the weight of the corresponding quality indicator.
[0039] As another way, the electronic device can also determine the evaluation average value of the image set under each quality index based on the multi-category evaluation value of each image in the image set, and then the electronic device can determine the weight value corresponding to each quality index based on the size of the evaluation average value under each quality index. The larger the evaluation average value, the higher the weight of the corresponding quality index, and the smaller the evaluation average value, the lower the weight of the corresponding quality index.
[0040] It can be understood that in the embodiments of the present application, fixed absolute weights are not used for the multi-category quality indicators. Instead, the weights of the multi-category quality indicators corresponding to the image set are determined based on the multi-category evaluation values of each image in the image set, so that the weights of the multi-category quality indicators can be adaptively adjusted according to different image sets, thereby making the weights of the multi-category quality indicators and the evaluation results more in line with the actual situation of the image set, thereby improving the accuracy of image quality evaluation.
[0041] Step S140: Obtaining a quality evaluation value of each image according to the weights of the multiple categories of quality indicators and the multiple categories of evaluation values of each image.
[0042] In an embodiment of the present application, after determining the weights of the multiple categories of quality indicators corresponding to the image set, the electronic device can obtain the quality evaluation value of each image according to the currently determined weights of the multiple categories of quality indicators and the multiple categories of evaluation values of each image in the image set. Among them, the quality evaluation value can be used to ensure the comprehensive evaluation of the image quality of each image under the multiple categories of quality indicators. In this way, by evaluating the image quality from multiple aspects, the obtained quality evaluation result can be made more objective, and the accuracy of image evaluation can be effectively improved.
[0043] In some embodiments, the electronic device can obtain the weights of each type of quality indicator based on the weights of multiple types of quality indicators, and can obtain the evaluation value of each image under each type of quality indicator based on the multiple types of evaluation values of each image. Then, the electronic device can perform weighted calculation on the evaluation values of each image under each type of quality indicator based on the weights of each type of quality indicator, so as to obtain the quality evaluation value of each image.
[0044] Step S150: Based on the quality assessment value, perform preset processing on the image set.
[0045] In an embodiment of the present application, after obtaining the quality evaluation value of each image in the image set, the electronic device can perform preset processing on the image set based on the quality evaluation value.
[0046] In some embodiments, the preset processing may be to classify images with lower quality assessment values in the image set, so that when the user views the images stored in the electronic device, the classified images are displayed preferentially or pop-up to confirm with the user whether to remove them. In other embodiments, the preset processing may be to classify images with higher quality assessment values in the image set, so that when the user configures the background image of the main interface of the electronic device, the classified images are displayed preferentially. The specific preset processing method is not limited in the embodiments of the present application. It is only necessary that the preset processing method be determined according to the quality assessment value. For example, the quality of images with lower quality assessment values in the image set may also be optimized.
[0047] The image processing method provided by the embodiment of the present application obtains an image set to be processed and obtains a multi-class evaluation value of each image in the image set, wherein the multi-class evaluation value is an evaluation value corresponding to a multi-class quality index, and the multi-class evaluation value corresponds to the multi-class quality index one by one, so that the electronic device can determine the weight of the multi-class quality index corresponding to the image set according to the multi-class evaluation value of each image in the image set, and can obtain the quality evaluation value of each image according to the weight of the multi-class quality index and the multi-class evaluation value of each image, so as to obtain a more comprehensive image quality evaluation result, and then the electronic device can perform preset processing on the image set based on the quality evaluation value. In this way, the weight of the multi-class quality index corresponding to the image set is determined by the multi-class evaluation value of each image in the image set, so that different image sets can be realized, and the weights of the multi-class quality indexes corresponding to them are also different. Then, the quality evaluation value of each image in the image set is determined by the weight of the multi-class quality index corresponding to the image set, so that the quality of each image in the image set can be evaluated based on the comprehensive quality of the image set, so as to achieve a more comprehensive image quality evaluation. Then, the electronic device can manage the image set accurately and efficiently according to the comprehensive quality evaluation value.
[0048] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of an image processing method provided by another embodiment of the present application. Figure 2 The process shown is described in detail, and the image processing method shown can specifically include the following steps:
[0049] Step S210: Obtain an image set to be processed.
[0050] In some embodiments, the image set to be processed may be a person image set, and all images in the person image set include the same person. In other embodiments, facial images of the same person may be extracted from the person image set to obtain a facial image set, and all facial images in the facial image set are of the same person. Optionally, the facial image set may also be obtained as the image set to be processed.
[0051] In some embodiments, the image set to be processed may also be a video image set obtained by extracting a combination of multiple frames of video images from a video. Each video image in the extracted video image set may contain the same person, that is, the electronic device may extract video image frames in which the same person appears from the video, thereby obtaining a video image set corresponding to the person. Thus, the video quality of the video may be determined by performing a quality assessment on each video image in the extracted video image set.
[0052] Step S220: Obtain multiple category evaluation values of each image in the image set.
[0053] In some embodiments, the electronic device may evaluate each image in the image set according to multiple categories of quality indicators, so that the electronic device can obtain multiple categories of evaluation values for each image in the image set.
[0054] As a method, when the multiple quality indicators include a target quality indicator, the electronic device can evaluate each image in the image set according to the target quality indicator. Figure 3 , step S220 may include:
[0055] Step S221: obtaining target parameters of each image in the image set, wherein the target parameters are parameters used to characterize the real state of the image under the target quality index.
[0056] In some embodiments, the electronic device may obtain a target parameter of each image in the image set, where the target parameter is a parameter used to characterize a real state of the image under a target quality index.
[0057] Among them, the type of target parameter has a corresponding relationship with the target quality index, that is, different quality indexes may correspond to different target parameter types. Optionally, when the target quality index is a face posture index, the target parameter may be a face posture parameter; when the target quality index is an eye state index, the target parameter may be an eye state parameter; when the target quality index is a face occlusion degree, the target parameter may be an occlusion degree parameter; when the target quality index is a face clarity, the target parameter may be a blur parameter or a clarity parameter of the face image. The specific type of target parameter and target quality index are not limited here.
[0058] In some embodiments, different quality indicators may correspond to different target parameter acquisition methods. The electronic device may acquire the target parameter of each image in the image set corresponding to the target quality indicator according to the target parameter acquisition method corresponding to the target quality indicator.
[0059] In some embodiments, when the target quality indicator is a face posture indicator, the target parameter acquisition method may be a face posture parameter acquisition method. As a method, the electronic device may detect the face area in the image through a face detection algorithm, and then obtain the pitch angle pitch, yaw angle yaw and roll angle roll of the face in the image through a head posture estimation algorithm as the face posture parameters of the image.
[0060] In other embodiments, when the target quality indicator is a human eye state indicator, the target parameter may be obtained in a manner that is a human eye state parameter. As one method, the electronic device may calculate the eyelid distance between the upper eyelid and the lower eyelid of the left eye and the right eye, respectively, based on the facial feature points in the image, as the human eye state parameter of the image. Among them, only the eyelid distance of the left eye may be used as the human eye state parameter of the image, or only the eyelid distance of the right eye may be used as the human eye state parameter of the image, or the average value of the eyelid distance of the left eye and the eyelid distance of the right eye may be obtained as the human eye state parameter of the image.
[0061] In some other embodiments, when the target quality metric is the degree of face occlusion, the acquisition method of the target parameter can be the acquisition method of the occlusion parameter. As a method, the electronic device can acquire the face image in the image, and then acquire the proportion parameter of the number of skin-color pixels or the proportion parameter of the number of non-skin-color pixels in the human eye image as the occlusion parameter. Among them, the electronic device can convert the face image from the RGB color space to the YCbCr color space, and then obtain the number of skin-color pixels, denoted as C, according to the pixel values of each pixel in the face image in the YCbCr color space. For example, when the red chroma value Cr in the pixel value satisfies 133 < Cr < 173 and the blue chroma value Cb satisfies 77 < Cb < 124, the pixel corresponding to the pixel value is a skin-color pixel. Then the electronic device can acquire the total number of pixels in the face image, and acquire the ratio of the number of skin-color pixels to the total number of pixels, denoted as P, as the occlusion parameter. It is expressed by formula (1) as:
[0062]
[0063] where NC is the number of non-skin-color pixels. It can be understood that the lower the proportion of the number of skin-color pixels, the more serious the face occlusion phenomenon.
[0064] Of course, the electronic device can also acquire the number of non-skin-color pixels in the face image, and acquire the ratio of the number of non-skin-color pixels to the total number of pixels as the occlusion parameter. It can be understood that the higher the proportion of the number of non-skin-color pixels, the more serious the face occlusion phenomenon.
[0065] In still some other embodiments, when the target quality metric is face sharpness, the acquisition method of the target parameter can be the acquisition method of the blurriness parameter or the sharpness parameter of the face image. As a method, the electronic device can calculate the blurriness parameter or the sharpness parameter of the image through the variance of Laplacian. In some cases, the higher the blurriness parameter, the higher the blurriness degree of the face image. It can also be that the higher the sharpness parameter, the higher the sharpness degree of the face image.
[0066] Step S222: Match the target parameter with a specified parameter to obtain a parameter matching result.
[0067] In the embodiments of the present application, after the electronic device acquires the target parameter of each image in the image set, it can match the target parameter with a specified parameter and obtain a parameter matching result. Among them, the parameter matching result can be that the target parameter is greater than the specified parameter, or the target parameter is not greater than the specified parameter, or the specific difference between the target parameter and the specified parameter. It is not limited here.
[0068] Among them, the specified parameters can be used to measure the baseline quality of the image under the target quality index. By matching the target parameters with the specified parameters, the difference between the quality of each image in the image set under the target quality index and the baseline quality can be determined, so that based on the difference, the evaluation value of each image in the image set under the target quality index can be determined.
[0069] In some embodiments, the specified parameters may be fixed parameters or variable parameters that are adaptively adjusted according to different image sets. They may be reasonably set according to specific quality indicators and are not limited here.
[0070] As a method, when the designated parameter is a variable parameter that is adaptively adjusted according to different image sets, the intermediate standard of the target parameters of all images in the image set can be used as the designated parameter. Specifically, before step S222, the image processing method of the present application can also include: according to the target parameter of each image, obtaining the intermediate value of all the target parameters in the image set as the designated parameter.
[0071] It can be understood that, since the electronic device obtains the target parameters of each image in the image set under the target quality index, it is equivalent to that the electronic device obtains all the target parameters of all the images in the image set under the target quality index. Therefore, the electronic device can obtain the maximum target parameter and the minimum target parameter among all the target parameters. At this time, it is equivalent to obtaining the upper and lower limits of the parameters that the target parameters in the image set can reach, so that the electronic device can obtain the middle value of the maximum target parameter and the minimum target parameter as the designated parameter for measuring the benchmark quality under the target quality index, that is, the middle horizontal line that the target parameters in the image set can reach is used to measure the benchmark quality under the target quality index. Therefore, the electronic device can compare the specific target parameters of each image with the middle value of the target parameters in the above image set to determine the quality of each image under the target quality index.
[0072] As an implementation method, when the target quality indicator is the eye state indicator and the target parameter is the eyelid distance of the image, the specified parameter can be the median value of all eyelid distances in the image set. As a method, when the average of the eyelid distance of the left eye and the eyelid distance of the right eye in the image is used as the final eyelid distance of the image (i.e., the target parameter), the electronic device can calculate the final eyelid distance for each image acquired in the image set, and then obtain the maximum value of the eyelid distance in the image set, recorded as Dmax, obtain the minimum value of the eyelid distance in the image set, recorded as Dmin, and finally obtain the middle value between the maximum and minimum values, recorded as Dmid, as the specified parameter corresponding to the image set. It can be expressed as:
[0073]
[0074] As another implementation, when the target quality indicator is the face occlusion degree, the target parameter may be a parameter of the skin color ratio of the number of skin color pixels in the face image to the total number of pixels, and the designated parameter may be the middle value of all skin color ratio parameters in the image set. The electronic device may calculate the skin color ratio parameter for each image acquired in the image set, and then obtain the maximum value of the skin color ratio parameter in the image set, recorded as Pmax, obtain the minimum value of the skin color ratio parameter in the image set, recorded as Pmin, and finally obtain the middle value between the maximum value and the minimum value, recorded as Pmid, as the designated parameter corresponding to the image set. It can be expressed as:
[0075]
[0076] As another way, when the designated parameter is a fixed parameter, a standard parameter under the target quality index may be used as the designated parameter.
[0077] As an implementation mode, when the target quality index is a face posture index, the target parameter may be a face posture parameter, and the specified parameter may be a preset standard posture parameter. Specifically, the above matching of the target parameter with the specified parameter may be to compare the face posture parameter with the standard posture parameter, so that the electronic device can obtain the posture rotation parameter of the face in each image as the parameter matching result.
[0078] Among them, the preset standard posture parameters can be pre-stored in the electronic device and can be set by the user, which is not limited here. For example, the preset standard posture parameters can be the posture parameters obtained when the front of the face is parallel to the screen plane of the electronic device. The electronic device can obtain the posture rotation parameters of the face by comparing the face posture parameters in the image with the standard posture parameters. It can be understood that when the face posture parameters are inconsistent with the standard posture parameters, it can be considered that the face in the image to be processed is deflected relative to the standard posture. When the face posture parameters are consistent with the standard posture parameters, it can be considered that the face in the image to be processed is not deflected relative to the standard posture.
[0079] In some embodiments, the facial posture parameters may include the pitch angle, yaw angle and roll angle of the face, and correspondingly, the facial posture rotation parameters may also include the pitch angle rotation parameters, yaw angle rotation parameters and roll angle rotation parameters of the face.
[0080] As another implementation, when the target quality indicator is face clarity, the target parameter may be a blurriness parameter or a clarity parameter, and the designated parameter may be a preset blurriness threshold or a clarity threshold. Specifically, the target parameter may be matched with the designated parameter by comparing the blurriness parameter with the blurriness threshold or by comparing the clarity parameter with the clarity threshold, so that the electronic device may obtain a parameter matching result. Exemplarily, by observing a large number of face images with different blurriness levels, it can be found that when the blurriness parameter of the image is greater than 800, the blurriness of the face image is more serious, so the blurriness threshold may be set to 800.
[0081] Step S223: Obtaining a target evaluation value of each image under the target quality index according to the parameter matching result.
[0082] In some embodiments, when the designated parameter is the middle value of all target parameters in the above-mentioned image set, the target evaluation value of each image under the target quality index can be determined according to the size relationship between the target parameter and the designated parameter.
[0083] As an implementation mode, when there is an image in the image set whose target parameter is less than the specified parameter corresponding to the image set, it can be considered that the image does not reach the reference quality under the target quality index, and the quality of the image under the target quality index is low. When there is an image in the image set whose target parameter is greater than the specified parameter corresponding to the image set, it can be considered that the image reaches the reference quality under the target quality index, and the quality of the image under the target quality index is not low.
[0084] As a method, if the evaluation score value interval is [0-100], the electronic device can directly determine the evaluation value of the image whose target parameter is less than the specified parameter as a smaller value, which can be 0, 1, 10, etc.
[0085] As another way, when the larger the target parameter is, the higher the quality of the image under the target quality index is, the target evaluation value of the image under the target quality index can be determined based on the target parameter value of the image and the specific position within the upper and lower limits of the target parameter corresponding to the image set. Specifically, the electronic device can obtain the first difference between the maximum target parameter and the maximum target parameter in the image set, and the difference is the upper and lower limits of the target parameter, and then obtain the second difference between the target parameter value of the image and the minimum target parameter, and the difference is the relative position of the target parameter value of the image within the above upper and lower limits. The electronic device obtains the ratio of the second difference to the first difference as the target evaluation value of the image under the target quality index. When the evaluation score value interval is [0-100], the ratio can be multiplied by 100 to map the ratio to the score value interval.
[0086] In some embodiments, the target evaluation value of the image under the target quality index may be determined based on the target parameter value of the image and the specific position within the upper and lower limits of the target parameter corresponding to the image set only when the target parameter is greater than the specified parameter. When the target parameter is less than the specified parameter, the electronic device may directly determine the evaluation value of the image whose target parameter is less than the specified parameter as a smaller value. For example, see 1. Figure 4 , step S223 may include:
[0087] Step S2231a: If the target parameter is greater than the specified parameter, the maximum target parameter and the minimum target parameter among all the target parameters are obtained.
[0088] Step S2232a: Obtain a first difference between the target parameter and the minimum target parameter.
[0089] Step S2233a: Obtain a second difference between the maximum target parameter and the minimum target parameter.
[0090] Step S2234a: Obtain a ratio of the first difference to the second difference as a target evaluation value of each image under the target quality index.
[0091] The electronic device can obtain the maximum target parameter and the minimum target parameter of all target parameters in the image set only when the target parameter is greater than the specified parameter. The maximum target parameter and the minimum target parameter can be used to characterize the upper threshold and the lower threshold of the target parameter. Then the electronic device can obtain the first difference between the target parameter and the minimum target parameter, and obtain the second difference between the maximum target parameter and the minimum target parameter. Among them, the second difference can be used to characterize the interval range of the target parameter in the image set, the first difference can be used to characterize the specific position of the target parameter of the image in the interval range, and the electronic device can obtain the ratio of the first difference to the second difference as the target evaluation value of the image under the target quality index. The ratio can be used to characterize the gap between the target parameter of the image and the upper limit of the interval range. That is, when the ratio is larger, it means that the target parameter of the image is closer to the upper limit of the interval range, that is, the target evaluation value of the image under the target quality index is higher and closer to the full score.
[0092] As an implementation method, when the target quality index is the eye state index and the target parameter is the eyelid distance of the image, the specified parameter may be the median value Dmid of all eyelid distances in the image set. The eye state evaluation value Escore of each image in the image set under the eye state index is expressed by formula (4):
[0093]
[0094] When the target parameter D of the image is less than Dmid, the electronic device can determine the human eye state evaluation value Escore of the image to be 1; when the target parameter D of the image is not less than Dmid, the electronic device can determine the human eye state evaluation value Escore of the image to be the first difference DD min and the second difference D max -D min The ratio is then multiplied by 100 to normalize to [0,100].
[0095] As another implementation, when the target quality indicator is the face occlusion degree, the target parameter may be a parameter of the skin color ratio of the number of skin color pixels in the face image to the total number of pixels, and the specified parameter may be the median value Pmid of all skin color ratio parameters in the image set. The occlusion evaluation value Cscore of each image in the image set under the face occlusion degree is expressed by formula (5) as follows:
[0096]
[0097] When the target parameter P of the image is less than Pmid, it can be considered that serious occlusion has occurred, and the electronic device can determine the occlusion evaluation value Cscore of the image as 1. When the target parameter P of the image is not less than Pmid, the electronic device can determine the occlusion evaluation value Cscore of the image as the first difference PP min and the second difference P max -P min The ratio is then multiplied by 100 to normalize to [0,100].
[0098] As another way, when the larger the target parameter, the lower the quality of the image under the target quality index, the target evaluation value of the image under the target quality index can also be determined according to the target parameter value of the image, and the specific position within the upper and lower limits of the target parameter corresponding to the image set. Specifically, the electronic device can obtain the first difference between the maximum target parameter and the minimum target parameter in the image set, and the difference is the upper and lower limits of the target parameter, and then obtain the second difference between the target parameter value of the image and the maximum target parameter, and the difference is the relative position of the target parameter value of the image in the above upper and lower limits. The electronic device obtains the ratio of the second difference to the first difference as the target evaluation value of the image under the target quality index. When the evaluation score value interval is [0-100], the ratio can be multiplied by 100 to map the ratio to the score value interval. Thereby, the larger the target evaluation value, the higher the quality of the image under the target quality index.
[0099] In some embodiments, when the designated parameter is the fixed parameter, the target evaluation value of each image under the target quality index may also be determined according to the size difference relationship between the target parameter and the designated parameter.
[0100] As a method, when the target parameter is a face posture parameter, wherein the face posture parameter may include the pitch angle, yaw angle and roll angle of the face, the above-mentioned specified parameter may be a preset standard posture parameter, wherein the standard posture parameter may include the standard pitch angle, standard yaw angle and standard roll angle of the face. The target parameter is matched with the specified parameter, and the parameter matching result obtained may be the posture rotation parameter of the face, wherein the posture rotation parameter of the face may include the pitch angle rotation parameter, yaw angle rotation parameter and roll angle rotation parameter of the face. Thus, the electronic device can determine the face posture evaluation value of the image under the face posture index according to the specific matching results of each angle.
[0101] Specifically, see Figure 5 , step S223 may include:
[0102] Step S2231b: normalize the pitch angle rotation parameter, the yaw angle rotation parameter, and the roll angle rotation parameter respectively to obtain normalized data corresponding to each rotation parameter.
[0103] In some embodiments, after comparing the facial posture parameters of an image with the preset standard posture parameters, the electronic device can obtain the rotation parameters of the pitch angle, yaw angle and roll angle of the face. Thus, the electronic device can determine the facial posture evaluation value of the image under the facial posture index according to each angle rotation parameter. Specifically, the electronic device can normalize the pitch angle rotation parameter, the yaw angle rotation parameter and the roll angle rotation parameter respectively to obtain normalized data corresponding to each rotation parameter.
[0104] As a method, the electronic device may first obtain the total value of the rotation parameters of the pitch angle rotation parameter, the yaw angle rotation parameter, and the roll angle rotation parameter, and then respectively obtain a first ratio of the pitch angle rotation parameter to the total value of the rotation parameters, obtain a second ratio of the yaw angle rotation parameter to the total value of the rotation parameters, and obtain a third ratio of the roll angle rotation parameter to the total value of the rotation parameters. The first ratio may be used as normalized data corresponding to the pitch angle rotation parameter, the second ratio may be used as normalized data corresponding to the yaw angle rotation parameter, and the third ratio may be used as normalized data corresponding to the roll angle rotation parameter.
[0105] Exemplarily, if the standard pitch angle = 180°, the standard yaw angle = 0°, and the standard roll angle = 0° in the preset standard posture parameters, the electronic device compares the pitch angle pitch, yaw angle, and roll angle roll in the face posture parameters of an image with the standard pitch angle, standard yaw angle, and standard roll angle in the standard posture parameters, and the obtained pitch angle rotation parameter is 180-|pitch|, the yaw angle rotation parameter is |yaw|, and the roll angle rotation parameter is |roll|. Then the electronic device can normalize the pitch angle rotation parameter, the yaw angle rotation parameter, and the roll angle rotation parameter, respectively, to obtain the normalized data corresponding to each rotation parameter. It can be expressed as formula (6):
[0106]
[0107] Among them, w 1 is the normalized data corresponding to the pitch angle rotation parameter, w 2 is the normalized data corresponding to the yaw angle rotation parameter, w 3 It is the normalized data corresponding to the roll angle rotation parameter.
[0108] Step S2232b: Determine the weight corresponding to each rotation parameter according to the normalized data corresponding to each rotation parameter.
[0109] Step S2233b: According to the weights corresponding to the rotation parameters, the pitch angle rotation parameter, the yaw angle rotation parameter and the roll angle rotation parameter are weightedly calculated to obtain a face posture evaluation value of each image under the face posture index.
[0110] In some embodiments, since the value range of normalized data is [0-1], the value range of weight is also [0-1], therefore, the normalized data corresponding to each rotation parameter can be directly used as the weight corresponding to each rotation parameter. Thus, the electronic device can perform weighted calculation on the pitch angle rotation parameter, the yaw angle rotation parameter and the roll angle rotation parameter according to the weight corresponding to each rotation parameter, and obtain the face posture evaluation value of each image under the face posture index.
[0111] For example, you can change the w in the above example to 1 As the weight coefficient corresponding to the pitch angle rotation parameter, w 2 As the weight coefficient corresponding to the yaw angle rotation parameter, w 3 As the weight coefficient corresponding to the roll angle rotation parameter. The electronic device can obtain the face posture evaluation value R of each image under the face posture index, which is expressed by formula (7):
[0112] R=w 1 (180-|pitch|)+w 2|yaw|+w 3 |roll| (7)
[0113] In some embodiments, since the various rotation angles of the face cannot be greater than 90°, the face posture evaluation value R can be standardized to [0,100] by formula (8), so that the standardized face posture evaluation value Rscore can be obtained and used as the face posture evaluation value of the image under the face posture index. Wherein, formula (8) can be expressed as:
[0114] R score =100-R (8)
[0115] It is understandable that when the various rotation angles of the face are larger, the face posture evaluation value R is larger, and thus the standardized face posture evaluation value Rscore is smaller. In other words, the more serious the face posture in the image deviates from the standard posture, the lower the face posture evaluation value of the image under the face posture index.
[0116] As another way, when the target quality indicator is face definition and the target parameter is a blur parameter, the designated parameter may be a preset blur threshold. The target parameter is matched with the designated parameter, and the parameter matching result obtained may be the relationship between the blur parameter and the blur threshold, or the difference between the blur parameter and the blur threshold. The electronic device may also determine the definition evaluation value of the image under face definition according to the specific parameter matching result.
[0117] In some embodiments, the larger the blurriness parameter is, the more severe the blurriness of the facial image is, that is, the lower the quality of the image at face clarity. If the blurriness parameter of the facial image reaches the blurriness threshold, the facial image blur is more severe. Therefore, the clarity evaluation value of the image at face clarity can be determined by judging the size of the blurriness parameter of the image and the blurriness threshold.
[0118] As an implementation mode, when there is an image in the image set whose blurriness parameter is less than a preset blurriness threshold, it can be considered that the image does not reach the benchmark quality under the face clarity index, and the image blur is relatively serious. At this time, the electronic device can directly determine the clarity evaluation value of the image whose blurriness parameter is less than the blurriness threshold as a smaller value. When there is an image in the image set whose blurriness parameter is less than a preset blurriness threshold, it can be considered that the image reaches the benchmark quality under the face clarity index, and the image blur is not very serious. At this time, the electronic device can determine the clarity evaluation value of the image under the face clarity index based on the difference between the blurriness parameter of the image and the blurriness threshold.
[0119] It can be understood that when the blur parameter of an image is less than the blur threshold, if the difference between the blur parameter and the blur threshold is smaller, it can be shown that the blur parameter is closer to the blur threshold, that is, the blur of the image begins to deepen step by step, and the clarity evaluation value of the image under the face clarity index will be lower. On the contrary, if the difference between the blur parameter and the blur threshold is larger, it can be shown that the blur parameter is farther away from the blur threshold, that is, the blur of the image begins to weaken step by step, the clarity is getting higher and higher, and the clarity evaluation value of the image under the face clarity index will be higher.
[0120] As a method, the electronic device can obtain a third difference between the blur parameter and the blur threshold when the blur parameter of the image is less than the blur threshold, and obtain a ratio of the third difference to the blur threshold as the clarity evaluation value of the image under the face clarity index. The ratio can be used to characterize the difference between the blur parameter and the blur threshold. The larger the ratio, the larger the difference between the blur parameter and the blur threshold, the higher the clarity of the image, and the higher the clarity evaluation value of the image under the face clarity index.
[0121] For example, if the blur threshold is set to 800, the electronic device can obtain the clarity evaluation value Bscore of the image under the face clarity index, which is expressed by formula (9):
[0122]
[0123] Among them, when the blur parameter B of the image is not less than 800, the electronic device can directly determine the clarity evaluation value Bscore of the image as 1. When the blur parameter B of the image is less than 800, the electronic device can determine the clarity evaluation value Bscore of the image as the ratio of the above-mentioned third difference 800-B to 800, and then multiply it by 100 to standardize it to [0,100].
[0124] Step S230: Obtaining an evaluation mean value of each type of quality indicator corresponding to the image set according to the multi-type evaluation values of each image.
[0125] In an embodiment of the present application, after obtaining multiple categories of evaluation values for each image in the image set, the electronic device can obtain the evaluation mean of each category of quality indicators corresponding to the image set, so as to determine the weight of each category of quality indicators corresponding to the image set according to the evaluation mean of each category of quality indicators. Specifically, the electronic device can obtain the target evaluation value of each image in the image set under the target quality indicator, and then sum them up to obtain the sum of the target evaluation values of all images in the image set under the target quality indicator. Then the electronic device obtains the number of images in the image set, and obtains the ratio of the sum of the target evaluation values to the number of images, so as to obtain the evaluation mean of the image set under the target quality indicator. Among them, the target quality indicator is any quality indicator among the multiple categories of quality indicators. The electronic device repeats the above method for each category of quality indicators among the multiple categories of quality indicators, so as to obtain the evaluation mean of each category of quality indicators corresponding to the image set.
[0126] Exemplarily, when the multiple categories of quality indicators are the above-mentioned face posture indicator, eye state indicator, face occlusion index and face clarity index, the electronic device can obtain the evaluation mean Rmean of the image set under the face posture indicator, the evaluation mean Emean under the eye state indicator, the evaluation mean Cmean under the face occlusion index, and the evaluation mean Bmean under the face clarity index.
[0127] Step S240: normalizing the evaluation mean of each type of quality indicator respectively to obtain normalized data corresponding to the evaluation mean of each type of quality indicator.
[0128] In an embodiment of the present application, after obtaining the evaluation mean of each type of quality indicator corresponding to the image set, the electronic device can normalize the evaluation mean of each type of quality indicator respectively, so as to obtain normalized data corresponding to the evaluation mean of each type of quality indicator.
[0129] In some embodiments, when the value ranges of the evaluation values of various quality indicators are inconsistent, the evaluation values of various quality indicators can be mapped to the same value range, so as to extract the accuracy of the processing when the various quality indicators are subsequently subjected to comprehensive processing (such as normalization processing, comprehensive evaluation, etc. involving calculation processing between the evaluation values of multiple types of quality indicators). For example, when the value range of the evaluation value of quality indicator A is [0,1] and the value range of the evaluation value of quality indicator B is [0,100], the value ranges of the evaluation values of quality indicators A and B can be mapped to the same value range [0,100], that is, the evaluation value of quality indicator A needs to be multiplied by 10, while the evaluation value of quality indicator B can remain unchanged.
[0130] For details, please refer to Figure 6 , step S240 may include:
[0131] Step S241: Obtain the total value of the evaluation mean of each type of quality indicator.
[0132] Step S242: respectively obtain the ratio of the evaluation mean of each type of quality indicator to the total value as the normalized data corresponding to the evaluation mean of each type of quality indicator.
[0133] In the embodiment of the present application, the electronic device can obtain the total value of the evaluation mean of each type of quality indicator, and respectively obtain the ratio of the evaluation mean of each type of quality indicator to the total value, as the normalized data corresponding to the evaluation mean of each type of quality indicator. Among them, the ratio of the evaluation mean of each type of quality indicator to the total value can also be understood as the proportion of the evaluation of each type of quality indicator.
[0134] It can be understood that the higher the evaluation mean of a quality indicator, the higher the ratio of the evaluation mean of the quality indicator to the total value, the higher the evaluation proportion of the quality indicator, and the higher the importance of the quality indicator.
[0135] Exemplarily, when the multiple quality indicators are the above-mentioned face posture indicator, eye state indicator, face occlusion indicator and face clarity indicator, the evaluation mean of the image set under the face posture indicator is Rmean, the evaluation mean under the eye state indicator is Emean, the evaluation mean under the face occlusion indicator is Cmean, and the evaluation mean under the face clarity indicator is Bmean. The electronic device can normalize the evaluation mean of each quality indicator separately, which can be expressed as follows using formulas (10) and (11):
[0136] S um_mean =R mean +E mean +C mean +B mean (10)
[0137]
[0138] Among them, S um_mean is the total value of the evaluation mean of each type of quality indicator, W R is the normalized data corresponding to the face posture index, W E is the normalized data corresponding to the human eye status index, W C is the normalized data corresponding to the face occlusion index, W B Normalized data corresponding to the face clarity index.
[0139] Step S250: determining the weight of each type of quality indicator corresponding to the image set according to the normalized data corresponding to each type of quality indicator.
[0140] In some embodiments, since the numerical range of normalized data is [0-1], the numerical range of weight is also [0-1], therefore, the normalized data corresponding to each type of quality indicator can be directly used as the weight of each type of quality indicator corresponding to the image set. Thus, the electronic device can obtain the comprehensive quality evaluation value of each image under multiple types of quality indicators according to the weight of each type of quality indicator corresponding to the image set. Thus, the weight of each type of quality indicator corresponding to each image set is determined by the evaluation of each type of quality indicator in each image set. The adaptive adjustment of the weights of multiple types of quality indicators is realized, and the weights according to the adaptive adjustment can more accurately reflect the quality of the image set.
[0141] Step S260: Obtain the quality evaluation value of each image according to the weights of the multiple categories of quality indicators and the multiple categories of evaluation values of each image.
[0142] The electronic device can obtain the quality evaluation value of each image according to the weights of the multiple quality indicators and the multiple evaluation values of each image. Figure 7 , step S260 may include:
[0143] Step S261: Obtain the weight of each type of quality indicator among the multiple types of quality indicators.
[0144] Step S262: performing weighted calculation on the evaluation values corresponding to the various quality indicators according to the weights of the various quality indicators to obtain the quality evaluation value of each image.
[0145] The electronic device can obtain the weights of each quality indicator among the multiple quality indicators, and then obtain the quality evaluation value of each image according to the weights of the multiple quality indicators and the multiple evaluation values of each image. Thus, according to the weights of the various quality indicators corresponding to the image set, a comprehensive quality evaluation is performed on each image in the image set in turn, which can more accurately reflect the quality of the image set and improve the accuracy of the quality evaluation.
[0146] Exemplarily, when the multiple types of quality indicators are the above-mentioned face posture indicator, eye state indicator, face occlusion indicator and face clarity indicator, the electronic device obtains the quality evaluation value of each image, which can be expressed by formula (12):
[0147] Q face =W R R score +W E E score +W c C score +W B B score (12)
[0148] Among them, Qface After combining multiple types of quality indicators, the quality evaluation value of each image is obtained. In this way, the linear weighting coefficient corresponding to the image set is calculated by combining the face posture index, eye state index, face occlusion index and face clarity index corresponding to the image set. Then, each image in the image set is comprehensively evaluated based on the linear weighting coefficient corresponding to the image set, and finally the comprehensive image quality index of each image is obtained, which improves the accuracy of quality evaluation and thus improves the image management effect.
[0149] Step S270: Based on the quality assessment value, perform preset processing on the image set.
[0150] In some embodiments, the electronic device may screen out images with poor quality in the image set based on the quality evaluation value of each image in the image set and remind the user. Figure 8 , step S270 may include:
[0151] Step S271: based on the quality evaluation value, obtaining a target image in the image set whose quality evaluation value is less than a preset evaluation value.
[0152] Step S272: Generate image prompt information according to the target image, wherein the image prompt information is used to prompt whether to delete the target image.
[0153] The preset evaluation value may be an evaluation standard value used to measure the comprehensive quality of an image, and may be set by a user or may be a factory default setting, which is not limited here.
[0154] It is understandable that when there is an image in the image set whose quality evaluation value is less than the preset evaluation value, it can be considered that the image quality is relatively low when multiple types of quality indicators and the overall evaluation value of the image set are comprehensively considered. When there is an image in the image set whose quality evaluation value is greater than the preset evaluation value, it can be considered that the image quality is relatively high when multiple types of quality indicators and the overall evaluation value of the image set are comprehensively considered. Therefore, in some embodiments, the electronic device can automatically classify images with relatively low quality to prompt the user whether to delete them, thereby reducing the user's judgment of low-quality images with the human eye, thereby improving the user's image management experience.
[0155] Specifically, the electronic device can obtain all target images in the image set whose quality evaluation values are less than a preset evaluation value based on the quality evaluation value, and then generate image prompt information based on the target image, and the image prompt information is used to prompt the user whether to delete the target image.
[0156] The image processing method provided by the embodiment of the present application obtains an image set to be processed and obtains the multi-class evaluation value of each image in the image set, so that the electronic device can obtain the evaluation mean of each class of quality indicators corresponding to the image set according to the multi-class evaluation value of each image in the image set, and normalize the evaluation mean of each class of quality indicators respectively to obtain the normalized data corresponding to the evaluation mean of each class of quality indicators, so that the electronic device can determine the weight of the multi-class quality indicators corresponding to the image set according to the normalized data corresponding to each class of quality indicators, and can obtain the quality evaluation value of each image according to the weight of the multi-class quality indicators and the multi-class evaluation value of each image, so as to obtain a more comprehensive image quality evaluation result, and then the electronic device can perform preset processing on the image set based on the quality evaluation value. In this way, the adaptive adjustment of the weight of the multi-class quality indicators is realized, and the quality evaluation value of each image in the image set can be determined by the weight of the multi-class quality indicators adjusted adaptively, so that the quality of each image in the image set can be evaluated based on the comprehensive quality of the image set, so as to realize a more comprehensive image quality evaluation. Then, the electronic device can manage the image set accurately and efficiently according to the comprehensive quality evaluation value. In addition, by comprehensively considering multiple quality indicators such as face posture index, eye state index, face occlusion index and face clarity index, the accuracy and completeness of image quality evaluation are also improved.
[0157] See also Fig. 9 , which shows a structural block diagram of an image processing device 700 provided in an embodiment of the present application, and the image processing device 700 includes: an image acquisition module 710, an index evaluation acquisition module 720, an index weight acquisition module 730, a quality evaluation acquisition module 740 and an image processing module 750. Among them, the image acquisition module 710 is used to acquire a set of images to be processed; the index evaluation acquisition module 720 is used to acquire a multi-class evaluation value of each image in the image set, wherein the multi-class evaluation value is an evaluation value corresponding to a multi-class quality index, and the multi-class evaluation value corresponds to the multi-class quality index one by one; the index weight acquisition module 730 is used to determine the weight of the multi-class quality index corresponding to the image set according to the multi-class evaluation value of each image; the quality evaluation acquisition module 740 is used to acquire the quality evaluation value of each image according to the weight of the multi-class quality index and the multi-class evaluation value of each image; the image processing module 750 is used to perform preset processing on the image set based on the quality evaluation value.
[0158] In some embodiments, the indicator weight acquisition module 730 may include: a mean acquisition module, used to obtain the evaluation mean of each type of quality indicator corresponding to the image set according to the multi-category evaluation values of each image; a mean normalization module, used to normalize the evaluation mean of each type of quality indicator respectively to obtain the normalized data corresponding to the evaluation mean of each type of quality indicator; an indicator weight determination module, used to determine the weight of each type of quality indicator corresponding to the image set according to the normalized data corresponding to each type of quality indicator.
[0159] In some embodiments, the above-mentioned mean normalization module can be specifically used to: obtain the total value of the evaluation mean of each type of quality indicator; obtain the ratio of the evaluation mean of each type of quality indicator to the total value as the normalized data corresponding to the evaluation mean of each type of quality indicator.
[0160] In some embodiments, when the above-mentioned multiple categories of quality indicators include a target quality indicator, the indicator evaluation acquisition module 720 may include: a parameter acquisition unit, used to acquire the target parameters of each image in the image set, and the target parameters are parameters used to characterize the actual state of the image under the target quality indicator; a parameter matching unit, used to match the target parameters with specified parameters to obtain parameter matching results; a target value acquisition unit, used to obtain the target evaluation value of each image under the target quality indicator based on the parameter matching results.
[0161] In some embodiments, the image processing device 700 may further include: a designated parameter acquisition module, configured to acquire, according to the target parameter of each image, an intermediate value of all target parameters in the image set as a designated parameter.
[0162] In some embodiments, the above-mentioned target value acquisition unit can be specifically used for: if the target parameter is greater than the specified parameter, then obtaining the maximum target parameter and the minimum target parameter among all the target parameters to obtain the first difference between the target parameter and the minimum target parameter; obtaining the second difference between the maximum target parameter and the minimum target parameter; obtaining the ratio of the first difference to the second difference as the target evaluation value of each image under the target quality indicator.
[0163] In some embodiments, when the above-mentioned target quality indicator is a face posture indicator, the above-mentioned target parameter is a face posture parameter, the above-mentioned specified parameter is a preset standard posture parameter, and the above-mentioned parameter matching unit can also be specifically used to: compare the face posture parameter with the standard posture parameter to obtain the posture rotation parameter of the face in each image as the parameter matching result.
[0164] In some embodiments, when the above-mentioned facial posture parameters include the pitch angle, yaw angle and roll angle of the face, the above-mentioned facial posture rotation parameters may include the pitch angle rotation parameter, yaw angle rotation parameter and roll angle rotation parameter of the face. The above-mentioned target value acquisition unit may be specifically used to: respectively normalize the pitch angle rotation parameter, yaw angle rotation parameter and roll angle rotation parameter to obtain normalized data corresponding to each rotation parameter; determine the weight corresponding to each rotation parameter according to the normalized data corresponding to each rotation parameter; perform weighted calculation on the pitch angle rotation parameter, yaw angle rotation parameter and roll angle rotation parameter according to the weight corresponding to each rotation parameter to obtain the facial posture evaluation value of each image under the facial posture index.
[0165] In some embodiments, the above-mentioned quality assessment acquisition module 740 can be specifically used to: obtain the weight of each type of quality indicator among the multiple types of quality indicators; according to the weight of each type of quality indicator, perform weighted calculation on the evaluation values corresponding to each type of quality indicator to obtain the quality assessment value of each image.
[0166] In some embodiments, the above-mentioned image processing module 750 may include: based on the quality assessment value, obtaining a target image in the image set whose quality assessment value is less than a preset assessment value; based on the target image, generating image prompt information, and the image prompt information is used to prompt whether to delete the target image.
[0167] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0168] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0169] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0170] In summary, the image processing device provided in the embodiment of the present application is used to implement the corresponding image processing method in the aforementioned method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0171] Please refer to Fig.10, which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be a terminal device such as a PC, a mobile terminal, etc. that can run an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0172] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0173] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.
[0174] Understandably, Fig.10The structure shown is only an example, and the electronic device 100 may also include Fig.10 More or fewer components as shown, or with Fig.10 The embodiment of the present application is not limited to this.
[0175] Please refer to Fig.11 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0176] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An image processing method, It is characterized in that Applied to electronic equipment, the method comprises: Get the image set to be processed; Obtaining a multi-class evaluation value for each image in the image set, wherein the multi-class evaluation value is an evaluation value corresponding to a multi-class quality indicator, and the multi-class evaluation value corresponds to the multi-class quality indicator in a one-to-one manner; According to the multi-category evaluation values of each image, obtaining the evaluation mean value of each category of quality indicators corresponding to the image set; Normalizing the evaluation mean of each type of quality indicator respectively to obtain normalized data corresponding to the evaluation mean of each type of quality indicator; The normalized data corresponding to each type of quality indicator is used as the weight of each type of quality indicator corresponding to the image set; Obtaining a quality evaluation value of each image according to the weights of the multiple categories of quality indicators and the multiple categories of evaluation values of each image; Based on the quality assessment value, a preset process is performed on the image set.
2. The method according to claim 1, It is characterized in that The respectively normalizing the evaluation mean of each type of quality indicator to obtain normalized data corresponding to the evaluation mean of each type of quality indicator includes: Obtaining the total value of the evaluation mean of each type of quality indicator; The ratio of the evaluation mean value of each type of quality indicator to the total value is obtained respectively as the normalized data corresponding to the evaluation mean value of each type of quality indicator.
3. The method according to claim 1, It is characterized in that When the multiple categories of quality indicators include a target quality indicator, obtaining the multiple categories of evaluation values of each image in the image set includes: Acquire a target parameter of each image in the image set, wherein the target parameter is a parameter used to characterize a real state of the image under the target quality index; Matching the target parameter with the specified parameter to obtain a parameter matching result; According to the parameter matching result, a target evaluation value of each image under the target quality index is obtained.
4. The method according to claim 3, It is characterized in that Before matching the target parameter with the specified parameter to obtain a parameter matching result, the method further includes: According to the target parameter of each image, the middle value of all the target parameters in the image set is obtained as the designated parameter.
5. The method according to claim 4, It is characterized in that The step of obtaining a target evaluation value of each image under the target quality index according to the parameter matching result includes: If the target parameter is greater than the specified parameter, obtaining the maximum target parameter and the minimum target parameter among all the target parameters; Obtaining a first difference between the target parameter and the minimum target parameter; Obtaining a second difference between the maximum target parameter and the minimum target parameter; A ratio of the first difference to the second difference is obtained as a target evaluation value of each image under the target quality index.
6. The method according to claim 3, It is characterized in that When the target quality index is a face posture index, the target parameter is a face posture parameter, the designated parameter is a preset standard posture parameter, and matching the target parameter with the designated parameter to obtain a parameter matching result includes: The face posture parameters are compared with the standard posture parameters to obtain the posture rotation parameters of the face in each image as the parameter matching result.
7. The method according to claim 6, It is characterized in that When the face posture parameters include the pitch angle, yaw angle and roll angle of the face, the face posture rotation parameters include the pitch angle rotation parameter, yaw angle rotation parameter and roll angle rotation parameter of the face, and obtaining the target evaluation value of each image under the target quality index according to the parameter matching result, comprises: Normalizing the pitch angle rotation parameter, the yaw angle rotation parameter, and the roll angle rotation parameter respectively to obtain normalized data corresponding to each rotation parameter; Determining weights corresponding to the rotation parameters according to the normalized data corresponding to the rotation parameters; According to the weights corresponding to the rotation parameters, the pitch angle rotation parameter, the yaw angle rotation parameter and the roll angle rotation parameter are weightedly calculated to obtain a face posture evaluation value of each image under the face posture index.
8. The method according to any one of claims 1 to 7, It is characterized in that The obtaining, according to the weights of the multiple categories of quality indicators and the multiple categories of evaluation values of each image, the quality evaluation value of each image comprises: Obtaining weights of various quality indicators among the multiple quality indicators; According to the weights of the various quality indicators, weighted calculation is performed on the evaluation values corresponding to the various quality indicators to obtain the quality evaluation value of each image.
9. The method according to any one of claims 1 to 7, It is characterized in that The performing preset processing on the image set based on the quality evaluation value comprises: Based on the quality evaluation value, acquiring a target image in the image set whose quality evaluation value is less than a preset evaluation value; Image prompt information is generated according to the target image, and the image prompt information is used to prompt whether to delete the target image.
10. An image processing device, It is characterized in that Applied to electronic equipment, the device comprises: An image acquisition module, used to acquire a set of images to be processed; An indicator evaluation acquisition module, used to obtain multiple categories of evaluation values for each image in the image set, wherein the multiple categories of evaluation values are evaluation values corresponding to multiple categories of quality indicators, and the multiple categories of evaluation values correspond to the multiple categories of quality indicators in a one-to-one manner; The indicator weight acquisition module is used to obtain the evaluation mean of each type of quality indicator corresponding to the image set according to the multi-category evaluation values of each image; normalize the evaluation mean of each type of quality indicator respectively to obtain the normalized data corresponding to the evaluation mean of each type of quality indicator; and use the normalized data corresponding to each type of quality indicator as the weight of each type of quality indicator corresponding to the image set; A quality assessment acquisition module, used to acquire a quality assessment value of each image according to the weights of the multiple categories of quality indicators and the multiple categories of assessment values of each image; An image processing module is used to perform preset processing on the image set based on the quality assessment value.
11. An electronic device, It is characterized in that include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1-9.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Image processing method and device
CN110895802A
Face photo quality evaluation method, system and device and storage medium
CN111160284A
