Image processing method and device, electronic equipment and medium
By acquiring and correcting the blur score of image information collected by the camera in electronic devices, the problem of low reliability of the aesthetic score of blurred image information is solved, and more accurate image quality evaluation and user experience improvement is achieved.
Patent Information
- Application Number
- CN202310728036.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the camera of an electronic device has low reliability in aesthetic scores when the image information is blurred, resulting in the blurred image information being still saved, affecting the user experience.
By obtaining the image information collected by the camera, determining its blur score, and correcting it based on the blur score and aesthetic score, a second aesthetic score is obtained, thereby improving the reliability of aesthetic scores.
Correction of aesthetic scores by fuzzy scores can more accurately reflect the blurring of image information, improve the reliability of aesthetic scores, identify and discard blurred image information, and improve user experience.
Smart Images

Figure CN119168931A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and medium. Background Art
[0002] At present, after collecting image information, the camera of the electronic device will determine the aesthetic score of the image information and save the image information with a high aesthetic score in the electronic device. However, when the image information is blurred, the aesthetic score has the problem of low reliability. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, electronic device and medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, the image processing method comprising:
[0005] Get the image information collected by the camera;
[0006] determining a blur score for the image information;
[0007] A second aesthetic score for the image information is determined based on the blur score and the first aesthetic score for the image information.
[0008] In some embodiments of the present disclosure, determining the blur score of the image information includes:
[0009] When the image information satisfies the correction condition, a blur score of the image information is determined.
[0010] In some embodiments of the present disclosure, the image information satisfies a correction condition, including:
[0011] The detail representation value of the image information is less than a first threshold;
[0012] Determining the blur score of the image information includes:
[0013] A blur score of the image information is determined according to the detail level representation value.
[0014] In some embodiments of the present disclosure, the image processing method further includes:
[0015] Determining an acquisition mode corresponding to the image information;
[0016] Calculating a detail representation value of the image information according to an acquisition mode corresponding to the image information;
[0017] The acquisition mode includes a first mode and a second mode, the first mode corresponds to shooting with a moving camera, and the second mode corresponds to shooting with a stationary camera.
[0018] In some embodiments of the present disclosure, determining the acquisition mode corresponding to the image information includes:
[0019] Determine the acquisition mode corresponding to the image information according to the shooting function turned on during the acquisition of the image information; or
[0020] Determine the acquisition mode corresponding to the image information according to the acceleration sensor and / or the angular velocity sensor; or,
[0021] The acquisition mode corresponding to the image information is determined according to the similarity of multiple frames of image information adjacent to the image information.
[0022] In some embodiments of the present disclosure, the calculating the detail representation value of the image information according to the acquisition mode corresponding to the image information includes:
[0023] When the image information corresponds to the first mode, calculating the overall detail degree of the image information, and determining the detail degree representation value to be the overall detail degree;
[0024] When the image information corresponds to the second mode, the overall detail level and at least one local detail level of the image information are calculated, and the detail level representation value is determined according to the overall detail level and the at least one local detail level.
[0025] In some embodiments of the present disclosure, determining the detail level representation value according to the overall detail level and the at least one local detail level includes:
[0026] Determine the weights corresponding to the overall detail level and the local detail level;
[0027] A weighted sum of the global detail level and the local detail level is taken as the detail level representation value.
[0028] In some embodiments of the present disclosure, determining the acquisition mode corresponding to the image information according to the similarity of multiple frames of image information adjacent to the image information includes:
[0029] When the similarity is less than a second threshold, determining that the image information corresponds to the first mode;
[0030] When the similarity is greater than or equal to the second threshold, it is determined that the image information corresponds to the second mode.
[0031] In some embodiments of the present disclosure, determining the blur score of the image information according to the detail level representation value includes:
[0032] Dividing the detail level representation value by a first preset value to obtain a target representation value;
[0033] Performing a logarithmic operation on the target representation value to obtain the fuzzy score;
[0034] Wherein, the first preset value is greater than or equal to the first threshold.
[0035] In some embodiments of the present disclosure, determining the blur score of the image information according to the detail level representation value includes:
[0036] Dividing the detail level representation value by a second preset value to obtain the blur score;
[0037] Wherein, the second preset value is greater than or equal to the first threshold;
[0038] Determining a second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information includes:
[0039] The product of the first aesthetic score and the fuzzy score is determined as the second aesthetic score.
[0040] In some embodiments of the present disclosure, determining the second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information includes:
[0041] When the fuzzy score is less than zero, the sum of the first aesthetic score and the fuzzy score is determined as the second aesthetic score;
[0042] When the blur score is greater than zero, the difference between the first aesthetic score and the blur score is determined as the second aesthetic score.
[0043] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, the image processing apparatus comprising:
[0044] An acquisition module is configured to acquire image information collected by a camera;
[0045] A first determination module is configured to determine a blur score of the image information;
[0046] The second determination module is configured to determine a second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information.
[0047] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0048] processor;
[0049] a memory for storing instructions executable by the processor;
[0050] Wherein, the processor is configured to execute:
[0051] Get the image information collected by the camera;
[0052] determining a blur score for the image information;
[0053] A second aesthetic score for the image information is determined based on the blur score and the first aesthetic score for the image information.
[0054] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute:
[0055] Get the image information collected by the camera;
[0056] determining a blur score for the image information;
[0057] A second aesthetic score for the image information is determined based on the blur score and the first aesthetic score for the image information.
[0058] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0059] The image information collected by the camera is obtained, and a blur score of the image information is determined to determine the blur degree of the image information. The second aesthetic score of the image information is determined according to the first aesthetic score and the blur score of the image information, so as to perform blur correction on the first aesthetic score by using the blur score. Since the second aesthetic score is obtained by correcting the first aesthetic score by using the blur score, the second aesthetic score can reflect the blur degree of the image information, thereby improving the reliability of the aesthetic score.
[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0062] Figure 1 is a flowchart of an image processing method according to an exemplary embodiment;
[0063] Figure 2 is a flowchart of an image processing method according to another exemplary embodiment;
[0064] Figure 3 is a flowchart of an image processing method according to another exemplary embodiment;
[0065] Figure 4 is a flowchart of an image processing method according to another exemplary embodiment;
[0066] Figure 5 is a flowchart of an image processing method according to another exemplary embodiment;
[0067] Figure 6 is a block diagram of an image processing apparatus according to an exemplary embodiment;
[0068] Figure 7 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0069] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0070] At present, after collecting image information, the camera of the electronic device will determine the aesthetic score of the image information and save the image information with a high aesthetic score in the electronic device. The aesthetic score is used to evaluate the subjective beauty of the image information. The image information with a high aesthetic score corresponds to a good subjective beauty, and the image information with a low aesthetic score corresponds to a poor subjective beauty. Exemplarily, after the user turns on the shooting function of the camera application in the electronic device, during the preview process, the electronic device will shoot and save the image information with a high aesthetic score. Among them, the image information with a high aesthetic score refers to the image information with an aesthetic score higher than the total score multiplied by the threshold percentage (such as 80%), or the image information with an aesthetic score higher than the score threshold (such as 5 points). During the entire shooting process, the user does not need to manually press the shooting button of the electronic device, and the electronic device will give a corresponding visual prompt after shooting. By automatically saving the image information with a high aesthetic score in the electronic device, the complexity of the user shooting the image information is reduced. In addition, since the image information with a low aesthetic score is not saved in the electronic device, the user does not need to delete the image information with poor subjective beauty, avoiding the cumbersome process of the user screening the image information. However, when the image information is blurred, the aesthetic score will not change due to the blurriness of the image information, resulting in the problem of low reliability of the aesthetic score. Furthermore, blurred image information with high aesthetic scores but poor subjective beauty will still be stored in the electronic device, affecting the user experience.
[0071] In order to solve the above technical problems, the present disclosure provides an image processing method. After the camera of the electronic device collects image information, the blur score of the image information is determined, and the first aesthetic score is corrected by the blur score to obtain a second aesthetic score. Since the second aesthetic score is obtained by correcting the blur score based on the first aesthetic score, the second aesthetic score can reflect the blur degree of the image information, thereby improving the reliability of the aesthetic score. Furthermore, the electronic device can identify blurred image information and discard the blurred image information.
[0072] The present disclosure provides an image processing method. Figure 1 As shown, the method includes:
[0073] S100: Obtain image information collected by a camera.
[0074] S200: Determine a blur score of the image information.
[0075] S300: Determine a second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information.
[0076] In this embodiment, the image information collected by the camera is obtained, and the blur score of the image information is determined to determine the blur degree of the image information. The second aesthetic score of the image information is determined according to the first aesthetic score and the blur score of the image information, so as to perform blur correction on the first aesthetic score by using the blur score. Since the second aesthetic score is obtained by correcting the first aesthetic score by using the blur score, the second aesthetic score can reflect the blur degree of the image information, thereby improving the reliability of the aesthetic score.
[0077] Exemplarily, the first aesthetic score may be an initial aesthetic score or an aesthetic score of an intermediate process, and the second aesthetic score may be a target aesthetic score or an aesthetic score of an intermediate process.
[0078] Exemplarily, the first aesthetic score of the image information may be determined by inputting the image information into an aesthetic score model. The aesthetic score model may be obtained by training a target neural network model based on the composition layout and the corresponding aesthetic score as sample data.
[0079] It can be understood that the determination of the blur score of the image information in step S200 may be performed only on the blurred image information or on all the image information. The determination of the second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information in step S300 may be performed only on the first aesthetic score of the blurred image information to obtain the second aesthetic score or on the first aesthetic score of all the image information to obtain the second aesthetic score.
[0080] In one embodiment, the fuzzy score of the image information determined in step S200 is determined in the following manner:
[0081] When the image information satisfies the correction condition, a blur score of the image information is determined.
[0082] In this embodiment, when the image information meets the correction condition, the image information is blurred and the first aesthetic score needs to be corrected to determine the blur score of the image information. By screening the image information, only the first aesthetic score of the blurred image information is corrected, thereby reducing the complexity of image information processing.
[0083] In one embodiment, whether the image information satisfies the correction condition is determined in the following manner:
[0084] The detail representation value of the image information is less than a first threshold.
[0085] The blur score for determining image information is determined as follows:
[0086] According to the detail characterization value, the blur score of the image information is determined.
[0087] In this embodiment, since the smaller the detail representation value of the image information is, the less detail the image information is and the higher the blurriness is, the image information satisfies the correction condition when the detail representation value of the image information is less than the first threshold. Since the detail representation value of the image information can reflect the blurriness of the image information, the blur score of the image information is determined according to the detail representation value. By determining whether the image information satisfies the correction condition and determining the blur score of the image information according to the detail representation value of the image information, the blurriness of the image information can be effectively reflected, thereby improving the reliability of the aesthetic score.
[0088] Exemplarily, the detail characterization value is a value used to characterize the edge density of image information, which can be determined by a method for calculating blurriness. For example, it can be determined by a grayscale variance algorithm, a grayscale difference absolute value sum variance algorithm, a grayscale difference square sum variance algorithm, a Brenner gradient function, a Robert gradient method, an edge detection operator, a Tenengrad gradient function, etc. Among them, the edge detection operator includes a Laplace operator, a Sobel operator, a Kenny operator, etc.
[0089] Exemplarily, when the Laplace edge detection operator is used to determine the variance of the image information as the detail representation value, when the function of the pixel value of the image information to the horizontal and vertical coordinates of the image information is a continuous function, the formula of the Laplace edge detection operator is as follows:
[0090]
[0091] Among them, △f(x,y) is the second-order derivative of the pixel value of the image information when it is a continuous function, f(x,y) is the pixel value of the image information, x is the horizontal coordinate of the image information, and y is the vertical coordinate of the image information.
[0092] After determining the second-order derivative of the pixel value of the image information, the variance of the image information is determined based on the second-order derivative.
[0093] When the function of the pixel value of the image information to the horizontal and vertical coordinates of the image information is a discontinuous function, the formula of the Laplace edge detection operator is as follows:
[0094]
[0095] in, The second-order derivative of the pixel value of the image information when it is a discontinuous function.
[0096] According to the second-order derivative of the image information, the convolution kernel is determined as:
[0097]
[0098] After determining the convolution kernel, the image information is converted into grayscale image information. The grayscale image information is convolved with the convolution kernel to obtain a gradient matrix. The values of the gradient matrix are added to obtain the variance of the image information.
[0099] Exemplarily, the value of the first threshold is related to the calculation method of the detail representation value. For example, when the Laplace edge detection operator is used, the value range of the first threshold may be 80 to 120, including 90, 100, 110, and the like.
[0100] like Figure 2 As shown, the image processing method provided by an embodiment of the present disclosure also includes the following steps:
[0101] S210: Determine a collection mode corresponding to the image information.
[0102] S220 , calculating a detail representation value of the image information according to an acquisition mode corresponding to the image information.
[0103] The acquisition mode includes a first mode and a second mode, the first mode corresponds to shooting with a moving camera, and the second mode corresponds to shooting with a stationary camera.
[0104] In this embodiment, the acquisition mode of the image information includes a first mode and a second mode. In the first mode and the second mode, the camera shooting state is different, and the influence on the blur degree of different positions of the image information is different. The acquisition mode corresponding to the image information is determined, and the detail representation value of the image information is calculated according to the acquisition mode corresponding to the image information. Since the detail representation value used to determine the blur score is determined according to different acquisition modes, the blur score can more accurately reflect the blur degree of the image information, thereby improving the reliability of the aesthetic score.
[0105] In one embodiment, the acquisition mode corresponding to the image information determined in step S210 may be determined in the following manner:
[0106] According to the shooting function turned on during the acquisition of the image information, the acquisition mode corresponding to the image information is determined.
[0107] In this embodiment, since multiple shooting functions are preset in the electronic device, the user can turn on the corresponding shooting function during the shooting process. By determining the acquisition mode corresponding to the image information according to the turned-on shooting function, the acquisition mode is matched with the user's selection, thereby increasing the accuracy of the blur score and thus improving the reliability of the aesthetic score.
[0108] Exemplarily, the shooting function is a function preset in the electronic device, such as an automatic composition function, a motion capture function, etc. After the user turns on the automatic composition function, the electronic device will be moved to collect surrounding image information. That is, the automatic composition function corresponds to the first mode. After the user turns on the motion capture function, the electronic device will be kept stationary to collect image information within a fixed field of view. That is, the motion capture function corresponds to the second mode.
[0109] In one embodiment, the acquisition mode corresponding to the image information determined in step S210 may also be determined in the following manner:
[0110] According to the acceleration sensor and / or the angular velocity sensor, a collection mode corresponding to the image information is determined.
[0111] In this embodiment, an acceleration sensor and / or an angular velocity sensor in the electronic device is used to determine whether the camera moves during the shooting process, and the acquisition mode corresponding to the image information is determined by hardware detection to avoid user selection errors, thereby increasing the accuracy of the blur score and thus improving the reliability of the aesthetic score.
[0112] Exemplarily, when the acceleration sensor and / or the angular velocity sensor detects that the electronic device is moving, the camera collects image information in a moving manner and determines that the image information corresponds to the first mode. When the acceleration sensor and / or the angular velocity sensor detects that the electronic device is stationary, the camera collects image information in a stationary manner and determines that the image information corresponds to the second mode.
[0113] In one embodiment, the acquisition mode corresponding to the image information determined in step S210 may also be determined in the following manner:
[0114] The acquisition mode corresponding to the image information is determined according to the similarity of multiple frames of image information adjacent to the image information.
[0115] In this embodiment, since the similarity of adjacent multi-frame image information is different in different acquisition modes, by determining the acquisition mode corresponding to the image information according to the similarity of adjacent multi-frame image information, it is possible to accurately determine whether the camera has moved, thereby improving the reliability of the aesthetic score. At the same time, since there is no need to use a sensor and receive the shooting mode turned on by the user, the requirements for determining the acquisition mode are reduced, thereby improving the versatility of the aesthetic score correction.
[0116] In one embodiment, the acquisition mode corresponding to the image information is determined according to the similarity of multiple frames of image information adjacent to the image information in the following manner:
[0117] When the similarity is less than the second threshold, it is determined that the image information corresponds to the first mode.
[0118] When the similarity is greater than or equal to the second threshold, it is determined that the image information corresponds to the second mode.
[0119] In this embodiment, when the similarity is less than the second threshold, the difference between the adjacent multiple frames of image information is large, reflecting that the camera has moved, and the image information is determined to correspond to the first mode. When the similarity is greater than or equal to the second threshold, the difference between the adjacent multiple frames of image information is small, reflecting that the camera remains stationary, and the image information is determined to correspond to the second mode. By comparing the similarity with the second threshold, the acquisition mode can be accurately determined, thereby improving the reliability of the aesthetic score.
[0120] Exemplarily, the similarity can be determined by a hash similarity algorithm, a structural similarity algorithm, a histogram similarity algorithm, a mean square error, etc. The value of the second threshold is related to the similarity calculation algorithm. For example, when the structural similarity algorithm is used, the value range of the second threshold can be -0.5 to 0.5, including -0.25, 0, 0.25, etc.
[0121] It can be understood that, in addition to the above-mentioned method, the acquisition mode corresponding to the image information can be determined by dividing each image information into multiple regions in the same way. Determine the similarity of the corresponding regions in the image information. When the similarity is less than the second threshold, the corresponding regions are determined to be similar. When the similarity is greater than or equal to the second threshold, the corresponding regions are determined to be dissimilar. If the number of similar regions is less than the third threshold, the acquisition mode is determined to be the first mode. If the number of similar regions is greater than or equal to the third threshold, the acquisition mode is determined to be the second mode. The value of the third threshold can be determined according to the number of divided regions. For example, when the number of divided regions is 9, the value of the third threshold can be 4, 5, 6, etc.
[0122] In one embodiment, the detail representation value of the image information calculated according to the acquisition mode corresponding to the image information in step S220 is determined by:
[0123] When the image information corresponds to the first mode, the overall detail level of the image information is calculated, and the detail level representation value is determined to be the overall detail level.
[0124] When the image information corresponds to the second mode, the overall detail level and at least one local detail level of the image information are calculated, and a detail level representation value is determined according to the overall detail level and the at least one local detail level.
[0125] In this embodiment, when the image information corresponds to the first mode, the image information as a whole changes, and the overall detail level is calculated as the detail level representation value. When the image information corresponds to the second mode, the image information is partially changed, and the detail level representation value is calculated and determined based on the overall detail level and at least one local detail level of the image information. By calculating the detail level at different locations of the image information under different acquisition modes to determine the detail level representation value, the accuracy of the detail level representation value is increased, thereby improving the reliability of the aesthetic score.
[0126] Exemplarily, when calculating the local detail of the image information, the frame where the target object is located and / or the frame where the target object features are located is determined by a target detection method, and the detail of the image information in the frame is calculated as the local detail. For example, when the target object is a person, it is necessary to determine the frame where the person is located and the frame where the face is located by a target detection method. The detail of the image information in the frame where the person is located and the detail of the image information in the frame where the face is located are calculated as two local detail.
[0127] Exemplarily, when calculating the overall detail and local detail of the image information, it can be determined by the above-mentioned fuzziness calculation method, which will not be described in detail here.
[0128] In one embodiment, if Figure 3 As shown, the detail level characterization value is determined according to the overall detail level and at least one local detail level in the following manner:
[0129] S230: Determine the weights corresponding to the overall detail level and the local detail level.
[0130] S240: Perform a weighted sum of the overall detail degree and the local detail degree as a detail degree representation value.
[0131] In this embodiment, since the target object is the focus of image information collection when the image information is collected through the second mode, it is necessary to determine the weights corresponding to the overall detail degree and the local detail degree. The overall detail degree and the local detail degree are weighted and summed as the detail degree representation value, which can highlight the importance of different local detail degrees, increase the accuracy of the detail degree representation value, and thus improve the reliability of the aesthetic score.
[0132] Exemplarily, taking the method of using the Laplace edge detection operator to determine the variance as the detail degree as an example, the weights corresponding to the determination of the overall detail degree and the local detail degree in step S230 and the weighted sum of the overall detail degree and the local detail degree as the detail degree representation value in step S240 are explained. When the target object is a person, the overall detail degree fa of the image information, the local detail degree fh of the person, and the local detail degree ff of the face are calculated. It can be determined that the weight of the overall detail degree fa is c, the weight of the local detail degree fh of the person is a, and the weight of the local detail degree ff of the face is b, then the detail degree representation value fm=a×fh+b×ff+c×fa. Among them, a and b are numbers less than 0, and c is a number greater than 0. For example, a can be -0.5, -5, etc., b can be -2, -20, etc., and c can be 0.8, 1, 1.2, etc. Alternatively, the overall detail fa, the local detail fh of the person, and the local detail ff of the face can be divided by the third threshold and then logarithms are taken to obtain the first detail fa', the second detail fh', and the third detail ff'. The first detail fa', the second detail fh', and the third detail ff' are weighted and summed as the detail representation value fm. That is, the detail representation value fm = a×fh'+b×ff'+c×fa'. At this time, the detail representation value fm can be directly used as the fuzzy score y c . Among them, a and b are numbers less than 0, which can be determined according to the overall detail degree fa, and c is a number greater than 0. For example, when the overall detail degree fa<1000, a=-0.5, b=-2. When the overall detail degree 1000≤fa<10000, a=-5, b=-20. c is 1 in both cases. The third threshold is greater than or equal to the first threshold. When the Laplace edge detection operator is used, the value range of the third threshold can be 100-140, including 110, 120, 130, etc. The base of the logarithmic operation is greater than 1. For example, the base can be a natural constant e, 10, etc.
[0133] In one embodiment, if Figure 4 As shown, according to the detail characterization value, the blur score of the image information is determined in the following way:
[0134] S250: Divide the detail level representation value by a first preset value to obtain a target representation value.
[0135] S260: Perform a logarithmic operation on the target representation value to obtain a fuzzy score.
[0136] Among them, the first preset value is greater than or equal to the first threshold.
[0137] In this embodiment, the detail level characterization value is divided by the first preset value to obtain a target characterization value, so that the target characterization value is a number less than 1. The target characterization value is logarithmically operated to obtain a fuzzy score, so that the fuzzy score matches the value range of the first aesthetic score. By operating the detail level characterization value to obtain a fuzzy score, the fuzzy score can match the first aesthetic score for correction, thereby improving the reliability of the aesthetic score.
[0138] Exemplarily, the value range of the first preset value may be 100 to 140. For example, the value of the first preset value may be 110, 120, 130, and so on.
[0139] Exemplarily, the base of the logarithm operation in step S260 is greater than 1. For example, the base may be a natural constant e, 10, or the like.
[0140] For example, taking the first preset value as 100 and the base as 10 as an example, the detail level representation value is divided by the first preset value in step S250 to obtain the target representation value and the target representation value is logarithmically operated in step S260 to obtain the fuzzy score. The detail level representation value fm is divided by 100 to obtain the target representation value fm'. The target representation value fm' is logarithmically operated, and the logarithmic operation result lg(fm') is used as the fuzzy score y c .
[0141] In one embodiment, the blur score of the image information is determined according to the detail level representation value in the following manner:
[0142] The detail level representation value is divided by a second preset value to obtain a blur score.
[0143] The second preset value is greater than or equal to the first threshold.
[0144] Determining the second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information in step S300 includes:
[0145] A product of the first aesthetic score and the blur score is determined as a second aesthetic score.
[0146] In this embodiment, the detail representation value is divided by the second preset value to obtain a blur score, which is used as a ratio for correcting the first aesthetic score. The product of the first aesthetic score and the blur score is determined as the second aesthetic score, so that the first aesthetic score is reduced at a certain ratio according to the blur degree. By correcting the first aesthetic score in proportion with the blur score, the blur degree of the image information can be reflected in the second aesthetic score, thereby improving the reliability of the aesthetic score.
[0147] Exemplarily, the second preset value may be a pre-set value, or may be determined based on the detail characterization value and the first threshold. When the second preset value is a pre-set value, the value range of the second preset value may be 100 to 140. For example, the value of the second preset value may be 110, 120, 130, etc. When the second preset value is determined based on the detail characterization value and the first threshold, the average value of the detail characterization value and the first threshold may be determined, and the average value may be multiplied by a preset proportional coefficient (such as 0.9, 1.1, etc.) as the second preset value. At this time, the second preset value is less than or equal to the first threshold and greater than or equal to the detail characterization value.
[0148] In one embodiment, the second aesthetic score of the image information is determined in step S300 according to the blur score and the first aesthetic score of the image information in the following manner:
[0149] When the fuzzy score is less than zero, the sum of the first aesthetic score and the fuzzy score is determined as the second aesthetic score.
[0150] When the blur score is greater than zero, the difference between the first aesthetic score and the blur score is determined as the second aesthetic score.
[0151] In this embodiment, since the user's perception of the image information is reduced when the image information is blurred, it is necessary to lower the first aesthetic score through the fuzzy score. When different algorithms are used, the fuzzy score may be greater than zero or less than zero. When the fuzzy score is less than zero, the sum of the first aesthetic score and the fuzzy score is determined as the second aesthetic score, and the first aesthetic score is lowered. When the fuzzy score is greater than zero, the difference between the first aesthetic score and the fuzzy score is determined as the second aesthetic score, and the first aesthetic score is lowered. By using the fuzzy score to lower the first aesthetic score under different algorithms, the reliability of the aesthetic score and the versatility of determining the second aesthetic score through the fuzzy score are improved.
[0152] For example, taking the case where the fuzzy score is greater than zero as an example, the difference between the first aesthetic score and the fuzzy score is determined as the second aesthetic score. pred +Fuzzy Rating c .
[0153] The present disclosure provides an image processing method. Figure 5 As shown, the method includes:
[0154] S400: Obtain image information collected by a camera.
[0155] S410: When the image information meets the correction condition, a capture mode corresponding to the image information is determined according to a shooting function enabled during the capture of the image information.
[0156] S420: When the image information corresponds to the first mode, the overall detail level of the image information is calculated, the detail level representation value is determined to be the overall detail level, and step S460 is executed.
[0157] S430: When the image information corresponds to the second mode, calculate the overall detail level and at least one local detail level of the image information.
[0158] S440: Determine the weights corresponding to the overall detail level and the local detail level.
[0159] S450: Perform a weighted sum of the overall detail level and the local detail level as a detail level representation value.
[0160] S460: Divide the detail representation value by a first preset value to obtain a target representation value.
[0161] S470, performing a logarithmic operation on the target representation value to obtain a fuzzy score.
[0162] S480: Determine the sum of the first aesthetic score and the fuzzy score as the second aesthetic score.
[0163] In this embodiment, the image information collected by the camera is obtained. When the image information is blurred, the acquisition mode corresponding to the image information is determined to determine the calculation method of the detail representation value. When the image information corresponds to the first mode, the overall image information is prone to blurring when it changes, and the overall detail is calculated and used as the detail representation value. When the image information corresponds to the second mode, the local part of the image information is the focus and the change is prone to blurring, and the detail representation value is calculated and determined according to the overall detail and at least one local detail. The weights corresponding to the overall detail and the local detail are determined, and the overall detail and the local detail are weighted and summed as the detail representation value, so that the local focus can be reflected in the detail representation value. The detail representation value is divided by the first preset value and then logarithmically operated to obtain a fuzzy score, so that the fuzzy score matches the value range of the first aesthetic score. Since the fuzzy score is less than zero, the sum of the first aesthetic score and the fuzzy score is determined as the second aesthetic score, and the first aesthetic score is adjusted down. Since the second aesthetic score is obtained by using the fuzzy score to correct the first aesthetic score, the second aesthetic score can reflect the degree of blur of the image information, thereby improving the reliability of the aesthetic score.
[0164] In an exemplary embodiment, an image processing device is provided, and the image processing device is used to implement the above method. Figure 6 As shown, the image processing device may include an acquisition module 100, a first determination module 200 and a second determination module 300, wherein, in the process of implementing the above method,
[0165] The acquisition module 100 is configured to acquire image information collected by a camera.
[0166] The first determination module 200 is configured to determine a blur score of the image information.
[0167] The second determination module 300 is configured to determine a second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information.
[0168] In an exemplary embodiment, an image processing device is provided, in which a first determining module 200 is configured to:
[0169] When the image information satisfies the correction condition, a blur score of the image information is determined.
[0170] In an exemplary embodiment, an image processing device is provided, in which a first determining module 200 is configured to:
[0171] According to the detail characterization value, the blur score of the image information is determined.
[0172] In an exemplary embodiment, an image processing device is provided, in which a first determining module 200 is configured to:
[0173] The detail level representation value is divided by the first preset value to obtain a target representation value.
[0174] The target representation value is logarithmically operated to obtain a fuzzy score.
[0175] In an exemplary embodiment, an image processing device is provided, in which a first determining module 200 is configured to:
[0176] The detail level representation value is divided by a second preset value to obtain a blur score.
[0177] In an exemplary embodiment, an image processing device is provided, in which the second determining module 300 is configured to:
[0178] The product of the first aesthetic score and the fuzzy score is determined as the second aesthetic score
[0179] In an exemplary embodiment, an image processing device is provided, in which the second determining module 300 is configured to:
[0180] When the fuzzy score is less than zero, the sum of the first aesthetic score and the fuzzy score is determined as the second aesthetic score.
[0181] When the blur score is greater than zero, the difference between the first aesthetic score and the blur score is determined as the second aesthetic score.
[0182] In an exemplary embodiment, an image processing apparatus is provided, the apparatus further comprising:
[0183] The third determination module is configured to determine the acquisition mode corresponding to the image information.
[0184] The calculation module is configured to calculate a detail representation value of the image information according to an acquisition mode corresponding to the image information.
[0185] In an exemplary embodiment, an image processing device is provided, in which a third determining module is configured to:
[0186] According to the shooting function turned on during the acquisition of the image information, the acquisition mode corresponding to the image information is determined.
[0187] In an exemplary embodiment, an image processing device is provided, in which a third determining module is configured to:
[0188] According to the acceleration sensor and / or the angular velocity sensor, a collection mode corresponding to the image information is determined.
[0189] In an exemplary embodiment, an image processing device is provided, in which a third determining module is configured to:
[0190] The acquisition mode corresponding to the image information is determined according to the similarity of multiple frames of image information adjacent to the image information.
[0191] In an exemplary embodiment, an image processing device is provided, in which a third determining module is configured to:
[0192] When the similarity is less than the second threshold, it is determined that the image information corresponds to the first mode.
[0193] When the similarity is greater than or equal to the second threshold, it is determined that the image information corresponds to the second mode.
[0194] In an exemplary embodiment, an image processing device is provided, in which a computing module is configured to:
[0195] When the image information corresponds to the first mode, the overall detail level of the image information is calculated, and the detail level representation value is determined to be the overall detail level.
[0196] When the image information corresponds to the second mode, the overall detail level and at least one local detail level of the image information are calculated, and a detail level representation value is determined according to the overall detail level and the at least one local detail level.
[0197] In an exemplary embodiment, an image processing device is provided, in which a computing module is configured to:
[0198] Determine the weights corresponding to the global detail level and the local detail level.
[0199] The weighted sum of the overall detail level and the local detail level is taken as the detail level representation value.
[0200] In an exemplary embodiment, an electronic device is provided, and the electronic device is, for example, a mobile phone, a laptop computer, a tablet computer, and a wearable device.
[0201] refer to Figure 7 As shown, electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0202] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0203] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0204] The power supply component 406 provides power to the various components of the electronic device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.
[0205] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera module and / or a rear camera module. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera module and / or the rear camera module may receive external multimedia data. Each front camera module and the rear camera module may be a fixed optical lens system or have a focal length and optical zoom capability.
[0206] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0207] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0208] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0209] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other terminals. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0210] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-described methods.
[0211] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the above instructions can be executed by the processor 420 of the electronic device 400 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, and an optical data storage terminal. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is enabled to perform the method shown in the above embodiment.
[0212] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0213] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0214] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that: The image processing method comprises: Get the image information collected by the camera; determining a blur score for the image information; A second aesthetic score for the image information is determined based on the blur score and the first aesthetic score for the image information.
2. The image processing method according to claim 1, characterized in that: Determining the blur score of the image information includes: When the image information satisfies the correction condition, a blur score of the image information is determined.
3. The image processing method according to claim 2, characterized in that: The image information satisfies the correction condition, including: The detail representation value of the image information is less than a first threshold; Determining the blur score of the image information includes: A blur score of the image information is determined according to the detail level representation value.
4. The image processing method according to claim 3, characterized in that: The image processing method further comprises: Determining an acquisition mode corresponding to the image information; Calculating a detail representation value of the image information according to an acquisition mode corresponding to the image information; The acquisition mode includes a first mode and a second mode, the first mode corresponds to shooting with a moving camera, and the second mode corresponds to shooting with a stationary camera.
5. The image processing method according to claim 4, characterized in that: The determining the acquisition mode corresponding to the image information includes: Determine the acquisition mode corresponding to the image information according to the shooting function turned on during the acquisition of the image information; or Determine the acquisition mode corresponding to the image information according to the acceleration sensor and / or the angular velocity sensor; or, The acquisition mode corresponding to the image information is determined according to the similarity of multiple frames of image information adjacent to the image information.
6. The image processing method according to claim 4, characterized in that: The calculating the detail representation value of the image information according to the acquisition mode corresponding to the image information includes: When the image information corresponds to the first mode, calculating the overall detail degree of the image information, and determining the detail degree representation value to be the overall detail degree; When the image information corresponds to the second mode, the overall detail level and at least one local detail level of the image information are calculated, and the detail level representation value is determined according to the overall detail level and the at least one local detail level.
7. The image processing method according to claim 6, characterized in that: The determining the detail level representation value according to the overall detail level and the at least one local detail level comprises: Determine the weights corresponding to the overall detail level and the local detail level; A weighted sum of the global detail level and the local detail level is taken as the detail level representation value.
8. The image processing method according to claim 5, characterized in that: The determining, according to the similarity of multiple frames of image information adjacent to the image information, the acquisition mode corresponding to the image information comprises: When the similarity is less than a second threshold, determining that the image information corresponds to the first mode; When the similarity is greater than or equal to the second threshold, it is determined that the image information corresponds to the second mode.
9. The image processing method according to claim 3, characterized in that: Determining the blur score of the image information according to the detail level representation value includes: Dividing the detail level representation value by a first preset value to obtain a target representation value; Performing a logarithmic operation on the target representation value to obtain the fuzzy score; Wherein, the first preset value is greater than or equal to the first threshold.
10. The image processing method according to any one of claims 3 to 8, characterized in that: Determining the blur score of the image information according to the detail level representation value includes: Dividing the detail level representation value by a second preset value to obtain the fuzzy score; Wherein, the second preset value is greater than or equal to the first threshold; Determining a second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information includes: The product of the first aesthetic score and the fuzzy score is determined as the second aesthetic score.
11. The image processing method according to any one of claims 1 to 9, characterized in that: Determining a second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information includes: When the fuzzy score is less than zero, the sum of the first aesthetic score and the fuzzy score is determined as the second aesthetic score; When the blur score is greater than zero, the difference between the first aesthetic score and the blur score is determined as the second aesthetic score.
12. An image processing device, characterized in that: The image processing device comprises: An acquisition module is configured to acquire image information collected by a camera; A first determination module is configured to determine a blur score of the image information; The second determination module is configured to determine a second aesthetic score of the image information according to the blur score and the first aesthetic score of the image information.
13. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute: Get the image information collected by the camera; determining a blur score for the image information; A second aesthetic score for the image information is determined based on the blur score and the first aesthetic score for the image information.
14. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute: Get the image information collected by the camera; determining a blur score for the image information; A second aesthetic score for the image information is determined based on the blur score and the first aesthetic score for the image information.
Citation Information
Patent Citations
Image acquisition method and device and electronic device
CN104104856A
Pedestrian image quality evaluation method, electronic device and computer-readable medium
CN108961209A
Face image quality evaluation method and device
CN110458792A
Image scoring method and device, storage medium and electronic equipment
CN111028216A
Image processing apparatus, image processing method, and image processing program
JP2013012906A
