WO2023109800A1 - 图像处理方法、装置、电子设备及存储介质 - Google Patents

图像处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2023109800A1
WO2023109800A1 PCT/CN2022/138611 CN2022138611W WO2023109800A1 WO 2023109800 A1 WO2023109800 A1 WO 2023109800A1 CN 2022138611 W CN2022138611 W CN 2022138611W WO 2023109800 A1 WO2023109800 A1 WO 2023109800A1
Authority
WO
WIPO (PCT)
Prior art keywords
analog gain
curve function
gain
parameter
coefficient
Prior art date
Application number
PCT/CN2022/138611
Other languages
English (en)
French (fr)
Inventor
巫启宇
郭奕滨
Original Assignee
影石创新科技股份有限公司
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 影石创新科技股份有限公司 filed Critical 影石创新科技股份有限公司
Publication of WO2023109800A1 publication Critical patent/WO2023109800A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/70SSIS architectures; Circuits associated therewith
    • H04N25/76Addressed sensors, e.g. MOS or CMOS sensors

Definitions

  • the present application relates to the technical field of image processing, and in particular to an image processing method, device, electronic equipment and storage medium.
  • An embodiment of the present application provides an image processing method, which can adjust the dynamic range of a picture and improve the adaptability of an electronic device to an actual scene during a shooting process.
  • the embodiment of the present application provides an image processing method, including:
  • the first analog gain and the first curve function are adjusted to improve the dynamic range or signal-to-noise ratio of the current picture while keeping the brightness and contrast of the current picture unchanged.
  • the scene mode includes a high-contrast mode and a low-contrast mode
  • the first analog gain and the first curve function are adjusted according to the scene mode corresponding to the current picture, including:
  • the scene mode is the high-contrast mode
  • determine the second analog gain and the second curve function adjust the first analog gain to the second analog gain, and adjust the first curve function to the second curve function, wherein the first curve function Corresponding to the first parameter, the second curve function corresponds to the second parameter, the second parameter is greater than the first parameter, and the second analog gain is smaller than the first analog gain;
  • the scene mode is low-contrast mode
  • determine the third analog gain and the third curve function adjust the first analog gain to the third analog gain, and adjust the first curve function to the third curve function, wherein the third curve function Corresponding to the third parameter, the third parameter is smaller than the first parameter, and the third analog gain is greater than the first analog gain.
  • Second analog gain first analog gain*first gain coefficient
  • Third analog gain first analog gain*second gain coefficient, where 0 ⁇ first gain coefficient ⁇ 1, 1 ⁇ second gain coefficient ⁇ maximum gain coefficient.
  • the first curve function includes:
  • y is the value of the ordinate
  • a is the first variable
  • b is the second variable
  • x is the value of the abscissa
  • c is the third variable
  • d is the fourth variable.
  • adjusting the first analog gain and the first curve function according to the scene mode corresponding to the current picture includes:
  • the scene mode is low-contrast mode
  • the function corresponds to the first parameter, and the first parameter includes the second variable.
  • the first coefficient*the first gain coefficient 1;
  • Second coefficient*second gain coefficient 1.
  • an image processing device including:
  • An acquisition unit configured to acquire the first analog gain of the image sensor corresponding to the current picture and the first curve function of the image processor
  • the adjustment unit is configured to adjust the first analog gain and the first curve function according to the scene mode corresponding to the current picture, so as to improve the dynamic range or the signal-to-noise ratio of the current picture while keeping the brightness and contrast of the current picture unchanged.
  • the embodiment of the present application provides an electronic device, including:
  • the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor, so that the at least one processor can execute the image processing method according to the first aspect.
  • the embodiment of the present application provides a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make the electronic device perform the first aspects of image processing methods.
  • the beneficial effects of the embodiments of the present application are: by providing an image processing method, including: obtaining the first analog gain of the image sensor corresponding to the current picture and the first curve function of the image processor; according to the scene mode corresponding to the current picture, adjusting The first analog gain and the first curve function improve the dynamic range or signal-to-noise ratio of the current picture while keeping the brightness and contrast of the current picture unchanged.
  • the application can adjust the dynamic range of the picture and improve The ability of electronic equipment to adapt to the actual scene during the shooting process.
  • FIG. 1 is a schematic flow diagram of an image processing method provided in an embodiment of the present application
  • Fig. 2 is a schematic flow chart of another image processing method provided by the embodiment of the present application.
  • Fig. 3 is a schematic diagram of a gamma curve provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a dynamic range provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an image processing device provided in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • Gain also known as gain, that is, the magnification factor
  • Gain is generally used for hardware amplifiers. As the Gain value increases, corresponding noise will be introduced.
  • Analog gain Analog Gain
  • the core that affects the purity of image quality is the signal-to-noise ratio technology, that is, SNR technology (signal to noise ratio, SNR).
  • SNR signal to noise ratio
  • the core of the signal-to-noise ratio is the ratio of the active components in the photoelectric conversion signal of the sensor to the power of the invalid noise, also called the signal-to-noise ratio, and the unit is dB.
  • the core that affects the signal-to-noise ratio is the pixel density per unit area of the sensor. In layman's terms, the total pixels of the sensor are related to the size of the output frame.
  • the better the photosensitivity of a single pixel the less noise will inevitably be generated during photoelectric conversion, and the less the total number of noise will naturally be. Of course, if the pixel density is too low, although the noise control is better, the ability to capture details will be reduced, so balance is the most important.
  • Log mode the camera's log mainly refers to the log format of the camera's video function, and the video shot in this format can preserve the details of the highlights and shadows to the greatest extent.
  • the full English name of Log is Logarithmic, which is a form of video recording that uses a logarithmic function applied to the exposure curve.
  • Log is similar to the RAW format, but the principles of the two are different.
  • the RAW format records all the optical information acquired by the sensor, while the Log Through the corresponding special curve, the dynamic range of the sensor is maximized during recording, and its volume will be smaller than that of RAW.
  • High contrast that is, High Contrast
  • the contrast range of black and white images is described by a technology (English tone) on the (scale) color scale of equal intervals from black to white.
  • High-contrast images have little or no halftone between black and white. Such images are well-defined and have the characteristics of propaganda posters.
  • High-contrast images can be obtained by shooting high-contrast scenes with standard photographic materials, or by shooting standard scenes with high-contrast materials.
  • "High-contrast" or printing plate film or paper produces the greatest contrast, with an image that is black and white only, with no half-tones.
  • High-contrast images are often used as intermediates in photoengraved reproductions of photographic works for special effects.
  • Gamma curve that is, Gamma curve.
  • Each pixel in a digital image has a certain level of lightness, from black (0) to white (1). These pixel values are the information entered into the computer monitor.
  • the Gamma curve is a special tone curve. When the Gamma value is equal to 1, the curve is a straight line at 45° to the coordinate axis, which means that the input and output densities are the same. Gamma values above 1 will darken the output, and Gamma values below 1 will lighten the output.
  • the actual output image may have deviations in brightness, and Gamma curve correction is a method to correct this deviation of the image through a certain method.
  • Gamma correction In general, when the value used for Gamma correction is greater than 1, the highlight part of the image is compressed and the dark part is expanded. When the value of Gamma correction is less than 1, the highlight part of the image is expanded and the dark part is compressed. Gamma correction is generally used to smoothly expand the details of dark tones.
  • Dynamic range refers to the range of light intensity distribution from the darkest shadow part to the brightest highlight part in the picture. Usually expressed in decibels (db) or grades. For example, describing a scene as saying that its dynamic range is very wide means that the exposure value from the shadow part to the highlight part in this scene has a large difference, and the contrast of the picture is high and the layers are rich.
  • db decibels
  • describing a scene as saying that its dynamic range is very wide means that the exposure value from the shadow part to the highlight part in this scene has a large difference, and the contrast of the picture is high and the layers are rich.
  • the photographer takes a photo there are actually two dynamic ranges that the photographer needs to consider: the first is the dynamic range of the scene the photographer wants to shoot, and the second is the dynamic range of the photosensitive element of the photographer's camera. Dynamic Range. If the dynamic range of the camera is smaller than the dynamic range of the scene, the photo will appear to lack details in highlights and shadows.
  • ISO refers to shooting 18 gray cards with a specific aperture and a specific shutter in a specific illumination LUX environment.
  • the gray value of the 18 gray cards can reach a specific gray level, the total Gain value at this time is collectively referred to as a specific ISO (such as ISO100), wherein the standard is defined in the ISO12232 standard.
  • REC.709 the REC.709 color standard
  • HDTV high-definition television
  • the International Telecommunication Union adopted REC.709 as the unified color standard for HDTV. It has a relatively small color gamut identical to the sRGB color space used for Internet media.
  • REC.709 color standard the REC.709 color standard
  • most films need to be transcoded on the basis of the original film with reference to the REC.709 color standard, in order to provide a film carrier that conforms to mainstream playback formats such as online video, Blu-ray DVD, etc.
  • the image processing method provided by the embodiment of the present application is applied to the Log mode. It can be understood that due to different lighting conditions, different shooting scenes will lead to different shooting pictures, but in actual shooting, not all scenes require High dynamic range, but the influence of noise needs to be considered, that is, considering the factor of signal-to-noise ratio, the dynamic range of conventional cameras has been determined after the video is encoded. Professional cameras can record the Log mode specified by the manufacturer to obtain a wide dynamic range, but at the same time it will bring a significant drop in signal-to-noise ratio. In the Log mode, since the Log curves are all formulated by the manufacturer, the user can only passively accept the dynamic range and signal-to-noise ratio specified by the manufacturer, and cannot choose according to the picture requirements of the actual scene.
  • embodiments of the present application provide an image processing method, device, electronic equipment, and storage medium, so as to adjust the dynamic range of a picture in Log mode.
  • FIG. 1 is a schematic flowchart of an image processing method provided in an embodiment of the present application.
  • the image processing method is applied to an electronic device, such as a mobile terminal. Specifically, the image processing method is executed by one or more processors of the electronic device.
  • the image processing method includes:
  • Step S101 Obtain the first analog gain of the image sensor corresponding to the current frame and the first curve function of the image processor;
  • the current scene refers to the shooting scene of the electronic device, where the current picture corresponds to an analog gain and curve function, for example: the image sensor corresponding to the current picture corresponds to the first analog gain, and the image processor corresponds to the first curve function.
  • the first curve function corresponds to the first curve, and the first curve includes a standard Log mode curve.
  • the brightness improvement of RAW images is generally achieved by adding circuit gain. Due to the characteristics of the circuit, adding gain from the analog side will obtain a higher signal-to-noise ratio than adding gain from the digital side. Moreover, based on the characteristics of the sensor's linear sensitivity, the analog gain is a linear gain. After increasing the analog gain, the highlights will be cut off, but the dark parts will be preserved, so that the overall dynamic range remains unchanged. On the contrary, after reducing the analog gain, the highlights will be cut off. is preserved, but shadows are lost, leaving the overall dynamic range unchanged.
  • Step S102 According to the scene mode corresponding to the current picture, adjust the first analog gain and the first curve function to improve the dynamic range or signal-to-noise ratio of the current picture while keeping the brightness and contrast of the current picture unchanged.
  • FIG. 2 is a schematic flowchart of another image processing method provided by the embodiment of the present application.
  • the image processing method includes:
  • Step S201 Obtain the scene mode corresponding to the current screen
  • the scene modes include a high-contrast mode and a low-contrast mode. If the scene mode is high contrast mode, it means that the scene is a high contrast scene; if the scene mode is low contrast scene, it means that the scene is a low contrast scene.
  • a high-contrast scene refers to a large area of the picture that is overexposed and/or too dark.
  • a high-contrast scene includes scenes such as large backlight, sunset, and windows.
  • obtaining the scene mode corresponding to the current screen includes:
  • the scene picture of the current scene is the current picture
  • the first area and the second area in the current picture are obtained, wherein the light intensity of the first area is greater than the light intensity of the second area, and the area of the first area is greater than the area of the second area
  • An area threshold, the area of the second region is greater than the second area threshold.
  • the light intensity refers to the luminous flux of visible light received per unit area, and the unit is Lux (Lux), which is used to indicate the intensity of light and the amount of illumination of the surface area of an object.
  • Step S202 judging whether the scene mode is a high-contrast mode
  • step S203 adjust the first analog gain to the second analog gain
  • step S204 adjust the first analog gain to the third analog gain
  • Step S203 adjusting the first analog gain to the second analog gain
  • the scene mode is a high-contrast mode
  • the second analog gain the first analog gain*the first gain coefficient, wherein, 0 ⁇ the first gain coefficient ⁇ 1, for example: the first analog gain is 2x, the first gain coefficient is 0.5, at this time the second analog The gain is 1x.
  • the analog gain has a minimum value, that is, the minimum analog gain.
  • Step S204 adjusting the first analog gain to the third analog gain
  • a third analog gain and a third curve function are determined, wherein the third analog gain is greater than the first analog gain.
  • analog gain is a basic parameter of the image sensor (Sensor), which is determined by the model of the image sensor.
  • Step S205 adjusting the first curve function to the second curve function
  • the first curve function corresponds to the first parameter, wherein the first parameter refers to the adjustable variable in the first curve function, specifically, the adjustable variable includes the first variable a, at least one of the second variable b, the third variable c, and the fourth variable d.
  • Step S206 adjusting the first curve function to the third curve function
  • the first curve function corresponds to the first parameter, wherein the first parameter refers to the adjustable variable in the first curve function, specifically, the adjustable variable includes the first variable a, at least one of the second variable b, the third variable c, and the fourth variable d.
  • the analog gain (analog gain) of the current frame is 2x
  • the curve uses the standard Log mode curve
  • FIG. 3 is a schematic diagram of a gamma curve provided by an embodiment of the present application.
  • the abscissa is the original pixel brightness of the image
  • the ordinate is the output brightness.
  • the function of the gamma curve is to map the brightness and contrast of the image input to an effect that conforms to the perception of the human eye.
  • the original scheme is the curve corresponding to the first curve function, namely the standard gamma curve
  • scheme 1 is the curve corresponding to the second curve function
  • scheme 2 is the curve corresponding to the third curve function.
  • the second analog gain is smaller than the first analog gain, that is, the analog gain (Analog Gain) is reduced, the overall brightness on the RAW image is reduced, and due to the photosensitive characteristics of the image sensor (Sensor), the highlight part can be retained in the RAW image middle.
  • the brightness and contrast are guaranteed to be unchanged, but the missing brightness due to the reduction of the analog gain (Analog Gain) is supplemented by the curve (ISP Digital Gain) on the image signal sensor (Image Signal Processor, ISP) , the overall picture signal-to-noise ratio will decrease. Therefore, the actual result of the scheme 1 compared with the original scheme is: to improve the dynamic range and reduce the signal-to-noise ratio.
  • scheme 1 makes full use of the complete code value of 0-1
  • scheme 2 is due to the adjustment of the curve formula , only the code value of 0-0.83 is used, and the range of the code value refers to the range of brightness 0-255 of the normal image.
  • the curve of Scheme 2 maps the point with the highest input brightness to a position of about 0.81, which means that the brightness range of the image under this scheme can only be 0-206, making the code value utilization low.
  • FIG. 4 is a schematic diagram of a dynamic range provided by an embodiment of the present application.
  • the solution in this application is in the Log mode. Since the dynamic range is higher in the Log mode, but the picture is relatively gray or foggy or the contrast is relatively low, in order to facilitate the normal viewing of the image picture, you can also create a 3dlut , convert the Log mode to the REC.709 mode, that is, map the curve in the Log mode to the curve in the REC.709 mode, so as to meet the visual perception requirements of the human eye.
  • the first analog gain of the image sensor and the first curve function of the image processor are adjusted according to the scene mode, so that the electronic device can provide Higher dynamic range, providing better signal-to-noise ratio in scenes with less contrast, that is, a solution that can dynamically provide high dynamic range and low signal-to-noise ratio, or a solution with low dynamic range and high signal-to-noise ratio, so that Realize the improvement of the adaptability of the electronic equipment to the actual scene during the shooting process.
  • FIG. 5 is a schematic structural diagram of an image processing device provided in an embodiment of the present application.
  • the image processing apparatus is applied to electronic equipment, specifically, the image processing apparatus is applied to one or more processors of the electronic equipment.
  • the image processing device 50 includes:
  • An acquisition unit 51 configured to acquire the first analog gain of the image sensor corresponding to the current picture and the first curve function of the image processor;
  • the adjustment unit 52 is configured to adjust the first analog gain and the first curve function according to the scene mode corresponding to the current picture, so as to improve the dynamic range or signal-to-noise ratio of the current picture and keep the brightness and contrast of the current picture unchanged.
  • the image processing device can also be built by hardware devices.
  • the image processing device can be built by one or more than two chips, and each chip can work in coordination with each other to complete the above-mentioned embodiments.
  • the image processing device can also be built by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
  • the image processing apparatus in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the device may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant).
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the image processing device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
  • the image processing device provided in the embodiment of the present application can realize various processes implemented in FIG. 1 , and details are not described here to avoid repetition.
  • the above-mentioned image processing device can execute the image processing method provided in the embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method.
  • the image processing method provided in the embodiment of the present application can execute the image processing method provided in the embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method.
  • an image processing device including: an acquisition unit, configured to acquire the first analog gain of the image sensor corresponding to the current picture and the first curve function of the image processor; an adjustment unit, configured to The scene mode corresponding to the current picture adjusts the first analog gain and the first curve function to improve the dynamic range or signal-to-noise ratio of the current picture while keeping the brightness and contrast of the current picture unchanged.
  • this application can realize dynamic adjustment of the dynamic range of the picture, and improve the electronic device's understanding of the actual scene during the shooting process. adaptability.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • the electronic device 60 includes, but is not limited to: a radio frequency unit 61, a network module 62, an audio output unit 63, an input unit 64, a sensor 65, a display unit 66, a user input unit 67, an interface unit 68, and a memory 69 , a processor 610, and a power supply 611 and other components, and the electronic device also includes a camera.
  • a radio frequency unit 61 the radio frequency unit
  • a network module 62 the electronic device also includes, but is not limited to: a radio frequency unit 61, a network module 62, an audio output unit 63, an input unit 64, a sensor 65, a display unit 66, a user input unit 67, an interface unit 68, and a memory 69 , a processor 610, and a power supply 611 and other components
  • the electronic device also includes a camera.
  • the structure of the electronic device shown in FIG. 6 does not constitute a limitation to the electronic device, and the electronic device may include more or less
  • the electronic device includes but is not limited to a mobile phone, a tablet computer, a handheld computer, a wearable device, a video camera, etc.
  • the electronic device in the embodiment of the present application is a video camera.
  • Processor 610 configured to acquire the first analog gain of the image sensor corresponding to the current picture and the first curve function of the image processor; adjust the first analog gain and the first curve function according to the scene mode corresponding to the current picture to improve the current picture
  • the dynamic range or signal-to-noise ratio and the brightness and contrast of the current picture will not change.
  • the application can dynamically adjust the dynamic range of the picture , Improve the adaptability of the electronic equipment to the actual scene during the shooting process.
  • the radio frequency unit 61 can be used for receiving and sending signals during sending and receiving information or during a call. Specifically, the downlink data from the base station is received and processed by the processor 610; Uplink data is sent to the base station.
  • the radio frequency unit 61 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.
  • the radio frequency unit 61 can also communicate with the network and other devices through a wireless communication system.
  • the electronic device 60 provides users with wireless broadband Internet access through the network module 62 , such as helping users send and receive emails, browse web pages, and access streaming media.
  • the audio output unit 63 may convert audio data received by the radio frequency unit 61 or the network module 62 or stored in the memory 69 into an audio signal and output as sound. Also, the audio output unit 63 may also provide audio output related to a specific function performed by the electronic device 60 (eg, call signal reception sound, message reception sound, etc.).
  • the audio output unit 63 includes a speaker, a buzzer, a receiver, and the like.
  • the input unit 64 is used to receive audio or video signals.
  • the input unit 64 can include a graphics processing unit (Graphics Processing Unit, GPU) 641 and a microphone 642, and the graphics processing unit 641 can target still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode.
  • the image is processed.
  • the processed image frames may be displayed on the display unit 66 .
  • the image frames processed by the graphics processor 641 may be stored in the memory 69 (or other storage media) or sent via the radio frequency unit 61 or the network module 62 .
  • the microphone 642 can receive sound and can process such sound into audio data.
  • the processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 61 for output in the case of a phone call mode.
  • the electronic device 60 also includes at least one sensor 65, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 661 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 661 and the display panel 661 when the electronic device 60 moves to the ear / or backlighting.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is still, and can be used to identify the posture of electronic equipment (such as horizontal and vertical screen switching, related games) , magnetometer attitude calibration), vibration recognition related functions (such as pedometer, knocking), etc.; sensor 65 can also include fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, Infrared sensors, etc., will not be repeated here.
  • the display unit 66 is used to display information input by the user or information provided to the user.
  • the display unit 66 may include a display panel 661, and the display panel 661 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • LCD Liquid Crystal Display
  • OLED Organic Light-Emitting Diode
  • the user input unit 67 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the electronic device.
  • the user input unit 67 includes a touch panel 671 and other input devices 672 .
  • the touch panel 671 also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 671 or near the touch panel 671). operate).
  • the touch panel 671 may include two parts, a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the For the processor 610, receive the command sent by the processor 610 and execute it.
  • the touch panel 671 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the user input unit 67 may also include other input devices 672 .
  • other input devices 672 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • the touch panel 671 can be covered on the display panel 661, and when the touch panel 671 detects a touch operation on or near it, it will be sent to the processor 610 to determine the type of the touch event, and then the processor 610 will The type of event provides a corresponding visual output on the display panel 661 .
  • the touch panel 671 and the display panel 661 are used as two independent components to realize the input and output functions of the electronic device, in some embodiments, the touch panel 671 and the display panel 661 can be integrated. The implementation of the input and output functions of the electronic device is not specifically limited here.
  • the interface unit 68 is an interface for connecting an external device to the electronic device 60 .
  • an external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) ports, video I/O ports, headphone ports, and more.
  • Interface unit 68 may be used to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more elements within electronic device 60 or may be used to interface transfer data between devices.
  • the memory 69 can be used to store software programs as well as various data.
  • Storer 69 can mainly comprise store program area and store data area, wherein, store program area can store at least one function required application program 691 (such as sound playback function, image play function etc.) and operating system 692 etc.; Store data area can be Store data (such as audio data, phone book, etc.) created according to the use of the mobile phone.
  • the memory 69 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
  • the processor 610 is the control center of the electronic equipment. It utilizes various interfaces and lines to connect various parts of the entire electronic equipment. By running or executing software programs and/or modules stored in the memory 69, and calling data stored in the memory 69 , to perform various functions of the electronic equipment and process data, so as to monitor the electronic equipment as a whole.
  • the processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem
  • the processor mainly handles wireless communication. It can be understood that, the foregoing modem processor may not be integrated into the processor 610 .
  • the electronic device 60 can also include a power supply 611 (such as a battery) for supplying power to various components.
  • a power supply 611 (such as a battery) for supplying power to various components.
  • the power supply 611 can be logically connected to the processor 610 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. and other functions.
  • the electronic device 60 includes some unshown functional modules, which will not be repeated here.
  • the embodiment of the present application also provides a non-volatile computer storage medium, the computer storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, such as a processor 610 in FIG. 6 , so that the above one or more processors can execute the image processing method in any of the above method embodiments.
  • processors such as a processor 610 in FIG. 6
  • the embodiment of the present application also provides a computer program product.
  • the computer program product includes a computer program stored on a non-volatile computer-readable storage medium.
  • the computer program includes program instructions. When the program instructions are executed by the electronic device, the electronic The device executes the image processing method described above.
  • each embodiment can be implemented by means of software plus a general hardware platform, and of course also by hardware.
  • the essence of the above technical solutions or the part that contributes to related technologies can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, disk , optical disk, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods of various embodiments or some parts of the embodiments.

Abstract

本申请涉及图像处理技术领域,公开一种图像处理方法、装置、电子设备及存储介质,该方法包括:获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。通过获取当前画面对应的场景模式,根据场景模式调整图像传感器的第一模拟增益以及图像处理器的第一曲线函数,使得当前画面的亮度、对比度不变,本申请能够实现调整画面的动态范围,提高电子设备在拍摄过程中对实际场景的适应能力。

Description

图像处理方法、装置、电子设备及存储介质 技术领域
本申请涉及图像处理技术领域,尤其涉及一种图像处理方法、装置、电子设备及存储介质。
背景技术
常规摄影机在视频经过编码之后,就确定了一个动态范围。专业摄影机上可以通过录制厂家制定的Log模式,来获取宽广的动态范围,但同时会带来信噪比的大幅下降。
在Log模式下,由于Log曲线都是由厂家事先制定好的,用户只能被动地接受厂家决定好的动态范围与信噪比,无法根据实际场景画面需求进行选择,导致对实际场景的适应能力不足。
发明内容
本申请实施例提供一种图像处理方法,其能够实现调整画面的动态范围,提高电子设备在拍摄过程中对实际场景的适应能力。
第一方面,本申请实施例提供一种图像处理方法,包括:
获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;
根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
在一些实施例中,场景模式包括高反差模式和低反差模式,根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,包括:
若场景模式为高反差模式,则确定第二模拟增益和第二曲线函数,将第一模拟增益调整为第二模拟增益,将第一曲线函数调整为第二曲线函数,其中,第一曲线函数对应第一参数,第二曲线函数对应第二参数,第二参数大于第一参数,第二模拟增益小于第一模拟增益;
若场景模式为低反差模式,则确定第三模拟增益和第三曲线函数,将第一模拟增益调整为第三模拟增益,将第一曲线函数调整为第三曲线函数,其中,第三曲线函数对应第三参数,第三参数小于第一参数,第三模拟增益大于第一模拟增益。
在一些实施例中,
第二模拟增益=第一模拟增益*第一增益系数;
第三模拟增益=第一模拟增益*第二增益系数,其中,0<第一增益系数≤1,1<第二增益系数≤最大增益系数。
在一些实施例中,最大增益系数由图像传感器的最大模拟增益确定,其中,最大增益系数=最大模拟增益/第一模拟增益。
在一些实施例中,第一曲线函数包括:
y=a*log 10(b*x+c)+d
其中,y为纵坐标的值,a为第一变量,b为第二变量,x为横坐标的值,c为第三变量,d为第四变量。
在一些实施例中,根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,包括:
若场景模式为高反差模式,则确定第二模拟增益和第二曲线函数,其中,第二曲线函数对应第二参数,其中,第二参数=第一参数*第一系数;
若场景模式为低反差模式,则确定第三模拟增益和第三曲线函数,其中,第三曲线函数对应第三参数,其中,第三参数=第一参数*第二系数,其中,第一曲线函数对应第一参数,第一参数包括第二变量。
在一些实施例中,
第一系数*第一增益系数=1;
第二系数*第二增益系数=1。
第二方面,本申请实施例提供一种图像处理装置,包括:
获取单元,用于获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;
调整单元,用于根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
第三方面,本申请实施例提供一种电子设备,包括:
至少一个处理器;和
与至少一个处理器通信连接的存储器;其中,
存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如第一方面的图像处理方法。
第四方面,本申请实施例提供一种非易失性计算机可读存储介质,非易失性计算机可读存储介质存储有计算机可执行指令,计算机可执行指令用于使电子设备执行如第一方面的图像处理方法。
本申请实施例的有益效果是:通过提供一种图像处理方法,包括:获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。通过获取当前场景的场景模式,根据场景模式调整图像传 感器的第一模拟增益以及图像处理器的第一曲线函数,使得当前画面的亮度、对比度不变,本申请能够实现调整画面的动态范围,提高电子设备在拍摄过程中对实际场景的适应能力。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本申请实施例提供的一种图像处理方法的流程示意图;
图2是本申请实施例提供的另一种图像处理方法的流程示意图;
图3是本申请实施例提供的一种伽马曲线的示意图;
图4是本申请实施例提供的一种动态范围的示意图;
图5是本申请实施例提供的一种图像处理装置的结构示意图;
图6是本申请实施例提供的一种电子设备的硬件结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,如果不冲突,本申请实施例中的各个特征可以相互结合,均在本申请的保护范围之内。另外,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以 以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。再者,本申请所采用的“第一”、“第二”、“第三”等字样并不对数据和执行次序进行限定,仅是对功能和作用基本相同的相同项或相似项进行区分。
对本申请进行详细说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释:
(1)增益,又称为gain,即放大倍数,一般多用于硬件放大器,随着Gain值增大会带入相应的噪声。模拟增益(Analog Gain),带来的噪声用数据来说明:2.4和3.1,数字量化后为2和3。但假如模拟增益2x,则为4.8和6.2,量化后为5和6。这就是模拟增益带来的噪声。
(2)信噪比。在光电转换技术基本相同的情况下,影响画质纯净度的核心就是信噪比技术,即SNR技术(signal to noise ratio,SNR)。信噪比的核心是传感器光电转换信号中的有效成分与无效噪声的功率之比,也叫讯噪比,单位是dB。影响信噪比最核心的是传感器单位面积上的像素密度。通俗地说,传感器的总像素关系到输出画幅的尺寸,像素越高可以放大的尺寸也越大,但在传感器面积相同时,像素越少,像素密度越低,单个像素点的面积越大,单个像素点的感光性能(光敏性)就越好,或者相同像素总数下,传感器面积越大,单个像素点的面积也越大,单个像素点的感光性能也就越好。单个像素的光敏性越好,光电转换时必然产生的噪点也越少,噪点总数自然也有越少。当然,像素密度过低,虽然控噪更好,但捕捉细节的能力会下降,故平衡是最重要的。
(3)Log模式,相机的log主要是指相机视频功能的log格式,该格式下拍摄的视频可以最大限度地保留高光和阴影部分的细节。Log的英文全称是Logarithmic,是一种采用对数函数应用到曝光曲线上的视频记录形式,Log与RAW格式很相似,但二者原理不同,RAW格式记录 了传感器获取的全部光学信息,而Log则是通过对应的特殊曲线,让传感器在录制时动态范围最大化,其体积相对于RAW会更小。
(4)高反差,即High Contrast,黑白影像的反差范围是由一个从黑到白等间隔灰的(标度)色阶上的技术(英调)来描述的。高反差影像在黑和白之间仅有很少的或没有中间影调。这样的影像轮廓分明,具有宣传画一样的特征。高反差影像可以用标准的照相材料对高反差景物拍摄获得,也可以用高反差材料对标准景物拍摄获得。“高反差”或印刷制版胶片或相纸产生的反差最大,其影像仅有黑与白,无中间影调。高反差影像在制作特殊效果的摄影作品获照相制版的复制中常常用作中间片。
(5)伽马曲线,即Gamma曲线。数码图像中的每个像素都有一定的光亮程度,即从黑色(0)到白色(1)。这些像素值就是输入到电脑显示器里面的信息。Gamma曲线是一种特殊的色调曲线,当Gamma值等于1的时候,曲线为与坐标轴成45°的直线,这个时候表示输入和输出密度相同。高于1的Gamma值将会造成输出暗化,低于1的Gamma值将会造成输出亮化。在计算机系统中,由于显卡或者显示器的原因会出现实际输出的图像在亮度上有偏差,而Gamma曲线矫正就是通过一定的方法来矫正图像的这种偏差的方法。一般情况下,当用于Gamma矫正的值大于1时,图像的高光部分被压缩而暗调部分被扩展,当Gamma矫正的值小于1时,图像的高光部分被扩展而暗调部分被压缩,Gamma矫正一般用于平滑的扩展暗调的细节。
(6)动态范围,指的是用来描述画面中从最暗的阴影部分到最亮的高光部分的光量强度分布范围。通常情况下用分贝(db)或档次来表示。例如:描述一个场景说它的动态范围很广,指的是这个场景中从阴影部分到高光部分之间的曝光数值相差很大,画面的对比度高,层次丰 富。当拍摄者拍摄一张照片的时候,实际上有两个动态范围是拍摄者需要考虑的:第一个是拍摄者要拍摄的场景的动态范围,第二个是拍摄者的相机的感光元件的动态范围。假如相机的动态范围比场景的动态范围小,照片会出现缺失亮部细节和暗部细节。
(7)ISO,指的是在特定照度LUX环境,以特定光圈、特定快门,拍摄18灰卡,当18灰卡的灰度值能达到特定灰度时,这时的总Gain值统称为特定ISO(如ISO100),其中,该标准在ISO12232标准中定义。
(8)REC.709,即REC.709色彩标准,是高清电视的国际标准。1990年,国际电信联盟将REC.709作为HDTV的统一色彩标准。它有相对较小色域和用于互联网媒体的sRGB色彩空间相同。大部分影片在后期发行的过程当中,都需要在原片的基础上参照REC.709色彩标准进行转码,以期提供符合主流播放形式如网络视频、蓝光DVD等的电影载体。
本申请实施例提供的图像处理方法应用于Log模式,可以理解的是,由于光照条件的不同,不同的拍摄场景会导致不同的拍摄画面,而在实际的拍摄中,并不是所有的场景都需要较高的动态范围,而需要考虑噪声的影响,即,考虑信噪比这一因素,常规摄影机在视频经过编码之后,动态范围就已经确定下来的。专业摄影机上可以通过录制厂家制定的Log模式,来获取宽广的动态范围,但同时会带来信噪比的大幅下降。在Log模式下,由于Log曲线都是由厂家制定好的,用户只能被动地接受厂家制定好的动态范围与信噪比,无法根据实际场景的画面需求进行选择。
基于此,本申请实施例提供一种图像处理方法、装置、电子设备及存储介质,以实现在Log模式下调整画面的动态范围。
下面结合说明书附图具体说明本申请的技术方案:
请参阅图1,图1是本申请实施例提供的一种图像处理方法的流程示意图;
其中,该图像处理方法,应用于电子设备,例如:移动终端,具体的,该图像处理方法的执行主体为电子设备的一个或多个处理器。
如图1所示,该图像处理方法,包括:
步骤S101:获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;
具体的,当前场景指的是电子设备的拍摄场景,其中,当前画面对应一个模拟增益和曲线函数,例如:当前画面对应的图像传感器对应第一模拟增益,图像处理器对应第一曲线函数。其中,第一曲线函数对应第一曲线,第一曲线包括标准Log模式曲线。
可以理解的是,对于RAW画面的亮度提高,一般通过加电路增益实现,由于电路特性,从模拟端加增益,比从数字端加增益会获得更高的信噪比。并且,基于传感器线性感光的特性,模拟增益是线性增益,在提高模拟增益之后,高光会被截断,但暗部会得以保留,使得整体的动态范围不变,反之,在降低模拟增益之后,高光会被保留,但暗部会损失,使得整体的动态范围不变。
步骤S102:根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
具体的,请再参阅图2,图2是本申请实施例提供的另一种图像处理方法的流程示意图;
如图2所示,该图像处理方法,包括:
步骤S201:获取当前画面对应的场景模式;
具体的,场景模式包括高反差模式和低反差模式。若场景模式为高 反差模式,则意味着场景为高反差场景,若场景模式为低反差场景,则意味着场景为低反差场景。可以理解的是,高反差场景指的是画面中有大面积过曝和/或大面积过黑,例如:高反差场景包括大逆光、落日、窗户等场景。
在本申请实施例中,获取当前画面对应的场景模式,包括:
获取当前场景的场景画面;确定场景画面中的第一区域和第二区域;若第一区域的光照强度与第二区域的光照强度之差大于第一照度阈值,则确定当前场景的场景模式为高反差模式,否则,确定当前场景的场景模式为低反差模式。
例如:当前场景的场景画面为当前画面,则获取当前画面中的第一区域和第二区域,其中,第一区域的光照强度大于第二区域的光照强度,并且,第一区域的面积大于第一面积阈值,第二区域的面积大于第二面积阈值。可以理解的是,光照强度是指单位面积上所接受可见光的光通量,单位是勒克斯(Lux),用于指示光照的强弱和物体表面积被照明程度的量。
步骤S202:判断场景模式是否为高反差模式;
具体的,若场景模式为高反差模式,则进入步骤S203:将第一模拟增益调整为第二模拟增益;
若场景模式不为高反差模式,即场景模式为低反差模式,则进入步骤S204:将第一模拟增益调整为第三模拟增益;
步骤S203:将第一模拟增益调整为第二模拟增益;
具体的,若场景模式为高反差模式,则确定第二模拟增益和第二曲线函数,其中,第二模拟增益小于第一模拟增益;
具体的,第二模拟增益=第一模拟增益*第一增益系数,其中,0<第一增益系数≤1,例如:第一模拟增益为2x,第一增益系数为0.5, 此时第二模拟增益为1x。
在本申请实施例中,模拟增益存在最小值,即最小模拟增益,此时存在最小增益系数,最小增益系数由图像传感器的最小模拟增益确定,其中,最小增益系数=最小模拟增益/第一模拟增益,此时,最小增益系数<第一增益系数≤1,例如:最小模拟增益为1x,此时最小增益系数=1x/2x=0.5。
步骤S204:将第一模拟增益调整为第三模拟增益;
具体的,若场景模式为低反差模式,则确定第三模拟增益和第三曲线函数,其中,第三模拟增益大于第一模拟增益。
具体的,第三模拟增益=第一模拟增益*第二增益系数,其中,1<第二增益系数≤最大增益系数,例如:第一模拟增益为2x,第二增益系数为2,此时第三模拟增益为4x。
在本申请实施例中,最大增益系数由图像传感器的最大模拟增益确定,其中,最大增益系数=最大模拟增益/第一模拟增益。
具体的,模拟增益(Analog_Gain)是图像传感器(Sensor)的一项基本参数,由图像传感器的型号决定,不同的图像传感器型号对应的最大模拟增益(max analog gain)不同,例如:imx577 max analog gain=22x,imx586 max analog gain=64x,若第一模拟增益为2x,则imx577的最大增益系数为22x/2x=11,imx586的最大增益系数为64x/2x=32。
步骤S205:将第一曲线函数调整为第二曲线函数;
具体的,第一曲线函数对应标准Log模式曲线,例如:第一曲线函数包括:y=a*log 10(b*x+c)+d,其中,y为纵坐标的值,a为第一变量,b为第二变量,x为横坐标的值,c为第三变量,d为第四变量。
在本申请实施例中,当第一模拟增益调整为第二模拟增益时,由于第二模拟增益小于第一模拟增益,此时,为了保持当前画面的亮度、对比度不变,本申请通过将第一曲线函数调整为第二曲线函数,具体的,第一曲线函数对应第一参数,其中,第一参数指的是第一曲线函数中的可调变量,具体的,可调变量包括第一变量a,第二变量b,第三变量c以及第四变量d中的至少一个。
例如:第一参数包括第二变量b,当第一模拟增益调整为第二模拟增益时,此时,第二模拟增益=第一模拟增益*第一增益系数,则将第二变量b的值对应调整为第一参数*第一系数,其中,第一系数*第一增益系数=1,比如:第一增益系数为0.5,则第一系数为1/0.5=2,此时,确定第二曲线函数为y=a*log 10(2*b*x+c)+d,此时第二参数为2b,而第一参数为b,即第二曲线函数对应的第二参数大于第一曲线函数对应的第一参数。
步骤S206:将第一曲线函数调整为第三曲线函数;
在本申请实施例中,当第一模拟增益调整为第三模拟增益时,由于第三模拟增益大于第一模拟增益,此时,为了保持当前画面的亮度、对比度不变,本申请通过将第一曲线函数调整为第三曲线函数,具体的,第一曲线函数对应第一参数,其中,第一参数指的是第一曲线函数中的可调变量,具体的,可调变量包括第一变量a,第二变量b,第三变量c以及第四变量d中的至少一个。
例如:第一参数包括第二变量b,当第一模拟增益调整为第三模拟增益时,此时,第三模拟增益=第一模拟增益*第二增益系数,则将第二变量b的值对应调整为第一参数*第二系数,其中,第二系数*第一增益系数=1,比如:第二增益系数为2,则第一系数为1/2=0.5,此时,确定第三曲线函数为y=a*log 10(0.5*b*x+c)+d,此时第三参数 为0.5b,而第一参数为b,即第三曲线函数对应的第三参数小于第一曲线函数对应的第一参数。
下面举例说明具体的调整方式:
假设正常曝光时,当前画面的模拟增益(analog gain)为2x,曲线使用标准Log模式曲线,公式为y=a*log 10(b*x+c)+d,此为原方案。
本申请提出两个新方案:
方案1:在当前画面下,模拟增益调整为analog gain=1x,曲线调整为y=a*log10(b*2*x+c)+d。
方案2:在当前画面下,模拟增益调整为analog gain=4x,曲线调整为y=a*log10(b*0.5*x+c)+d。
可以理解的是,原方案与方案1、方案2相比,具有一致的亮度、对比度,因此认为它们处于相同的ISO。
请参阅图3,图3是本申请实施例提供的一种伽马曲线的示意图;
如图3所示,其中,横坐标为图像的原始像素亮度,纵坐标为输出亮度。可以理解的是,伽马曲线的作用是将图像输入的亮度、对比度映射到一个符合人眼观感的效果。
其中,原方案,即第一曲线函数对应的曲线,即标准的伽马曲线,方案1,即第二曲线函数对应的曲线,方案2,即第三曲线函数对应的曲线。
对于方案1,由于第二模拟增益小于第一模拟增益,即模拟增益(Analog Gain)降低,RAW画面上的整体亮度降低,由于图像传感器(Sensor)的感光特性,高光部分得以被保留至RAW画面中。基于伽马曲线的提高,从而保证了亮度、对比度不变,但由于通过图像信号传感器(Image Signal Processor,ISP)上的曲线(ISP Digital Gain)来 补充模拟增益(Analog Gain)降低而缺失的亮度,整体画面信噪比会降低。因此该方案1相比原方案产生的实际结果是:提高动态范围,降低信噪比。
对于方案2,由于第三模拟增益大于第一模拟增益,即模拟增益(Analog Gain)提高,RAW画面上的整体亮度提高,由于图像传感器(Sensor)的感光特性,高光部分会被更多地截断而损失于RAW画面中。基于伽马曲线的的降低,从而保证了亮度、对比度不变,但由于相比原方案使用了更低的曲线(ISP Digital Gain),来补充模拟增益(Analog Gain)提高而提高的亮度,整体画面信噪比会降低。因此该方案2相比原方案产生的实际结果是:降低动态范围,提高信噪比。
可以理解的是,由于原方案、方案1和方案2的曲线不同,导致了码值利用程度的不同,其中,方案1充分利用了0-1的完整码值,而方案2由于曲线公式的调整,仅利用了0-0.83的码值,码值范围是指正常图像的亮度0-255这个范围。从图3中可以看出,方案2的曲线将输入亮度最高的点,映射到了0.81左右的位置,意味着这个方案下的图像亮度范围只能是0-206,使得码值利用程度低。
请再参阅图4,图4是本申请实施例提供的一种动态范围的示意图;
如图4所示,横坐标为光量强度分布范围,其中,原方案的动态范围为(-3)-(-15)=12;方案1的动态范围为(-2)-(-15)=13,方案2的动态范围为(-4)-(-15)=11,可以看出,相比原方案,方案1增加了动态范围,方案2减少了动态范围。
可以理解的是,本申请中的方案是在Log模式下,由于Log模式下动态范围较高,而画面比较灰或比较蒙或对比度比较低,为了方便正常看到图像画面,还可以通过制作3dlut,将Log模式转换到REC.709模式,即,将Log模式下的曲线映射到REC.709模式下的曲线,从而满足 人眼观感需求。
在本申请实施例中,通过获取当前画面对应的场景模式,根据场景模式来调整图像传感器的第一模拟增益以及图像处理器的第一曲线函数,使得电子设备能够在反差较大的场景中提供更高的动态范围,在反差较小的场景中提供更好的信噪比,即能够动态提供高动态范围、低信噪比的方案,或者,低动态范围、高信噪比的方案,从而实现提高电子设备在拍摄过程中对实际场景的适应能力。
需要说明的是,在上述各个实施例中,上述各步骤之间并不必然存在一定的先后顺序,本领域普通技术人员,根据本申请实施例的描述可以理解,不同实施例中,上述各步骤可以有不同的执行顺序,亦即,可以并行执行,亦可以交换执行等等。
请再参阅图5,图5是本申请实施例提供的一种图像处理装置的结构示意图;
其中,该图像处理装置,应用于电子设备,具体的,该图像处理装置应用于电子设备的一个或多个处理器。
如图5所示,该图像处理装置50,包括:
获取单元51,用于获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;
调整单元52,用于根据所述当前画面对应的场景模式,调整所述第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
在本申请实施例中,图像处理装置亦可以由硬件器件搭建成的,例如,图像处理装置可以由一个或两个以上的芯片搭建而成,各个芯片可以互相协调工作,以完成上述各个实施例所阐述的图像处理方法。再例如,图像处理装置还可以由各类逻辑器件搭建而成,诸如由通用处理器、 数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、单片机、ARM(Acorn RISC Machine)或其它可编程逻辑器件、分立门或晶体管逻辑、分立的硬件组件或者这些部件的任何组合而搭建成。
本申请实施例中的图像处理装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的图像处理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
本申请实施例提供的图像处理装置能够实现图1实现的各个过程,为避免重复,这里不再赘述。
需要说明的是,上述图像处理装置可执行本申请实施例所提供的图像处理方法,具备执行方法相应的功能模块和有益效果。未在图像处理装置实施例中详尽描述的技术细节,可参见本申请实施例所提供的图像处理方法。
在本申请实施例中,通过提供一种图像处理装置,包括:获取单元,用于获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;调整单元,用于根据所述当前画面对应的场景模式,调 整所述第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
通过获取当前画面对应的场景模式,根据场景模式调整模拟增益以及曲线函数,使得当前画面的亮度、对比度不变,本申请能够实现动态调整画面的动态范围,提高电子设备在拍摄过程中对实际场景的适应能力。
请参阅图6,图6是本申请实施例提供的一种电子设备的硬件结构示意图;
如图6所示,该电子设备60包括但不限于:射频单元61、网络模块62、音频输出单元63、输入单元64、传感器65、显示单元66、用户输入单元67、接口单元68、存储器69、处理器610、以及电源611等部件,电子设备还包括摄像头。本领域技术人员可以理解,图6中示出的电子设备的结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本申请实施例中,电子设备包括但不限于手机、平板电脑、掌上电脑、可穿戴设备、摄影机等,优选地,本申请实施例中的电子设备为摄影机。
处理器610,用于获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;根据当前画面对应的场景模式,调整第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
通过获取当前画面对应的场景模式,根据场景模式调整图像传感器的第一模拟增益以及图像处理器的第一曲线函数,使得当前画面的亮度、对比度不变,本申请能够实现动态调整画面的动态范围,提高电子设备在拍摄过程中对实际场景的适应能力。
应当理解的是,本申请实施例中,射频单元61可用于收发信息或 通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器610处理;另外,将上行的数据发送给基站。通常,射频单元61包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元61还可以通过无线通信系统与网络和其他设备通信。
电子设备60通过网络模块62为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。
音频输出单元63可以将射频单元61或网络模块62接收的或者在存储器69中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元63还可以提供与电子设备60执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元63包括扬声器、蜂鸣器以及受话器等。
输入单元64用于接收音频或视频信号。输入单元64可以包括图形处理器(Graphics Processing Unit,GPU)641和麦克风642,图形处理器641对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的目标图像进行处理。处理后的图像帧可以显示在显示单元66上。经图形处理器641处理后的图像帧可以存储在存储器69(或其它存储介质)中或者经由射频单元61或网络模块62进行发送。麦克风642可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元61发送到移动通信基站的格式输出。
电子设备60还包括至少一种传感器65,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板661的亮度,接近传感器可在电子设备60移动到耳边时,关闭显示面板661和/或背 光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器65还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。
显示单元66用于显示由用户输入的信息或提供给用户的信息。显示单元66可包括显示面板661,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板661。
用户输入单元67可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元67包括触控面板671以及其他输入设备672。触控面板671,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板671上或在触控面板671附近的操作)。触控面板671可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器610,接收处理器610发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板671。除了触控面板671,用户输入单元67还可以包括其他输入设备672。具体地,其他输入设备672可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
进一步的,触控面板671可覆盖在显示面板661上,当触控面板671 检测到在其上或附近的触摸操作后,传送给处理器610以确定触摸事件的类型,随后处理器610根据触摸事件的类型在显示面板661上提供相应的视觉输出。虽然在图6中,触控面板671与显示面板661是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板671与显示面板661集成而实现电子设备的输入和输出功能,具体此处不做限定。
接口单元68为外部装置与电子设备60连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元68可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备60内的一个或多个元件或者可以用于在电子设备60和外部装置之间传输数据。
存储器69可用于存储软件程序以及各种数据。存储器69可主要包括存储程序区和存储数据区,其中,存储程序区可存储至少一个功能所需的应用程序691(比如声音播放功能、图像播放功能等)以及操作系统692等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器69可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器610是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器69内的软件程序和/或模块,以及调用存储在存储器69内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器610可包括一个或多个处理单元;优选的,处理器610可集成应用处理器和调制解调 处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。
电子设备60还可以包括给各个部件供电的电源611(比如电池),优选的,电源611可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
另外,电子设备60包括一些未示出的功能模块,在此不再赘述。
本申请实施例还提供了一种非易失性计算机存储介质,计算机存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如图6中的一个处理器610,可使得上述一个或多个处理器可执行上述任意方法实施例中的图像处理方法。
本申请实施例还提供了一种计算机程序产品,计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,计算机程序包括程序指令,当程序指令被电子设备执行时,使电子设备执行上述的图像处理方法。
以上所描述的装置或设备实施例仅仅是示意性的,其中作为分离部件说明的单元模块可以是或者也可以不是物理上分开的,作为模块单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络模块单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令 用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上的本申请的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (10)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;
    根据所述当前画面对应的场景模式,调整所述第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
  2. 根据权利要求1所述的方法,其特征在于,所述场景模式包括高反差模式和低反差模式,所述根据所述当前画面对应的场景模式,调整所述第一模拟增益以及第一曲线函数,包括:
    若所述场景模式为高反差模式,则确定第二模拟增益和第二曲线函数,将所述第一模拟增益调整为所述第二模拟增益,将所述第一曲线函数调整为所述第二曲线函数,其中,第一曲线函数对应第一参数,第二曲线函数对应第二参数,所述第二参数大于所述第一参数,所述第二模拟增益小于所述第一模拟增益;
    若所述场景模式为低反差模式,则确定第三模拟增益和第三曲线函数,将所述第一模拟增益调整为所述第三模拟增益,将所述第一曲线函数调整为所述第三曲线函数,其中,所述第三曲线函数对应第三参数,所述第三参数小于所述第一参数,所述第三模拟增益大于所述第一模拟增益。
  3. 根据权利要求2所述的方法,其特征在于,
    所述第二模拟增益=所述第一模拟增益*第一增益系数;
    所述第三模拟增益=所述第一模拟增益*第二增益系数,其中,0<第一增益系数≤1,1<第二增益系数≤最大增益系数。
  4. 根据权利要求3所述的方法,其特征在于,所述最大增益系数由图像传感器的最大模拟增益确定,其中,最大增益系数=最大模拟增益/第一模拟增益。
  5. 根据权利要求3或4所述的方法,其特征在于,所述第一曲线函数包括:
    y=a*log 10(b*x+c)+d
    其中,y为纵坐标的值,a为第一变量,b为第二变量,x为横坐标的值,c为第三变量,d为第四变量。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述当前画面对应的场景模式,调整所述第一模拟增益以及第一曲线函数,包括:
    若所述场景模式为高反差模式,则确定第二模拟增益和第二曲线函数,其中,第二曲线函数对应第二参数,其中,第二参数=第一参数*第一系数;
    若所述场景模式为低反差模式,则确定第三模拟增益和第三曲线函数,其中,第三曲线函数对应第三参数,其中,第三参数=第一参数*第二系数,其中,所述第一曲线函数对应第一参数,所述第一参数包括第二变量。
  7. 根据权利要求6所述的方法,其特征在于,
    第一系数*第一增益系数=1;
    第二系数*第二增益系数=1。
  8. 一种图像处理装置,其特征在于,所述装置包括:
    获取单元,用于获取当前画面对应的图像传感器的第一模拟增益和图像处理器的第一曲线函数;
    调整单元,用于根据所述当前画面对应的场景模式,调整所述第一模拟增益以及第一曲线函数,提高当前画面的动态范围或信噪比且使得当前画面的亮度、对比度不变。
  9. 一种电子设备,其特征在于,包括:
    至少一个处理器;和
    与至少一个所述处理器通信连接的存储器;其中,
    所述存储器存储有可被至少一个所述处理器执行的指令,所述指令被至少一个所述处理器执行,以使至少一个所述处理器能够执行如权利要求1-7任一项所述的图像处理方法。
  10. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使电子设备执行如权利要求1-7任一项所述的图像处理方法。
PCT/CN2022/138611 2021-12-16 2022-12-13 图像处理方法、装置、电子设备及存储介质 WO2023109800A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111546903.6 2021-12-16
CN202111546903.6A CN114222072B (zh) 2021-12-16 2021-12-16 图像处理方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023109800A1 true WO2023109800A1 (zh) 2023-06-22

Family

ID=80703307

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138611 WO2023109800A1 (zh) 2021-12-16 2022-12-13 图像处理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN114222072B (zh)
WO (1) WO2023109800A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222072B (zh) * 2021-12-16 2023-10-27 影石创新科技股份有限公司 图像处理方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107820069A (zh) * 2017-11-16 2018-03-20 安徽亿联智能有限公司 一种视频监控设备isp调试方法
US20190108626A1 (en) * 2017-10-10 2019-04-11 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
CN110113508A (zh) * 2019-05-15 2019-08-09 深圳市亿联智能有限公司 一种应用于视频监控设备的智能gamma调试方法
CN111064902A (zh) * 2019-12-27 2020-04-24 重庆紫光华山智安科技有限公司 一种光圈控制方法、装置及曝光控制方法
CN114222072A (zh) * 2021-12-16 2022-03-22 影石创新科技股份有限公司 图像处理方法、装置、电子设备及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4894595B2 (ja) * 2007-04-13 2012-03-14 ソニー株式会社 画像処理装置および方法、並びに、プログラム
US8130292B2 (en) * 2008-12-31 2012-03-06 Aptina Imaging Corporation Scene illumination adaptive lens shading correction for imaging devices
US10803562B2 (en) * 2016-03-18 2020-10-13 Koninklijke Philips N.V. Encoding and decoding HDR videos
EP3430806B1 (en) * 2016-03-18 2023-06-07 Koninklijke Philips N.V. Encoding and decoding hdr videos
CN107580184B (zh) * 2017-10-31 2019-11-19 维沃移动通信有限公司 一种拍摄方法及移动终端
CN108109180B (zh) * 2017-12-12 2020-10-02 上海顺久电子科技有限公司 一种对输入的高动态范围图像进行处理的方法和显示设备
CN109639996B (zh) * 2019-01-23 2023-06-06 努比亚技术有限公司 高动态场景成像方法、移动终端及计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190108626A1 (en) * 2017-10-10 2019-04-11 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
CN107820069A (zh) * 2017-11-16 2018-03-20 安徽亿联智能有限公司 一种视频监控设备isp调试方法
CN110113508A (zh) * 2019-05-15 2019-08-09 深圳市亿联智能有限公司 一种应用于视频监控设备的智能gamma调试方法
CN111064902A (zh) * 2019-12-27 2020-04-24 重庆紫光华山智安科技有限公司 一种光圈控制方法、装置及曝光控制方法
CN114222072A (zh) * 2021-12-16 2022-03-22 影石创新科技股份有限公司 图像处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN114222072B (zh) 2023-10-27
CN114222072A (zh) 2022-03-22

Similar Documents

Publication Publication Date Title
CN107038715B (zh) 一种图像处理方法及装置
US11743605B2 (en) Image sensor, mobile terminal, and image photographing method
CN107566730B (zh) 一种全景图像拍摄方法及移动终端
US11463642B2 (en) Image sensor including pixel array and mobile terminal
US11477383B2 (en) Method for providing preview and electronic device for displaying preview
WO2021052342A1 (zh) 电子设备调整画面色彩的方法和装置
CN110213484B (zh) 一种拍照方法、终端设备及计算机可读存储介质
CN107958470A (zh) 一种色彩校正方法、移动终端
CN110868544B (zh) 一种拍摄方法及电子设备
WO2023160285A1 (zh) 视频处理方法和装置
WO2023109800A1 (zh) 图像处理方法、装置、电子设备及存储介质
CN108200352A (zh) 一种调解图片亮度的方法、终端及存储介质
US20240126224A1 (en) Switch Switching Method and Related Apparatus
US11915667B2 (en) Method and system for displaying corrected image, and display device
WO2023226612A1 (zh) 一种曝光参数确定方法和装置
CN109729280A (zh) 一种图像处理方法及移动终端
CN110503618A (zh) 图像处理方法及电子设备
WO2023000745A1 (zh) 显示控制方法及相关装置
US20230325990A1 (en) Tone mapping using gradient descent
CN112150357B (zh) 一种图像处理方法及移动终端
CN111028192B (zh) 一种图像合成方法及电子设备
CN114331880A (zh) 一种图像处理方法、装置、电子设备及存储介质
US20240144451A1 (en) Image Processing Method and Electronic Device
CN115297269B (zh) 曝光参数的确定方法及电子设备
CN117119316B (zh) 图像处理方法、电子设备及可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22906545

Country of ref document: EP

Kind code of ref document: A1