Image processing method and device, electronic equipment and storage medium
By acquiring and selecting candidate parameters and images in image processing, and selecting target images and their parameters based on quality parameters, the problem of time-consuming and difficult to achieve optimal selection of image processing parameters is solved, and more efficient and accurate parameter selection is achieved.
Patent Information
- Application Number
- CN202311323260.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2043-10-12
AI Technical Summary
The prior art requires experienced engineers to spend a lot of time debugging image processing parameters in image processing, and it is difficult to ensure that the selected parameters are globally or locally optimal.
By taking the initial image, the initial parameters of its image processing indicators are determined, candidate parameters are collected and generated, candidate images are captured based on these candidate parameters in the same scene, and finally the target image and its corresponding image processing parameters are selected based on the quality parameters of the candidate image.
It effectively reduces the time for image processing parameter selection, improves the accuracy of parameter selection, and increases the probability that the selection result can reach global optimality.
Smart Images

Figure CN119835534A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] Commercial-grade imaging systems rely on an image processing pipeline that typically consists of several image processing modules that contain a large number of image processing parameters to transform the raw image from the sensor into a visually optimal image.
[0003] Traditional methods usually require experienced engineers to spend a lot of time debugging image processing parameters one by one and evaluating the corresponding images after image processing parameters are processed to select the optimal parameters that can achieve the best visual effect. This method not only consumes a lot of time and resources, but also makes it difficult to ensure that the selected optimal parameters are global or local optimal. Summary of the invention
[0004] The present disclosure provides an image processing method, device, electronic device and storage medium to overcome the problem that image processing parameter selection is time-consuming and difficult to achieve the optimum.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, including:
[0006] Taking pictures to obtain an initial image;
[0007] Determining initial parameters of various image processing indicators of the initial image;
[0008] Taking each of the initial parameters as the center, collecting and generating a plurality of candidate parameters corresponding to each of the image processing indicators;
[0009] Under the same shooting scene as the initial image, a plurality of candidate images are obtained by shooting based on the respective candidate parameters;
[0010] Based on the quality parameters of each of the candidate images, a target image is determined from the plurality of candidate images, and image processing parameters corresponding to the target image are selected from the plurality of candidate parameters.
[0011] In some embodiments, the traversing and generating a plurality of candidate parameters corresponding to each of the image processing indicators with each of the initial parameters as the center includes:
[0012] Determining the acquisition range and acquisition step length of each of the initial parameters based on the brightness parameter of the initial image and / or the type of the image processing index;
[0013] Within the acquisition range centered on the initial parameter, a plurality of candidate parameters corresponding to each of the initial parameters are acquired and generated according to the acquisition step.
[0014] In some embodiments, the initial image includes a dynamic object and a static object;
[0015] The step of capturing multiple candidate images based on the candidate parameters in the same shooting scene as the initial image includes:
[0016] Selecting a dynamic processing parameter from a plurality of candidate parameters corresponding to the image processing index of the dynamic object;
[0017] In the same shooting scene as the initial image, a plurality of candidate images are captured based on the dynamic processing parameters and a plurality of candidate parameters corresponding to the image processing index of the static object.
[0018] In some embodiments, selecting a dynamic processing parameter from a plurality of candidate parameters corresponding to the image processing index of the dynamic object includes:
[0019] Based on a plurality of candidate parameters corresponding to the image processing index of the dynamic object, a plurality of images to be processed are captured;
[0020] Performing cropping processing on the image to be processed to obtain a cropped image containing the dynamic object;
[0021] Determining a preferred image from a plurality of the cropped images based on quality parameters of each of the cropped images;
[0022] A plurality of candidate parameters corresponding to the image processing index of the preferred image are selected from a plurality of candidate parameters corresponding to the image processing index of the dynamic object and determined as the dynamic processing parameters.
[0023] In some embodiments, the selecting the image processing parameter corresponding to the target image from the plurality of candidate parameters includes:
[0024] Selecting a static processing parameter corresponding to the target image from a plurality of candidate parameters corresponding to the image processing index of the static object;
[0025] The dynamic processing parameters and the static processing parameters are combined to obtain the image processing parameters.
[0026] In some embodiments, the image processing index of the static object includes at least: multi-channel spatial noise filtering;
[0027] The image processing index of the dynamic object includes at least one of the following: time domain filtering, space domain and frequency domain filtering, and adaptive Bayer filtering.
[0028] In some embodiments, the quality parameters include: a clarity parameter and a noise parameter;
[0029] Determining a target image from a plurality of the candidate images based on the quality parameters of each of the candidate images comprises:
[0030] Determining definition parameters of each of the candidate images respectively, and drawing a definition curve based on the definition parameters of each of the candidate images;
[0031] Determining noise parameters of each of the candidate images respectively, and drawing a noise curve based on the noise parameters of each of the candidate images;
[0032] The target image is determined from the plurality of candidate images based on an intersection point between the sharpness curve and the noise curve.
[0033] In some embodiments, the clarity parameter is obtained by:
[0034] Performing singular value decomposition on the candidate image to obtain singular values of the candidate image;
[0035] The reciprocal of the singular value is used as the definition parameter of the candidate image.
[0036] In some embodiments, the noise parameter is obtained by:
[0037] When the candidate image contains a dynamic object, respectively calculating the structural similarity index of each of the candidate images and the initial image, and using the structural similarity index as the noise parameter of the candidate image;
[0038] When the candidate image contains a static object, a pixel value of the candidate image is obtained, and the pixel value is used as a noise parameter of the candidate image.
[0039] In some embodiments, the image processing method further includes: debugging the image processing function of the device to be debugged based on the image processing parameters.
[0040] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:
[0041] An acquisition module, configured to capture and obtain an initial image;
[0042] A first determination module, configured to determine initial parameters of various image processing indicators of the initial image;
[0043] A collection module, configured to collect and generate multiple candidate parameters corresponding to each of the image processing indicators with each of the initial parameters as the center;
[0044] A shooting module, configured to shoot a plurality of candidate images based on each of the candidate parameters in the same shooting scene as the initial image;
[0045] The second determination module is configured to determine a target image from a plurality of the candidate images based on the quality parameters of each of the candidate images, and select image processing parameters corresponding to the target image from the plurality of the candidate parameters.
[0046] In some embodiments, the acquisition module is further configured to:
[0047] Determining the acquisition range and acquisition step length of each of the initial parameters based on the brightness parameter of the initial image and / or the type of the image processing index;
[0048] Within the acquisition range centered on the initial parameter, a plurality of candidate parameters corresponding to each of the initial parameters are acquired and generated according to the acquisition step.
[0049] In some embodiments, the initial image includes a dynamic object and a static object; the shooting module is further configured to:
[0050] Selecting a dynamic processing parameter from a plurality of candidate parameters corresponding to the image processing index of the dynamic object;
[0051] In the same shooting scene as the initial image, a plurality of candidate images are captured based on the dynamic processing parameters and a plurality of candidate parameters corresponding to the image processing index of the static object.
[0052] In some embodiments, the camera module is further configured to:
[0053] Based on a plurality of candidate parameters corresponding to the image processing index of the dynamic object, a plurality of images to be processed are captured;
[0054] Performing cropping processing on the image to be processed to obtain a cropped image containing the dynamic object;
[0055] Determining a preferred image from a plurality of the cropped images based on quality parameters of each of the cropped images;
[0056] A plurality of candidate parameters corresponding to the image processing index of the preferred image are selected from a plurality of candidate parameters corresponding to the image processing index of the dynamic object and determined as the dynamic processing parameters.
[0057] In some embodiments, the camera module is further configured to:
[0058] Selecting a static processing parameter corresponding to the target image from a plurality of candidate parameters corresponding to the image processing index of the static object;
[0059] The dynamic processing parameters and the static processing parameters are combined to obtain the image processing parameters.
[0060] In some embodiments, the second determining module is further configured to:
[0061] Determining definition parameters of each of the candidate images respectively, and drawing a definition curve based on the definition parameters of each of the candidate images;
[0062] Determining noise parameters of each of the candidate images respectively, and drawing a noise curve based on the noise parameters of each of the candidate images;
[0063] The target image is determined from the plurality of candidate images based on an intersection point between the sharpness curve and the noise curve.
[0064] In some embodiments, the second determination module is further configured to:
[0065] Performing singular value decomposition on the candidate image to obtain singular values of the candidate image;
[0066] The reciprocal of the singular value is used as the definition parameter of the candidate image.
[0067] In some embodiments, the second determination module is further configured to:
[0068] When the candidate image contains a dynamic object, respectively calculating the structural similarity index of each of the candidate images and the initial image, and using the structural similarity index as the noise parameter of the candidate image;
[0069] When the candidate image contains a static object, a pixel value of the candidate image is obtained, and the pixel value is used as a noise parameter of the candidate image.
[0070] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0071] processor;
[0072] a memory configured to store processor-executable instructions;
[0073] Wherein, the processor is configured to execute the image processing method described in the first aspect above when calling the executable instructions in the memory.
[0074] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the image processing method described in the first aspect above.
[0075] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0076] The image processing method disclosed in the present invention is to shoot an initial image, determine the initial parameters of each image processing index of the initial image, collect and generate multiple candidate parameters corresponding to each image processing index with each initial parameter as the center; shoot multiple candidate images based on each candidate parameter in the same shooting scene as the initial image; determine the target image from the multiple candidate images based on the quality parameters of each candidate image, and select the image processing parameters corresponding to the target image from the multiple candidate parameters. That is, the present invention is based on a large number of candidate parameters for shooting to obtain a large number of candidate images for image processing parameter selection, avoiding the problem of long time consumption and difficulty in achieving global optimal parameter selection when the candidate images are directly generated by candidate parameters for image processing parameter selection without considering the interference of the shooting device itself.
[0077] 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
[0078] 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.
[0079] Figure 1 is a schematic diagram of a process of an image processing method according to an exemplary embodiment Figure 1 .
[0080] Figure 2 is a schematic diagram of a process of an image processing method according to an exemplary embodiment Figure 2 .
[0081] Figure 3 is a schematic diagram of a process of an image processing method according to an exemplary embodiment Figure 3 .
[0082] Figure 4 is a schematic diagram of a process of an image processing method according to an exemplary embodiment Figure 4 .
[0083] Figure 5 is a schematic diagram of a process of an image processing method according to an exemplary embodiment Figure 5 .
[0084] Figure 6 is a schematic diagram of a process of an image processing method according to an exemplary embodiment Figure 6 .
[0085] Figure 7 FIG. 4 is a schematic diagram showing the structure of an image processing device according to an exemplary embodiment.
[0086] Figure 8 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0087] 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, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. 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.
[0088] In the specification, unless otherwise clearly stated, the terms "first" and "second" are used only to describe and distinguish constituent elements, and should not be understood as indicating an order. Unless otherwise clearly stated, the terms "connected", "fixed", etc. should be understood as having a broad meaning, including but not limited to directly, indirectly, detachably "connected", "fixed", etc.
[0089] Figure 1 is a flow chart of an image processing method according to an exemplary embodiment Figure 1 ,like Figure 1 As shown, the method mainly includes the following steps:
[0090] In step 101, an initial image is captured.
[0091] In this embodiment, the execution subject of the image processing method can be the device to be debugged, and the device to be debugged starts to capture images and completes the debugging of the image processing function by executing a pre-stored debugging program. Of course, the execution subject of the image processing method can also be a professional debugging device (such as a computer on the PC side), and the debugging device completes the debugging of the image processing function in the device to be debugged (mobile phone) by executing the debugging program. That is, the whole process requires the debugging device and the device to be debugged to cooperate with each other.
[0092] In step 102, initial parameters of various image indicators of the initial image are determined.
[0093] The device to be debugged may be a device with an imaging system, that is, it includes both a hardware imaging module and a software image processing module. For example: mobile phones, tablets, computers, cameras, smart watches, etc. Before leaving the factory, the device to be debugged needs to debug and select a large number of image processing parameters contained in the image processing module so that the image photography effect of the device to be debugged can be optimized. Therefore, the present disclosure obtains the initial image captured by the device to be debugged, thereby obtaining the initial parameters of the initial image with respect to various image processing indicators. The image processing indicators may include indicators involved in various image processing methods such as noise reduction, filtering, exposure, brightness, etc. that can enhance the visual effect of the image. For example: regarding noise reduction, the image processing indicators may be any one or more of mean filtering, Gaussian filtering, median filtering, etc., and the corresponding initial parameters are any one or more of mean filtering parameters, Gaussian filtering parameters, median filtering parameters, etc.
[0094] In step 103, taking each initial parameter as the center, a plurality of candidate parameters corresponding to each image processing index are collected and generated.
[0095] In this embodiment, the initial image captured will have basic, unadjusted initial parameters. The present disclosure is based on the initial parameters and collects multiple candidate parameters within a real number range that is larger than and / or smaller than the initial parameters. For example: if the initial parameter of the A index is 8.7, then multiple candidate parameters can be selected within a range greater than 8.7, or multiple candidate parameters can be selected within a range less than 8.7. Then the candidate parameters of the A index can be exemplarily {…, 8.1, 8.3, 8.5, 8.9, 9.1,…}. That is, each image processing index corresponds to an initial parameter, and one initial parameter corresponds to multiple candidate parameters. The image processing parameters that can achieve the best image photography effect of the device to be debugged are selected from the candidate parameters.
[0096] In step 104, multiple candidate images are obtained by shooting based on various candidate parameters in the same shooting scene as the initial image.
[0097] In this embodiment, the multiple candidate parameters generated by the collection are imported into the device to be debugged, and the device to be debugged is allowed to shoot multiple candidate images in the same shooting scene as the initial image. At this time, the candidate images and the initial image are in the same shooting scene, that is, the candidate images and the initial image have the same shooting content, shooting direction, and shooting position. Then, the multiple candidate images also have the same shooting content, shooting direction, and shooting position. Only in this way can the multiple candidate images obtained be used as the basis for selecting the target image.
[0098] In addition, each image processing indicator corresponds to a candidate parameter set, and multiple candidate parameters corresponding to each image processing indicator are located in the candidate parameter set corresponding to each image processing indicator; step 103 includes: combining the candidate parameters selected from the candidate parameter sets corresponding to each image processing indicator to obtain a candidate parameter group; obtaining multiple candidate images captured by the device to be debugged based on multiple candidate parameter groups. That is, when multiple candidate images are obtained, the present disclosure can import different candidate parameters of each image processing indicator separately for shooting, or can combine different candidate parameters of each image processing indicator into a candidate parameter group for shooting.
[0099] For example, the image processing indicators include A, B, and C. The candidate parameters corresponding to the image processing indicator A include A1, A2, and A3; the candidate parameters corresponding to the image processing indicator B include B1 and B2; the candidate parameters corresponding to the image processing indicator C include C1, C2, C3, and C4. A total of 9 candidate parameters can be imported to obtain 9 candidate images, and then the image processing parameters corresponding to the image processing indicators A, B, and C (i.e., the optimal parameters) will be selected. They can also be combined to obtain (A1, B1, C1), (A2, B1, C1), (A3, B1, C1), and so on. 24 candidate parameter groups can be obtained to speed up the debugging selection process, and this method also takes into account the influence between parameters of different indicator types.
[0100] In step 105, based on the quality parameters of each candidate image, a target image is determined from a plurality of candidate images, and image processing parameters corresponding to the target image are selected from a plurality of candidate parameters.
[0101] In this embodiment, a quality evaluation is performed on each candidate image to obtain a quality parameter of each candidate image. The dimension of quality evaluation can be determined based on the application scenario of the device to be debugged, the characteristics of the imaging system of the device to be debugged, the user's requirements for the visual effect of the image, etc. For example, the quality parameters may include clarity, brightness, distortion, noise, etc. When clarity is used as a quality parameter, the higher the clarity of the candidate image, the more likely it is to be used as a target image; when distortion is used as a quality parameter, the smaller the distortion of the candidate image, the more likely it is to be used as a target image; when noise is used as a quality parameter, the smaller the noise of the candidate image, the more likely it is to be used as a target image.
[0102] The candidate parameters corresponding to the image with the best quality and the best visual effect are selected from the candidate images as the image processing parameters. In this way, the image processing method disclosed in the present invention takes into account the influence of the device to be debugged itself on the selection of image processing parameters, and allows the device to be debugged to capture different candidate images under different candidate parameters as the basis for selection, rather than directly processing the initial image based on the collected candidate parameters, and then selecting image processing parameters based on the processed image, thereby improving the accuracy of image processing parameter selection and making the final selection result more likely to reach the global optimum.
[0103] It should be noted that the image processing method disclosed in the present invention is applied to an electronic device that completes a debugging process, or the electronic device executes the above steps to complete the selection of image processing parameters for the device to be debugged.
[0104] In some embodiments, step 103 includes: determining the acquisition range and acquisition step of each initial parameter based on the brightness parameter of the initial image and / or the type of image processing index; within the acquisition range centered on the initial parameter, acquiring and generating multiple candidate parameters corresponding to each initial parameter according to the acquisition step.
[0105] Specifically, the acquisition range and acquisition step of the candidate parameters are different for different brightness of the initial image; the acquisition range and acquisition step of the candidate parameters are different for different types of image processing indicators. The larger the brightness parameter, the brighter the initial image, and the smaller the acquisition range and acquisition step; the smaller the brightness parameter, the darker the initial image, and the larger the acquisition range and acquisition step. For example: if the initial parameter of a certain image processing indicator is 10, the acquisition range is 0-20, and the acquisition step is 2, the candidate parameters obtained include: 0, 2, 4, 6, 8, 10, 12, 14, 16, 18.
[0106] In some embodiments, Figure 2 As shown, when the initial image contains both dynamic objects and static objects, step 104 includes:
[0107] In step 1041, a dynamic processing parameter is selected from a plurality of candidate parameters corresponding to the image processing index of the dynamic object.
[0108] In step 1042, in the same shooting scene as the initial image, multiple candidate images are captured based on multiple candidate parameters corresponding to the dynamic processing parameters and the image processing indexes of the static object.
[0109] In this embodiment, the dynamic object refers to the moving object in the shooting scene, which is the object with a trailing shadow in the initial image, such as a moving car, a running person, a tree blown by the wind, etc. Similarly, the static object refers to the stationary object in the shooting scene, such as a sitting person, a bottle placed on the ground, etc. When the initial image contains both dynamic objects and static objects, this embodiment first selects the image processing parameters (dynamic processing parameters) corresponding to the dynamic objects, and then selects the image processing parameters (static processing parameters) corresponding to the static objects based on the dynamic processing parameters. It can be understood that under the same environment, due to factors such as instability and difficulty in following and capturing, the image photography effect of dynamic objects is often not as good as that of static objects, and processing the image area of dynamic objects often affects the display effect of the image area of static objects. Therefore, first selecting the dynamic processing parameters and then selecting the static processing parameters based on the dynamic processing parameters can effectively improve the debugging and selection efficiency of the parameters and the possibility of the selection result being the global optimal.
[0110] Specifically, a dynamic processing parameter is first selected from multiple candidate parameters corresponding to the dynamic object, and the dynamic processing parameter can make the visual effect of the image area containing the dynamic object in the image reach the best. Then, the dynamic processing parameter and multiple candidate parameters corresponding to the image processing indicators of the static object are combined and imported into the device to be debugged to capture and obtain multiple candidate images. The visual effect of the image area of the dynamic object in these candidate images has reached the best. Subsequently, it is only necessary to select the static processing parameter that can make the visual effect of the image area of the static object in the candidate image reach the best.
[0111] Furthermore, if Figure 2 As shown, in step 105, image processing parameters corresponding to the target image are selected from a plurality of candidate parameters, including:
[0112] In step 1054, a static processing parameter corresponding to the target image is selected from a plurality of candidate parameters corresponding to the image processing index of the static object.
[0113] In step 1055, the dynamic processing parameters and the static processing parameters are combined to obtain image processing parameters.
[0114] In this embodiment, when the initial image contains both static objects and dynamic objects, after obtaining a candidate image by importing multiple candidate parameters corresponding to the dynamic processing parameters and the image processing indicators of the static objects into the device to be debugged (at this time, the visual effect of the image area of the dynamic object in the candidate image has reached the best), based on the quality parameters of the candidate image, a target image is determined from the candidate image. At this time, the quality evaluation of the candidate image is mainly for the image area of the static object in the candidate image, and the determined target image is the one with the best quality in both the image area of the static object and the image area of the dynamic object in all the candidate images.
[0115] Further, step 1041 includes: based on multiple candidate parameters corresponding to the image processing indicators of the dynamic object, capturing multiple images to be processed; cropping the images to be processed to obtain cropped images containing the dynamic object; based on quality parameters of each cropped image, determining a preferred image from the multiple cropped images; and selecting multiple candidate parameters corresponding to the image processing indicators of the preferred image from the multiple candidate parameters corresponding to the image processing indicators of the dynamic object as dynamic processing parameters.
[0116] Specifically, dynamic objects and static objects correspond to different image processing indicators respectively. When selecting dynamic processing parameters, multiple candidate parameters corresponding to the image processing indicators of dynamic objects are imported into the device to be debugged, and the device to be debugged is allowed to capture multiple images to be processed under the same shooting environment as the initial image. Then, in order to eliminate the interference of static objects, the images to be processed are cropped to obtain cropped images containing dynamic objects. The quality of the cropped images containing dynamic objects is evaluated, and the preferred images with the best quality and the best visual effects are selected. The candidate parameters corresponding to the images are the dynamic processing parameters, that is, the image processing parameters that can achieve the optimal image effect of dynamic objects.
[0117] Of course, the cropping step in the above process does not necessarily have to be performed, and the image to be processed may not be cropped, but only the image area of the dynamic object in the image to be processed may be evaluated during the quality evaluation to obtain the quality parameters. The specific processing flow can be adjusted according to the processing requirements and the processing convenience.
[0118] In addition, when the initial image only contains dynamic objects (or static objects), the initial parameters corresponding to the image processing indicators of the dynamic objects (or static objects) are directly determined, and multiple candidate parameters corresponding to the image processing indicators of the dynamic objects (or static objects) are obtained based on the initial parameters. A candidate image is obtained based on the candidate parameters, and the dynamic processing parameters (or static processing parameters) are obtained based on the candidate image. At this time, the dynamic processing parameters or static processing parameters are the image processing parameters.
[0119] In one embodiment, the image processing index of static objects includes at least: multi-channel spatial noise filtering; the image processing index of dynamic objects includes at least one of the following: time domain filtering, spatial domain and frequency domain filtering, and adaptive Bayer filtering.
[0120] In some embodiments, the quality parameters include: a clarity parameter and a noise parameter; Figure 2 As shown, in step 105, based on the quality parameters of each candidate image, a target image is determined from a plurality of candidate images, including:
[0121] In step 1051, the definition parameters of each candidate image are determined respectively, and a definition curve is drawn based on the definition parameters of each candidate image.
[0122] In step 1052, noise parameters of each candidate image are determined respectively, and noise curves are drawn based on the noise parameters of each candidate image.
[0123] In step 1053, the target image is determined from a plurality of candidate images based on the intersection of the clarity curve and the noise curve.
[0124] In this embodiment, the quality of the candidate image is measured from two aspects: clarity and noise. However, clarity and noise are two contradictory image processing indicators, that is, the higher the image clarity, the greater the image noise, and the lower the image clarity, the smaller the image noise. Therefore, the present disclosure draws a clarity curve and a noise curve respectively, and the horizontal coordinates of the two curves represent the number of the candidate image, and the vertical coordinates represent the clarity parameter value or the noise parameter value. The intersection of the clarity curve and the noise curve is the balance point of clarity and noise, and the candidate image corresponding to this point is the target image.
[0125] Furthermore, the image processing method further includes: performing singular value decomposition on the candidate image to obtain a singular value of the candidate image; and using the inverse of the singular value as a clarity parameter of the candidate image.
[0126] Specifically, an RGB image is composed of multiple pixel units, which can be regarded as a three-dimensional matrix during data processing. Singular Value Decomposition (SVD) can decompose the three-dimensional matrix of the image to obtain singular values, which can represent most of the information of the image. The smaller the reciprocal of the singular value, the better the image clarity.
[0127] Furthermore, the image processing method also includes: when the candidate image contains a dynamic object, respectively calculating the structural similarity index of each candidate image and the initial image, and using the structural similarity index as the noise parameter of the candidate image; when the candidate image contains a static object, obtaining the pixel value of the candidate image, and using the pixel value as the noise parameter of the candidate image.
[0128] Specifically, the structural similarity index (SSIM) is an indicator used to quantify the structural similarity between two images. SSIM implements the relevant theories of structural similarity based on the human visual system (HVS) and is sensitive to the perception of local structural changes in images. SSIM quantifies the properties of images from the perspective of brightness, contrast, and structure, using the mean to estimate brightness, the variance to estimate contrast, and the covariance to estimate the degree of structural similarity. The smaller the SSIM value, the smaller the noise. The smaller the pixel value of the image, the smaller the noise.
[0129] In addition, when obtaining the quality parameters of a candidate image containing both static objects and dynamic objects, it is generally cropped so that it only contains static objects (or dynamic objects), and then the quality parameters of the cropped image are calculated. However, when the visual effect of the image area of the dynamic object (or static object) in the candidate image has reached the best, the quality parameters of the candidate image can be calculated without cropping.
[0130] In some embodiments, the image processing method further includes: importing the image processing parameters into the device to be debugged to complete the debugging of the image processing function of the device to be debugged.
[0131] Figure 3 An image processing method is shown according to an exemplary embodiment. The method uses a mobile phone as a device to be debugged and a PC as an electronic device to complete the debugging process. The method includes the following steps:
[0132] In step 301, an initial image taken by a mobile phone is obtained;
[0133] In step 302, it is determined whether the clarity and noise of the initial image meet the standards;
[0134] When the clarity and noise of the initial image meet the standard, the process ends. When the clarity and noise of the initial image do not meet the standard, step 303 to step 308 are executed:
[0135] In step 303, initial parameters of each image processing index of the initial image are determined, and multiple candidate parameters corresponding to each image processing index are collected and generated with each initial parameter as the center;
[0136] In step 304, multiple candidate images are obtained by taking pictures based on various candidate parameters by the mobile phone in the same shooting scene as the initial image;
[0137] In step 305, a target image is determined from a plurality of candidate images based on the quality parameters of each candidate image;
[0138] In step 306, it is determined whether the target image is the optimal visual effect;
[0139] When the target image has the optimal visual effect, step 307 is executed; when the target image does not have the optimal visual effect, step 308 is executed.
[0140] In step 307, the image processing parameters corresponding to the target image are output;
[0141] In step 308, a target image is reselected.
[0142] In this embodiment, the above-mentioned image processing parameter selection process is completed by a computer, the image processing parameters are obtained, and the debugged image processing parameters are imported into the mobile phone to complete the debugging of the image processing function of the mobile phone.
[0143] When the initial image captured by the mobile phone contains a dynamic object, the specific process of determining the target image is as follows: Figure 4 As shown, including:
[0144] In step 401, a plurality of candidate images are obtained by taking pictures of a mobile phone based on various candidate parameters in the same shooting scene as the initial image;
[0145] In step 402, a plurality of candidate images are cropped respectively to obtain a plurality of cropped images containing dynamic objects;
[0146] In step 403, the clarity and noise of the multiple cropped images are calculated, wherein the structural similarity index mssim is used as the noise and the inverse of the singular value 1 / SVD is used as the clarity;
[0147] In step 404, a target image is selected based on the sharpness and noise of the plurality of cropped images.
[0148] This embodiment is a target image selected for an initial image containing a dynamic object. In this embodiment, the same processes as step 302-step 303 and step 306-step 308 are omitted. The specific implementation details can be referred to the previous embodiment and will not be repeated here.
[0149] When the initial image captured by the mobile phone contains a static object, the specific process of determining the target image is as follows: Figure 5 As shown, including:
[0150] In step 501, a plurality of candidate images are obtained by taking a photo of a mobile phone based on various candidate parameters in the same shooting scene as the initial image;
[0151] In step 502, the clarity and noise of multiple candidate images are calculated, wherein the image pixel value FV is used as the noise, and the inverse of the image singular value 1 / SVD is used as the clarity;
[0152] In step 503, a target image is selected based on the clarity and noise of the plurality of cropped images.
[0153] This embodiment is a target image selected for an initial image containing a static object. In this embodiment, the same processes as step 302-step 303 and step 306-step 308 are omitted. The specific implementation details can be referred to the aforementioned embodiment and will not be repeated here.
[0154] Figure 6 It is a specific process of determining the target image based on clarity and noise, including the following steps:
[0155] In step 601, a plurality of candidate images to be calculated are obtained;
[0156] In step 602, the clarity of the candidate image is calculated;
[0157] In step 603, the noise of the candidate image is calculated;
[0158] In step 604, the clarity and noise indicators are normalized;
[0159] In step 605, a definition change curve is drawn;
[0160] In step 606, a noise variation curve is drawn;
[0161] In step 607, the intersection of the two curves is the balance point of noise and clarity, and the corresponding horizontal coordinate is the target image.
[0162] This embodiment is a process of determining a target image by a computer based on the clarity and noise of multiple candidate images captured by a mobile phone.
[0163] Figure 7 An image processing device is shown according to an exemplary embodiment. Figure 7 As shown, the image processing device comprises:
[0164] The acquisition module 701 is configured to capture and obtain an initial image; the first determination module 702 is configured to determine initial parameters of various image processing indicators of the initial image;
[0165] The acquisition module 703 is configured to acquire and generate multiple candidate parameters corresponding to each of the image processing indicators with each of the initial parameters as the center;
[0166] A shooting module 704 is configured to shoot a plurality of candidate images based on the candidate parameters in the same shooting scene as the initial image;
[0167] The second determination module 705 is configured to determine a target image from a plurality of the candidate images based on the quality parameters of each of the candidate images, and select image processing parameters corresponding to the target image from the plurality of candidate parameters.
[0168] In some embodiments, the acquisition module 703 is further configured to:
[0169] Determining the acquisition range and acquisition step length of each of the initial parameters based on the brightness parameter of the initial image and / or the type of the image processing index;
[0170] Within the acquisition range centered on the initial parameter, a plurality of candidate parameters corresponding to each of the initial parameters are acquired and generated according to the acquisition step.
[0171] In some embodiments, the initial image includes a dynamic object and a static object; the shooting module 704 is further configured to:
[0172] Selecting a dynamic processing parameter from a plurality of candidate parameters corresponding to the image processing index of the dynamic object;
[0173] In the same shooting scene as the initial image, a plurality of candidate images are captured based on the dynamic processing parameters and a plurality of candidate parameters corresponding to the image processing index of the static object.
[0174] In some embodiments, the photographing module 704 is further configured to:
[0175] Based on a plurality of candidate parameters corresponding to the image processing index of the dynamic object, a plurality of images to be processed are captured;
[0176] Performing cropping processing on the image to be processed to obtain a cropped image containing the dynamic object;
[0177] Determining a preferred image from a plurality of the cropped images based on quality parameters of each of the cropped images;
[0178] A plurality of candidate parameters corresponding to the image processing index of the preferred image are selected from a plurality of candidate parameters corresponding to the image processing index of the dynamic object and determined as the dynamic processing parameters.
[0179] In some embodiments, the photographing module 704 is further configured to:
[0180] Selecting a static processing parameter corresponding to the target image from a plurality of candidate parameters corresponding to the image processing index of the static object;
[0181] The dynamic processing parameters and the static processing parameters are combined to obtain the image processing parameters.
[0182] In some embodiments, the second determining module 705 is further configured to:
[0183] Determining definition parameters of each of the candidate images respectively, and drawing a definition curve based on the definition parameters of each of the candidate images;
[0184] Determining noise parameters of each of the candidate images respectively, and drawing a noise curve based on the noise parameters of each of the candidate images;
[0185] The target image is determined from the plurality of candidate images based on an intersection point between the sharpness curve and the noise curve.
[0186] In some embodiments, the second determination module 705 is further configured to:
[0187] Performing singular value decomposition on the candidate image to obtain singular values of the candidate image;
[0188] The reciprocal of the singular value is used as the definition parameter of the candidate image.
[0189] In some embodiments, the second determination module is further configured to:
[0190] When the candidate image contains a dynamic object, respectively calculating the structural similarity index of each of the candidate images and the initial image, and using the structural similarity index as the noise parameter of the candidate image;
[0191] When the candidate image contains a static object, a pixel value of the candidate image is obtained, and the pixel value is used as a noise parameter of the candidate image.
[0192] like Figure 8 As shown, the embodiment of the present disclosure further provides an electronic device 800, including:
[0193] Memory 804 for storing processor executable instructions;
[0194] A processor 820 connected to the memory 804;
[0195] The processor 820 is configured to execute the image processing method provided by any of the aforementioned technical solutions.
[0196] A block diagram of an electronic device 800 is shown according to an exemplary embodiment. For example, the electronic device 800 may be a smart phone, a tablet computer, a notebook computer, a portable learning machine, and the like.
[0197] refer to Figure 8, the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 818 .
[0198] The processing component 802 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 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0199] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device 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.
[0200] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 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 800.
[0201] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 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 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0202] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 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 804 or sent via the communication component 818. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0203] I / O interface 812 provides an interface between processing component 802 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.
[0204] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 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 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0205] The communication component 818 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 818 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 818 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.
[0206] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0207] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform 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 magnetic tape, a floppy disk, an optical data storage device, etc.
[0208] An embodiment of the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer, the computer can execute the image processing method described in one or more of the aforementioned technical solutions.
[0209] 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.
[0210] 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: include: Taking pictures to obtain an initial image; Determining initial parameters of various image processing indicators of the initial image; Taking each of the initial parameters as the center, collecting and generating a plurality of candidate parameters corresponding to each of the image processing indicators; Under the same shooting scene as the initial image, a plurality of candidate images are obtained by shooting based on the respective candidate parameters; Based on the quality parameters of each of the candidate images, a target image is determined from the plurality of candidate images, and image processing parameters corresponding to the target image are selected from the plurality of candidate parameters.
2. The image processing method according to claim 1, characterized in that: The collecting and generating a plurality of candidate parameters corresponding to each of the image processing indicators with each of the initial parameters as the center includes: Determining the acquisition range and acquisition step length of each of the initial parameters based on the brightness parameter of the initial image and / or the type of the image processing index; Within the acquisition range centered on the initial parameter, a plurality of candidate parameters corresponding to each of the initial parameters are acquired and generated according to the acquisition step.
3. The image processing method according to claim 1, characterized in that: The initial image includes a dynamic object and a static object; The method of obtaining a plurality of candidate images by shooting based on each of the candidate parameters in the same shooting scene as the initial image comprises: Selecting a dynamic processing parameter from a plurality of candidate parameters corresponding to the image processing index of the dynamic object; In the same shooting scene as the initial image, a plurality of candidate images are captured based on the dynamic processing parameters and a plurality of candidate parameters corresponding to the image processing index of the static object.
4. The image processing method according to claim 3, characterized in that: The step of selecting a dynamic processing parameter from a plurality of candidate parameters corresponding to the image processing index of the dynamic object comprises: Based on a plurality of candidate parameters corresponding to the image processing index of the dynamic object, a plurality of images to be processed are captured; Performing cropping processing on the image to be processed to obtain a cropped image containing the dynamic object; Determining a preferred image from a plurality of the cropped images based on quality parameters of each of the cropped images; A plurality of candidate parameters corresponding to the image processing index of the preferred image are selected from a plurality of candidate parameters corresponding to the image processing index of the dynamic object and determined as the dynamic processing parameters.
5. The image processing method according to claim 3, characterized in that: The step of selecting the image processing parameter corresponding to the target image from the plurality of candidate parameters comprises: Selecting a static processing parameter corresponding to the target image from a plurality of candidate parameters corresponding to the image processing index of the static object; The dynamic processing parameters and the static processing parameters are combined to obtain the image processing parameters.
6. The image processing method according to claim 5, characterized in that: The image processing index of the static object includes at least: multi-channel spatial noise filtering; The image processing index of the dynamic object includes at least one of the following: time domain filtering, space domain and frequency domain filtering, and adaptive Bayer filtering.
7. The image processing method according to claim 1, characterized in that: The quality parameters include: clarity parameters and noise parameters; Determining a target image from a plurality of the candidate images based on the quality parameters of each of the candidate images comprises: Determining definition parameters of each of the candidate images respectively, and drawing a definition curve based on the definition parameters of each of the candidate images; Determining noise parameters of each of the candidate images respectively, and drawing a noise curve based on the noise parameters of each of the candidate images; The target image is determined from the plurality of candidate images based on an intersection point between the sharpness curve and the noise curve.
8. The image processing method according to claim 7, characterized in that: The method further comprises: Performing singular value decomposition on the candidate image to obtain singular values of the candidate image; The reciprocal of the singular value is used as the definition parameter of the candidate image.
9. The image processing method according to claim 7, characterized in that: The method further comprises: When the candidate image contains a dynamic object, respectively calculating the structural similarity index of each of the candidate images and the initial image, and using the structural similarity index as the noise parameter of the candidate image; When the candidate image contains a static object, a pixel value of the candidate image is obtained, and the pixel value is used as a noise parameter of the candidate image.
10. An image processing device, characterized in that: include: An acquisition module, configured to capture and obtain an initial image; A first determination module, configured to determine initial parameters of various image processing indicators of the initial image; A collection module, configured to collect and generate multiple candidate parameters corresponding to each of the image processing indicators with each of the initial parameters as the center; A shooting module, configured to shoot a plurality of candidate images based on each of the candidate parameters in the same shooting scene as the initial image; The second determination module is configured to determine a target image from a plurality of the candidate images based on the quality parameters of each of the candidate images, and select image processing parameters corresponding to the target image from the plurality of candidate parameters.
11. An electronic device, characterized in that: include: processor; a memory configured to store processor-executable instructions; The processor is configured to execute the image processing method according to any one of claims 1 to 9 when calling the executable instructions in the memory. 12 . A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Image shooting method, image shooting device, mobile terminal and storage medium
CN111654594A
Shooting method and device based on multiple cameras and electronic equipment
CN113364965A
Image synchronization method and device, equipment and computer storage medium
CN113728653A
Photographing method and device, mobile terminal and storage medium
US20210306558A1
Image processing method and apparatus, and computer readable storage medium
WO2022193288A1