CN111405205A - Image processing method and electronic device - Google Patents

Image processing method and electronic device Download PDF

Info

Publication number
CN111405205A
CN111405205A CN202010213353.5A CN202010213353A CN111405205A CN 111405205 A CN111405205 A CN 111405205A CN 202010213353 A CN202010213353 A CN 202010213353A CN 111405205 A CN111405205 A CN 111405205A
Authority
CN
China
Prior art keywords
image
exposure
original image
ratio
signal processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010213353.5A
Other languages
Chinese (zh)
Other versions
CN111405205B (en
Inventor
彭乾坤
张梦萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010213353.5A priority Critical patent/CN111405205B/en
Publication of CN111405205A publication Critical patent/CN111405205A/en
Application granted granted Critical
Publication of CN111405205B publication Critical patent/CN111405205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/50Control of the SSIS exposure
    • H04N25/57Control of the dynamic range

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses an image processing method and electronic equipment. The method is applied to the electronic equipment and comprises the steps of acquiring a first original image output by an image sensor of the electronic equipment; determining a first ratio of the number of pixel points meeting a first preset overexposure condition in the first original image to the total number of pixel points; reducing the exposure of the image sensor and acquiring a first original image again under the condition that the first ratio is larger than a first preset threshold value; and under the condition that the first ratio is smaller than or equal to a first preset threshold value, obtaining a first target image processed by the image signal processor according to the first original image. According to the embodiment of the invention, highlight information can be accurately acquired.

Description

Image processing method and electronic device
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to an image processing method and electronic equipment.
Background
With the continuous development of mobile terminals, the functional requirements of users for high dynamic scenes are higher and higher. A High Dynamic Range (HDR) image is an image obtained by combining a low exposure frame, a normal exposure frame, and a High exposure frame. HDR images can provide more dynamic range and image detail than ordinary images.
Currently, the exposure required for capturing a low exposure frame is estimated according to the overall brightness distribution of an image obtained by previewing (i.e., an image processed by an image signal processor), and then the image captured under the estimated exposure is used to obtain highlight information in the image. However, in the current method, the exposure of the low-exposure frame is estimated, so that the accuracy is not high, and the highlight information cannot be accurately acquired. Therefore, it is desirable to provide an image processing method for accurately acquiring highlight information.
Disclosure of Invention
The embodiment of the invention provides an image processing method and electronic equipment, which can solve the problem that highlight information cannot be acquired.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides an image processing method applied to an electronic device, including:
acquiring a first original image output by an image sensor of the electronic equipment;
determining a first ratio of the number of pixel points meeting a first preset overexposure condition in the first original image to the total number of pixel points;
reducing the exposure of the image sensor and acquiring a first original image again under the condition that the first ratio is larger than a first preset threshold value;
and under the condition that the first ratio is smaller than or equal to a first preset threshold value, obtaining a first target image processed by the image signal processor according to the first original image.
In a second aspect, an embodiment of the present invention provides an electronic device, including:
the first image acquisition module is used for acquiring a first original image output by an image sensor of the electronic equipment;
the ratio determining module is used for determining a first ratio of the number of pixel points meeting a first preset overexposure condition in the first original image to the total number of the pixel points;
the first processing module is used for reducing the exposure of the image sensor and acquiring a first original image again under the condition that the first ratio is larger than a first preset threshold value;
and the second processing module is used for obtaining a first target image processed by the image signal processor according to the first original image under the condition that the first ratio is less than or equal to a first preset threshold value.
In a third aspect, an embodiment of the present invention provides an electronic device, where the device includes: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the image processing method as provided in the first aspect above.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, on which computer program instructions are stored, and when executed by a processor, the computer program instructions implement the image processing method provided in the first aspect.
In the embodiment of the invention, the exposure of the image sensor is continuously adjusted to obtain the original image output by the image sensor, wherein the first ratio of the number of the pixels meeting the first preset overexposure condition to the total number of the pixels is smaller than the first preset threshold, so that the original image with the overexposure pixel ratio meeting the preset requirement is obtained, namely the original image capable of accurately acquiring highlight information is obtained, and the estimation is not carried out by utilizing the image processed by the image signal processor, so that the accuracy of acquiring the highlight information is improved.
Drawings
The present invention will be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings, in which like or similar reference characters designate like or similar features.
Fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 3 is a second schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Conventionally, when determining the exposure amount of a low-exposure frame for synthesizing an HDR Image, a preview Image obtained by performing Image Signal Processing (ISP) on an original Image (RAW Image) output from an Image sensor of an electronic device is generally used. The raw image is raw data of the image sensor of the image acquisition device converting the captured light source signal into a digital signal.
At present, the overall brightness distribution of an image processed by an image signal processor is adopted to estimate the exposure required by acquiring a low-exposure frame, the accuracy is low, and highlight information cannot be accurately acquired. Based on the foregoing technical problem, embodiments of the present invention provide an image processing method, an electronic device, and a medium, which can accurately obtain highlight information. The following detailed description is to be read with reference to specific embodiments and the drawings.
Fig. 1 is a flowchart illustrating an image processing method applied to an electronic device according to an embodiment of the present invention. As shown in fig. 1, the image processing method according to the embodiment of the present invention includes steps 110 to 150.
Step 110, a first original image output by an image sensor of the electronic device is acquired.
Step 120, determining a first ratio of the number of pixels meeting a first preset overexposure condition in the first original image to the total number of pixels.
Step 130, determining whether the first ratio is greater than a first preset threshold.
In case the first ratio is larger than the first preset threshold, step 140 is entered. In the case where the first ratio is less than or equal to the preset threshold, step 150 is entered.
In step 140, the exposure of the image sensor is reduced, and the process returns to step 110, in which the first original image output by the image sensor of the electronic device is re-acquired.
And 150, obtaining a first target image processed by the image signal processor according to the first original image.
In the embodiment of the invention, the exposure of the image sensor is continuously adjusted to obtain the original image output by the image sensor, wherein the first ratio of the number of the pixels meeting the first preset overexposure condition to the total number of the pixels is smaller than the first preset threshold value, so that the original image with the overexposure pixel ratio meeting the preset requirement is obtained, namely the original image capable of accurately acquiring highlight information is obtained, and the estimation is not carried out by utilizing the image processed by the image signal processor, so that the accuracy of acquiring the highlight information is improved.
The exposure amount of the image sensor is the exposure amount of the original image output by the image sensor, and the exposure amount is equal to the product of the exposure time of the original image output by the image sensor and the analog gain of the image sensor. The exposure amount of the preview image is equal to the product of the exposure amount of the original image and the digital gain of the image signal processor.
The specific implementation of each of steps 110 to 150 is described in detail below.
First, a specific implementation of step 110 will be described. In an embodiment of the present invention, the first original image is an original image corresponding to a preview image acquired by an image acquisition device of the electronic device. That is, the first original image is an original image output from the image sensor acquired in the image preview process.
In the embodiment of the invention, the image acquisition device of the electronic equipment determines the target brightness of the preview image according to the current shooting environment. To achieve the target brightness, the image sensor outputs an original image with the target exposure amount, i.e., an original image of normal exposure. The target exposure is determined by the target brightness, namely the target exposure is determined by the image acquisition device according to the current shooting environment.
The first raw image acquired for the first time may be a raw image with a target exposure output by the image sensor.
As one example, the image sensor may be a complementary metal-Oxide-Semiconductor (CMOS) sensor or a Charge Coupled Device (CCD).
A specific implementation of step 120 is next described. In the embodiment of the present invention, if it is determined whether highlight information can be accurately obtained from the first original image, it is necessary to determine whether overexposure information in the image meets a preset condition according to original data in the first original image.
In some embodiments, step 120 includes determining a first ratio of the number of pixels satisfying the first preset overexposure condition to the total number of pixels in the first original image.
As an example, the first ratio may be calculated using histogram statistics. The histogram statistics is a data statistics method. For example, the horizontal axis represents each pixel point in the first original image, and the vertical axis represents the pixel value of each pixel point. Then, the number of the pixel points with the pixel values meeting the first preset overexposure condition is counted.
As one example, the first preset overexposure condition comprises a pixel value being greater than or equal to a first preset pixel value threshold.
And after the number of the pixel points of which the pixel values meet the first preset overexposure condition is counted, calculating a first ratio of the number to the total number of the pixel points in the first original image.
In the embodiment of the invention, the overexposure information can be more accurately counted by using the pixel values of the pixel points in the first original image instead of using the preview image processed by the image signal processor, so that whether highlight information can be completely acquired from the first original image can be more accurately judged.
In step 140, if the first ratio is greater than the first preset threshold, the number of pixels representing overexposure in the image is too large, which may affect accurate highlight information acquisition, and therefore, the exposure amount of the image sensor needs to be reduced, so as to reduce the exposure amount of the first original image output by the image sensor, so as to reduce the ratio of the overexposure pixels in the newly output first original image.
In some embodiments, since the exposure of the first raw image is equal to the exposure time of the image multiplied by the analog gain of the image sensor, step 140 includes reducing the exposure time of the first raw image output by the image sensor and/or the analog gain of the image sensor to reduce the exposure of the image sensor, i.e., reduce the exposure of the first raw image re-output by the image sensor.
In some embodiments, to reduce the noise of the first raw image, the analog gain of the image sensor may be reduced first. If the analog gain is reduced to 1, which is still not sufficient, the exposure time of the original image output by the image sensor can be reduced.
In some embodiments, step 140 includes decreasing the exposure of the image sensor by a preset exposure interval or based on a first ratio.
As one example, the reduction may be performed at preset exposure intervals each time the exposure of the image sensor needs to be reduced. By reducing the exposure amount of the image sensor by the preset exposure amount interval, the data processing speed can be increased.
In other embodiments, in the case that the first ratio is greater than the first preset threshold, an Exposure Value (EV) corresponding to a low Exposure frame, that is, a negative EV, may be preliminarily estimated based on the first ratio. Wherein the amount of decrease Δ exposure in the exposure amount of the image sensor can be calculated using the following expression:
Δexposure=shutter*sensor gain/2^EV (1)
where, shutter is the exposure time of the first original image in the last cycle, and sensor gain is the analog gain of the image sensor in the last cycle. EV is an exposure value corresponding to one low-exposure frame preliminarily estimated based on the first ratio in the case where the first ratio is larger than a first preset threshold. Where EV is the reduction factor of the exposure of the low exposure frame relative to the exposure of the original image of the normal exposure.
In the embodiment of the invention, the exposure amount reduction amount of the image sensor is determined by using the exposure value corresponding to the low exposure frame preliminarily estimated by the first ratio, so that the first original image of which the first ratio is less than or equal to the first preset threshold can be obtained more accurately and more quickly.
In step 140, after the exposure of the image sensor is reduced, the exposure of the first raw image output by the image sensor is also reduced, and the first raw image with the reduced exposure may be acquired again.
By reducing the exposure of the image sensor, the proportion of over-exposed pixel points in the first original image output by the image sensor to the total pixel points in the image can be reduced. After the first original image is obtained again, the process returns to step 120 until the first original image with the first ratio smaller than or equal to the first preset threshold is obtained, so as to obtain the first target image.
In the embodiment of the invention, the exposure required by the low exposure frame capable of completely acquiring the highlight information is continuously approached by directly adjusting the exposure of the image sensor, the accuracy is higher, and the highlight information can be acquired more accurately.
A specific implementation of step 150 is then presented. If the first ratio is less than or equal to the first preset threshold, it may be considered that the ratio of the overexposed pixels in the currently acquired first original image has satisfied the requirement of the low-exposure frame, that is, it is considered that the highlight information can be completely acquired from the first original image, and the exposure amount of the image sensor does not need to be adjusted.
In some embodiments, in order to save the shooting time and improve the shooting efficiency, the first original image with the first ratio less than or equal to the first preset threshold may be cached as the low exposure frame for synthesizing the HDR image. When a shooting request of a user is received, the cached first original image can be directly adopted to synthesize the HDR image.
In some embodiments, step 150 includes deriving a composite image based on the first original image and the second original image; and processing the composite image by using an image signal processor to obtain a first target image. And the second original image is an original image acquired under the condition that the exposure of the image sensor is the target exposure.
The second original image is an original image output by the image sensor and acquired under a target exposure determined by target brightness, namely an original image of normal exposure.
In some embodiments, a composite image may be obtained by compositing the first original image, the second original image, and the high-exposure original image output by the image processor. Then, the composite image is processed by an image signal processor, so that an HDR image with better quality, i.e., the first target image, can be obtained.
In other embodiments, the user may be previewing the image at all times, but not capturing the HDR image. In order to meet different requirements of the user, in an application scenario of the user preview image, step 150 includes processing the first original image by the image signal processor to obtain a first target image.
The first target image is a preview image, that is, in order to meet the preview requirement of the user, the first original image needs to be processed by the image signal processor, so as to obtain the preview image capable of being displayed to the user.
It should be noted that, in the embodiment of the present invention, in order to improve the preview experience of the user, it is required to ensure that the target brightness of the preview image of the user remains unchanged in the preview process, and after the exposure of the image sensor is reduced, the image processing method provided in the embodiment of the present invention further includes: the gain value of the image signal processor is increased. On the basis of this, step 150 includes processing the first original image according to the increased digital gain value of the image signal processor to obtain a first target image.
It should be noted that, in order to keep the target brightness of the preview image in the preview interface unchanged and improve the good preview experience of the user, the exposure amount of the image sensor may be reduced by a factor equal to the increase factor of the digital gain value of the image signal processor.
By processing the first original image with the increased digital gain value of the image signal processor, a preview image with unchanged target brightness can be obtained, so as to improve the preview experience of a user.
In other embodiments, the user may take the HDR image after previewing the image. Then after it is determined during the preview that the first raw image of highlight information can be accurately acquired, the exposure of the first raw image can be recorded as the exposure for acquiring the low-exposure frame for capturing the HDR image. Therefore, the image processing method provided by the embodiment of the invention further comprises the following steps: in step 160, in the case that the first ratio is less than or equal to the first preset threshold, a first exposure amount of the image sensor at the time of acquiring the first original image is determined. At step 170, a first input from a user is received. Step 180, in response to the first input, acquiring a third raw image output by the image sensor at the first exposure. And 190, obtaining a second target image processed by the image signal processor according to the third original image.
In an application scenario where the HDR image is captured after the preview image, the first target image may be a preview image corresponding to the first original image.
Since a low exposure frame that can acquire highlight information needs to be acquired when an HDR image is captured, the exposure amount for acquiring the low exposure frame needs to be determined. Therefore, the first exposure amount of the first original image, which is determined in the preview process and can accurately acquire highlight information, can be taken as the exposure amount for acquiring a low-exposure frame.
In some embodiments of the present invention, the first input may be a click input, a slide input, a press input, a preset gesture operation, or the like. Wherein the first input is an input representing a photographing request of a user. When the electronic equipment receives the first input, a third original image with the exposure amount output by the image sensor being the first exposure amount is acquired in response to the first input. And the third original image is a low exposure frame which is acquired again and can accurately acquire highlight information.
Then, by synthesizing the third original image, the second original image, and the high-exposure original image output by the image processor, a synthesized image can be obtained. Then, the composite image is processed by an image signal processor, so that an HDR image with better quality, i.e., a second target image, can be obtained.
That is, in order to avoid waste of storage resources, the first exposure amount of the first raw image with the first ratio being less than or equal to the first preset threshold may be saved, and the third raw image with the first exposure amount output by the image sensor may be re-acquired as the low exposure frame after receiving a shooting request from the user.
In some embodiments, when the first ratio is less than or equal to the first preset threshold, the EV corresponding to the low-exposure frame, that is, the reduction multiple of the exposure amount of the low-exposure frame relative to the exposure amount of the original image in the normal exposure, may be calculated based on the first ratio for the user to refer to.
In some embodiments, to further improve the quality of the HDR image, step 140 comprises: step A to step F. And step A, reducing the exposure of the image sensor under the condition that the reduction amplitude of the exposure of the image sensor is less than or equal to the preset amplitude. And step B, processing the first original image through the image signal processor under the condition that the reduction amplitude of the exposure of the image sensor is larger than the preset amplitude to obtain a third target image. And step C, determining a second ratio of the number of the pixel points meeting a second preset overexposure condition in the third target image to the total number of the pixel points. And D, determining a second exposure of the image sensor according to the second ratio under the condition that the second ratio is larger than a second preset threshold. And E, acquiring a fourth original image output by the image sensor under the second exposure. And F, obtaining a fourth target image processed by the image signal processor according to the fourth original image.
It should be noted that the reduction range here refers to a reduction range of the current exposure amount of the image sensor relative to the target exposure amount of the second original image output by the image sensor.
As an example, the preset magnitude may be a preset reduction factor.
When the exposure quantity reduction amplitude of the image sensor exceeds the preset amplitude, the overexposed pixels cannot be completely converged, the exposure quantity of the image sensor is not reduced continuously, and the exposure quantity of a low-exposure frame is estimated by adopting the overexposed pixel proportion of a preview image, so that the accuracy of highlight information acquisition is improved.
In step B, a third target image, i.e., a preview image, is obtained by processing the first original image with an image signal processor.
Then, in step C, a second ratio of the number of pixels satisfying the second preset overexposure condition in the third target image to the total number of pixels may be counted by using a histogram statistics method.
As an example, the second preset overexposure condition is that the pixel value is greater than or equal to a second preset pixel threshold value.
If the second ratio is smaller than or equal to the second preset threshold, the first target image processed by the image signal processor may be obtained according to the first original image, which may refer to the description of step 150, and will not be described herein again.
In step D, in some embodiments, in the case that the second ratio is greater than or equal to the second preset threshold, the exposure amount of the image sensor may be reduced based on the second ratio, and then the first original image may be acquired again. Due to the fact that the exposure of the image sensor is further reduced, the reduction range of the exposure of the image sensor is still larger than the preset range, a new third target image can be obtained, and the third target image are circulated in sequence, so that the first original image of which the second ratio is smaller than or equal to the second preset threshold value can be obtained. And then taking the exposure of the first original image with the second ratio smaller than or equal to a second preset threshold value as a second exposure of the image sensor, namely acquiring the exposure of a low-exposure frame.
In other embodiments, the second exposure amount for acquiring the low-exposure frame by the image sensor can be directly estimated based on the second ratio.
Then in step E, the fourth raw image output by the image sensor at the second exposure is re-acquired, i.e. a low exposure frame is acquired. The specific implementation manner of step F is similar to that of step 150, and is not described herein again.
In the embodiment of the invention, when the reduction amplitude of the exposure of the image sensor is smaller than or equal to the preset amplitude, the exposure of the image sensor can be reduced, and a low exposure frame capable of accurately acquiring highlight information can be obtained. However, if the exposure amount of the image sensor is decreased by more than a predetermined amount, in order to improve the quality of the low-exposure frame, the exposure amount of the low-exposure frame may be estimated using the preview image to more accurately acquire highlight information.
Fig. 2 shows a schematic structural diagram of an electronic device 200 according to an embodiment of the present invention. As shown in fig. 2, an electronic device provided in an embodiment of the present invention includes:
the first image obtaining module 210 is configured to obtain a first original image output by an image sensor of the electronic device.
The ratio determining module 220 is configured to determine a first ratio of the number of pixels meeting the first preset overexposure condition in the first original image to the total number of pixels.
And the first processing module 230 is configured to reduce the exposure of the image sensor and re-acquire the first original image if the first ratio is greater than the first preset threshold.
And a second processing module 240, configured to obtain, according to the first original image, a first target image processed by the image signal processor under the condition that the first ratio is less than or equal to a first preset threshold.
In the embodiment of the invention, the exposure of the image sensor is continuously adjusted to obtain the original image output by the image sensor, wherein the first ratio of the number of the pixels meeting the first preset overexposure condition to the total number of the pixels is smaller than the first preset threshold, so that the original image with the overexposure pixel ratio meeting the preset requirement is obtained, namely the original image capable of accurately acquiring highlight information is obtained, and the estimation is not carried out by utilizing the image processed by the image signal processor, so that the accuracy of acquiring the highlight information is improved.
Optionally, in some embodiments of the present invention, in order to improve efficiency of capturing an image, the second processing module 220 includes:
and a composite image determining unit for obtaining a composite image based on the first original image and the second original image. The second original image is an original image acquired with the exposure amount of the image sensor being the target exposure amount.
And the first image processing unit is used for processing the composite image by using the image signal processor to obtain a first target image.
Optionally, in some embodiments of the present invention, in order to meet the preview requirement of the user, the second processing module 220 includes:
and the second image processing unit is used for processing the first original image through the image signal processor to obtain a first target image.
In some embodiments, to meet the user's preview requirements, the electronic device 200 further comprises:
and the gain increasing module is used for increasing the digital gain value of the image signal processor.
Wherein the second image processing unit is configured to:
and processing the first original image according to the increased digital gain value of the image signal processor to obtain a first target image.
Optionally, in some embodiments of the present invention, in order to improve the quality of the HDR image, the electronic device 200 further comprises:
and the first exposure amount determining module is used for determining the first exposure amount of the image sensor when the first original image is acquired under the condition that the first ratio is smaller than or equal to a first preset threshold value.
The first input receiving module is used for receiving a first input of a user.
And the second image acquisition module is used for responding to the first input and acquiring a third original image output by the image sensor under the first exposure.
And the third processing module is used for obtaining a second target image processed by the image signal processor according to the third original image.
In some embodiments of the present invention, to improve the quality of the HDR image, the first processing module 230 includes:
an exposure amount reducing unit for reducing the exposure amount of the image sensor in a case where a reduction width of the exposure amount of the image sensor is less than or equal to a preset width.
And the third image processing unit is used for processing the first original image through the image signal processor to obtain a third target image under the condition that the reduction amplitude of the exposure of the image sensor is larger than the preset amplitude.
And the ratio determining unit is used for determining a second ratio of the number of the pixel points meeting a second preset overexposure condition in the third target image to the total number of the pixel points.
And an exposure amount determining unit for determining a second exposure amount of the image sensor according to the second ratio if the second ratio is greater than a second preset threshold.
And the image acquisition unit is used for acquiring a fourth original image output by the image sensor under the second exposure.
And the fourth image processing unit is used for obtaining a fourth target image processed by the image signal processor according to the fourth original image.
The electronic device 200 provided in the embodiment of the present invention can implement each process applied to the image processing method in the embodiment of the present invention, and is not described herein again to avoid repetition.
Fig. 3 is a schematic diagram of a hardware structure of an electronic device for implementing various embodiments of the present invention, where the electronic device 300 includes but is not limited to: radio frequency unit 301, network module 302, audio output unit 303, input unit 304, sensor 305, display unit 306, user input unit 307, interface unit 308, memory 309, processor 310, and power supply 311. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 3 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 310 is configured to acquire a first original image output by an image sensor of the electronic device; determining a first ratio of the number of pixel points meeting a first preset overexposure condition in the first original image to the total number of pixel points; reducing the exposure of the image sensor and acquiring a first original image again under the condition that the first ratio is larger than a first preset threshold value; and under the condition that the first ratio is smaller than or equal to a first preset threshold value, obtaining a first target image processed by the image signal processor according to the first original image.
In the embodiment of the invention, the exposure of the image sensor is continuously adjusted to obtain the original image output by the image sensor, wherein the first ratio of the number of the pixels meeting the first preset overexposure condition to the total number of the pixels is smaller than the first preset threshold, so that the original image with the overexposure pixel ratio meeting the preset requirement is obtained, namely the original image capable of accurately acquiring highlight information is obtained, and the estimation is not carried out by utilizing the image processed by the image signal processor, so that the accuracy of acquiring the highlight information is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 301 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 310; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 301 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 301 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 302, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 303 may convert audio data received by the radio frequency unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output as sound. Also, the audio output unit 303 may also provide audio output related to a specific function performed by the electronic apparatus 300 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, a receiver, and the like.
The input unit 304 is used to receive audio or video signals. The input Unit 304 may include a Graphics Processing Unit (GPU) 3041 and a microphone 3042, and the Graphics processor 3041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera module) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 306. The image frames processed by the graphic processor 3041 may be stored in the memory 309 (or other storage medium) or transmitted via the radio frequency unit 301 or the network module 302. The microphone 3042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 301 in case of the phone call mode.
The electronic device 300 also includes at least one sensor 305, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 3061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 3061 and/or the backlight when the electronic device 300 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 305 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The Display unit 306 may include a Display panel 3061, and the Display panel 3061 may be configured in the form of a liquid Crystal Display (L acquired Crystal Display, L CD), an Organic light Emitting Diode (O L ED), or the like.
The user input unit 307 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 307 includes a touch panel 3071 and other input devices 3072. The touch panel 3071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 3071 (e.g., operations by a user on or near the touch panel 3071 using a finger, a stylus, or any suitable object or attachment). The touch panel 3071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 310, and receives and executes commands sent by the processor 310. In addition, the touch panel 3071 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 307 may include other input devices 3072 in addition to the touch panel 3071. Specifically, the other input devices 3072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 3071 may be overlaid on the display panel 3061, and when the touch panel 3071 detects a touch operation on or near the touch panel, the touch operation is transmitted to the processor 310 to determine the type of the touch event, and then the processor 310 provides a corresponding visual output on the display panel 3061 according to the type of the touch event. Although the touch panel 3071 and the display panel 3061 are shown in fig. 3 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 3071 and the display panel 3061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 308 is an interface for connecting an external device to the electronic apparatus 300. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 308 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 300 or may be used to transmit data between the electronic apparatus 300 and the external device.
The memory 309 may be used to store software programs as well as various data. The memory 309 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 309 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 310 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 309 and calling data stored in the memory 309, thereby performing overall monitoring of the electronic device. Processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 310.
The electronic device 300 may further include a power supply 311 (such as a battery) for supplying power to various components, and preferably, the power supply 311 may be logically connected to the processor 310 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 300 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, further including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program, when executed by the processor, implements each process of the above-mentioned embodiment of the image processing method, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the image processing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An image processing method applied to an electronic device, the method comprising:
acquiring a first original image output by an image sensor of the electronic equipment;
determining a first ratio of the number of pixel points meeting a first preset overexposure condition in the first original image to the total number of pixel points;
reducing the exposure of the image sensor and acquiring a first original image again under the condition that the first ratio is larger than a first preset threshold value;
and under the condition that the first ratio is smaller than or equal to the first preset threshold, obtaining a first target image processed by an image signal processor according to the first original image.
2. The method according to claim 1, wherein obtaining the first target image processed by the image signal processor from the first original image comprises:
obtaining a composite image based on the first original image and the second original image; the second original image is an original image acquired under the condition that the exposure of the image sensor is a target exposure;
and processing the synthesized image by using the image signal processor to obtain the first target image.
3. The method according to claim 1, wherein obtaining the first target image processed by the image signal processor from the first original image comprises:
and processing the first original image through the image signal processor to obtain a first target image.
4. The method of claim 3, wherein after the reducing the exposure of the image sensor, the method further comprises:
increasing a digital gain value of the image signal processor;
the processing the first original image by the image signal processor to obtain a first target image specifically includes:
and processing the first original image according to the increased digital gain value of the image signal processor to obtain the first target image.
5. The method of claim 1, further comprising:
determining a first exposure amount of the image sensor when the first original image is acquired under the condition that the first ratio is smaller than or equal to the first preset threshold value;
receiving a first input of a user;
acquiring a third raw image output by the image sensor at the first exposure in response to the first input;
and obtaining a second target image processed by the image signal processor according to the third original image.
6. The method according to claim 1, wherein the reducing the exposure of the image sensor comprises:
reducing the exposure amount of the image sensor under the condition that the reduction amplitude of the exposure amount of the image sensor is smaller than or equal to a preset amplitude;
under the condition that the reduction amplitude of the exposure of the image sensor is larger than the preset amplitude, processing the first original image through the image signal processor to obtain a third target image;
determining a second ratio of the number of pixel points meeting a second preset overexposure condition in the third target image to the total number of pixel points;
under the condition that the second ratio is larger than a second preset threshold value, determining a second exposure of the image sensor according to the second ratio;
acquiring a fourth original image output by the image sensor under the second exposure;
and obtaining a fourth target image processed by an image signal processor according to the fourth original image.
7. An electronic device, characterized in that the device comprises:
the first image acquisition module is used for acquiring a first original image output by an image sensor of the electronic equipment;
the ratio determining module is used for determining a first ratio of the number of pixel points meeting a first preset overexposure condition in the first original image to the total number of the pixel points;
the first processing module is used for reducing the exposure of the image sensor and acquiring a first original image again under the condition that the first ratio is larger than a first preset threshold;
and the second processing module is used for obtaining a first target image processed by the image signal processor according to the first original image under the condition that the first ratio is less than or equal to the first preset threshold value.
8. The apparatus of claim 7, wherein the second processing module comprises:
a composite image determining unit, configured to obtain a composite image based on the first original image and the second original image; the second original image is an original image acquired under the condition that the exposure of the image sensor is a target exposure;
and the first image processing unit is used for processing the synthesized image by using the image signal processor to obtain the first target image.
9. The apparatus of claim 7, wherein the second processing module comprises:
and the second image processing unit is used for processing the first original image through the image signal processor to obtain the first target image.
10. The apparatus of claim 7, further comprising:
a first exposure amount determining module, configured to determine a first exposure amount of the image sensor when the first raw image is acquired, if the first ratio is less than or equal to the first preset threshold;
the first input receiving module is used for receiving a first input of a user;
the second image acquisition module is used for responding to the first input and acquiring a third original image output by the image sensor under the first exposure;
and the third processing module is used for obtaining the first target image processed by the image signal processor according to the third original image.
CN202010213353.5A 2020-03-24 2020-03-24 Image processing method and electronic device Active CN111405205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010213353.5A CN111405205B (en) 2020-03-24 2020-03-24 Image processing method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010213353.5A CN111405205B (en) 2020-03-24 2020-03-24 Image processing method and electronic device

Publications (2)

Publication Number Publication Date
CN111405205A true CN111405205A (en) 2020-07-10
CN111405205B CN111405205B (en) 2023-02-24

Family

ID=71429083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010213353.5A Active CN111405205B (en) 2020-03-24 2020-03-24 Image processing method and electronic device

Country Status (1)

Country Link
CN (1) CN111405205B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284063A (en) * 2021-05-24 2021-08-20 维沃移动通信有限公司 Image processing method, image processing apparatus, electronic device, and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268396A1 (en) * 2006-05-11 2007-11-22 Seiko Epson Corporation Image pickup device and image pickup apparatus
US20120287294A1 (en) * 2011-05-13 2012-11-15 Sony Corporation Image processing apparatus, image pickup apparatus, image processing method, and program
CN103826066A (en) * 2014-02-26 2014-05-28 芯原微电子(上海)有限公司 Automatic exposure adjusting method and system
CN104079842A (en) * 2014-06-27 2014-10-01 广东欧珀移动通信有限公司 Camera noise and frame rate control method and device
CN105100637A (en) * 2015-08-31 2015-11-25 联想(北京)有限公司 Image processing method and electronic equipment
CN107635102A (en) * 2017-10-30 2018-01-26 广东欧珀移动通信有限公司 High dynamic range images exposure compensating value-acquiring method and device
CN109743506A (en) * 2018-12-14 2019-05-10 维沃移动通信有限公司 A kind of image capturing method and terminal device
CN109756680A (en) * 2019-01-30 2019-05-14 Oppo广东移动通信有限公司 Image composition method, device, electronic equipment and readable storage medium storing program for executing
CN109788207A (en) * 2019-01-30 2019-05-21 Oppo广东移动通信有限公司 Image composition method, device, electronic equipment and readable storage medium storing program for executing
WO2019183813A1 (en) * 2018-03-27 2019-10-03 华为技术有限公司 Image capture method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268396A1 (en) * 2006-05-11 2007-11-22 Seiko Epson Corporation Image pickup device and image pickup apparatus
US20120287294A1 (en) * 2011-05-13 2012-11-15 Sony Corporation Image processing apparatus, image pickup apparatus, image processing method, and program
CN103826066A (en) * 2014-02-26 2014-05-28 芯原微电子(上海)有限公司 Automatic exposure adjusting method and system
CN104079842A (en) * 2014-06-27 2014-10-01 广东欧珀移动通信有限公司 Camera noise and frame rate control method and device
CN105100637A (en) * 2015-08-31 2015-11-25 联想(北京)有限公司 Image processing method and electronic equipment
CN107635102A (en) * 2017-10-30 2018-01-26 广东欧珀移动通信有限公司 High dynamic range images exposure compensating value-acquiring method and device
WO2019183813A1 (en) * 2018-03-27 2019-10-03 华为技术有限公司 Image capture method and device
CN111418201A (en) * 2018-03-27 2020-07-14 华为技术有限公司 Shooting method and equipment
CN109743506A (en) * 2018-12-14 2019-05-10 维沃移动通信有限公司 A kind of image capturing method and terminal device
CN109756680A (en) * 2019-01-30 2019-05-14 Oppo广东移动通信有限公司 Image composition method, device, electronic equipment and readable storage medium storing program for executing
CN109788207A (en) * 2019-01-30 2019-05-21 Oppo广东移动通信有限公司 Image composition method, device, electronic equipment and readable storage medium storing program for executing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284063A (en) * 2021-05-24 2021-08-20 维沃移动通信有限公司 Image processing method, image processing apparatus, electronic device, and readable storage medium

Also Published As

Publication number Publication date
CN111405205B (en) 2023-02-24

Similar Documents

Publication Publication Date Title
CN107707827B (en) High-dynamic image shooting method and mobile terminal
CN110740259B (en) Video processing method and electronic equipment
CN110198412B (en) Video recording method and electronic equipment
CN107613191B (en) Photographing method, photographing equipment and computer readable storage medium
CN107566739B (en) photographing method and mobile terminal
CN108307109B (en) High dynamic range image preview method and terminal equipment
CN109218626B (en) Photographing method and terminal
CN110213484B (en) Photographing method, terminal equipment and computer readable storage medium
CN110913139B (en) Photographing method and electronic equipment
CN108280817B (en) Image processing method and mobile terminal
CN108449541B (en) Panoramic image shooting method and mobile terminal
CN107623818B (en) Image exposure method and mobile terminal
CN111405199A (en) Image shooting method and electronic equipment
CN111601032A (en) Shooting method and device and electronic equipment
CN109922294B (en) Video processing method and mobile terminal
CN109120853B (en) Long exposure image shooting method and terminal
CN109474784B (en) Preview image processing method and terminal equipment
CN110708475B (en) Exposure parameter determination method, electronic equipment and storage medium
CN108307123B (en) Exposure adjusting method and mobile terminal
CN111447371A (en) Automatic exposure control method, terminal and computer readable storage medium
CN111050069B (en) Shooting method and electronic equipment
CN110881105B (en) Shooting method and electronic equipment
CN111131722A (en) Image processing method, electronic device, and medium
CN108243489B (en) Photographing control method and mobile terminal
CN107734269B (en) Image processing method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant