Image processing method, device and electronic equipment

By collecting multiple frames of RAW images and adjusting the image definition according to the average brightness, the problem of poor image processing universality in the existing technology is solved, and high-quality images are automatically generated during the shooting process, which is suitable for multiple platforms and models. Electronic devices improve user experience.

CN112446848BActive Publication Date: 2024-10-22VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011507572.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2024-10-22
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

Existing image processing methods have poor universality. Users need to have image retouching skills or install professional software to obtain high-quality images. Problems such as hand shake, blur, and low light often occur during shooting, affecting image quality.

Method used

By collecting multi-frame RAW images with different exposure levels, determine the target image area to be adjusted, calculate the average brightness of each pixel, determine the target image frame from the multi-frame image, and adjust the image clarity based on these values ​​to achieve high quality The generation of images does not require the user to participate in image processing or install professional software.

Benefits of technology

It realizes the automatic adjustment of image sharpness during the shooting process and generates high-quality images. It is suitable for multiple platforms and models of electronic devices. It does not require users to retouch images or install professional software, which improves the universality and user experience of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112446848B_ABST
    Figure CN112446848B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method, device and electronic device, belonging to the field of communication technology, the method comprising: collecting multiple RAW images with different exposure levels; determining the target image area to be adjusted; respectively calculating the first brightness average of each first pixel point in the target image area of ​​the multiple RAW images; determining the target image frame from the multiple RAW images based on the first brightness average of each first pixel point; adjusting the clarity of the target image area in the target image frame based on the first brightness average of each first pixel point. The image processing method disclosed in the present application can adjust the clarity of the target image during its generation process, and the target image finally presented to the user is a high-quality image with adjusted clarity, without the user's participation in image processing, and has good universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to an image processing method, device and electronic device. Background Art

[0002] With the rapid development of electronic device technology, more and more applications can be installed in electronic devices. Users can use electronic devices to chat, watch videos, take photos, etc. When using electronic devices to take photos, problems such as hand shaking, blur, and unclear low light often occur, resulting in users being unable to capture high-quality images.

[0003] In order to obtain high-quality images, the main solution currently is to perform post-processing on the captured images, such as sharpening, adding noise, etc., to improve the clarity of the image. The existing image processing methods, on the one hand, require the use of professional image processing software, and on the other hand, require users to have a certain level of photo editing skills, and have poor universality. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an image processing method that can solve the problem of poor universality of existing image processing methods.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an image processing method, wherein the method comprises: acquiring multiple frames of RAW images with different exposure levels, wherein the RAW image is raw data of a digital signal converted by an image sensor into a captured light source signal, and the three frames of RAW images include a first image frame of normal exposure, a second image frame of underexposure, and a third image frame of overexposure; determining a target image area to be adjusted; respectively calculating a first brightness average value of each first pixel point in the target image area of ​​the multiple frames of RAW images; determining a target image frame from the multiple frames of RAW images based on the first brightness average value of each first pixel point; and adjusting the clarity of the target image area in the target image frame based on the first brightness average value of each first pixel point.

[0007] In a second aspect, an embodiment of the present application provides an image processing device, wherein the device includes: an acquisition module, used to acquire multiple frames of RAW images with different exposure levels, wherein the multiple frames of RAW images include a first image frame of normal exposure, a second image frame of underexposure, and a third image frame of overexposure; an area determination module, used to determine a target image area to be adjusted; a calculation module, used to respectively calculate a first brightness average value of each first pixel point in the target image area of ​​the multiple frames of RAW images; a determination module, used to determine a target image frame from the multiple frames of RAW images based on the first brightness average value of each first pixel point; and an adjustment module, used to adjust the clarity of the target image area in the target image frame based on the first brightness average value of each first pixel point.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0011] In an embodiment of the present application, a target image area to be adjusted is determined by acquiring multiple frames of RAW images with different exposure levels; the first brightness average of each first pixel in the target image area of ​​the multiple frames of RAW is calculated respectively; the target image frame is determined from the multiple frames of RAW images based on the first brightness average of each first pixel; the clarity of the target image area in the target image frame is adjusted based on the first brightness average of each first pixel. The clarity of the target image can be adjusted during the target image generation process, and the target image finally presented to the user is a high-quality image with adjusted clarity. The user does not need to participate in image processing, and the user does not need to have a solid foundation in photo editing, nor does the user need to install additional professional photo editing software. Therefore, it has good universality. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0013] Figure 1 is a flowchart showing the steps of an image processing method according to an embodiment of the present application;

[0014] Figure 2 is a structural block diagram of an image processing device according to an embodiment of the present application;

[0015] Figure 3 is a structural block diagram of an electronic device according to an embodiment of the present application;

[0016] Figure 4 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0019] The image processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0020] Reference Figure 1 , shows a step flow chart of an image processing method in an embodiment of the present application.

[0021] The image processing method of the embodiment of the present application comprises the following steps:

[0022] Step 101: Collect multiple RAW images with different exposure levels.

[0023] Among them, the RAW image is an image in RAW format, and multiple RAW image frames include a first image frame with normal exposure, a second image frame with underexposure, and a third image frame with overexposure. Multiple RAW images are images taken continuously or intermittently within a unit time length, and the image contents contained in the multiple RAW images are the same. The number of frames of the captured RAW image can be set by those skilled in the art according to actual needs. In the embodiments of the present application, the capture of three RAW images will be used as an example for explanation. The first image frame can be represented as ev0, the second image frame can be represented as ev-1, and the third image frame can be represented as ev1.

[0024] RAW means unprocessed. RAW images are the original data that the image sensor converts the captured light source signal into a digital signal. By collecting image information in the RAW domain, you can obtain detailed information about the image, such as the hue, saturation, and brightness of each pixel in the image.

[0025] Each pixel is composed of hue, saturation, and brightness. In the embodiment of the present application, the image is processed based on the brightness of each pixel to obtain a high-definition, high-quality image.

[0026] Step 102: Determine the target image area to be adjusted.

[0027] The target image area can be the entire image or a local area of ​​the image. The target image area can be manually selected by the user or automatically selected by the system according to the layout of the captured image. For example, if the captured image is a person image, the area occupied by the person image can be determined as the target image area; for another example, if the captured image is a still life image, the area occupied by the still life image can be determined as the target image area.

[0028] Step 103: Calculate the first brightness average value of each first pixel point in the target image area of ​​the multiple frames of RAW images respectively.

[0029] The first average brightness value of each first pixel is the average brightness value of the first pixel in multiple frames of RAW images.

[0030] The target image area includes multiple first pixel points. In this step, it is necessary to determine the average brightness of each first pixel point in multiple frames of RAW images.

[0031] Step 104: determining a target image frame from multiple frames of RAW images according to a first average brightness value of each first pixel point.

[0032] The first brightness average of each first pixel point can reflect the average brightness level in the target image region of the multiple RAW image frames. Under this average level, the image clarity can be well improved. In this embodiment, subsequent image processing is performed based on the average brightness level in the target image region. During the subsequent image processing, it is necessary to determine the target image frame from the multiple RAW image frames as the base image, and adjust the brightness of the target image region in the target image frame according to the average brightness level in the target image region.

[0033] When determining the target image frame from multiple frames of RAW images based on the first brightness average value of each first pixel point, technical personnel in this field can set the target image frame determination rule according to actual needs, and no specific limitation is made in the embodiments of the present application.

[0034] Step 105: adjusting the clarity of the target image area in the target image frame based on the first brightness average value of each first pixel point.

[0035] When adjusting the clarity of the target image area in the target image frame, the brightness of each second pixel in the target image area in the target image frame is mainly adjusted based on the first brightness average of each first pixel. By adjusting the brightness, the clarity of the target image area can be improved. The target image area composed of second pixels of different brightness has a very different image texture displayed in the target image area. Therefore, in the present application, it is necessary to adjust the brightness of each second pixel in the target image area so that the texture is displayed in the target image area.

[0036] Steps 101 to 105 are a process for adjusting the clarity of a target image area. In actual implementation, the above process can be repeated to adjust the clarity of different target image areas.

[0037] The image processing method provided in the embodiment of the present application can be applied to electronic devices of multiple platforms and models, and the method does not require any improvement to the hardware of the electronic device.

[0038] The image processing method provided in the embodiment of the present application determines the target image area to be adjusted by collecting multiple frames of RAW images with different exposure levels; respectively calculates the first brightness average values ​​of the first pixels in the target image area of ​​the multiple frames of RAW images; determines the target image frame from the multiple frames of RAW images based on the first brightness average values ​​of each first pixel; adjusts the clarity of the target image area in the target image frame based on the first brightness average values ​​of each first pixel, and can adjust its clarity during the target image generation process. The target image finally presented to the user is a high-quality image with adjusted clarity. The user does not need to participate in image processing, and the user does not need to have a solid foundation in photo editing, nor does the user need to install additional professional photo editing software. Therefore, the method has good universality.

[0039] In an optional embodiment, the method of determining the target image frame from multiple RAW image frames according to the first brightness average value of each first pixel point includes the following sub-steps:

[0040] Sub-step 1: Calculate the average of the first brightness averages of each first pixel point to obtain a target brightness average;

[0041] For example, if the target image area contains 1000 first pixel points, the first brightness average values ​​of the 1000 first pixel points are calculated respectively to obtain 1000 first brightness average values, and the average value of the 1000 first brightness average values ​​is calculated to obtain the target brightness average value, that is, the target brightness average value of the target image area.

[0042] Sub-step 2: Calculate the average brightness of the target image area in the first image frame, the second image frame, and the third image frame to obtain a second average brightness, a third average brightness, and a fourth average brightness;

[0043] The second average brightness value is the average brightness value of each pixel included in the target image area in the first image frame. The third average brightness value is the average brightness value of each pixel included in the target image area in the second image frame. The fourth average brightness value is the average brightness value of each pixel included in the target image area in the third image frame.

[0044] Sub-step three: determining a target image frame from multiple RAW image frames according to the second average brightness value, the third average brightness value, the fourth average brightness value and the target average brightness value.

[0045] The specific rules for determining the target image frame from multiple RAW image frames based on the average brightness values ​​can be set by those skilled in the art according to actual needs, and no specific restrictions are imposed on this in this optional embodiment. For example: from the second average brightness value, the third average brightness value, and the fourth average brightness value, select the image frame corresponding to the average brightness value closest to the target average brightness value as the target image frame. For another example: from the second average brightness value, the third average brightness value, and the fourth average brightness value, select the image frame corresponding to the average brightness value with the largest difference from the target average brightness value as the target image frame.

[0046] This optional method of determining the target image frame determines the target image frame based on the brightness parameter of the image texture, has a small amount of calculation and is easy to implement.

[0047] In an optional embodiment, the step of determining a target image frame from multiple RAW image frames according to the second brightness average value, the third brightness average value, the fourth brightness average value and the target brightness average value comprises the following sub-steps:

[0048] Sub-step 1: determining the value with the smallest difference from the target brightness average value among the second brightness average value, the third brightness average value and the fourth brightness average value;

[0049] For example, the target brightness average value is 55, the second brightness average value is 43, the third brightness average value is 53, and the fourth brightness average value is 70, then it is determined that the difference between the third brightness average value and the target brightness average value is the smallest.

[0050] Sub-step 2: Determine the image frame corresponding to the value with the smallest difference from the target brightness average value as the target image frame.

[0051] For example: if the target brightness average of target image area A after the fusion of three frames of images is closest to the second brightness average of the corresponding target image area B in the second image frame, the second image frame is determined as the target image frame, and the brightness information of the two target image areas A and B are synthesized to improve the texture clarity of the target area B in the second image frame.

[0052] This optional method of determining the target image frame is that the brightness of the target image area in the found target image frame is closest to the brightness of the target image area after the fusion of multiple frames of images, and the proportion of pixels with the same brightness in the two is higher. Accordingly, the amount of calculation during the subsequent brightness information synthesis is smaller, which can save the computing resources consumed by the brightness information synthesis and improve the efficiency of the brightness information synthesis.

[0053] In an optional embodiment, based on the first brightness average value of each first pixel point, the clarity of the target image area in the target image frame is adjusted as follows:

[0054] First, based on each first pixel point, a second pixel point corresponding to the first pixel point is determined in a target image area in the target image frame;

[0055] Secondly, the brightness of the second pixel is adjusted to the first brightness average value of the first pixel.

[0056] Repeat the above process to adjust the brightness of each first pixel and the corresponding second pixel to complete the brightness information synthesis of the target image area. By adjusting the brightness value of the second pixel, the texture details and texture clarity displayed by the second pixel can be adjusted.

[0057] The method for adjusting the clarity of the target image area provided in this optional embodiment requires little calculation and is easy to implement.

[0058] In an optional embodiment, after the brightness of the second pixel is adjusted to the first brightness average of the first pixel, feathering processing may be performed on each third pixel within a preset range around the target image area in the target image frame.

[0059] The preset range can be set by those skilled in the art according to actual needs, for example, it can be set to the area surrounded by X pixels extending from the edge of the target image area. X can be set to a value such as 2, 3 or 4.

[0060] During feathering, the edge of the target image area and each third pixel point within a preset range around it are blurred, so that the edge of the target image area and the texture of the surrounding area are naturally connected, and finally the texture in the target image frame is more natural.

[0061] In an optional embodiment, when there are multiple target image areas to be adjusted, each target image area corresponds to a target image frame, and after the step of adjusting the clarity of the target image area in the target image frame based on the first brightness average value of each first pixel point, the method further includes the following steps:

[0062] Step 1: for each target image region, intercepting the adjusted target image region from the target image frame corresponding to the target image region;

[0063] The method for determining the target image frame corresponding to each target image area and the adjustment process according to each target image area may refer to the above-mentioned related descriptions, and will not be described in detail in this optional embodiment.

[0064] Step 2: stitching the captured and adjusted target image regions to obtain the target image.

[0065] In this optional manner, since the brightness of the background area and the foreground area in the image is quite different, the clarity of the target image area is adjusted after the target image frame is determined for each target image area, and finally the corresponding target image areas adjusted in each target image frame are spliced, which can ensure the quality of the spliced ​​target image. In an optional embodiment, when there are multiple target image areas to be adjusted, the target image frames corresponding to each target image area to be adjusted are the same.

[0066] This optional method of determining the target image frame for each target image area has a small amount of calculation and a short calculation time.

[0067] It should be noted that the image processing method provided in the embodiment of the present application can be executed by an image processing device or a control module in the image processing device for executing the image processing method. In the embodiment of the present application, the image processing device provided in the embodiment of the present application is described by taking the image processing module executing the image processing method as an example.

[0068] Figure 2 A structural block diagram of an image processing device for implementing an embodiment of the present application.

[0069] The image processing device 200 of the embodiment of the present application includes:

[0070] An acquisition module 201 is used to acquire multiple RAW image frames with different exposure levels, wherein the multiple RAW image frames include a first image frame with normal exposure, a second image frame with underexposure, and a third image frame with overexposure;

[0071] A region determination module 202, used to determine a target image region to be adjusted;

[0072] A calculation module 203, configured to respectively calculate a first brightness average value of each first pixel point in the target image area of ​​the multiple frames of RAW images;

[0073] A determination module 204, configured to determine a target image frame from the multiple RAW image frames according to a first brightness average value of each of the first pixel points;

[0074] The adjustment module 205 is configured to adjust the clarity of the target image area in the target image frame based on a first brightness average value of each of the first pixel points.

[0075] Optionally, the determining module includes:

[0076] A first submodule is used to calculate the average of the first brightness averages of the first pixel points to obtain a target brightness average;

[0077] The second submodule is used to calculate the brightness average of the target image area in the first image frame, the second image frame and the third image frame, respectively, to obtain a second brightness average, a third brightness average and a fourth brightness average;

[0078] The third submodule is used to determine a target image frame from the multiple RAW image frames according to the second brightness average value, the third brightness average value, the fourth brightness average value and the target brightness average value.

[0079] Optionally, the third submodule includes:

[0080] The first unit is used to determine a value among the second brightness average value, the third brightness average value and the fourth brightness average value, which has the smallest difference with the target brightness average value;

[0081] The second unit is used to determine the image frame corresponding to the value with the smallest difference from the target brightness average value as the target image frame.

[0082] Optionally, the adjustment module includes:

[0083] A fourth submodule, configured to determine, based on each of the first pixel points, a second pixel point corresponding to the first pixel point in the target image area in the target image frame;

[0084] The fifth submodule is used to adjust the brightness of the second pixel to a first brightness average value of the first pixel.

[0085] Optionally, the adjustment module further includes:

[0086] The sixth submodule is used to perform feathering processing on each third pixel point within a preset range around the target image area in the target image frame after the fifth submodule adjusts the brightness of the second pixel point to the first brightness average value of the first pixel point.

[0087] Optionally, the device further comprises: a capture module, configured to, when there are multiple target image regions to be adjusted, each of the target image regions corresponds to a target image frame, and after the adjustment module adjusts the clarity of the target image region in the target image frame based on the first brightness average value of each of the first pixels, capture the adjusted target image region from the target image frame corresponding to each of the target image regions;

[0088] The splicing module is used to splice the intercepted and adjusted target image regions to obtain a target image.

[0089] Optionally, when there are multiple target image regions to be adjusted, the target image frames corresponding to the target image regions to be adjusted are the same.

[0090] The image processing device provided in the embodiment of the present application determines the target image area to be adjusted by collecting multiple frames of RAW images with different exposure levels; respectively calculates the first brightness average values ​​of the first pixels in the target image area of ​​the multiple frames of RAW images; determines the target image frame from the multiple frames of RAW images based on the first brightness average values ​​of the first pixels; and adjusts the clarity of the target image area in the target image frame based on the first brightness average values ​​of the first pixels. The clarity of the target image can be adjusted during the target image generation process, and the target image finally presented to the user is a high-quality image with adjusted clarity. The user does not need to participate in image processing, and the user does not need to have a solid foundation in photo editing, nor does the user need to install additional professional photo editing software. Therefore, the device has good universality.

[0091] The image processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0092] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0093] The image processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0094] Optional, such as Figure 3As shown, an embodiment of the present application also provides an electronic device 300, including a processor 301, a memory 302, and a program or instruction stored in the memory 302 and executable on the processor 301. When the program or instruction is executed by the processor 301, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0095] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0096] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0097] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .

[0098] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0099] Among them, the processor 410 is used to collect multiple frames of RAW images with different exposure levels, wherein the multiple frames of RAW images include a first image frame with normal exposure, a second image frame with underexposure, and a third image frame with overexposure; determine the target image area to be adjusted; calculate the first brightness average value of the first pixel points in the target image area in the multiple frames of RAW images respectively; determine the target image frame from the multiple frames of RAW images based on the first brightness average value of each of the first pixel points; and adjust the clarity of the target image area in the target image frame based on the first brightness average value of each of the first pixel points.

[0100] The electronic device provided in the embodiment of the present application determines the target image area to be adjusted by collecting multiple frames of RAW images with different exposure levels; respectively calculates the first brightness average values ​​of the first pixels in the target image area in the multiple frames of RAW images; determines the target image frame from the multiple frames of RAW images based on the first brightness average values ​​of each first pixel; adjusts the clarity of the target image area in the target image frame based on the first brightness average values ​​of each first pixel, and can adjust its clarity during the target image generation process. The target image finally presented to the user is a high-quality image with adjusted clarity. The user does not need to participate in image processing, and the user does not need to have a solid foundation in photo editing, nor does the user need to install additional professional photo editing software. Therefore, it has good universality.

[0101] Optionally, when the processor 410 determines the target image frame from the multiple frames of RAW images according to the first brightness average value of each of the first pixel points, it is specifically configured to:

[0102] Calculate the average of the first brightness averages of the first pixel points to obtain a target brightness average;

[0103] Calculating the average brightness of the target image area in the first image frame, the second image frame, and the third image frame respectively to obtain a second average brightness, a third average brightness, and a fourth average brightness;

[0104] A target image frame is determined from the multiple RAW image frames according to the second brightness average value, the third brightness average value, the fourth brightness average value and the target brightness average value.

[0105] Optionally, when the processor 410 determines the target image frame from the multiple frames of RAW images according to the second brightness average value, the third brightness average value, the fourth brightness average value and the target brightness average value, it is specifically configured to:

[0106] Determine a value among the second brightness average value, the third brightness average value, and the fourth brightness average value, which has the smallest difference with the target brightness average value;

[0107] The image frame corresponding to the value with the smallest difference from the target brightness average value is determined as the target image frame.

[0108] Optionally, when the processor 410 adjusts the clarity of the target image area in the target image frame based on the first brightness average value of each of the first pixel points, it is specifically configured to:

[0109] Based on each of the first pixel points, determining a second pixel point corresponding to the first pixel point in the target image area in the target image frame;

[0110] The brightness of the second pixel is adjusted to the first brightness average value of the first pixel.

[0111] Optionally, after the processor 410 adjusts the brightness of the second pixel point to the first brightness average value of the first pixel point, the processor 410 is further used to perform feathering processing on each third pixel point within a preset range around the target image area in the target image frame.

[0112] Optionally, in the case where there are multiple target image areas to be adjusted, each target image area corresponds to a target image frame. After the step of adjusting the clarity of the target image area in the target image frame based on the first brightness average value of each first pixel point, the processor 410 is further used to: for each target image area, intercept the adjusted target image area from the target image frame corresponding to the target image area; and splice the intercepted adjusted target image areas to obtain a target image.

[0113] Optionally, when there are multiple target image regions to be adjusted, the target image frames corresponding to the target image regions to be adjusted are the same.

[0114] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processor (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 409 may be used to store software programs and various data, including but not limited to applications and operating systems. The processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.

[0115] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0116] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0117] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0118] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0119] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0121] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, characterized in that: The method comprises: Acquire multiple RAW image frames with different exposure levels, wherein the RAW images include a first image frame with normal exposure, a second image frame with underexposure, and a third image frame with overexposure; Determine a target image area to be adjusted; Calculating respectively the first brightness average value of each first pixel point in the target image area of ​​the multiple frames of RAW images; Determining a target image frame from the multiple frames of RAW images according to a first brightness average value of each of the first pixel points; Adjusting the clarity of the target image area in the target image frame based on a first brightness average value of each of the first pixels; The step of determining a target image frame from the multiple RAW image frames according to the first brightness average value of each of the first pixel points comprises: Calculate the average of the first brightness averages of the first pixel points to obtain a target brightness average; Calculating the average brightness of the target image area in the first image frame, the second image frame, and the third image frame respectively to obtain a second average brightness, a third average brightness, and a fourth average brightness; A target image frame is determined from the multiple RAW image frames according to the second brightness average value, the third brightness average value, the fourth brightness average value and the target brightness average value.

2. The method according to claim 1, characterized in that The step of determining a target image frame from the multiple RAW image frames according to the second brightness average value, the third brightness average value, the fourth brightness average value and the target brightness average value comprises: Determine a value among the second brightness average value, the third brightness average value, and the fourth brightness average value, which has the smallest difference with the target brightness average value; The image frame corresponding to the value with the smallest difference from the target brightness average value is determined as the target image frame.

3. The method according to claim 1, characterized in that The step of adjusting the clarity of the target image area in the target image frame based on the first brightness average value of each of the first pixel points comprises: Based on each of the first pixel points, determining a second pixel point corresponding to the first pixel point in the target image area in the target image frame; The brightness of the second pixel is adjusted to the first brightness average value of the first pixel.

4. The method according to claim 3, characterized in that After the step of adjusting the brightness of the second pixel to the first brightness average value of the first pixel, the method further includes: In the target image frame, feathering is performed on each third pixel point within a preset range around the target image area.

5. The method according to claim 1, characterized in that In the case where there are multiple target image areas to be adjusted, each of the target image areas corresponds to a target image frame, and after the step of adjusting the clarity of the target image area in the target image frame based on the first brightness average value of each of the first pixel points, the method further includes: For each of the target image regions, intercepting the adjusted target image region from the target image frame corresponding to the target image region; The intercepted and adjusted target image regions are spliced ​​to obtain a target image.

6. The method according to claim 1, characterized in that When there are multiple target image regions to be adjusted, the target image frames corresponding to the target image regions to be adjusted are the same.

7. An image processing device, characterized in that: The device comprises: An acquisition module, used for acquiring multiple RAW image frames with different exposure levels, wherein the multiple RAW image frames include a normally exposed first image frame, an underexposed second image frame, and an overexposed third image frame; A region determination module, used for determining a target image region to be adjusted; A calculation module, used for respectively calculating a first brightness average value of each first pixel point in the target image area of ​​the multiple frames of RAW images; A determination module, used to determine a target image frame from the multiple RAW image frames according to a first brightness average value of each of the first pixel points, comprising: A first submodule is used to calculate the average of the first brightness averages of the first pixel points to obtain a target brightness average; The second submodule is used to calculate the brightness average of the target image area in the first image frame, the second image frame and the third image frame, respectively, to obtain a second brightness average, a third brightness average and a fourth brightness average; A third submodule is used to determine a target image frame from the multiple RAW image frames according to the second brightness average value, the third brightness average value, the fourth brightness average value and the target brightness average value; an adjustment module, configured to adjust the clarity of the target image area in the target image frame based on a first brightness average value of each of the first pixel points; The step of determining the target image frame from the multiple RAW image frames according to the first brightness average value of each of the first pixel points includes running the first submodule, the second submodule and the third submodule.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the image processing method according to any one of claims 1 to 6.