Image processing method and device, electronic equipment and storage medium
By checking and updating image quality parameters in the hardware abstraction layer of electronic devices, the problem of parameter selection correctness in complex shooting scenes is solved, cross-platform image quality detection and update are realized, and image processing effect is improved.
Patent Information
- Application Number
- CN202310802523.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
In complex shooting function scenarios, the prior art is difficult to ensure the correctness of image quality parameters, resulting in poor image quality effects.
By introducing a verification mechanism for image processing requests and initial image quality parameters in the hardware abstraction layer of electronic devices, a cloud server is used to update parameters to ensure cross-platform image quality parameter detection and update between different hardware abstraction layers.
It realizes the accuracy and breadth of image quality parameter selection in complex shooting scenes, ensures cross-platform application of image quality parameter detection, and improves image processing effect.
Smart Images

Figure CN119233079A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] Currently, the quality of images taken by electronic devices is determined by image quality parameters.
[0003] In the related art, the image quality parameter selection method is to select the image quality parameter path according to the requested attributes of the current captured image, and then read the image quality parameters from the corresponding path file. As the functions of electronic devices increase, the photo-taking function scenarios become more and more complex, which increases the complexity of image quality parameter selection.
[0004] In this way, the complexity of image quality parameters will make it impossible to ensure the correctness of image quality parameter selection in some scenarios, affecting the accuracy of image quality parameter selection and resulting in poor image quality effects obtained by electronic equipment. Summary of the invention
[0005] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0006] To this end, the purpose of the present disclosure is to provide an image processing method, device, electronic device, storage medium and computer program product.
[0007] An embodiment of a first aspect of the present disclosure proposes an image processing method, which is applied to a first hardware abstraction layer of an electronic device, and wherein the electronic device also includes: a second hardware abstraction layer, and the method includes: sending an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to a preview image; and acquiring a target image based on the received initial image quality parameters sent by the second hardware abstraction layer.
[0008] An embodiment of a second aspect of the present disclosure proposes a method for generating image quality parameters, which is applied to a second hardware abstraction layer of an electronic device, wherein the electronic device also includes a first hardware abstraction layer different from the second hardware abstraction layer, and the method includes: receiving an image processing request sent by the first hardware abstraction layer; generating initial image quality parameters corresponding to a preview image based on the image processing request; and sending the initial image quality parameters to the first hardware abstraction layer.
[0009] An embodiment of the third aspect of the present disclosure proposes a method for generating image quality parameters, which is applied to a cloud server corresponding to an electronic device. The method includes: receiving an abnormal initial image quality parameter item indicated by the electronic device; generating parameter update information corresponding to the abnormal initial image quality parameter item, wherein the parameter update information is used for a first hardware abstraction layer of the electronic device to update the abnormal initial image quality parameter item; and sending the parameter update information to the first hardware abstraction layer.
[0010] An embodiment of the fourth aspect of the present disclosure proposes an image quality parameter generation device, which is applied to a first hardware abstraction layer of an electronic device, and wherein the electronic device also includes: a second hardware abstraction layer, and the device includes: a first transmission module, used to send an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to a preview image; an acquisition module, used to acquire a target image based on the received initial image quality parameters sent by the second hardware abstraction layer.
[0011] The fifth aspect embodiment of the present disclosure proposes an image quality parameter generating device, wherein the electronic device also includes a first hardware abstraction layer different from the second hardware abstraction layer, and is characterized in that the device includes: a second receiving module, used to receive an image processing request sent by the first hardware abstraction layer; a first generating module, used to generate initial image quality parameters corresponding to the preview image according to the image processing request; and a second transmission module, used to send the initial image quality parameters to the first hardware abstraction layer.
[0012] The sixth aspect embodiment of the present disclosure proposes an image quality parameter generation device, which is applied to a cloud server corresponding to an electronic device, and the device includes: a fifth transmission module, used to receive an abnormal initial image quality parameter item indicated by the electronic device; a second generation module, used to generate parameter update information corresponding to the abnormal initial image quality parameter item, wherein the parameter update information is used for the first hardware abstraction layer of the electronic device to update the abnormal initial image quality parameter item; a sixth transmission module, used to send the parameter update information to the first hardware abstraction layer.
[0013] The seventh aspect embodiment of the present disclosure proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the image processing method proposed in the first aspect embodiment of the present disclosure, or implements the image quality parameter generation method proposed in the second aspect embodiment of the present disclosure, or implements the image quality parameter generation method proposed in the third aspect embodiment of the present disclosure.
[0014] The eighth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the image processing method proposed in the first aspect embodiment of the present disclosure, or implements the image quality parameter generation method proposed in the second aspect embodiment of the present disclosure, or implements the image quality parameter generation method proposed in the third aspect embodiment of the present disclosure.
[0015] The ninth aspect embodiment of the present disclosure proposes a computer program product. When the instructions in the computer program product are executed by a processor, the image processing method proposed in the first aspect embodiment of the present disclosure is executed, or the image quality parameter generation method proposed in the second aspect embodiment of the present disclosure is executed, or the image quality parameter generation method proposed in the third aspect embodiment of the present disclosure is executed.
[0016] The image processing method, device, electronic device, storage medium and computer program product proposed in the embodiments of the present disclosure are applied to the first hardware abstraction layer of the electronic device, and the electronic device also includes: a second hardware abstraction layer, which at least includes the following beneficial effects: by sending an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image, based on the received initial image quality parameters sent by the second hardware abstraction layer, a target image is obtained, the first hardware abstraction layer can be set for image quality parameter verification, the first hardware abstraction layer can be set for image quality parameter verification, and timely update processing is performed when the image quality parameter selection is incorrect, so as to ensure the correctness of the image quality parameter selection in complex shooting function scenarios. Since the first hardware abstraction layer can be compatible with a variety of different second hardware abstraction layer image quality parameter detection operations, a cross-platform design of image quality parameter detection is realized, and the wide application of image quality parameter detection is ensured.
[0017] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0019] Figure 1 is a flowchart of an image processing method proposed in an embodiment of the present disclosure;
[0020] Figure 2 is a flowchart of an image processing method proposed in another embodiment of the present disclosure;
[0021] Figure 3 is a schematic diagram of the architecture of image quality parameter monitoring in an embodiment of the present disclosure;
[0022] Figure 4 is a flowchart of an image processing method proposed in another embodiment of the present disclosure;
[0023] Figure 5 is a timing diagram of image quality parameter monitoring in an embodiment of the present disclosure;
[0024] Figure 6 is a flowchart of a method for generating image quality parameters proposed in an embodiment of the present disclosure;
[0025] Figure 7 is a flowchart of a method for generating image quality parameters proposed in another embodiment of the present disclosure;
[0026] Figure 8 is a flowchart of a method for generating image quality parameters proposed in another embodiment of the present disclosure;
[0027] Fig. 9 is a flowchart of a method for generating image quality parameters proposed in another embodiment of the present disclosure;
[0028] Fig.10 is a structural schematic diagram of an image processing device proposed in an embodiment of the present disclosure;
[0029] Fig.11 is a structural schematic diagram of an image processing device proposed in another embodiment of the present disclosure;
[0030] Fig.12 is a structural schematic diagram of an image quality parameter generating device proposed in an embodiment of the present disclosure;
[0031] Fig.13 is a structural schematic diagram of an image quality parameter generating device proposed in another embodiment of the present disclosure;
[0032] Fig.14 is a structural schematic diagram of an image quality parameter generating device proposed in another embodiment of the present disclosure;
[0033] Fig.15 is a structural schematic diagram of an image quality parameter generating device proposed in another embodiment of the present disclosure;
[0034] Fig.16 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0035] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and are not to be construed as limitations of the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications, and equivalents that fall within the spirit and connotation of the appended claims.
[0036] Figure 1 It is a flowchart of an image processing method proposed in an embodiment of the present disclosure.
[0037] It should be noted that the image processing method of this embodiment is executed by an image processing device, which can be implemented by software and / or hardware, and can be configured in an electronic device, without limitation.
[0038] like Figure 1 As shown, the image processing method is applied to a first hardware abstraction layer of an electronic device, and wherein the electronic device further includes: a second hardware abstraction layer, and the method includes:
[0039] The electronic device refers to a device that has a camera application and can be used for image capture. The electronic device may be, for example, a mobile phone, a tablet computer, or any other device that can be used for intelligent photo processing, without limitation.
[0040] The first hardware abstraction layer refers to a hardware abstraction layer set in an electronic device and can be used to monitor and process the correctness of image quality parameters. A quality monitoring module is set in the first hardware abstraction layer to detect the importance of image quality parameters.
[0041] Among them, the second hardware abstraction layer refers to a hardware abstraction layer set in the electronic device that can be used to select and generate image quality parameters according to image processing requests. There can be many types of second hardware abstraction layers, for example, different hardware abstraction layers produced by different manufacturers.
[0042] S101: Sending an image processing request to a second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to a preview image.
[0043] The image processing request refers to request information for requesting the second hardware abstraction layer to perform image quality selection processing, and the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image.
[0044] Among them, the initial image quality parameters refer to the image quality parameters obtained by the second hardware abstraction layer according to the received image processing request and transmitted to the first hardware abstraction layer. The initial image quality parameters are the image quality parameters before the first hardware abstraction layer verifies their correctness.
[0045] The preview image refers to an image to be processed in terms of image quality corresponding to the image processing request.
[0046] In the disclosed embodiment, the first hardware abstraction layer and the second hardware abstraction layer are different hardware abstraction layers that participate in image quality parameter processing. The first hardware abstraction layer and the second hardware abstraction layer can exchange data. When sending an image processing request to the second hardware abstraction layer, the first hardware abstraction layer can receive the image processing request generated by the camera application according to the currently selected shooting function scene, and send the image processing request to the second hardware abstraction layer. After receiving the image processing request, the second hardware abstraction layer can generate initial image quality parameters corresponding to the preview image. The second hardware abstraction layer can obtain parameter items required to generate the initial image quality parameters from the image processing request, generate corresponding initial image quality parameters based on the obtained parameter items, and send the initial image quality parameters to the first hardware abstraction layer.
[0047] In the disclosed embodiment, the first hardware abstraction layer is a hardware abstraction layer for monitoring the correctness of image quality, and the second hardware abstraction layer is an image quality parameter for preliminary selection of image quality parameters. Since the second hardware abstraction layer can be a variety of different hardware abstraction layers, by performing layered processing on the hardware abstraction layers involved in the selection of image quality parameters, and the first hardware abstraction layer can be compatible with a variety of different second hardware abstraction layers, a cross-platform design for monitoring and adjusting the correctness of image quality parameters can be implemented, thereby ensuring the wide application of image quality monitoring in different second hardware abstraction layers.
[0048] S102: Acquire a target image based on the received initial image quality parameters sent by the second hardware abstraction layer.
[0049] The target image refers to an image obtained by performing image quality processing on the preview image based on the initial image quality parameters sent by the second hardware abstraction layer.
[0050] In the embodiment of the present disclosure, after sending an image processing request to the second hardware abstraction layer, the second hardware abstraction layer generates initial image quality parameters corresponding to the preview image according to the image processing request, and sends the initial image quality parameters to the first hardware abstraction layer, the target image can be acquired based on the received initial image quality parameters sent by the second hardware abstraction layer.
[0051] In the embodiment of the present disclosure, when acquiring a target image based on the received initial image quality parameters sent by the second hardware abstraction layer, the first hardware abstraction layer may perform a correctness check on the received initial image quality parameters. If the initial image quality parameters are correctly selected after the check, the initial image quality parameters may be provided to an image processor in the electronic device, so that the image processor adjusts the quality of the preview image according to the initial image quality to generate a processed target image. If the initial image quality parameters are incorrectly selected after the check, the initial image quality parameters may be re-determined to correct the initial image quality parameters, and the corrected image quality parameters may be provided to the image processor in the electronic device, so that the image processor adjusts the quality of the preview image according to the corrected image quality parameters and generates a processed target image, thereby achieving acquisition of the target image based on the received initial image quality parameters sent by the second hardware abstraction layer.
[0052] In this embodiment, an image processing request is sent to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image, and based on the received initial image quality parameters sent by the second hardware abstraction layer, a target image is obtained, and the first hardware abstraction layer can be set for image quality parameter verification, and the first hardware abstraction layer can be set for image quality parameter verification, and timely update processing is performed when the image quality parameter selection is incorrect, so as to ensure the correctness of the image quality parameter selection in complex shooting function scenarios. Since the first hardware abstraction layer can be compatible with a variety of different second hardware abstraction layer image quality parameter detection operations, a cross-platform design of image quality parameter detection is realized, thereby ensuring the wide application of image quality parameter detection.
[0053] Figure 2 It is a flowchart of an image processing method proposed in another embodiment of the present disclosure.
[0054] like Figure 2 As shown, the image processing method is applied to the first hardware abstraction layer of the electronic device, and the method includes:
[0055] In the disclosed embodiment, the electronic device further includes: an image processor, wherein the image processor refers to a hardware device in the electronic device for performing image processing. The image processor can adjust the image quality of the preview image according to the image quality parameters to obtain a processed target image.
[0056] S201: Sending an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image.
[0057] For the detailed description of S201 , please refer to the above embodiment, which will not be repeated here.
[0058] S202: Processing initial image quality parameters to obtain target image quality parameters.
[0059] The target image quality parameters refer to image quality parameters obtained after the first hardware abstraction layer verifies the initial image quality parameters, and the target image quality parameters are image quality parameters required for adjusting the quality of the preview image.
[0060] In the disclosed embodiment, when processing image quality parameters to obtain target image quality parameters, the first hardware abstraction layer can perform correctness verification processing on the initial image quality parameters to obtain corresponding verification results. If the verification result indicates that the initial image quality parameters are correctly selected, the initial image quality parameters are used as the target image quality parameters. If the verification result indicates that there is an error in the selection of the initial image quality parameters, the erroneous parameter items in the initial image quality parameters can be corrected to obtain the correct image quality parameters after processing as the target image quality parameters.
[0061] Optionally, in some embodiments, image quality parameter request information sent by the second hardware abstraction layer can also be received, wherein the image quality parameter request information is used by the first hardware abstraction layer to verify the initial image quality parameters. When processing the initial image quality parameters to obtain the target image quality parameters, the initial image quality parameters can be processed according to the image quality parameter request information to obtain the target image quality parameters.
[0062] The image quality parameter request information refers to the information used by the first hardware abstraction layer to verify the initial image quality parameters. The image quality parameter request information is obtained by parsing the image processing request by the second hardware abstraction layer and is sent by the second hardware abstraction layer to the first hardware abstraction layer.
[0063] In the disclosed embodiment, after the second hardware abstraction layer receives the image processing request, it can parse the image processing request to obtain image quality parameter request information, and send the image quality parameter request information to the first hardware abstraction layer. The first hardware abstraction layer receives the image quality parameter request information sent by the second hardware abstraction layer. The image quality parameter request information is used by the first hardware abstraction layer to verify the initial image quality parameters. When processing the initial image quality parameters to obtain the target image quality parameters, it can be verified whether the selection of the initial image quality parameters is correct according to the image quality parameter request information. When the selection is correct, the initial image quality parameters are used as the target image quality parameters. When the selection is incorrect, the initial image quality parameters are corrected and the corrected image quality parameters are used as the target image quality parameters.
[0064] It should be noted that the second hardware abstraction layer sends image quality parameter request information and initial image quality parameters to the first hardware abstraction layer, wherein the order in which the image quality parameter request information and the initial image quality parameters are sent can be that the second hardware abstraction layer sends the image quality parameter request information and the initial image quality parameters to the first hardware abstraction layer at the same time, or the image quality parameter request information and the initial image quality parameters can be sent one after another, and there is no restriction on this.
[0065] In the embodiment of the present disclosure, when the initial image quality parameters are processed according to the image quality parameter request information to obtain the target image quality parameters, the image quality parameter related json configuration information stored in the first hardware abstraction layer can be obtained, and the configuration information stores the correspondence between different image quality parameter request information and the image quality parameters. According to the correspondence between different image quality parameter request information and the image quality parameters in the configuration information, it is determined whether the correspondence between the received image quality parameter request information and the initial image quality parameters is correct, and the corresponding verification result is obtained. If the verification result indicates that the correspondence is correct, it indicates that the initial image quality parameters are correctly selected, and the initial image quality parameters are used as the target image quality parameters. If the verification result indicates that the correspondence is incorrect, it means that the initial image quality parameters are incorrectly selected, and the image quality parameter re-decision logic can be started, and the incorrectly selected image quality parameter items in the initial image quality parameters are replaced and modified according to the configuration information and the parameter update indication of the cloud server of the electronic device, so as to obtain the modified image quality parameters as the target image quality parameters, so as to realize the processing of the initial image quality parameters according to the image quality parameter request information and obtain the target image quality parameters.
[0066] Optionally, in some embodiments, reference image quality parameter information is stored in the first hardware abstraction layer, wherein the reference image quality parameter information is used to describe the correspondence between image quality parameter request information and one or more reference image quality parameters. When the initial image quality parameters are processed according to the image quality parameter request information to obtain the target image quality parameters, the initial image quality parameters can be verified according to the reference image quality parameter information and the image quality parameter request information to obtain the verification results, and the initial image quality parameters are processed according to the verification results to obtain the target image quality parameters.
[0067] Among them, the reference image quality parameter information refers to data information stored in the first hardware abstraction layer, which is used to describe the correspondence between image quality parameter request information and reference image quality parameters. It can be stored in a json file as configuration information. The reference image quality parameter information is pre-stored in the first hardware abstraction when developing the first hardware abstraction layer.
[0068] The verification result refers to data information that can be used to indicate whether the selection of the initial image quality parameters is correct.
[0069] In the disclosed embodiment, when the initial image quality parameters are processed according to the quality parameter request information to obtain the target image quality parameters, the reference image quality parameters that match the quality parameter request information sent by the second hardware abstraction layer can be selected from the correspondence between the quality parameter request information described in the quality parameter request information and one or more reference image quality parameters, and the reference image quality parameters are compared with the initial image quality parameters to obtain a corresponding comparison result, which is used to indicate whether the reference image quality parameters are the same as the initial image quality parameters, and the comparison result is used as a verification result, and then the initial image quality parameters are processed according to the verification result to obtain the target image quality parameters.
[0070] In the disclosed embodiment, when the initial image quality parameters are processed according to the verification results to obtain the target image quality parameters, the verification results can be analyzed. If the verification result shows that the reference image quality parameters are the same as the initial image quality parameters, the initial image quality parameters are used as the target image quality parameters. If the verification result shows that the reference image quality parameters are different from the initial image quality parameters, a new decision and correction is made based on the parameter items in the initial image quality parameters indicated in the verification result that are different from the reference image quality parameters, and the corrected image quality parameters are used as the target image quality parameters.
[0071] For example, Figure 3 As shown, Figure 3 1 is a schematic diagram of the architecture of image quality parameter monitoring in the embodiment of the present disclosure, in which a quality monitoring module is added to the first hardware abstraction layer, and the module is used to compare whether the image quality parameter path selection is correct, and monitor the image quality parameters in combination with the image processing result of the second hardware abstraction layer, wherein the first hardware abstraction layer can be compatible with different second hardware abstraction layers to realize the cross-platform design of the image quality parameter monitoring function, and the specific execution process is: first, the camera application sends an image processing request to the first hardware abstraction layer, the first platform hardware abstraction layer sends an image request to the second hardware abstraction layer, and when the second platform hardware abstraction layer processes the current image request, it will send the request attributes of the image and the selected image quality parameter file to the second platform hardware abstraction layer. The file path is passed to the image quality monitoring module in the first hardware abstraction layer through the callback function. The image quality monitoring module will determine whether the image quality file path parameter selection is correct based on the configuration information in json and the image request information. If the parameter selection is incorrect, it will trigger the re-decision logic, and then update the determined image quality parameter path to the second platform hardware abstraction layer. At the same time, the daemon process will be notified to send the error information to the cloud, which will then be distributed to the R&D personnel by the cloud server. Among them, some image request attributes mainly include requested scenes, frames, sizes, exposure values, portraits and other information. The json file is the corresponding information of the image request attributes and image quality parameter paths confirmed by the R&D personnel.
[0072] S203: providing the target image quality parameters to the image processor, so that the image processor processes the preview image to output the target image.
[0073] In the embodiment of the present disclosure, after processing the initial image quality parameters as described above to obtain the target image quality parameters, the target image quality parameters can be provided to the image processor, and the image processor can apply the target image quality parameters to the preview image, adjust the preview image to the image quality effect corresponding to the target image quality parameters, and use the image after generating the image quality effect as the target image, thereby enabling the image processor to process the preview image to output the target image.
[0074] S204: Acquire the target image output by the image processor.
[0075] In the embodiment of the present disclosure, after providing the target image quality parameters to the image processor so that the image processor processes the preview image to output the target image, the target image output by the image processor can be obtained, thereby obtaining the target image based on the initial image quality parameters sent by the received second hardware abstraction layer.
[0076] In this embodiment, by sending an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image, a target image is obtained based on the received initial image quality parameters sent by the second hardware abstraction layer, the first hardware abstraction layer can be set for image quality parameter verification, the first hardware abstraction layer can be set for image quality parameter verification, timely update processing is performed when the image quality parameter selection is incorrect, and the correctness of the image quality parameter selection in complex shooting function scenarios is ensured. Since the first hardware abstraction layer can be compatible with a variety of different second hardware abstraction layer image quality parameter detection operations, a cross-platform design of image quality image parameter detection is realized, and the wide application of image quality parameter detection is ensured. By verifying the initial image quality parameters according to the reference image quality parameter information and the image quality parameter request information, a verification result is obtained, and the initial image quality parameters are processed according to the verification result to obtain the target image quality parameters. When the image quality parameter selection is incorrect, timely correction processing can be performed according to the verification result, and the correctness of the image quality parameter selection in complex shooting function scenarios is ensured, and the image quality processing effect of the electronic device is ensured.
[0077] Figure 4 It is a flowchart of an image processing method proposed in another embodiment of the present disclosure.
[0078] like Figure 4 As shown, the image processing method is applied to the first hardware abstraction layer of the electronic device, and the method includes:
[0079] For the detailed description of the first hardware abstraction layer, please refer to the above embodiment, which will not be repeated here.
[0080] S401: Sending an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image.
[0081] S402: Receive image quality parameter request information sent by the second hardware abstraction layer, wherein the image quality parameter request information is used by the first hardware abstraction layer to verify the initial image quality parameters.
[0082] For the detailed description of S401 and S402 , please refer to the above embodiments, which will not be repeated here.
[0083] S403: Determine, from the reference image quality parameter information, a reference image quality parameter that matches the image quality parameter request information.
[0084] In the embodiment of the present disclosure, when the initial image quality parameters are verified based on the reference image quality parameter information and the image quality parameter request information to obtain the verification result, the image quality parameter request information can be matched based on the correspondence between the image quality parameter request information described in the reference image quality parameter information and one or more reference image quality parameters to obtain the reference image quality parameters in the reference image quality parameter information that match the image quality parameter request information sent by the second hardware abstraction layer.
[0085] S404: Compare the reference image quality parameters with the initial image quality parameters to obtain a parameter comparison result, and use the parameter comparison result as a verification result.
[0086] The reference comparison result refers to a data comparison result that can be used to indicate whether the image quality parameters of the reference image are the same as the image quality parameters of the initial image.
[0087] After determining the reference image quality parameters that match the image quality parameter request information from the reference image quality parameter information, the disclosed embodiment can compare the reference image quality parameters with the initial image quality parameters to compare whether there are different image quality parameter items in the reference image quality parameters and the initial image quality parameters, and obtain corresponding parameter comparison results. The reference comparison result is used to indicate whether the reference image quality parameters are the same as the initial image quality parameters, and the parameter comparison result is used as the verification result.
[0088] S405: If the verification result indicates that the initial image quality parameters are different from the reference image quality parameters, the initial image quality parameters are updated according to the reference image quality parameter information and the verification result to obtain the target image quality parameters.
[0089] In the disclosed embodiment, when the initial image quality parameters are processed according to the verification results to obtain the target image quality parameters, the verification results can be analyzed and processed. If the verification results indicate that the initial image quality parameters are different from the reference image quality parameters, the initial image quality parameters are updated according to the reference quality parameter information and the verification results to obtain the target image quality parameters.
[0090] In the disclosed embodiment, when the initial image quality parameters are updated according to the reference image quality parameter information and the verification results to obtain the target image quality parameters, it can be determined that there are incorrectly selected parameter items in the initial image quality parameters according to the reference image quality parameter information and the verification results, and the initial image quality parameters can be corrected by auxiliary selection of correct parameter items in the reference image quality parameter values, and the corrected image quality parameters are used as the target image quality parameters.
[0091] Optionally, in some embodiments, the initial image quality parameters include: initial image quality parameter items, and the reference image quality parameters include: reference image quality parameter items, wherein when the initial image quality parameters are updated according to the reference image quality parameter information and the verification results to obtain the target image quality parameters, the abnormal initial image quality parameter items in the initial image quality parameter items that are different from the reference image quality parameter items can be determined according to the verification results, and the abnormal initial image quality parameters in the initial image quality parameters are updated to obtain the target image quality parameters.
[0092] Among them, the picture quality parameter items refer to parameters used to achieve different picture quality functions, such as portrait, night scene and high dynamic range imaging (HDR). The picture quality parameter items that constitute the initial image quality parameters are called initial picture quality parameter items, and the picture quality parameter items that constitute the reference image quality parameters are called reference picture quality parameter items.
[0093] In the disclosed embodiment, the initial image quality parameters are composed of initial image quality parameter items, and the reference image quality parameters are composed of reference image quality parameter items. When the initial image quality parameters are updated according to the reference image quality parameter information and the verification result to obtain the target image quality parameters, if the verification result indicates that the initial image quality parameters and the reference image quality parameters are different, the initial image quality parameter items in the initial image quality parameters and the reference image quality parameter items in the reference image quality parameters can be compared to obtain the image quality parameter items in the initial image quality parameter items that are different from the reference image quality parameter items as abnormal initial image quality parameter items, and then the abnormal initial image quality parameter items can be re-determined and selected, and the abnormal initial image quality parameter items can be replaced and corrected to obtain the corrected image quality parameters as the target image quality parameters.
[0094] Optionally, in some embodiments, when the abnormal initial image quality parameters in the initial image quality parameters are updated to obtain the target image quality parameters, the abnormal initial image quality parameter items can be indicated to the cloud server corresponding to the electronic device, so that the cloud server generates parameter update information for updating the abnormal initial image quality parameter items, receives the parameter update information sent by the cloud server, and updates the abnormal initial image quality parameters in the initial image quality parameters according to the parameter update information to obtain the target image quality parameters.
[0095] In the disclosed embodiment, when the abnormal initial image quality parameters in the initial image quality parameters are updated and the target image quality parameters are obtained, the abnormal initial image quality parameter items can be indicated to the cloud server corresponding to the electronic device, and the daemon process can be notified to send the image quality parameter error information to the cloud, which is then distributed to the R&D personnel by the cloud server. The R&D personnel can analyze and process the error information. The cloud server generates parameter update information for updating the abnormal initial image quality parameter items based on the preset parameter selection logic and the error information, and sends the parameter update information to the corresponding first hardware platform layer by the cloud server. The first hardware platform layer receives the parameter update information sent by the cloud server, updates the abnormal initial image quality parameters in the initial image quality parameters according to the parameter update method indicated in the parameter update information, and uses the updated image quality parameters as the target image quality parameters.
[0096] S406: If the verification result indicates that the initial image quality parameters are the same as the reference image quality parameters, the initial image quality parameters are used as target image quality parameters.
[0097] In the disclosed embodiment, when the initial image quality parameters are processed according to the verification results to obtain the target image quality parameters, the verification results can be analyzed and processed. If the verification results indicate that the initial image quality parameters are the same as the reference image quality parameters, the initial image quality parameters are used as the target image quality parameters.
[0098] For example, Figure 5 As shown, Figure 5This is a timing diagram of image quality parameter monitoring in the embodiment of the present disclosure. First, the camera application sends an image processing request to the first platform hardware abstraction layer. The first platform hardware abstraction layer sends an image processing request to the second platform hardware abstraction layer. The second platform hardware abstraction layer parses the image processing request to obtain image request attributes, selects and generates corresponding image quality parameter paths according to the image request attributes, and passes the request attributes of this image and the selected image quality parameter file path to the image quality monitoring module in the first platform hardware abstraction layer through a callback function. The image quality monitoring module compares the image quality parameter path configured in json with the image quality parameter path issued by the platform abstraction layer to determine whether the image quality file path parameter selection is correct. If the paths are inconsistent, it indicates that the parameter selection is incorrect. Incorrect parameter selection will trigger the re-decision logic, and then the determined image quality parameter path will be updated to the second platform hardware abstraction layer. At the same time, the daemon process will be notified to send the error information to the cloud server.
[0099] S407: providing the target image quality parameters to the image processor, so that the image processor processes the preview image to output the target image.
[0100] S408: Acquire the target image output by the image processor.
[0101] For the detailed description of S407 and S408 , please refer to the above embodiments, which will not be repeated here.
[0102] In this embodiment, an image processing request is sent to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image, and based on the received initial image quality parameters sent by the second hardware abstraction layer, a target image is obtained, and the first hardware abstraction layer can be set for image quality parameter verification, and the first hardware abstraction layer can be set for image quality parameter verification, and timely update processing is performed when the image quality parameter selection is incorrect, so as to ensure the correctness of the image quality parameter selection in complex shooting function scenarios. Since the first hardware abstraction layer can be compatible with a variety of different second hardware abstraction layer image quality parameter detection operations, a cross-platform design of image quality parameter detection is realized, thereby ensuring the wide application of image quality parameter detection.
[0103] Figure 6 It is a flowchart of an image quality parameter generation method proposed in an embodiment of the present disclosure.
[0104] like Figure 6 As shown, the image quality parameter generation method is applied to the second hardware abstraction layer of the electronic device, and the method includes:
[0105] The electronic device further comprises a first hardware abstraction layer which is different from the second hardware abstraction layer. The second hardware abstraction layer is used to generate initial image quality parameters, and the first hardware abstraction layer is used to verify the initial image quality parameters.
[0106] S601: Receive an image processing request sent by a first hardware abstraction layer of an electronic device.
[0107] In the disclosed embodiment, when taking images using a camera application of an electronic device, the camera application may send an image processing request to a first hardware abstraction layer. After receiving the image processing request, the first hardware abstraction layer may forward the image processing request to a second hardware abstraction layer, and the second hardware abstraction layer may receive the image processing request sent by the first hardware abstraction layer.
[0108] S602: Generate initial image quality parameters corresponding to the preview image according to the image processing request.
[0109] After receiving the image processing request sent by the first hardware abstraction layer of the electronic device, the embodiment of the present disclosure can generate initial image quality parameters corresponding to the preview image according to the image processing request.
[0110] In the disclosed embodiment, when generating initial image quality parameters corresponding to a preview image based on an image processing request, the image processing request can be parsed to obtain quality parameter items required to generate the initial image quality parameters, and the obtained quality parameter items can be combined and processed to generate the initial image quality parameters.
[0111] Optionally, in some embodiments, when generating initial image quality parameters corresponding to a preview image based on an image processing request, the image processing request can be parsed to obtain quality parameter request information, wherein the quality parameter request information is used to describe quality parameter items required for the second hardware abstraction layer to generate the initial image quality parameters, and the initial image quality parameters are generated based on the quality parameter request information, and the quality parameter request information is sent to the first hardware abstraction layer.
[0112] Among them, the image processing request contains image quality parameter request information for image quality parameter selection processing. The image processing request can be parsed to obtain the image quality parameter request information. The image request attributes mainly include image scene, frame, size, exposure value, portrait and other information.
[0113] In the disclosed embodiment, when generating initial image quality parameters based on image quality parameter request information, specific selection and setting can be performed one by one on parameter items such as image scene, frame, size, exposure value, portrait, etc. according to multiple image attributes requested in the image quality parameter request information, the selected parameter items are combined to generate the initial image quality parameters, and the image quality parameter request information and the initial image quality parameters are sent to the first hardware abstraction layer.
[0114] S603: Sending initial image quality parameters to the first hardware abstraction layer.
[0115] After generating the initial image quality parameters corresponding to the preview image according to the image processing request, the disclosed embodiment may send the initial image quality parameters to the first hardware abstraction layer, and the first hardware abstraction layer may obtain the target image based on the received initial image quality parameters sent by the second hardware abstraction layer.
[0116] In the disclosed embodiment, by receiving an image processing request sent by the first hardware abstraction layer, initial image quality parameters corresponding to the preview image are generated according to the image processing request, and the initial image quality parameters are sent to the first hardware abstraction layer. Quality parameters corresponding to the preview image can be selected according to the image processing request, and the initial image quality parameters are transmitted back to the first hardware abstraction layer, thereby assisting the first hardware abstraction layer to complete parameter verification and target image acquisition.
[0117] Figure 7 It is a flowchart of an image quality parameter generation method proposed in another embodiment of the present disclosure.
[0118] like Figure 7 As shown, the image quality parameter generation method is applied to the second hardware abstraction layer of the electronic device, and the method includes:
[0119] S701: Receive an image processing request sent by a first hardware abstraction layer of an electronic device.
[0120] S702: Parse the image processing request to obtain image quality parameter request information.
[0121] For the detailed description of S701 and S702 , please refer to the above embodiments, which will not be repeated here.
[0122] S703: Acquire multiple candidate image quality parameter items.
[0123] The candidate image quality parameter items refer to a plurality of image quality parameter items from which image quality parameter items are to be processed to generate initial image quality parameters. The candidate image quality parameter items may include, for example, a plurality of picture sizes or a plurality of image brightnesses.
[0124] In the embodiment of the present disclosure, when obtaining multiple candidate image quality parameter items, multiple candidate image quality parameter items can be obtained for different image quality parameter attributes, such as image scene, frame, size, exposure value, portrait, etc.
[0125] S704: Acquire a target picture quality parameter item that matches the picture quality parameter request information from a plurality of candidate picture quality parameter items.
[0126] After obtaining the plurality of candidate image quality parameter items as described above, the embodiment of the present disclosure may obtain a target image quality parameter item that matches the image quality parameter request information from the plurality of candidate image quality parameter items.
[0127] In the embodiment of the present disclosure, when obtaining a target image quality parameter item that matches the image quality parameter request information from multiple candidate image quality parameter items, multiple candidate image quality parameter items can be corresponding to each image quality attribute, the image quality parameter request information and the candidate image quality parameter items can be matched and processed, and the candidate image quality parameter item that matches the image quality parameter request information can be used as the target image quality parameter item.
[0128] S705: Generate initial image quality parameters according to the target image quality parameter items.
[0129] After acquiring the target image quality parameter item that matches the image quality parameter request information from the plurality of candidate image quality parameter items, the embodiment of the present disclosure can generate an initial image quality parameter according to the target image quality parameter item.
[0130] In the embodiment of the present disclosure, when generating the initial image quality parameters according to the target image quality parameter items, a plurality of target image quality parameter items may be combined to generate the initial image quality parameters.
[0131] S706: Send image quality parameter request information to the first hardware abstraction layer.
[0132] S707: Sending initial image quality parameters to the first hardware abstraction layer.
[0133] For the detailed description of S706 and S707, please refer to the above embodiment, which will not be repeated here.
[0134] In the disclosed embodiment, by receiving an image processing request sent by the first hardware abstraction layer, initial image quality parameters corresponding to the preview image are generated according to the image processing request, and the initial image quality parameters are sent to the first hardware abstraction layer. It is possible to select quality parameters corresponding to the preview image according to the image processing request, and return the initial image quality parameters to the first hardware abstraction layer, thereby assisting the first hardware abstraction layer in completing parameter verification and target image acquisition.
[0135] Figure 8It is a flowchart of an image quality parameter generation method proposed in an embodiment of the present disclosure.
[0136] like Figure 8 As shown, the image quality parameter generation method is applied to a cloud server corresponding to the electronic device, and the method includes:
[0137] S801: Receive an abnormal initial image quality parameter item indicated by a first hardware abstraction layer of an electronic device.
[0138] In the disclosed embodiment, when the first hardware abstraction layer performs verification processing on the initial image quality parameters and determines that there are abnormal initial image quality parameter items in the initial image quality parameters, the first hardware abstraction layer can indicate the abnormal initial image quality parameter items to the cloud server corresponding to the electronic device, and the cloud server receives the abnormal initial image quality parameter items indicated by the first hardware abstraction layer.
[0139] S802: Generate parameter update information corresponding to the abnormal initial image quality parameter item, wherein the parameter update information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item.
[0140] The parameter update information is used by the first hardware abstraction layer of the electronic device to update the abnormal initial image quality parameter item. The parameter update information can be used to instruct the first hardware abstraction layer to replace the abnormal initial image quality parameter item with a correct image quality parameter item.
[0141] In the disclosed embodiment, the correct image quality parameter item corresponding to the abnormal initial image quality parameter item can be determined according to the image quality parameter selection logic stored in the cloud server, and the correspondence between the abnormal initial image quality parameter item and the correct image quality parameter item, as well as the storage path of the correct image quality parameter item are used as parameter update information. The parameter update information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item.
[0142] S803: Send parameter update information to the first hardware abstraction layer.
[0143] In the above-disclosed embodiment, the parameter update information corresponding to the abnormal initial image quality parameter item is generated and sent to the first hardware abstraction layer. After receiving the parameter update information, the first hardware abstraction layer can update the abnormal initial image quality parameter item according to the parameter update information.
[0144] In the disclosed embodiment, by receiving the abnormal initial image quality parameter item indicated by the first hardware abstraction layer of the electronic device, parameter update information corresponding to the abnormal initial image quality parameter item is generated, wherein the parameter update information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item, and the parameter update information is sent to the first hardware abstraction layer, so that a new decision can be made on the incorrectly selected abnormal image quality parameter item, and corresponding parameter update information can be generated to assist the first hardware abstraction layer in updating and correcting the initial image quality parameters, thereby ensuring the correctness of the image quality parameters applied to the final image generation.
[0145] Fig. 9 It is a flowchart of an image quality parameter generation method proposed in another embodiment of the present disclosure.
[0146] like Fig. 9 As shown, the image quality parameter generation method is applied to a cloud server corresponding to the electronic device, and the method includes:
[0147] S901: Receive an abnormal initial image quality parameter item indicated by a first hardware abstraction layer of an electronic device.
[0148] For the specific description of S901, please refer to the above embodiment, which will not be repeated here.
[0149] S902: Obtain parameter update rule information.
[0150] The parameter update rule information refers to the decision logic information stored in the cloud server for selecting image quality parameters.
[0151] In the disclosed embodiment, decision logic information for selecting image quality parameters stored in the cloud server may be obtained as parameter update rule information.
[0152] S903: Determine, according to the parameter updating rule information, a parameter mapping relationship between the abnormal initial image quality parameter item and the target image quality parameter item to be updated.
[0153] After acquiring the parameter update rule information as described above, the embodiment of the present disclosure can perform matching processing on the abnormal initial image quality parameter item according to the parameter update rule information to determine the parameter mapping relationship between the abnormal initial image quality parameter item and the target image quality parameter item to be updated.
[0154] S904: Use the parameter mapping relationship as parameter update information.
[0155] After determining the parameter mapping relationship between the abnormal initial image quality parameter item and the target image quality parameter item to be updated according to the parameter update rule information, the embodiment of the present disclosure may use the parameter mapping relationship as the parameter update information.
[0156] S905: Send parameter update information to the first hardware abstraction layer.
[0157] In the disclosed embodiment, by receiving the abnormal initial image quality parameter item indicated by the first hardware abstraction layer of the electronic device, parameter update information corresponding to the abnormal initial image quality parameter item is generated, wherein the parameter update information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item, and the parameter update information is sent to the first hardware abstraction layer, so that a new decision can be made on the incorrectly selected abnormal image quality parameter item, and corresponding parameter update information can be generated to assist the first hardware abstraction layer in updating and correcting the initial image quality parameters, thereby ensuring the correctness of the image quality parameters applied to the final image generation.
[0158] Fig.10 It is a structural schematic diagram of an image processing device proposed in an embodiment of the present disclosure.
[0159] like Fig.10 As shown, the image processing device 100 is applied to a first hardware abstraction layer of an electronic device, and the electronic device further includes: a second hardware abstraction layer, the device includes:
[0160] The first transmission module 1001 is used to send an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image;
[0161] The acquisition module 1002 is used to acquire a target image based on the received initial image quality parameters sent by the second hardware abstraction layer.
[0162] In some embodiments of the present disclosure, the electronic device further includes: an image processor; wherein the acquisition module 1002 is specifically configured to:
[0163] Processing initial image quality parameters to obtain target image quality parameters;
[0164] providing the target image quality parameters to the image processor so that the image processor processes the preview image to output the target image;
[0165] Get the target image output by the image processor.
[0166] In some embodiments of the present disclosure, Fig.11 As shown, Fig.11 is a schematic diagram of the structure of an image processing device proposed in another embodiment of the present disclosure, wherein the device further includes:
[0167] The first receiving module 1003 is used to receive the image quality parameter request information sent by the second hardware abstraction layer, wherein the image quality parameter request information is used by the first hardware abstraction layer to verify the initial image quality parameters.
[0168] In some embodiments of the present disclosure, the acquisition module 1002 is further used to:
[0169] The initial image quality parameters are processed according to the image quality parameter request information to obtain the target image quality parameters.
[0170] In some embodiments of the present disclosure, reference image quality parameter information is stored in the first hardware abstraction layer, wherein the reference image quality parameter information is used to describe the corresponding relationship between the image quality parameter request information and one or more reference image quality parameters;
[0171] The acquisition module 1002 is further used for:
[0172] Verifying the initial image quality parameters according to the reference image quality parameter information and the image quality parameter request information to obtain a verification result;
[0173] The initial image quality parameters are processed according to the verification results to obtain the target image quality parameters.
[0174] In some embodiments of the present disclosure, the acquisition module 1002 is further used to:
[0175] Determine, from the reference image quality parameter information, a reference image quality parameter that matches the image quality parameter request information;
[0176] The reference image quality parameters and the initial image quality parameters are compared to obtain a parameter comparison result, which is used as a verification result.
[0177] In some embodiments of the present disclosure, the acquisition module 1002 is further used to:
[0178] If the verification result indicates that the initial image quality parameters are different from the reference image quality parameters, the initial image quality parameters are updated according to the reference image quality parameter information and the verification result to obtain the target image quality parameters;
[0179] If the verification result indicates that the initial image quality parameters are the same as the reference image quality parameters, the initial image quality parameters are used as the target image quality parameters.
[0180] In some embodiments of the present disclosure, the initial image quality parameters include: initial image quality parameter items, and the reference image quality parameters include: reference image quality parameter items;
[0181] The acquisition module 1002 is further used for:
[0182] Determine, according to the verification result, an abnormal initial image quality parameter item that is different from the reference image quality parameter item in the initial image quality parameter item;
[0183] Abnormal initial image quality parameters in the initial image quality parameters are updated to obtain target image quality parameters.
[0184] In some embodiments of the present disclosure, the acquisition module 1002 is further configured to:
[0185] Indicating the abnormal initial image quality parameter item to a cloud server corresponding to the electronic device, so that the cloud server generates parameter update information for updating the abnormal initial image quality parameter item;
[0186] Receive parameter update information sent by the cloud server;
[0187] Abnormal initial image quality parameters in the initial image quality parameters are updated according to the parameter update information to obtain target image quality parameters.
[0188] It should be noted that the above explanation of the embodiment of the image processing method is also applicable to the image processing device of this embodiment, and will not be repeated here.
[0189] In this embodiment, an image processing request is sent to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image, and based on the received initial image quality parameters sent by the second hardware abstraction layer, a target image is obtained, and the first hardware abstraction layer can be set for image quality parameter verification, and the first hardware abstraction layer can be set for image quality parameter verification, and timely update processing is performed when the image quality parameter selection is incorrect, so as to ensure the correctness of the image quality parameter selection in complex shooting function scenarios. Since the first hardware abstraction layer can be compatible with a variety of different second hardware abstraction layer image quality parameter detection operations, a cross-platform design of image quality parameter detection is realized, thereby ensuring the wide application of image quality parameter detection.
[0190] Fig.12 It is a structural schematic diagram of an image quality parameter generating device proposed in an embodiment of the present disclosure.
[0191] like Fig.12 As shown, the image quality parameter generating device 120 is applied to the second hardware abstraction layer of the electronic device, wherein the device includes:
[0192] A second receiving module 1201, configured to receive an image processing request sent by the first hardware abstraction layer;
[0193] A first generating module 1202 is configured to generate initial image quality parameters corresponding to the preview image according to the image processing request; and
[0194] The second transmission module 1203 is used to send the initial image quality parameters to the first hardware abstraction layer
[0195] In some embodiments of the present disclosure, Fig.13 As shown, Fig.13 1 is a schematic diagram of the structure of an image quality parameter generating device proposed in another embodiment of the present disclosure, wherein the first generating module 1202 includes:
[0196] The parsing submodule 12021 is used to parse the image processing request to obtain image quality parameter request information, wherein the image quality parameter request information is used to describe the image quality parameter items required by the second hardware abstraction layer to generate initial image quality parameters;
[0197] A generating submodule 12022, configured to generate initial image quality parameters according to the image quality parameter request information;
[0198] The transmission submodule 12023 is used to send the image quality parameter request information to the first hardware abstraction layer.
[0199] In some embodiments of the present disclosure, the generating submodule 12022 is specifically used to:
[0200] Obtain multiple candidate image quality parameter items;
[0201] Acquire a target image quality parameter item that matches the image quality parameter request information from the multiple candidate image quality parameter items;
[0202] The initial image quality parameter is generated according to the target image quality parameter item.
[0203] It should be noted that the above explanation of the embodiment of the method for generating image quality parameters is also applicable to the image quality parameter generating device of this embodiment, and will not be repeated here.
[0204] In the disclosed embodiment, by receiving an image processing request sent by the first hardware abstraction layer, initial image quality parameters corresponding to the preview image are generated according to the image processing request, and the initial image quality parameters are sent to the first hardware abstraction layer. Quality parameters corresponding to the preview image can be selected according to the image processing request, and the initial image quality parameters are transmitted back to the first hardware abstraction layer, thereby assisting the first hardware abstraction layer to complete parameter verification and target image acquisition.
[0205] Fig.14 It is a structural schematic diagram of an image quality parameter generating device proposed in another embodiment of the present disclosure.
[0206] like Fig.14 As shown, the image quality parameter generating device 140 is applied to a cloud server corresponding to the electronic device, and is characterized in that the device includes:
[0207] The third transmission module 1401 is used to receive an abnormal initial image quality parameter item indicated by the first hardware abstraction layer of the electronic device;
[0208] A second generating module 1402 is used to generate parameter update information corresponding to the abnormal initial image quality parameter item, wherein the parameter update information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item;
[0209] The fourth transmission module 1403 is used to send the parameter update information to the first hardware abstraction layer.
[0210] In some embodiments of the present disclosure, Fig.15 As shown, Fig.15 14 is a schematic diagram of the structure of an image quality parameter generating device proposed in another embodiment of the present disclosure, wherein the second generating module 1402 includes:
[0211] An acquisition submodule 14021 is used to acquire parameter update rule information;
[0212] A determination submodule 14022 is used to determine a parameter mapping relationship between an abnormal initial image quality parameter item and a target image quality parameter item to be updated according to the parameter update rule information;
[0213] The generating submodule 14023 is used to use the parameter mapping relationship as parameter update information.
[0214] It should be noted that the above explanation of the embodiment of the method for generating image quality parameters is also applicable to the image quality parameter generating device of this embodiment, and will not be repeated here.
[0215] In the disclosed embodiment, by receiving the abnormal initial image quality parameter item indicated by the first hardware abstraction layer of the electronic device, parameter update information corresponding to the abnormal initial image quality parameter item is generated, wherein the parameter update information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item, and the parameter update information is sent to the first hardware abstraction layer, so that a new decision can be made on the incorrectly selected abnormal image quality parameter item, and corresponding parameter update information can be generated to assist the first hardware abstraction layer in updating and correcting the initial image quality parameters, thereby ensuring the correctness of the image quality parameters applied to the final image generation.
[0216] In order to implement the above-mentioned embodiments, the present disclosure also proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the image processing method proposed in the above-mentioned embodiments of the present disclosure, or implements the image quality parameter generation method proposed in the above-mentioned embodiments of the present disclosure.
[0217] In order to implement the above embodiments, the present disclosure also proposes a computer program product. When the instruction processor in the computer program product is executed, it executes the image processing method proposed in the above embodiments of the present disclosure, or implements the image quality parameter generation method proposed in the above embodiments of the present disclosure.
[0218] Fig.16 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown.
[0219] Fig.16 The electronic device 16 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0220] like Fig.16 As shown, the electronic device 16 is in the form of a general purpose computing device. The components of the electronic device 16 may include, but are not limited to: one or more processors or processing units 17, a memory 28, and a bus 18 connecting different system components (including the memory 28 and the processing unit 17).
[0221] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.
[0222] The electronic device 16 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 16, including volatile and non-volatile media, removable and non-removable media.
[0223] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 16 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.16 Not shown, often called a "hard drive").
[0224] although Fig.16 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (hereinafter referred to as: CD-ROM), a digital versatile disc read only memory (hereinafter referred to as: DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0225] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0226] The electronic device 16 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable the human body to interact with the electronic device 16, and / or communicate with any device that enables the electronic device 16 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, the electronic device 16 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 16 through a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 16, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0227] The processing unit 17 executes various functional applications and parameter information determination by running the programs stored in the memory 28, such as implementing the image processing method or the image quality parameter generation method mentioned in the above embodiments.
[0228] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.
[0229] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.
[0230] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0231] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0232] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0233] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0234] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0235] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.
Claims
1. An image processing method, characterized in that: A first hardware abstraction layer applied to an electronic device, wherein the electronic device further comprises: a second hardware abstraction layer, the method comprising: Sending an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image; A target image is acquired based on the received initial image quality parameters sent by the second hardware abstraction layer.
2. The method according to claim 1, characterized in that The electronic device further includes: an image processor; wherein, acquiring a target image based on the received initial image quality parameter sent by the second hardware abstraction layer includes: Processing the initial image quality parameters to obtain target image quality parameters; Providing the target image quality parameter to an image processor so that the image processor processes the preview image to output a target image; The target image output by the image processor is acquired.
3. The method according to claim 2, characterized in that in, The method further comprises: Receive image quality parameter request information sent by the second hardware abstraction layer, wherein the image quality parameter request information is used by the first hardware abstraction layer to perform verification processing on the initial image quality parameters.
4. The method according to claim 3, characterized in that: in, The processing of the initial image quality parameters to obtain target image quality parameters includes: The initial image quality parameters are processed according to the image quality parameter request information to obtain the target image quality parameters.
5. The method according to claim 4, characterized in that The first hardware abstraction layer stores reference image quality parameter information, wherein the reference image quality parameter information is used to describe a corresponding relationship between the image quality parameter request information and one or more reference image quality parameters; The step of processing the initial image quality parameters according to the image quality parameter request information to obtain the target image quality parameters includes: Verifying the initial image quality parameters according to the reference image quality parameter information and the image quality parameter request information to obtain a verification result; The initial image quality parameters are processed according to the verification result to obtain the target image quality parameters.
6. The method according to claim 5, characterized in that The verifying the initial image quality parameter according to the reference image quality parameter information and the image quality parameter request information to obtain a verification result includes: Determining, from the reference image quality parameter information, a reference image quality parameter that matches the image quality parameter request information; The reference image quality parameters and the initial image quality parameters are compared to obtain a parameter comparison result, and the parameter comparison result is used as the verification result.
7. The method according to claim 6, characterized in that The step of processing the initial image quality parameter according to the verification result to obtain the target image quality parameter includes: If the verification result indicates that the initial image quality parameters are different from the reference image quality parameters, updating the initial image quality parameters according to the reference image quality parameter information and the verification result to obtain the target image quality parameters; If the verification result indicates that the initial image quality parameters are the same as the reference image quality parameters, the initial image quality parameters are used as the target image quality parameters.
8. The method according to claim 7, characterized in that The initial image quality parameters include: initial image quality parameter items, and the reference image quality parameters include: reference image quality parameter items; Wherein, updating the initial image quality parameter according to the reference image quality parameter information and the verification result to obtain the target image quality parameter includes: Determining, according to the verification result, an abnormal initial image quality parameter item among the initial image quality parameter items that is different from the reference image quality parameter item; The abnormal initial image quality parameters in the initial image quality parameters are updated to obtain the target image quality parameters.
9. The method according to claim 8, characterized in that The updating process of the abnormal initial image quality parameters in the initial image quality parameters to obtain the target image quality parameters includes: Indicating the abnormal initial image quality parameter item to a cloud server corresponding to the electronic device, so that the cloud server generates parameter update information for updating the abnormal initial image quality parameter item; Receiving the parameter update information sent by the cloud server; The abnormal initial image quality parameters in the initial image quality parameters are updated according to the parameter update information to obtain the target image quality parameters.
10. A method for generating image quality parameters, applied to a second hardware abstraction layer of an electronic device, wherein: The electronic device further comprises a first hardware abstraction layer different from the second hardware abstraction layer, wherein the method comprises: Receiving an image processing request sent by the first hardware abstraction layer; generating initial image quality parameters corresponding to the preview image according to the image processing request; and The initial image quality parameter is sent to the first hardware abstraction layer.
11. The method according to claim 10, characterized in that The step of generating initial image quality parameters corresponding to the preview image according to the image processing request includes: Parsing the image processing request to obtain image quality parameter request information, wherein the image quality parameter request information is used to describe image quality parameter items required by the second hardware abstraction layer to generate initial image quality parameters; Generating initial image quality parameters according to the image quality parameter request information; Send the image quality parameter request information to the first hardware abstraction layer.
12. The method according to claim 11, characterized in that Generating initial image quality parameters according to the image quality parameter request information includes: Obtain multiple candidate image quality parameter items; Acquire a target image quality parameter item that matches the image quality parameter request information from the multiple candidate image quality parameter items; The initial image quality parameter is generated according to the target image quality parameter item.
13. A method for generating image quality parameters, applied to a cloud server corresponding to an electronic device, characterized in that: The method comprises: Receiving an abnormal initial image quality parameter item indicated by a first hardware abstraction layer of the electronic device; Generate parameter update information corresponding to the abnormal initial image quality parameter item, wherein the parameter update information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item; The parameter update information is sent to the first hardware abstraction layer.
14. The method according to claim 13, characterized in that The generating parameter update information corresponding to the abnormal initial image quality parameter item includes: Get parameter update rule information; Determining, according to the parameter updating rule information, a parameter mapping relationship between the abnormal initial image quality parameter item and the target image quality parameter item to be updated; The parameter mapping relationship is used as the parameter update information.
15. An image processing device, characterized in that: A first hardware abstraction layer applied to an electronic device, wherein the electronic device further comprises: a second hardware abstraction layer, the device comprising: A first transmission module, configured to send an image processing request to the second hardware abstraction layer, wherein the image processing request is used to enable the second hardware abstraction layer to generate initial image quality parameters corresponding to the preview image; An acquisition module is used to acquire a target image based on the received initial image quality parameters sent by the second hardware abstraction layer.
16. The device according to claim 15, characterized in that The electronic device further includes: an image processor; wherein the acquisition module is specifically used for: Processing the initial image quality parameters to obtain target image quality parameters; Providing the target image quality parameter to an image processor so that the image processor processes the preview image to output a target image; The target image output by the image processor is acquired.
17. The device according to claim 16, characterized in that in, The device also includes: The first receiving module is used to receive the image quality parameter request information sent by the second hardware abstraction layer, wherein the image quality parameter request information is used by the first hardware abstraction layer to verify the initial image quality parameters.
18. The device according to claim 17, characterized in that in, The acquisition module is further used for: The initial image quality parameters are processed according to the image quality parameter request information to obtain the target image quality parameters.
19. The device according to claim 18, characterized in that The first hardware abstraction layer stores reference image quality parameter information, wherein the reference image quality parameter information is used to describe a corresponding relationship between the image quality parameter request information and one or more reference image quality parameters; Wherein, the acquisition module is also used for: Verifying the initial image quality parameters according to the reference image quality parameter information and the image quality parameter request information to obtain a verification result; The initial image quality parameters are processed according to the verification result to obtain the target image quality parameters.
20. The device according to claim 19, characterized in that The acquisition module is further used for: Determining, from the reference image quality parameter information, a reference image quality parameter that matches the image quality parameter request information; The reference image quality parameters and the initial image quality parameters are compared to obtain a parameter comparison result, and the parameter comparison result is used as the verification result.
21. The device according to claim 20, characterized in that The acquisition module is further used for: If the verification result indicates that the initial image quality parameters are different from the reference image quality parameters, updating the initial image quality parameters according to the reference image quality parameter information and the verification result to obtain the target image quality parameters; If the verification result indicates that the initial image quality parameters are the same as the reference image quality parameters, the initial image quality parameters are used as the target image quality parameters.
22. The device according to claim 21, characterized in that The initial image quality parameters include: initial image quality parameter items, and the reference image quality parameters include: reference image quality parameter items; Wherein, the acquisition module is also used for: Determining, according to the verification result, an abnormal initial image quality parameter item among the initial image quality parameter items that is different from the reference image quality parameter item; The abnormal initial image quality parameters in the initial image quality parameters are updated to obtain the target image quality parameters.
23. The device according to claim 22, characterized in that The acquisition module is further used for: Indicating the abnormal initial image quality parameter item to a cloud server corresponding to the electronic device, so that the cloud server generates parameter update information for updating the abnormal initial image quality parameter item; Receiving the parameter update information sent by the cloud server; The abnormal initial image quality parameters in the initial image quality parameters are updated according to the parameter update information to obtain the target image quality parameters.
24. An image quality parameter generation device, applied to the second hardware abstraction layer of an electronic device, wherein: The electronic device further includes a first hardware abstraction layer different from the second hardware abstraction layer, wherein the device includes: A second receiving module, used for receiving an image processing request sent by the first hardware abstraction layer; A first generating module, configured to generate initial image quality parameters corresponding to the preview image according to the image processing request; and The second transmission module is used to send the initial image quality parameters to the first hardware abstraction layer.
25. The device according to claim 24, characterized in that The generating module comprises: A parsing submodule, used for parsing the image processing request to obtain image quality parameter request information, wherein the image quality parameter request information is used to describe the image quality parameter items required by the second hardware abstraction layer to generate initial image quality parameters; A generating submodule, used for generating initial image quality parameters according to the image quality parameter request information; A transmission submodule is used to send the image quality parameter request information to the first hardware abstraction layer.
26. The device according to claim 25, characterized in that The generating submodule is specifically used for: Obtain multiple candidate image quality parameter items; Acquire a target image quality parameter item that matches the image quality parameter request information from the multiple candidate image quality parameter items; The initial image quality parameter is generated according to the target image quality parameter item.
27. An image quality parameter generation device, applied to a cloud server corresponding to an electronic device, characterized in that: The device comprises: A third transmission module, configured to receive an abnormal initial image quality parameter item indicated by the first hardware abstraction layer of the electronic device; A second generating module, configured to generate parameter updating information corresponding to the abnormal initial image quality parameter item, wherein the parameter updating information is used by the first hardware abstraction layer to update the abnormal initial image quality parameter item; A fourth transmission module is used to send the parameter update information to the first hardware abstraction layer.
28. The device according to claim 27, characterized in that The second generating module comprises: The acquisition submodule is used to obtain parameter update rule information; A determination submodule, configured to determine, according to the parameter update rule information, a parameter mapping relationship between the abnormal initial image quality parameter item and the target image quality parameter item to be updated; A generating submodule is used to use the parameter mapping relationship as the parameter updating information.
29. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image processing method described in any one of claims 1 to 9, or execute the image quality parameter generation method described in any one of claims 10 to 12, or execute the image quality parameter generation method described in any one of claims 13 to 14.
30. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to enable the computer to execute the image processing method described in any one of claims 1 to 9, or the image quality parameter generation method described in any one of claims 10 to 12, or the image quality parameter generation method described in any one of claims 13 to 14.
31. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the steps of the image processing method according to any one of claims 1 to 9, or executes the image quality parameter generation method according to any one of claims 10 to 12, or executes the image quality parameter generation method according to any one of claims 13 to 14.
