WO2024239779A1 - 一种视频拍摄方法及电子设备 - Google Patents
一种视频拍摄方法及电子设备 Download PDFInfo
- Publication number
- WO2024239779A1 WO2024239779A1 PCT/CN2024/082987 CN2024082987W WO2024239779A1 WO 2024239779 A1 WO2024239779 A1 WO 2024239779A1 CN 2024082987 W CN2024082987 W CN 2024082987W WO 2024239779 A1 WO2024239779 A1 WO 2024239779A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- sensor
- brightness
- sensitivity
- electronic device
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/741—Circuitry 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/667—Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/71—Circuitry for evaluating the brightness variation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/52—Details of telephonic subscriber devices including functional features of a camera
Definitions
- the present application relates to the field of image processing, and in particular to a video shooting method and electronic equipment.
- the dynamic range of a camera sensor is the ability of the sensor to simultaneously reflect the highlights and shadows in an image.
- the dynamic range of a camera sensor is limited.
- a high dynamic range (HDR) problem will occur, that is, the shadow area and bright area of the image in the video frame cannot be recognized. How to solve the HDR problem that occurs when electronic devices shoot videos requires further research.
- the embodiments of the present application provide a video shooting method and an electronic device, which improve the dynamic range of the electronic device during video shooting and improve the video shooting effect.
- the present application provides a video shooting method, wherein an electronic device includes a camera module, the camera module includes an image sensor and a dual conversion gain sensor, the dual conversion gain sensor includes a first sensor and a second sensor, the conversion gain of the first sensor is less than the conversion gain of the second sensor, and the method includes: the electronic device displays a shooting interface, the shooting interface is used to display an image shot by the camera; when the ambient brightness is less than a first illuminance value, the electronic device processes a first original image output by the image sensor into a first image according to a first sensitivity through the second sensor, and processes the first original image into a second image according to a second sensitivity through the second sensor, and the first sensitivity is less than the second sensitivity; the electronic device synthesizes the first image and the second image into a third image, and displays the third image on the shooting interface; when the ambient brightness is between the first illuminance value and the second illuminance value, the electronic device processes the second original image output by the image sensor into a
- the dual conversion gain sensor may be located inside the image sensor, or may be independent of the image sensor.
- the first sensor may be referred to as a low conversion gain sensor and the second sensor may be referred to as a high conversion gain sensor.
- the size of the voltage swing allowed in a pixel is determined when the sensor is designed, and the voltage swing is then fixed.
- Image sensors have a dynamic range, which refers to the ability of an image sensor to perceive the darkest and brightest illumination values in a shooting scene, that is, the ability to reflect the brightness value of an image.
- a dynamic range refers to the ability of an image sensor to perceive the darkest and brightest illumination values in a shooting scene, that is, the ability to reflect the brightness value of an image.
- the larger the dynamic range of an image sensor the wider the range of light intensity that the image sensor can perceive, and the richer the image details in the image captured by the camera.
- the dynamic range that an image sensor can perceive is limited, and is generally determined by the full well capacity (FWC).
- the full well capacity refers to the total number of electrons that the potential well of a single pixel can accommodate.
- the maximum capacity of the potential well that can hold charges is the full well capacity, which can also be called the maximum well capacity.
- V the voltage generated across the potential well.
- V the voltage generated across the potential well.
- C represents the capacitance of the potential well, and usually, C is constant.
- the dynamic range may be obtained based on the darkest illumination value and the brightest illumination value in the captured scene sensed by the image sensor.
- the dynamic range of nature exceeds 100dB, while the dynamic range of high-end sensors can reach 78dB, and the dynamic range of consumer-grade sensors is about 60dB.
- the dynamic range of the sensor is smaller than the dynamic range of the shooting scene, a dynamic range overflow problem will occur, and the camera imaging will lose dark area details or bright area content.
- the dynamic range of an image sensor is 20dB to 78dB, while the dynamic range of the environment is between 1dB and 100dB.
- the dynamic range of the environment is greater than the dynamic range of the image sensor, and the captured image lacks dark area details and bright area content, resulting in poor imaging results.
- FIG1A is a natural scene image observed by human eyes provided in an embodiment of the present application, and the brightness value range of the scene is 1dB to 100dB, wherein the brightness value range of the first area 1011 is 1dB to 15dB, and the brightness value range of the second area 1012 is 80 to 100dB.
- the dynamic range of the sensor is 20dB to 78dB. Since the dynamic range of the scene exceeds the dynamic range of the sensor, when taking a photo of the scene, the captured image cannot accurately present the content of the scene that exceeds the brightness value range of the sensor.
- Figure 1B is a rendering of the natural scene in Figure 1A.
- the brightness value range of the first area 1011 is 1dB to 15dB, which belongs to the shadow area
- the brightness value range of the second area 1012 is 80dB to 100dB, which belongs to the bright area.
- An image sensor with DCG capability has two potential wells per pixel.
- the two potential wells correspond to different full well capacities and different conversion gains.
- a large full well capacity corresponds to low conversion gain (LCG) and low sensitivity
- a small full well capacity corresponds to high conversion gain (HCG) and high sensitivity.
- the image sensor can use two potential wells (two sensitivities) and two conversion gains in the same scene to obtain two images in one exposure: an image in high sensitivity mode and an image in low sensitivity mode.
- the acquisition time of the image in high sensitivity mode and the image in low sensitivity mode are the same, and the exposure time of the image in high sensitivity mode and the image in low sensitivity mode are also the same.
- the electronic device synthesizes the image in high sensitivity mode and the image in low sensitivity mode into one image to obtain a DCG image.
- the image in high sensitivity mode is intended to restore the details in the dark area
- the image in low sensitivity mode is intended to suppress the overexposed area and restore the content in the bright area.
- the minimum dynamic range value that the image sensor can perceive can be reduced by HCG
- the maximum dynamic range value that the image sensor can perceive can be increased by LCG, thereby increasing the dynamic range of the image sensor.
- the perceptible dynamic range is between 20 dB and 78 dB, while for an image sensor with DCG capability, the perceptible dynamic range can reach between 1 dB and 100 dB.
- the image sensor with DCG capability can obtain the dark area details and bright area content of the captured image, and the imaging effect is better.
- the dynamic range of the image sensor When the dynamic range of the image sensor is smaller than the dynamic range of the environment, the dynamic range of the image sensor can be improved through the DCG solution.
- the image in low-sensitivity mode can be output through LCG
- the image in high-sensitivity mode can be output through HCG.
- the image in low-sensitivity mode can be used to suppress overexposed areas and restore bright area content
- the image in high-sensitivity mode can be used to restore dark area details.
- FIG1C is an image output by the image sensor in low-sensitivity mode. It can be seen from FIG1C that objects in the dark area of the image (for example, the first area 1011) are relatively clear, while the content in the bright area of the image cannot be displayed clearly (for example, the blue sky and white clouds in the second area 1012 cannot be distinguished).
- FIG. 1D is an image in a high-sensitivity mode output by an image sensor. From FIG. 1D , it can be found that in this The content in the dark area of the image cannot be displayed clearly (for example, the first area 1011 is displayed in black and the objects in the area cannot be distinguished), while the content in the bright area of the image can be clearly displayed (for example, the blue sky and white clouds in the first area 3012 can be clearly distinguished).
- the image in the low-sensitivity mode shown in FIG1C and the image in the high-sensitivity mode shown in FIG1D are synthesized to obtain the DCG image shown in FIG1E.
- the contents of the dark light area and the bright light area in the DCG image are clearly displayed (for example, the objects in the first area 1011 and the blue sky and white clouds in the second area 1012 are clearly displayed).
- FIG2 shows the imaging principle of a DCG image.
- binning is an image readout mode.
- the image sensor includes multiple photosensitive elements, and the charge collected by each photosensitive element is a pixel.
- the charges induced in adjacent pixels are added together, read out in a pixel mode, and a binning operation is performed on the pixel information.
- binning can merge n ⁇ n pixels into one pixel.
- binning can be to combine adjacent 2 ⁇ 2 pixels into one pixel, that is, the pixel information of adjacent 2 ⁇ 2 pixels is presented in the form of one pixel.
- binning can combine adjacent 2 ⁇ 2 pixels into one pixel, so that the image sensor can combine the 4 ⁇ 4 image into a 2 ⁇ 2 image, and use the 2 ⁇ 2 image as the binning image obtained by the image sensor, and the binning image is a frame of image.
- the photosensitive area of the pixel can be increased to improve the sensitivity of dark areas to light sensing.
- the image sensor can output images in a DCG manner to enhance the dynamic range of the image and improve the imaging effect of the image.
- the image sensor can further use two conversion gains, for example, to obtain output image data under two conversion gains based on the HCG channel and the LCG channel, for example, the synthesized pixels can be input into the LCG channel to synthesize an image in a low-sensitivity mode, and the synthesized pixels can be input into the HCG channel to synthesize an image in a high-sensitivity mode.
- the image sensor outputs an LCG image after the synthesized pixels are subjected to LCG circuit, analog amplification, analog-to-digital conversion, and digital amplification.
- the image sensor outputs an HCG image after the synthesized pixels are subjected to HCG circuit, analog amplification, analog-to-digital conversion, and digital amplification.
- the image sensor then fuses the LCG image and the HCG image to obtain a fused DCG image, and outputs the DCG image.
- the ISO in the LCG channel and the HCG channel are different, and the corresponding LCG image and HCG image have different dynamic ranges.
- the dynamic range of the HCG image can be 10dB-50dB
- the dynamic range of the LCG image can be 20dB-100dB
- the dynamic range of the synthesized DCG image can be 10dB-100dB. In this way, the dynamic range of the image sensor imaging is improved.
- SNR signal-to-noise ratio
- Figure 4 shows the signal-to-noise ratio of the images obtained by the LCG channel and the HCG channel at different illumination values.
- the HCG image output by the HCG channel in a low illumination value scene also known as a low-brightness scene
- the signal-to-noise ratio is high and the image is clear.
- low-illuminance scenes also called low-brightness scenes
- the signal-to-noise ratio of the output LCG image is significantly attenuated, and the image is blurred.
- Fig. 5A shows an LCG image output by the LCG channel in a low-light scene. From the comparison between Fig. 5A and Fig. 1C, it can be seen that in a low-light scene, the signal-to-noise ratio of the LCG image output by the LCG channel is reduced and the image is blurred.
- FIG5B shows a HCG image output by the HCG channel in a low-light scene. It can be seen from FIG5B that in a low-light scene, the HCG image output by the HCG channel is clearer than the LCG image output by the LCG channel.
- the DCG image shown in FIG5C can be obtained by synthesizing the LCG image shown in FIG5A and the HCG image shown in FIG5B.
- the blue sky and white clouds in the second area 1012 in the DCG image are clearly displayed, because the blue sky and white clouds in the second area 1012 are synthesized from the HCG image.
- the object image in the first area 1011 is synthesized from the LCG image, and the signal-to-noise ratio of the LCG image is quite different from that of the HCG image.
- the clarity of the object image in the first area 1011 in FIG5C is inconsistent with that of the images in other areas, and noise stratification occurs.
- the HCG image obtained through the HCG pathway is more suitable for application in low-light scenes.
- the light intensity is weak, and the illumination value perceivable by the image sensor is also relatively low.
- the DCG image is used as the video frame obtained in the low-light scene, it can be seen from the embodiments of Figures 4, 5A and 5C that the HCG image output by the HCG path and the LCG image output by the LCG path will have obvious noise stratification in the low-light scene, and the imaging effect is not good.
- the video recording may include a preview state before the video recording starts and a preview state after the video recording starts.
- Image sensors can monitor ambient brightness and ambient dynamic range in real time.
- the image sensor can operate in a low dynamic mode and output video frames in a binning manner.
- the image sensor When the environment dynamic range is greater than the dynamic range of the image sensor, the image sensor can be switched from the low dynamic mode to the high dynamic mode. In the high dynamic mode, the dynamic range of the image sensor can be increased so that the dynamic range of the image sensor in the high dynamic mode is greater than the environment dynamic range.
- the electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) or virtual reality (VR) device, etc.
- UMPC ultra-mobile personal computer
- PDA personal digital assistant
- AR augmented reality
- VR virtual reality
- the embodiment of the present application does not impose any special restrictions on the specific type of the electronic device 100.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently.
- the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc.
- different processing units may be independent devices or integrated in one or more processors.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
- the electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor.
- a microprocessor for processing connected to the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos, etc.
- the display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.
- the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
- the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.
- the ISP can also perform algorithm optimization on the noise and brightness of the image.
- the ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP can be set in the camera 193.
- the camera 193 is used to capture still images or videos.
- the object generates an optical image through the lens and projects it onto the photosensitive element.
- the photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor.
- CMOS complementary metal oxide semiconductor
- the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
- the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
- the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
- NPU is a neural network (NN) computing processor.
- NN neural network
- applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
- the internal memory 121 can be used to store computer executable program codes, which include instructions.
- the processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121.
- the internal memory 121 may include a program storage area and a data storage area.
- the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
- the data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
- UFS universal flash storage
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A can be disposed on the display screen 194 .
- the gyro sensor 180B may be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.
- the gyroscope sensor 180B can be used for anti-shake shooting. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
- the air pressure sensor 180C is used to measure air pressure.
- the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
- the magnetic sensor 180D includes a Hall sensor, and the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
- the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and is applied to applications such as horizontal and vertical screen switching and pedometers.
- the distance sensor 180F is used to measure the distance.
- the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
- the light emitting diode may be an infrared light emitting diode.
- the electronic device 100 emits infrared light outward through the light emitting diode.
- the electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects so as to automatically turn off the screen to save power.
- the proximity light sensor 180G may also be used for automatic unlocking and locking of the screen in the leather case mode and the pocket mode.
- the ambient light sensor 180L is used to sense the ambient light brightness.
- the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
- the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
- the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
- the fingerprint sensor 180H is used to collect fingerprints.
- the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
- the temperature sensor 180J is used to detect temperature.
- the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.
- the touch sensor 180K is also called a "touch panel”.
- the touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen”.
- the touch sensor 180K is used to detect touch operations acting on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through the display screen 194.
- the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
- the bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of a human vocal part.
- the software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
- the embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
- the electronic device may include: an application layer, an application framework, a hardware abstraction layer (HAL) layer and a kernel layer.
- HAL hardware abstraction layer
- the application layer can include a series of application packages. As shown in Figure 7, the application package can include camera application, gallery, calendar, map, music, short message, call and other applications.
- the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
- the framework layer includes some predefined functions. As shown in Figure 7, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
- the window manager is used to manage window programs.
- the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
- Content providers are used to store and retrieve data and make it accessible to applications.
- the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
- the view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
- the view system can be used to build applications.
- a display interface can be composed of one or more views.
- a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
- the phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
- the resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
- the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
- the notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
- the hardware abstraction layer may include multiple functional modules, such as a perception module, an image processor, etc.
- the perception module is used to determine the dynamic range and ambient brightness of the environment based on the video frames collected by the image sensor. And the working mode of the image sensor is determined based on the dynamic range and ambient brightness of the environment to achieve dynamic switching of the working mode of the image sensor. For example, if the perception module determines that the dynamic range of the environment is greater than the dynamic range of the image sensor for m consecutive frames, then the perception module can determine that the image sensor needs to be switched to the high dynamic mode. The perception module then determines the working mode of the image sensor in the high dynamic mode based on the perceived ambient brightness. The working mode of the image sensor in the high dynamic mode is different in different ambient brightness ranges.
- the image processor is used to perform pre-processing and post-processing on the video frames to obtain preview video frames and recorded video frames.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display driver, camera driver, audio driver, etc.
- the camera driver is used to trigger the camera to turn on when receiving a trigger command sent by a camera application located in the application layer.
- the hardware layer mainly includes components in the display screen and camera module, such as the camera, which may include a lens, a lens, and an image sensor.
- the above components are used to start working under the control of the corresponding driver in the kernel layer.
- the camera can be turned on and collect images under the control of the camera driver.
- the image sensor in the camera can also switch the working mode of the image sensor in the camera under the control of the camera driver in the kernel layer.
- FIG. 8A exemplarily shows an exemplary user interface 710 on the electronic device 100 for displaying applications installed on the electronic device 100 .
- the user interface 710 displays a page with application icons, which may include multiple application icons (e.g., weather application icon, calendar application icon, photo album application icon, note application icon, email application icon, application store application icon, setting application icon, etc.).
- a page indicator may also be displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages.
- There are multiple application icons e.g., camera application icon 711, browser application icon, information application icon, dial application icon) below the page indicator. The application icons remain displayed when the page is switched.
- the camera application icon 711 is an icon of a camera application.
- the camera application icon 711 can be used to trigger the start of the camera application.
- the camera application is an image shooting application on electronic devices such as smart phones and tablets, and this application does not limit the name of the application.
- the user interface 710 shown in FIG8A is only an example provided by the present application and should not be regarded as a limitation of the present application. In other words, the user interface 710 can display more or less content, and the present application does not limit this.
- the electronic device 100 may detect a user operation (such as a touch/click operation) acting on the camera application icon 711, and in response to the operation, the electronic device 100 may display the shooting interface 720 shown in FIG. 8B.
- the shooting interface 720 may be a user interface of the default shooting mode of the camera application, and the user may preview the image and complete the shooting on the interface. That is, the user may open the shooting interface 720 of the camera application by clicking the camera application icon 711.
- user operations mentioned in this application may include but are not limited to touch, click, voice control, gesture and other operations, and this application does not limit this.
- the shooting interface 720 may include a mode bar 721 , a shooting control 722 , a preview window 723 , a review control 724 , a camera flip control 725 , and a quick function area 726 .
- the mode bar 721 may include multiple shooting mode options, such as “night scene”, “portrait”, “photo”, “video recording”, etc. Different shooting modes can provide users with shooting services with different effects. Users can select any shooting mode from multiple shooting modes for shooting according to different needs. For example, “photo recording” can be the default shooting mode for taking photos. “Video recording” is used to record videos. The “night scene” mode is suitable for shooting scenes with dim light, such as at night. The “portrait” mode is suitable for shooting scenes where the subject is a person.
- the electronic device 100 can also provide more shooting modes, such as “large aperture”, “movie”, “professional”, etc., which are not listed one by one here.
- the shooting control 722 is used to trigger taking a photo.
- the electronic device 100 can detect whether there is a user operation on the shooting control 722, such as a click operation. When the user operation on the shooting control 722 is detected, the electronic device 100 can generate a shooting instruction. The electronic device 100 can obtain the image reported by the camera at the corresponding timestamp according to the shooting instruction, and then save it as a photo.
- the preview window 723 can be used to display the image reported by the camera in real time.
- the electronic device 100 can process the image reported by the camera to improve the display effect of the image.
- the electronic device 100 can blur the background in the image reported by the camera to highlight the portrait.
- the preview window 723 can display the image processed by the image processing algorithm corresponding to the different shooting modes in real time, so that the user can perceive the shooting effects corresponding to the different shooting modes in real time.
- the review control 724 can be used to browse thumbnails of the photos/videos that have been taken. When a user operation acting on the review control 724 is detected, the electronic device 100 can also display the best photo corresponding to the thumbnail.
- the camera flip control 725 can be used to monitor the user operation that triggers the flipping of the camera.
- the electronic device 100 can flip the camera used for shooting, such as switching the rear camera to the front camera, or switching the front camera to the rear camera.
- the quick function area 726 may include a control 726A for the protagonist recording mode, an AI scene recognition control 726B, a flash control 726C, a color mode control 726D, a setting control 726E, and the like.
- the control 726A for the protagonist recording mode can be used to trigger the electronic device 100 to identify the protagonist character among multiple characters in the preview screen when it is turned on.
- the AI scene recognition control 726B can be used to trigger the electronic device 100 to identify the shooting scene in the preview screen when it is turned on, and the current AI scene recognition control 726B is in the off state.
- the flash control 726C can be used to trigger the electronic device 100 to turn on or off the flash.
- the color mode control 726D can be used to trigger the electronic device 100 to use a color filter to process the image collected by the camera.
- the setting control 726E can be used to set the shooting parameters of the electronic device 100 (for example, image size, image storage format, etc.).
- the shooting interface 720 may also include more or fewer controls, which is not limited in the embodiment of the present application.
- the electronic device 100 can detect the user operation acting on the shooting mode option in the mode bar 721, and change the shooting mode currently used according to the above user operation.
- the above user operation is, for example, a left slide/right slide operation.
- the electronic device 100 can switch to the "recording" mode and display the recording interface 810 shown in Figure 8C.
- the recording interface 810 can also be called a recording preview interface.
- the electronic device 100 may display a preview video frame in the preview window 723, and the electronic device 100 may switch the preview interface corresponding to the original “photographing” mode to the preview interface corresponding to the “recording” mode. Specifically, the electronic device 100 may switch the original shooting control 722 of the “photographing” mode to the start recording control 812 of the “recording” mode. At the same time, the electronic device 100 may display a timestamp control 811 in the preview window 723. The timestamp control 811 is used to indicate the duration of the recorded video. Before starting to record the video, the time displayed in the timestamp control 811 is 0. After starting to record the video, the time displayed in the timestamp control 811 increases as the length of the recorded video increases.
- the electronic device 100 may start to determine the environmental dynamic range and determine whether to enter the low dynamic mode or the high dynamic mode.
- the image sensor operates in a low dynamic mode and outputs a preview video frame based on the low dynamic mode.
- the image sensor operates in a high dynamic mode and outputs a preview video frame based on the high dynamic mode.
- the electronic device 100 can start to determine the dynamic range of the environment. And determine whether to enter the low dynamic mode or the high dynamic mode. In this way, if the dynamic range of the environment is greater than the dynamic range of the image sensor in the electronic device 100, before the electronic device 100 starts shooting the video, the image sensor has entered the high dynamic mode, and the image sensor can output the preview video frame based on the high dynamic mode. After the electronic device 100 starts shooting the video, the image sensor can directly output the recorded video frame based on the high dynamic mode.
- the electronic device 100 can determine the size relationship between the environment dynamic range and the image sensor dynamic range based on the preview video frame.
- n is a positive integer greater than or equal to 1, and the electronic device 100 can switch the image sensor from the low dynamic mode to the high dynamic mode. Otherwise, the image sensor works in the low dynamic mode.
- the default working mode of the image sensor in the electronic device 100 is the low dynamic mode.
- the low dynamic mode may refer to the electronic device 100 generating video frames by binning. In the low dynamic mode, the dynamic range of the image sensor is not changed.
- High dynamic mode can refer to the image sensor improving the dynamic range of the image sensor through dual-sensing mode, or through long exposure and short exposure mode.
- the working mode of the image sensor in high dynamic mode can be divided into low-brightness high dynamic mode, medium-brightness high dynamic mode and high-brightness high dynamic mode.
- high dynamic mode please refer to the introduction below.
- the image sensor of the electronic device 100 switches to the high dynamic mode, it is also necessary to determine which working mode in the high dynamic mode to switch to. Based on the above introduction, in low-light scenes (such as night scenes), the HCG image output through the HCG path and the LCG image output through the LCG path will have noise stratification in the synthesized image, resulting in poor imaging effect.
- the full well capacity of a single pixel is also limited.
- the full well capacity of a single pixel overflows, resulting in an overexposed image. In this case, the imaging effect is also poor.
- the electronic device 100 also needs to determine the ambient brightness and enter different working modes in the high dynamic mode based on the ambient brightness.
- the electronic device 100 can control the image sensor to enter a low-brightness high-dynamic mode.
- the electronic device 100 determines based on the preview video frame that the ambient dynamic range is greater than the dynamic range of the image sensor in the electronic device 100, and the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the electronic device 100 can control the image sensor to enter the medium-brightness high dynamic mode.
- the electronic device 100 determines based on the preview video frame that the ambient dynamic range is greater than the dynamic range of the image sensor in the electronic device 100 and the ambient brightness is greater than the second illumination value, the electronic device 100 can control the image sensor to enter the high-brightness high-dynamic mode.
- the image sensor can output a preview video frame based on a low-brightness high-dynamic mode and display the preview video frame in a preview window 723 shown in FIG8D .
- the electronic device 100 may receive a user operation on the start video recording control 812 and start recording a video.
- the electronic device 100 may detect a user operation on the start recording control 812. In response to the above operation, the electronic device 100 may start recording a video. Correspondingly, the electronic device 100 may display the video recording interface shown in FIG8E . The electronic device 100 may switch the original start recording control 812 to the end recording control 814.
- the video recording interface 810 may further include a control 813.
- the control 813 may be used to receive a user's shooting operation during the video recording process, capture a photo, and save the photo.
- the electronic device 100 may determine the size relationship between the environment dynamic range and the image sensor dynamic range based on the recorded video frames after starting to shoot the video, and determine whether to switch the image sensor.
- the working mode is not limited in this application.
- the image sensor When the ambient brightness is less than the first illumination value, the image sensor operates in a low-brightness high-dynamic mode and outputs a recorded video frame based on the low-brightness high-dynamic mode (FIG. 8E-FIG. 8F).
- the image sensor in the electronic device 100 may output a recorded video frame based on the low-brightness high-dynamic mode, and display the recorded video frame in a preview window 723 shown in FIG. 8E .
- the electronic device 100 can change the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens or darkens, so as to avoid sudden changes in the brightness of the recorded video frame affecting the user's visual experience.
- the electronic device 100 may increase the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually dims.
- the electronic device 100 can reduce the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor slowly becomes brighter.
- the electronic device 100 can display the recorded video frame shown in FIG8F.
- the brightness of the recorded video frame shown in FIG8F is higher than that of the recorded video frame shown in FIG8E.
- the time displayed in the timestamp control 811 also gradually increases.
- the electronic device 100 can control the image sensor to enter the medium-brightness high dynamic mode.
- the electronic device 100 may control the image sensor to enter the medium brightness high dynamic mode when m consecutive video frames all determine that the ambient brightness is greater than the first illuminance value and less than the second illuminance value.
- m is a positive integer greater than or equal to 1.
- the image sensor When the ambient brightness is greater than the first illuminance value and less than the second illuminance value, the image sensor operates in a medium-brightness high-dynamic mode and outputs a recorded video frame based on the medium-brightness high-dynamic mode (FIG. 8G-FIG. 8H).
- the image sensor in the electronic device 100 may output a recorded video frame based on the medium-brightness high dynamic mode, and display the recorded video frame in a preview window 723 shown in FIG. 8G .
- the electronic device 100 can change the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens or darkens, so as to avoid sudden changes in the brightness of the recorded video frame affecting the user's visual experience.
- the electronic device 100 can switch the working mode of the image sensor to a low-brightness high-dynamic working mode.
- the electronic device 100 can increase the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor slowly darkens.
- the electronic device 100 can reduce the sensitivity of the image sensor so that the brightness of the recorded video frame synthesized by the image sensor is slowly brightened.
- the electronic device 100 can display the recorded video frame shown in FIG8H .
- the brightness of the recorded video frame shown in FIG8H is higher than that of the recorded video frame shown in FIG8G .
- the time displayed in the timestamp control 811 also gradually increases.
- the electronic device 100 can control the image sensor to enter a high-brightness high-dynamic mode.
- the electronic device 100 may control the image sensor to enter the high-brightness high-dynamic mode.
- the image sensor When the ambient brightness is greater than the second illumination value, the image sensor operates in a high-brightness high-dynamic mode and outputs a recorded video frame based on the high-brightness high-dynamic mode ( FIG. 8I ).
- the highlight high dynamic mode is different from the medium high dynamic mode or the low high dynamic mode.
- the difference is that the highlight high dynamic mode corresponds to a high brightness environment.
- the full well capacity of the pixel is also limited and has reached the maximum value, resulting in the potential well of the pixel being unable to carry more charge, resulting in charge overflow, which will cause the image to be over-exposure.
- the electronic device 100 can obtain a frame of recorded video frame through short exposure, and restore the over-exposure image through the short exposure recorded video frame.
- the image sensor in the electronic device 100 may output a recorded video frame based on the high-brightness high-dynamic mode, and display the recorded video frame in a preview window 723 shown in FIG. 8I .
- the electronic device 100 can change the exposure time of the short exposure frame, so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens or darkens, thereby avoiding sudden changes in the brightness of the recorded video frame affecting the user's visual experience.
- the electronic device 100 can switch the working mode of the image sensor to the medium-brightness high-dynamic working mode.
- the electronic device 100 can increase the exposure time of the short exposure frame so that the brightness of the recorded video frame synthesized by the image sensor gradually darkens.
- the electronic device 100 can reduce the exposure time of the short exposure frame so that the brightness of the recorded video frame synthesized by the image sensor gradually brightens.
- the time displayed in the timestamp control 811 also gradually increases.
- the above embodiment only divides the working modes of the image sensor in the high dynamic mode into three categories, namely, low-brightness high dynamic mode, medium-brightness high dynamic mode and high-brightness high dynamic mode.
- the working modes of the image sensor in the high dynamic mode can also be divided into more or fewer categories, which is not limited in this application.
- the electronic device 100 determines that the ambient brightness is greater than the second illumination value.
- the electronic device 100 may first switch to the medium brightness high dynamic mode, and then gradually reduce the brightness. The sensitivity of the small image sensor is reduced. Afterwards, the image sensor in the electronic device 100 is switched to the high brightness and high dynamic mode. In this way, the brightness of the recorded video frame generated by the electronic device 100 gradually becomes brighter.
- the electronic device 100 before switching the image sensor in the electronic device 100 to the high dynamic mode, the electronic device 100 determines that the ambient brightness is greater than the second illumination value. The electronic device 100 may also directly switch the image sensor to the high brightness high dynamic mode.
- the electronic device 100 can dynamically switch the working mode of the image sensor, which not only improves the dynamic range of the video shot by the electronic device 100, but also the brightness of the recorded video frames in the video can change with the change of the ambient brightness, thereby improving the imaging effect of the recorded video frames.
- Figure 9 is a flow chart of a video shooting method provided in an embodiment of the present application.
- the implementation of this method can be based on the interactive cooperation between the application layer (such as the camera application) and the hardware abstraction layer (HAL) in the electronic device, wherein the application layer mainly involves the CameraUI and image storage modules in the camera application; the HAL layer mainly involves the perception module.
- the specific process of the electronic device displaying preview video frames and recording video frames is as follows:
- a video preview interface is displayed and a preview video frame is displayed (S901-S915).
- the system desktop can detect the user's operation of opening the camera application, such as the user clicking the desktop icon of "Camera".
- the CameraUI module is started.
- the CameraUI module can display the shooting interface 720 shown in Figure 8B above.
- the camera application is an application with a camera function in the electronic device 100.
- the CameraUI module can be responsible for the human-computer interaction of the camera application, such as controlling the display of the shooting interface and the interface elements therein and responding to user operations occurring in the shooting interface.
- the CameraUI module receives a first input operation from a user.
- the first input may be a user operation on a shooting mode option in the mode bar 721 .
- the first input may be a user operation of dragging the mode bar 721 to the left and causing the float to stop at the “recording” option.
- the CameraUI module In response to the first input operation, displays a video preview interface.
- the electronic device 100 In response to the first input operation, the electronic device 100 enters the “recording” mode and displays the recording preview interface shown in FIG8C .
- the CameraUI module can display the preview video frame in the preview window 723 .
- the image sensor In response to the first input operation, the image sensor outputs a preview video frame based on the low dynamic mode.
- the electronic device 100 After entering the "recording" mode, the electronic device 100 assumes that the image sensor outputs preview video frames in low dynamic mode. That is, in the low dynamic mode, the dynamic range of the image sensor is not adjusted, and the electronic device 100 generates preview video frames by binning.
- the image sensor sends the preview video frame generated in real time to the perception module.
- the image sensor sends the preview video frame generated in real time to the CameraUI module.
- the image sensor After generating the preview video frame, the image sensor sends the preview video frame to the perception module and the CameraUI module respectively.
- the perception module can obtain the ambient brightness and ambient dynamic range based on the preview video frame.
- the CameraUI module may display the preview video frame in the preview window 723 .
- S906 may also be executed before S905, and S906 may also be executed simultaneously with S905, which is not limited in this application.
- the CameraUI module displays the preview video frame output in the low dynamic mode in the preview window.
- the CameraUI module may display the preview video frame output by the image sensor based on the low dynamic mode in the preview window 723 .
- the preview video frame output by the image sensor based on the low dynamic mode may be the preview video frame displayed in the preview window 723 in FIG. 8C .
- S905 and S907 may be executed in real time/periodically/irregularly, so that the CameraUI module can refresh the preview video frame displayed in the preview window 723 .
- the perception module obtains the environment dynamic range and environment brightness based on the preview video frame.
- S908 may also be executed before S907, and S908 may also be executed simultaneously with S907, which is not limited in this application.
- the perception module sends the ambient dynamic range and ambient brightness to the image sensor.
- the perception module After acquiring the ambient dynamic range and ambient brightness, the perception module sends the ambient dynamic range and ambient brightness to the image sensor.
- the perception module may determine the ambient brightness based on a grayscale histogram or an average brightness value of the preview video frame.
- different brightness scenes can be divided based on the illuminance value of the ambient brightness. For example, low-brightness scenes, medium-brightness scenes, and high-brightness scenes. Different brightness scenes have different brightness ranges. For example, the illuminance value of a low-dark scene is less than a first illuminance value, the illuminance value of a medium-brightness scene is greater than the first illuminance value and less than a second illuminance value, and the illuminance value of a high-brightness scene is greater than the second illuminance value.
- the electronic device 100 stores grayscale histograms corresponding to different brightness scenes.
- the grayscale histogram is used to represent the brightness distribution of pixels in an image.
- the brightness can be understood as the brightness of the image in YUV format.
- Each brightness scene may include one or more grayscale histograms.
- the perception module may obtain the grayscale histogram of the preview video frame based on the preview video frame. The similarity between the grayscale histogram of the preview video frame and the grayscale histograms corresponding to different brightness scenes is calculated respectively. When the similarity is greater than a first threshold, the perception module may determine the current brightness scene. For example, if the perception module calculates that the similarity between the grayscale histogram of the preview video frame and the preset grayscale histogram in the low-brightness scene is greater than a first threshold, the perception module may determine that the current shooting scene is a low-brightness scene and determine the current ambient brightness.
- the perception module can count the average illumination value of the pixels in the preview video frame respectively, and determine the ambient brightness based on the average illumination value, and then determine the brightness scene. For example, if the perception module determines that the average illumination value of the pixels in the preview video frame is less than the first illumination value, then the perception module can determine that the current shooting scene is a low-light scene, and the average illumination value of the pixels in the preview video frame is the current ambient brightness.
- the perception module can also determine the ambient brightness in other ways, which is not limited in this application.
- S906, S908 and S909 may also be executed in real time/periodically/irregularly, so that the image sensor can dynamically switch between different working modes based on the environmental dynamic range and the environmental brightness.
- the ambient brightness and ambient dynamic range may be determined by another light metering sensor.
- a light metering sensor may be provided in the camera of the electronic device 100. It is understandable that the light metering sensor may be used to measure the brightness of light reflected by the subject. That is, reflective light metering.
- the light metering sensor may include a light metering element. The incident light is refracted by the lens and reflector of the electronic device 100 and enters the built-in light metering sensor, and the light metering sensor may obtain the ambient brightness and ambient dynamic range.
- the image sensor needs to confirm whether the environment dynamic range is greater than the dynamic range of the image sensor.
- the dynamic range of the image sensor is set at the factory. After receiving the ambient dynamic range and ambient brightness sent by the perception module, the image sensor can compare the size relationship between the ambient dynamic range and the dynamic range of the image sensor.
- S911 is executed and the image sensor is switched to a high dynamic mode.
- the image details in the preview video frame output by the image sensor based on the low dynamic mode are not clear.
- the bright area content (such as blue sky and white clouds) and the dark area details (objects) in FIG8C are not clear.
- n is a positive integer greater than or equal to 1, and the image sensor executes S911 again. Otherwise, the image sensor executes S914.
- the image sensor needs to confirm whether the ambient brightness is greater than a first illumination value.
- the signal-to-noise ratio of the HCG image output by the HCG channel and the LCG image output by the LCG channel are both relatively good.
- the signal-to-noise ratio of the LCG image output by the LCG channel will be significantly attenuated, and the preview video frame synthesized by the HCG image output by the HCG channel and the LCG image output by the LCG channel will have obvious noise stratification, and the imaging effect is not good.
- the full well capacity of a single pixel is also limited in high-brightness scenes (such as outdoor scenes).
- high-brightness scenes such as outdoor scenes.
- the full well capacity of a single pixel overflows, resulting in an overexposed image.
- the preview video frame synthesized by the HCG image output by the HCG channel and the LCG image output by the LCG channel will have an overexposed area, and the imaging effect is not good.
- the image sensor can switch to different working modes in high dynamic mode based on different ambient brightness ranges to solve the imaging problems existing in the above-mentioned low-brightness scenes or high-brightness scenes.
- the image sensor determines to enter the high dynamic mode, it needs to obtain the ambient brightness and switch to different high dynamic working modes based on different ambient brightness ranges.
- the reason why the environment dynamic range is greater than the dynamic range of the image sensor may be that the environment is too bright, causing the environment dynamic range to be greater than the dynamic range of the image sensor, or that the environment is too dark, causing the environment dynamic range to be less than the dynamic range of the image sensor. Therefore, the image sensor also needs to confirm whether the environment brightness is greater than the first illumination value.
- the ambient dynamic range is greater than the dynamic range of the image sensor because the ambient brightness is too dark, and the image sensor can be switched to a low brightness and high dynamic working mode, that is, S912 is executed.
- the ambient brightness is greater than the first illumination value, it means that the ambient brightness is too bright, causing the ambient dynamic range to be greater than the image sensor. If the dynamic range of the sensor is too large, the image sensor can be switched to the medium brightness high dynamic working mode, that is, S913 is executed.
- the ambient brightness is greater than the first illumination value, which may include the two cases that the ambient brightness is greater than the second illumination value and the ambient brightness is greater than the first illumination value and less than the second illumination value. That is, the ambient brightness is greater than the first illumination value, which may include the two cases of a high-brightness scene and a medium-brightness scene.
- the image sensor can first switch to the medium-brightness high-dynamic working mode.
- the image sensor can first switch to the medium-brightness high-dynamic working mode, and then switch to the high-brightness high-dynamic working mode, so that the brightness of the preview video frame displayed by the electronic device 100 is a gradually brightening process.
- the image sensor can also directly switch to the high-brightness and high-dynamic working mode, which is not limited in this application.
- S910 and S911 may also be performed by the perception module.
- the perception module may send a switching notification to the image sensor, and the image sensor switches to the low brightness high dynamic mode after receiving the notification.
- the perception module determines that the image sensor needs to switch from the low dynamic mode to the medium-brightness high dynamic mode, the perception module can send a switching notification to the image sensor, and the image sensor switches to the medium-brightness high dynamic mode after receiving the switching notification.
- the perception module may not send a notification to the image sensor, and the image sensor continues to work in the low dynamic mode.
- the perception module may also send a notification to the image sensor, and the image sensor continues to work in the low dynamic mode after receiving the switching notification.
- the image sensor switches from a low-dynamic mode to a low-brightness high-dynamic mode, and outputs a preview video frame based on the low-brightness high-dynamic mode.
- the image sensor can switch to the low-brightness high-dynamic working mode.
- the image sensor can output a preview video frame based on the low-brightness high-dynamic mode.
- the signal-to-noise ratio of the HCG image output by the HCG channel is relatively good, and two frames of HCG images can be output through the HCG channel based on different sensitivities, and the two frames of HCG images are synthesized to obtain a preview video frame in low-light high-dynamic mode.
- the two frames of HCG images obtained through the HCG channel can be referred to as a first HCG image and a second HCG image.
- the sensitivity of the HCG channel for obtaining the first HCG image is different from the sensitivity of the HCG channel for obtaining the second HCG image.
- the sensitivity of the HCG channel for obtaining the first HCG image is higher than the sensitivity of the HCG channel for obtaining the second HCG image.
- the first HCG image and the second HCG image are synthesized to obtain a preview video frame.
- the first HCG image can be used to obtain dark area details in the preview video frame
- the second HCG image can be used to obtain bright area content in the preview video frame.
- the working mode of the image sensor in a low-light scene can be set to a working mode.
- the sensitivity of the HCG path of the first HCG image is obtained and the sensitivity of the HCG path of the HCG path is obtained.
- the sensitivity of the HCG path of the second HCG image is fixed.
- the low-light scene can also be divided into multiple brightness ranges, and the working mode of the image sensor corresponding to each brightness range is different. That is, the working mode of the image sensor in the low-light scene can be set to multiple working modes.
- the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image can change with the change of the ambient brightness.
- the image sensor can also dynamically adjust the sensitivity of the HCG path, so that the brightness of the preview video frame captured by the electronic device 100 in the low-light scene can change with the change of the ambient brightness.
- the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image may change by the same amount.
- the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image decrease by the same amount.
- the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image also increase by the same amount.
- the ratio of the sensitivity of the HCG path for obtaining the first HCG image and the sensitivity of the HCG path for obtaining the second HCG image is the same, and the dynamic range of the two preview video frames before and after remains unchanged, ensuring that the image content of the two preview video frames before and after will not change suddenly.
- the exposure duration of the HCG path for obtaining the first HCG image and the exposure duration of the HCG path for obtaining the second HCG image remain unchanged and are integer multiples of the artificial light source flicker cycle, where the artificial light source flicker cycle can be the reciprocal of twice the frequency of the AC power connected to the electronic device 100. In this way, AC flicker will not occur, that is, the picture in the preview video frame captured by the electronic device 100 flickers with time.
- the sensitivity of the image sensor is determined by CG, AG and DG.
- CG is fixed, and the sensitivity of the image sensor can be adjusted by adjusting the size of AG and/or DG.
- the capacitor used to carry electrons in the image sensor can be divided into LOFIC capacitors and non-LOFIC capacitors.
- the sensitivity of the image sensor can be adjusted by adjusting the size of AG and/or DG.
- the sensitivity of the image sensor can only be adjusted by adjusting the size of DG.
- the noise caused by adjusting the sensitivity of the image sensor through AG is smaller than the noise caused by adjusting the sensitivity of the image sensor through DG, and the imaging effect is good.
- the sensitivity of the LCG pathway and the HCG pathway is preset, and the ratio of the sensitivity of the LCG pathway to the sensitivity of the HCG pathway is fixed.
- the sensitivity of the LCG pathway may be 100*AG*DG, where the value of CG may be 100.
- the initial AG and initial DG of the LCG pathway and the HCG pathway may be Different, the initial AG and initial DG of the LCG pathway and the HCG pathway may also be other values, and the CG of the LCG pathway and the HCG pathway may also be other values, which is not limited in the present application.
- Table 1 shows the values of shooting parameters in an image sensor in a low-light scene.
- the shooting parameters include but are not limited to sensitivity and exposure time.
- the electronic device 100 can determine that the current brightness scene is a low-brightness scene, and the image sensor can work in a low-brightness high-dynamic mode.
- the sensitivity of the HCG path of the first HCG image obtained by the image sensor is 400*2AG*DG, and the exposure time is 10ms.
- the sensitivity of the HCG path of the second HCG image obtained by the image sensor is 400*32AG*DG, and the exposure time is also 10ms.
- the image sensor when the image sensor determines that it is to switch from the low dynamic mode to the low brightness high dynamic mode, the image sensor can set the exposure time to 10ms, and set the sensitivity in the HCG path to 400*2AG*DG and 400*32AG*DG respectively, to obtain the first HCG image and the second HCG image.
- the first HCG image and the second HCG image are then synthesized to obtain a preview video frame obtained by the image sensor in the low brightness high dynamic mode.
- the image sensor after the image sensor enters the low-brightness high-dynamic mode, if the ambient brightness becomes darker or brighter, as long as the ambient brightness does not exceed 200 Lux, the image sensor can always obtain the preview video frame according to the shooting parameters shown in Table 1.
- Table 2 shows the values of shooting parameters in the image sensor in another low-light scene.
- the embodiment shown in Table 2 divides the low-brightness scene into a plurality of different brightness ranges.
- the sensitivity of the HCG path for obtaining the first HCG image and the second HCG image in different brightness ranges is different.
- the low-brightness scene can be further divided into four brightness ranges: 200 Lux to 150 Lux brightness range, 150 Lux to 100 Lux brightness range, 100 Lux to 50 Lux brightness range, and 50 Lux to 0 Lux brightness range.
- the low-brightness scene can also be divided into more or fewer brightness ranges, which is not limited in this application.
- the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*AG*DG to obtain the second HCG image.
- the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*2AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*32AG*DG to obtain the second HCG image.
- the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*4AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*64AG*DG to obtain the second HCG image.
- the exposure time can be set to 10 ms, and the sensitivity of the HCG channel can be set to 400*8AG*DG to obtain the first HCG image. Then, the sensitivity of the HCG channel can be set to 400*128AG*DG to obtain the second HCG image.
- the image sensor adjusts the sensitivity of the HCG path so that the sensitivity of the HCG path of the first HCG image and the sensitivity of the second HCG image are obtained before and after the adjustment.
- the ratio of the sensitivity between the two images is the same.
- the ratio of the sensitivity of the HCG channel of the first HCG image to the sensitivity of the second HCG image is 1:16.
- the ratio of the sensitivity of the HCG channel of the first HCG image to the sensitivity of the second HCG image is also 1:16.
- the ratio of the sensitivity of the HCG channel of the first HCG image to the sensitivity of the second HCG image is also 1:16.
- the ratio of the sensitivity of the HCG channel of the first HCG image to the sensitivity of the second HCG image is also 1:16.
- the exposure value of the HCG path for obtaining the first HCG image and the exposure time of the HCG path for obtaining the second HCG image are always 10ms
- the AC frequency can be 50hz
- the image sensor determines that it needs to switch from low dynamic mode to low brightness high dynamic mode.
- the image sensor needs to determine the shooting parameters of the image sensor based on the ambient brightness.
- the image sensor can determine that the current ambient brightness is within the brightness range of 150Lux to 100Lux, the image sensor can set the exposure time to 10ms, and set the sensitivity in the HCG channel to 400*AG*DG and 400*16AG*DG, respectively, to obtain multiple preview video frames.
- the image sensor sets the sensitivity in the HCG channel to 400*2AG*DG and 400*32AG*DG, respectively, to obtain multiple preview video frames.
- the ambient brightness continues to be within the brightness range of 150Lux to 100Lux, the image sensor can continue to output preview video frames based on the sensitivities of 400*2AG*DG and 400*32AG*DG.
- the image sensor after the image sensor enters the low-brightness high-dynamic mode, if the ambient brightness becomes darker or brighter, the image sensor can switch different shooting parameters based on the ambient brightness in real time. For example, when the ambient brightness becomes darker, the image sensor can increase the sensitivity, and when the ambient brightness becomes brighter, the image sensor can decrease the sensitivity. This allows the brightness of the preview video frame captured by the image sensor in a low-brightness scene to change with the change of the ambient brightness.
- the values of the shooting parameters of the image sensor in the low-light scene may be stored in a configuration file, which may be called.
- the image sensor switches from the low dynamic mode to the medium-brightness high dynamic mode, and outputs a preview video frame based on the medium-brightness high dynamic mode.
- the image sensor can switch to the medium brightness high dynamic working mode.
- the image sensor can output a preview video frame based on the medium brightness high dynamic mode.
- the signal-to-noise ratio of the HCG image output by the HCG channel and the LCG image output by the LCG channel are both relatively good, and the imaging effect is also relatively good. Then, the HCG image can be obtained through the HCG channel and the LCG image can be obtained through the LCG channel respectively, and then the HCG image and the LCG image are synthesized to obtain a preview video frame.
- the working mode of the image sensor in the medium-brightness scene can be set to a working mode of
- the sensitivity of the HCG channel and the sensitivity of the LCG channel are fixed.
- the medium-bright scene can also be divided into multiple brightness ranges, and the working mode of the image sensor corresponding to each brightness range is different.
- the working mode of the image sensor in the low-bright scene can be set to multiple working modes.
- the sensitivity of the HCG channel and the sensitivity of the LCG channel can change with the change of the ambient brightness.
- the image sensor can also dynamically adjust the sensitivity of the HCG channel and the LCG channel, so that the brightness of the preview video frame captured by the electronic device 100 in the medium-bright scene can change with the change of the ambient brightness.
- the present application also takes adjusting the sensitivity of the image sensor through AG as an example for explanation.
- the sensitivity of the HCG channel and the sensitivity of the LCG channel can change by the same amount.
- the sensitivity of the HCG channel and the sensitivity of the LCG channel decrease by the same amount.
- the sensitivity of the HCG channel and the sensitivity of the LCG channel increase by the same amount.
- the ratio of the sensitivity of the HCG channel and the sensitivity of the LCG channel is the same, and the dynamic range of the two preview video frames before and after remains unchanged, ensuring that the image content of the two preview video frames before and after will not change suddenly.
- the exposure duration of the HCG channel and the exposure duration of the LCG channel remain unchanged and are integer multiples of the flicker period of the artificial light source, so that AC flicker does not occur.
- the electronic device 100 can determine that the current brightness scene is a medium brightness scene, and the image sensor can work in the medium brightness high dynamic mode.
- the sensitivity of the LCG channel of the LCG image is 100*2AG*DG, and the exposure time is 10ms.
- the sensitivity of the LCG channel of the HCG image is 400*8AG*DG, and the exposure time is also 10ms.
- the image sensor when the image sensor determines that it is to switch from the low dynamic mode to the medium brightness high dynamic mode, the image sensor can set the exposure time to 10ms, and then set the sensitivity of the LCG channel to 100*2AG*DG and the sensitivity of the HCG channel to 400*8AG*DG to obtain the LCG image and the HCG image.
- the HCG image and the HCG image are then synthesized to obtain a preview video frame obtained by the image sensor in the medium brightness high dynamic mode.
- Table 4 shows the values of shooting parameters in the image sensor in another medium-brightness scene.
- the embodiment shown in Table 4 divides the medium-bright scene into a plurality of different brightness ranges.
- the sensitivities of the LCG channel and the HCG channel in different brightness ranges are different.
- the medium-brightness scene can be further divided into four brightness ranges: 2000 Lux to 1400 Lux brightness range, 1400 Lux to 800 Lux brightness range, 800 Lux to 400 Lux brightness range, and 400 Lux to 200 Lux brightness range.
- the medium-brightness scene can also be divided into more or fewer brightness ranges, which is not limited in this application.
- the exposure time can be set to 10 ms, and the sensitivity of the LCG channel can be set to 100*AG*DG to obtain an LCG image.
- the sensitivity of the HCG channel can be set to 400*4AG*DG to obtain an HCG image.
- the exposure time can be set to 10 ms
- the sensitivity of the LCG channel can be set to 100*4AG*DG
- the LCG image can be obtained.
- the sensitivity of the HCG channel can be set to 400*16AG*DG, and the HCG image can be obtained.
- the exposure time can be set to 10 ms, and the sensitivity of the LCG channel can be set to 100*16AG*DG to obtain an LCG image.
- the sensitivity of the HCG channel can be set to 400*64AG*DG to obtain an HCG image.
- the exposure time can be set to 10 ms, and the sensitivity of the LCG channel can be set to 100*64AG*DG to obtain an LCG image.
- the sensitivity of the HCG channel can be set to 400*256AG*DG to obtain an HCG image.
- the image sensor adjusts the sensitivity of the LCG channel and the HCG channel so that the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel before and after the adjustment is the same.
- the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is 1:16.
- the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is also 1:16.
- the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is also 1:16.
- the ratio of the sensitivity of the LCG channel to the sensitivity of the HCG channel is also 1:16.
- the image sensor determines that it is to switch from low dynamic mode to medium brightness high dynamic mode.
- the image sensor needs to determine the value of the image sensor's shooting parameters based on the ambient brightness.
- the image sensor can set the exposure time to 10ms, set the sensitivity of the LCG channel to 100*AG*DG and the sensitivity of the LCG channel to 400*4AG*DG, and obtain multiple preview video frames. Then set the sensitivity of the LCG channel to 100*4AG*DG and the sensitivity of the LCG channel to 400*16AG*DG to obtain multiple preview video frames.
- the image sensor can continue to output preview video frames based on the sensitivities of 100*4AG*DG and 400*16AG*DG.
- the values of the shooting parameters of the image sensor in the above-mentioned medium-brightness scene may be stored in a configuration file.
- the configuration file may be called.
- determining that the environment dynamic range is greater than the first illuminance value may also include a situation where the environment brightness is greater than the second illuminance value, that is, also includes a situation of a highlight scene.
- the image sensor can first be switched from the low dynamic mode to the medium brightness high dynamic mode according to the method in Table 3 or Table 4, and then switched from the medium brightness high dynamic mode to the high brightness high dynamic mode.
- the embodiment shown in Table 5 divides the highlight scene into three different brightness ranges.
- the exposure time of the short exposure preview video frame in different brightness ranges is different. If the ambient brightness continues to be within the brightness range of 150Lux to 100Lux, the image sensor can continue to output preview video frames based on the sensitivity of 400*2AG*DG and 400*32AG*DG.
- the high-brightness scene can be further divided into more than three brightness ranges: 2000 Lux to 2600 Lux, 2600 Lux to 3200 Lux, and above 3200 Lux.
- the highlight scene can also be divided into more or fewer brightness ranges, which is not limited in this application.
- the ambient brightness is within the range of 2000Lux to 2600Lux
- first set the exposure time to 10ms and the sensitivity of the LCG channel to 100*AG*DG to obtain an LCG image.
- Set the sensitivity of the HCG channel to 400*4AG*DG to obtain an HCG image.
- set the exposure time to 10ms to obtain a short-exposure image frame.
- synthesize the LCG image and the HCG image into a long-exposure image frame, and then synthesize the long-exposure image frame and the short-exposure image frame into a preview video frame.
- the ambient brightness is within the range of 2600Lux to 3200Lux
- first set the exposure time to 10ms and the sensitivity of the LCG channel to 100*AG*DG to obtain an LCG image.
- Set the sensitivity of the HCG channel to 400*4AG*DG to obtain an HCG image.
- set the exposure time to 5ms to obtain a short-exposure image frame.
- synthesize the LCG image and the HCG image into a long-exposure image frame, and then synthesize the long-exposure image frame and the short-exposure image frame into a preview video frame.
- the exposure time When the ambient brightness is above 3200 Lux, first set the exposure time to 10 ms and the sensitivity of the LCG channel to 100*AG*DG to obtain an LCG image. Set the sensitivity of the HCG channel to 400*4AG*DG to obtain an HCG image. Then set the exposure time to 2.5 ms to obtain a short-exposure image frame. First, synthesize the LCG image and the HCG image into a long-exposure image frame, and then synthesize the long-exposure image frame and the short-exposure image frame into a preview video frame.
- the exposure time of the short-exposure image frame can be gradually reduced to improve the dynamic range of the preview video frame, so that the bright area content can be restored.
- the dynamic range of the preview video frame synthesized within the brightness range of 2600 Lux to 3200 Lux is greater than that of the preview video frame synthesized within the brightness range of 2000 Lux to 2600 Lux.
- the dynamic range of the preview video frame synthesized within the brightness range above 3200 Lux is greater than that of the preview video frame synthesized within the brightness range of 2600 Lux to 3200 Lux.
- the image sensor determines that the medium brightness high dynamic mode is to be switched to the medium brightness high dynamic mode.
- the sensor needs to determine the value of the shooting parameters of the image sensor based on the ambient brightness. For example, if the current ambient brightness is 2800Lux, the image sensor can determine that the current ambient brightness is within the brightness range of 2600Lux to 3200Lux.
- the image sensor can first obtain multiple preview video frames based on the shooting parameters of the image sensor in the brightness range of 2000Lux to 2600Lux. Finally, multiple preview video frames are obtained by shooting the shooting parameters of the image sensor in the brightness range of 2600Lux to 3200Lux. If the ambient brightness continues to be within the brightness range of 2600Lux to 3200Lux, the image sensor can continue to output preview video frames based on the shooting parameters of the image sensor in the brightness range of 2600Lux to 3200Lux.
- the image sensor can switch different shooting parameters based on the ambient brightness in real time. For example, when the ambient brightness becomes darker, the image sensor can increase the exposure time of the short-exposure image frame. When the ambient brightness becomes brighter, the image sensor can reduce the exposure time of the short-exposure image frame. This allows the brightness of the preview video frame captured by the image sensor in a high-brightness scene to change with the change of the ambient brightness.
- the image sensor outputs a preview video frame based on the low dynamic mode.
- the image sensor may operate in a low dynamic mode and output a preview video frame based on the low dynamic mode.
- the CameraUI module displays the preview video frame output in the low-brightness high-dynamic mode in the preview window.
- the image sensor can obtain a preview video frame based on the shooting parameters shown in Table 1 or Table 2, and send the preview video frame to the CameraUI module.
- the CameraUI module can display the preview video frame output in the low-brightness high-dynamic mode in the preview window.
- the image sensor Before starting to record a video, the image sensor has already switched to the high dynamic mode. After starting to record a video, the image sensor can directly record the video based on the high dynamic mode.
- the video recording interface is displayed and video recording starts (S916-S924).
- the CameraUI module receives a second input operation from the user.
- the image sensor In response to the second input operation, the image sensor outputs a recorded video frame based on a low-brightness high-dynamic mode.
- the implementation method of the image sensor outputting recorded video frames based on the low-brightness high-dynamic mode is similar to the implementation method of the image sensor outputting preview video frames based on the low-brightness high-dynamic mode. Please refer to the description in S912, and this application will not repeat it here.
- the CameraUI module displays a video recording interface.
- the CameraUI module displays the recorded video frames output based on the low-brightness high-dynamic mode in the preview window of the video recording interface.
- the second input operation may be a user operation on the start recording control 812 shown in FIG. 8D .
- the electronic device 100 starts recording a video and displays the video recording interface shown in FIG. 8E .
- the CameraUI module may display the recorded video frames output based on the low-brightness high-dynamic mode in the preview window 723 .
- the image sensor sends the recorded video frame output based on the low-brightness high-dynamic mode to the image storage module.
- the image sensor In response to the second operation, the image sensor sends the recorded video frame output based on the low-brightness high-dynamic mode to the image storage mode.
- the image storage module can save the recorded video frames output based on the low-brightness and high-dynamic mode.
- the image sensor switches from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and outputs a recorded video frame based on the medium-brightness high-dynamic mode.
- the image sensor may switch from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and output the recorded video frame based on the medium-brightness high-dynamic mode.
- m is a positive integer greater than or equal to 1.
- the implementation method of the image sensor outputting the recorded video frame based on the medium-brightness high dynamic mode is similar to the implementation method of the image sensor outputting the preview video frame based on the medium-brightness high dynamic mode. Please refer to the description in S913, and this application will not repeat it here.
- the image sensor outputs a recorded video frame based on the medium-brightness high dynamic mode and sends it to the image storage module.
- the image sensor After the image sensor enters the medium-brightness high dynamic mode, the image sensor can output recorded video frames based on the medium-brightness high dynamic mode, and send the recorded video frames output in the medium-brightness high dynamic mode to the image storage module, so that the image storage module can save the recorded video frames output based on the medium-brightness high dynamic mode.
- the image sensor switches from the medium-brightness high-dynamic mode to the high-brightness high-dynamic mode, and outputs a recorded video frame based on the high-brightness high-dynamic mode.
- the image sensor may switch from the medium brightness high dynamic mode to the high brightness high dynamic mode, and output the recorded video frame based on the high brightness high dynamic mode.
- m is a positive integer greater than or equal to 1.
- the implementation method of the image sensor outputting the recording video frame based on the highlight high dynamic mode is similar to the implementation method of the image sensor outputting the preview video frame based on the highlight high dynamic mode. Please refer to the description in S913, and this application will not repeat it here.
- the image sensor outputs the recorded video frame based on the high-brightness and high-dynamic mode and sends it to the image storage module.
- the image sensor After the image sensor enters the high-brightness and high-dynamic mode, the image sensor can output recorded video frames based on the high-brightness and high-dynamic mode, and send the recorded video frames output in the high-brightness and high-dynamic mode to the image storage module, so that the image storage module can save the recorded video frames output based on the high-brightness and high-dynamic mode.
- the image sensor may first execute S921-S922 and then execute S923-S924.
- the image sensor may not execute S921-S922, but directly execute S923-S924.
- S919-S924 are only an example and do not constitute a limitation.
- the image sensor can switch to different working modes in real time based on the monitored ambient brightness.
- FIG. 10 is a schematic diagram showing a switching of an image sensor between different working modes.
- the working modes of the image sensor include but are not limited to low dynamic mode, low brightness high dynamic mode, Medium brightness high dynamic mode and high brightness high dynamic mode, etc.
- the image sensor works in the low dynamic mode.
- the image sensor can monitor the environmental dynamic range and environmental brightness in real time to confirm whether the working mode needs to be switched.
- the image sensor after the image sensor enters the low dynamic mode, if the image sensor detects that the ambient dynamic range is greater than the image sensor dynamic range and the ambient brightness is greater than the first illuminance value, the image sensor can switch from the low dynamic mode to the medium-brightness high dynamic mode and output video frames based on the medium-brightness high dynamic mode.
- the image sensor After the image sensor enters the medium-brightness high dynamic mode, the image sensor can also dynamically switch to other working modes based on the ambient brightness.
- the image sensor can switch to the low-dynamic mode and output video frames based on the low-dynamic mode.
- the image sensor can switch from the medium-brightness high dynamic mode to the low-brightness high dynamic mode and output video frames based on the low-brightness high dynamic mode.
- the image sensor can switch from the medium-brightness high dynamic mode to the high-brightness high dynamic mode and output video frames based on the high-brightness high dynamic mode.
- the image sensor after the image sensor enters the low dynamic mode, if the image sensor detects that the ambient dynamic range is greater than the image sensor dynamic range and the ambient brightness is less than the first illuminance value, the image sensor can switch from the low dynamic mode to the low-brightness high dynamic mode and output video frames based on the low-brightness high dynamic mode.
- the image sensor After the image sensor enters the low-brightness high-dynamic mode, the image sensor can also dynamically switch to other working modes based on the ambient brightness.
- the image sensor can switch to the low-dynamic mode again and output video frames based on the low-dynamic mode.
- the image sensor can switch from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode and output video frames based on the medium-brightness high-dynamic mode.
- the image sensor may first switch from the low-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and then switch from the medium-brightness high-dynamic mode to the high-brightness high-dynamic mode. In other possible implementations, the image sensor may directly switch from the low-brightness high-dynamic mode to the high-brightness high-dynamic mode.
- the image sensor After the image sensor enters the high-brightness high-dynamic mode, the image sensor can also dynamically switch to other working modes based on the ambient brightness.
- the image sensor may first switch from the high-brightness high-dynamic mode to the medium-brightness high-dynamic mode, and then switch from the medium-brightness high-dynamic mode to the low-brightness high-dynamic mode. In other possible implementations, the image sensor may directly switch from the high-brightness high-dynamic mode to the low-brightness high-dynamic mode.
- the CameraUI module receives a third input operation from the user.
- the third input operation may be an input operation (eg, single click) for the end recording control 814.
- the electronic device 100 may switch the end recording control 814 to the start recording control 812 and save the recorded video.
- the image storage module stores the multiple recorded video frames, and generates a first video based on the multiple recorded video frames.
- the image storage module saves the multiple recorded video frames and generates a first video based on the multiple recorded video frames.
- the image storage module can generate the first video based on the time sequence of the multiple recorded video frames, and the first video includes the multiple recorded video frames.
- the CameraUI module In response to the third input operation, displays a video preview interface.
- the CameraUI module may display a video preview interface, and display a preview video frame in a preview window of the video preview interface.
- the image sensor In response to the third input operation, the image sensor outputs a preview video frame based on the high-brightness and high-dynamic mode.
- the image sensor if the image sensor operates in the highlight high dynamic mode before the CameraUI module receives the third input from the user, if the CameraUI module receives the third input from the user, the image sensor will output a preview video frame based on the highlight high dynamic mode.
- the image sensor sends the preview video frame output based on the highlight high dynamic mode to the CameraUI module.
- the CameraUI module displays the preview video frame output by the image sensor based on the high-brightness high-dynamic mode in the preview window.
- the electronic device 100 may execute the embodiments shown in S908-S914 to display the preview video frame in the preview window.
- the camera is used to capture images.
- the reflected light of the photographed object passes through the lens, it is refracted on the lens and converges on the image sensor.
- the image sensor can convert the light signal into an analog electrical signal.
- the analog electrical signal is bypassed from the image sensor and the sensor front end (SFE), and then output through the digital-to-analog converter.
- SFE sensor front end
- the image sensor can generate two video frames.
- the image sensor can synthesize the two video frames into one video frame.
- the image sensor can send the two video frames to the sensor front end, and the sensor front end synthesizes the two video frames into one video frame.
- the image sensor can generate three video frames. Two of them are long-exposure video frames, and one is a short-exposure video frame.
- the image sensor combines the two long-exposure video frames into one video frame, and the image sensor then sends the combined video frame to the sensor front end, and the sensor front end then combines the combined video frame and the short-exposure video frame into one video frame.
- the image sensor can send the two long-exposure video frames and the short-exposure video frames to the sensor front end, and the sensor front end then combines the two long-exposure video frames and the short-exposure video frames into one video frame.
- the image signal processor ISP is used to process the RAW video frames from the camera and generate video frames to be displayed.
- the video frames to be displayed can be video frames in YUV (or understood as brightness and chrominance) format.
- the image signal processor then sends the video frames in YUV format to the display screen for display.
- the ISP may include an image processing engine (IPE), an image processor front-end (IFE), an I/O control interface, etc.
- the process of processing the video frame at the front end of the image processor may include one or more of the following, for example: bad pixel correction processing, RAW domain noise reduction processing, black level correction processing, optical shading correction processing, automatic white balance processing, color interpolation processing, color correction processing, global tone mapping processing, or image conversion processing, etc.
- the video frame pre-processing process is not limited in the embodiments of the present application.
- the image processor front end then sends the pre-processed video frames to the image processor back end, and the image processor back end can post-process the pre-processed video frames.
- the image processor back end can use the post-processed video frame sequence as a preview video stream or a recorded video stream.
- the preview video stream or the recorded video stream can be displayed on the display screen through the I/O control interface.
- the image processor back end can send the post-processed video frame sequence to the perception module, so that the perception module can obtain the environmental dynamic range and ambient brightness based on the post-processed video frame sequence.
- the perception module then sends the environmental dynamic range and ambient brightness to the image sensor, so that the image sensor can switch different working modes based on the environmental dynamic range and ambient brightness.
- the camera may further include a light metering sensor, which may monitor ambient brightness and ambient dynamic range.
- a light metering sensor which may monitor ambient brightness and ambient dynamic range.
- the electronic device 100 receives an input operation (such as a single click) from a user on the control 813, and the electronic device 100 can save the recorded video frame corresponding to the moment when the user clicks the control 813 in the gallery.
- an input operation such as a single click
- the video frame post-processing may include one or more of the following, for example: image correction and adjustment processing, local tone mapping processing, and gamma correction processing.
- image correction and adjustment processing the image processor backend can perform anti-shake processing on the current video frame.
- local tone mapping processing the image processor backend can adjust the overall brightness of the video frame so that the picture after brightness adjustment can be closer to the brightness presented in the real world.
- gamma correction processing the image processor backend can adjust the brightness of the video frame so that it can retain more bright and dark details, compress the contrast, and retain more color information.
- the recorded video stream can be saved in the gallery.
- FIG12 is a flow chart of a video shooting method provided in the present application.
- the electronic device displays a shooting interface, where the shooting interface is used to display images captured by a camera.
- the electronic device comprises a camera module, the camera module comprises an image sensor and a dual conversion gain sensor, the dual conversion gain sensor comprises a first sensor and a second sensor, and the conversion gain of the first sensor is smaller than the conversion gain of the second sensor.
- the dual conversion gain sensor may be located inside the image sensor, or may be independent of the image sensor.
- the first sensor may also be referred to as an LCG pathway.
- the second sensor may also be referred to as an HCG pathway.
- the photographing interface may be the photographing interface 720 shown in FIG. 8B .
- the shooting interface may also be the video recording interface 810 shown in FIG. 8C .
- the shooting interface may also be the video recording interface 810 shown in FIG. 8E .
- the electronic device processes a first original image output by the image sensor into a first image according to a first sensitivity through a second sensor, and processes the first original image into a second image according to a second sensitivity through a second sensor, wherein the first sensitivity is less than the second sensitivity.
- S1203 The electronic device synthesizes the first image and the second image into a third image, and displays the third image on the shooting interface.
- the first image may be referred to as a first HCG image.
- the first sensitivity may be 400*2AG*DG as shown in Table 1.
- the second sensitivity may be 400*32AG*DG as shown in Table 1.
- the first sensitivity may also be a plurality of sensitivities shown in Table 2 for obtaining the first HCG image.
- the second sensitivity may also be a plurality of those shown in Table 2 for obtaining the second HCG image.
- the electronic device processes the second original image output by the image sensor into a fourth image according to the third sensitivity through the first sensor, and processes the second original image into a fifth image according to the fourth sensitivity through the second sensor, where the third sensitivity is smaller than the fourth sensitivity, and the fourth sensitivity is smaller than the second sensitivity.
- S1205 The electronic device combines the fourth image and the fifth image into a sixth image, and displays the sixth image on the shooting interface.
- the first illumination value and the second illumination value may be a specific value or may refer to a range.
- the first illuminance value may be 200 Lux to 0 Lux.
- the second illumination value may be 2000 Lux to 200 Lux.
- 200 Lux may be the ambient brightness of a low-brightness scene or the ambient brightness of a medium-brightness scene, and this application does not limit this.
- the fourth image may be referred to as an LCG image.
- the fifth image may be referred to as a HCG image.
- the third sensitivity may be 100*2AG*DG as shown in Table 3.
- the fourth sensitivity may be 400*8AG*DG as shown in Table 3.
- the third sensitivity may also be a plurality of sensitivities for obtaining the LCG image shown in Table 4.
- the fourth sensitivity may also be a plurality of sensitivities for obtaining the HCG image shown in Table 4.
- the signal-to-noise ratio of the first sensor is comparable to that of the second sensor, and the signal-to-noise ratio of the first sensor and the signal-to-noise ratio of the second sensor are also relatively high.
- the first sensor and the second sensor output two frames of images to synthesize a video frame, and the imaging effect of the video frame is also relatively good.
- the method also includes: when the ambient brightness is greater than or equal to the second illuminance value, the electronic device controls the image sensor to output the third original image with the first exposure time, and controls the image sensor to output the fourth original image with the second exposure time; the electronic device processes the third original image into a seventh image according to the third sensitivity through the first sensor, and processes the third original image into an eighth image according to the fourth sensitivity through the second sensor; the electronic device processes the fourth original image into a ninth image based on a merging method; the electronic device synthesizes the seventh image, the eighth image and the ninth image into a tenth image, and displays the tenth image on the shooting interface.
- the seventh image may be referred to as an LCG image.
- the eighth image may be referred to as a HCG image.
- the ninth image may be referred to as a short exposure preview video frame or a short exposure recording video frame.
- a long exposure frame image (the seventh image and the eighth image) and a short exposure frame image (the ninth image) are output, and the seventh image, the eighth image and the ninth image are fused to obtain a frame image, namely the tenth image.
- This can solve the problem of overexposed images in bright scenes when the full well capacity of a single pixel overflows.
- the overexposed image can be restored through the tenth image.
- the shooting interface also includes a recording end button; the method also includes: the electronic device receives a first operation of the user on the recording end button; in response to the first operation, the electronic device saves a first video, the first video includes the third image and the sixth image, or the first video includes the third image, the sixth image and the tenth image.
- the recording end button may be the recording end control 814 shown in FIG. 8E .
- the method can be applied to video shooting scenes, and videos can be shot based on the method.
- the shooting interface further includes a video recording start button.
- the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image can be gradually reduced.
- the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image can be gradually increased.
- the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.
- the method further includes: when the ambient brightness is between the first illuminance value and the second illuminance value, the brighter the ambient brightness is, the smaller the sensitivity of the first sensor and the sensitivity of the second sensor are.
- the sensitivity of the first sensor and the sensitivity of the second sensor can be gradually reduced.
- the sensitivity of the first sensor and the sensitivity of the second sensor can be gradually increased.
- the video frames captured by the electronic device also gradually become brighter or darker, which can improve the video shooting effect.
- the exposure time of the first sensor and the second sensor remains unchanged, and only the sensitivity is changed, thereby avoiding flickering between two adjacent video frames and affecting the visual effect.
- the first exposure duration may be 10 ms.
- a ratio between the sensitivity of the second sensor that obtains the first image and the sensitivity of the second sensor that obtains the second image remains unchanged.
- the sensitivity of the second sensor that obtains the first image and the sensitivity of the second sensor that obtains the second image increase or decrease proportionally, avoiding differences in dynamic range.
- the ratio between the sensitivity of the second sensor for obtaining the first image and the sensitivity of the second sensor for obtaining the second image is 1:16.
- the ratio between the sensitivity of the first sensor and the sensitivity of the second sensor remains unchanged.
- the ratio between the sensitivity of the first sensor and the sensitivity of the second sensor is 1:16.
- the ratio between the sensitivity of the first sensor and the sensitivity of the second sensor is 1:16.
- the ratio between the sensitivity of the second sensor that obtains the first image and the sensitivity of the second sensor that obtains the second image is also 1:16.
- the method further includes: when the ambient brightness is greater than or equal to the second illumination value, the brighter the ambient brightness is, the longer the first exposure time remains unchanged and the shorter the second exposure time is.
- the exposure time for obtaining the ninth image can be gradually reduced.
- the exposure time for obtaining the ninth image can be gradually increased.
- the video frame captured by the electronic device is also It gradually brightens or darkens, which can improve the video shooting effect.
- the method further includes: when the ambient brightness is equal to the second illumination value, the first exposure duration is equal to the second exposure duration.
- the second illumination value may be 2000 Lux to 2600 Lux.
- the first exposure time and the second exposure time are 10 ms.
- the first sensor also includes a first capacitor
- the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and/or digital gain of the first sensor, specifically including: when the first capacitor is a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the digital gain of the first sensor; when the first capacitor is not a LOFIC capacitor, the electronic device adjusts the sensitivity of the first sensor by adjusting the analog gain and/or digital gain of the first sensor.
- the computer program product includes one or more computer instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode.
- the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated.
- the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk), etc.
- the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media.
- the programs can include the processes of the above-mentioned method embodiments.
- the aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
- Transforming Light Signals Into Electric Signals (AREA)
Abstract
本申请提供了一种视频拍摄方法及电子设备。电子设备可以基于不同的环境亮度切换图像传感器不同的工作模式。例如在环境亮度小于第一照度值的情况下,电子设备控制图像传感器工作在低亮高动态模式。在环境亮度在第一照度值和第二照度值之间的情况下,电子设备控制图像传感器工作在中亮高动态模式。在环境亮度大于等于第二照度值的情况下,电子设备控制图像传感器工作在高亮高动态模式。通过该方法,一方面可以提升电子设备在拍摄视频过程中的动态范围。另一方面,通过图像传感器不同的工作模式,提高视频拍摄效果。
Description
本申请要求于2023年05月25日提交中国专利局、申请号为202310601145.6、申请名称为“一种视频拍摄方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及图像处理领域,尤其涉及一种视频拍摄方法及电子设备。
相机的传感器的动态范围就是传感器在一幅图像里能够同时体现高光和阴影部分内容的能力,相机的传感器的动态范围是有限的。当拍摄视频场景的动态范围大于传感器的动态范围时,就会产生高动态范围(highdynamicrange,HDR)问题,即不能识别视频帧中的图像的阴影区域和明亮区域的内容。如何解决在电子设备拍摄视频的过程中,出现的HDR问题,有待进一步研究。
发明内容
本申请实施例提供了一种视频拍摄方法及电子设备,提升了电子设备在拍摄视频过程中的动态范围,提高了拍摄视频效果。
第一方面,本申请提供了一种视频拍摄方法,电子设备包括摄像头模组,摄像头模组包括图像传感器和双转换增益传感器,双转换增益传感器包括第一传感器和第二传感器,第一传感器的转换增益小于第二传感器的转换增益,方法包括:电子设备显示拍摄界面,拍摄界面用于显示摄像头拍摄的图像;在环境亮度小于第一照度值的情况下,电子设备通过第二传感器按照第一感光度将图像传感器输出的第一原始图像处理成第一图像,通过第二传感器按照第二感光度将第一原始图像处理成第二图像,第一感光度小于第二感光度;电子设备将第一图像和第二图像合成第三图像,并在拍摄界面显示第三图像;在环境亮度在第一照度值和第二照度值之间的情况下,电子设备通过第一传感器按照第三感光度将图传感器输出的第二原始图像处理成第四图像,通过第二传感器按照第四感光度将第二原始图像处理成第五图像,第三感光度小于第四感光度,第四感光度小于第二感光度;电子设备将第四图像和第五图像合成第六图像,并在拍摄界面显示第六图像。
其中,双转换增益传感器可以位于图像传感器内部,双转换增益传感器也可以独立于图像传感器。
第一传感器可以被称为低转换增益传感器,第二传感器可以被称为高转换增益传感器。
其中,拍摄界面可以是照片拍摄预览界面,也可以是视频拍摄预览界面,也可以是视频拍摄界面。
第一照度值、第二照度值可以是一个具体值,也可以指一个范围。
通过该方法,一方面可以提升电子设备在拍摄视频过程中的动态范围。另一方面,电子设备可以基于环境亮度,自动切换不同的拍摄模式。具体的,在低亮场景中,第一传感器的性噪比低,第二传感器的性噪比比较高,通过第二传感器分别通输出两帧图像合成视频帧,不会出现噪声分层的问题,且视频帧的成像效果也好。在中亮场景中,第一传感器
的性噪比和第二传感器的性噪比相当,且第一传感器的性噪比和第二传感器的性噪比也比较高,通过第一传感器和第二传感器输出两帧图像合成一帧视频帧,视频帧的成像效果也比较好。
结合第一方面,在一种可能的实现方式中,方法还包括:在环境亮度大于等于第二照度值的情况下,电子设备以第一曝光时长控制图像传感器输出第三原始图像,以第二曝光时长控制图像传感器输出第四原始图像;电子设备通过第一传感器按照第三感光度将第三原始图像处理成第七图像,通过第二传感器按照第四感光度将第三原始图像处理成第八图像;电子设备基于合并方式将第四原始图像处理成第九图像;电子设备将第七图像、第八图像和第九图像合成第十图像,并在拍摄界面显示第十图像。
这样,在高亮场景中,输出长曝光帧图像(第七图像和第八图像)和短曝光帧图像(第九图像),将第七图像和第八图像和第九图像融合得到一帧图像,即第十图像。可以解决高亮场景中,单个像素的满阱容量溢出后,会产生过曝的图像的问题。可以通过第十图像恢复过爆图像。
结合第一方面,在一种可能的实现方式中,拍摄界面还包括录像结束按钮;方法还包括:电子设备接收用户针对录像结束按钮的第一操作;响应于第一操作,电子设备保存第一视频,第一视频包括第三图像和第六图像,或者第一视频包括第三图像、第六图像和第十图像。
这样,该方法可以适用于视频拍摄场景,并基于该方法拍摄得到视频。
结合第一方面,在一种可能的实现方式中,拍摄界面还包括录像开始按钮。
这样,该方法可以适用于视频拍摄预览场景。在视频拍摄预览界面中,电子设备先工作在地动态模式,在确定出环境动态范围大于图像传感器动态范围的情况下,电子设备可以切换至高动态模式,例如低亮高动态模式或者中亮高动态面模式或者高亮高动态模式。那么在电子设备进入视频拍摄界面后,电子设备可以直接以低亮高动态模式或者中亮高动态模式或者高亮高动态模式拍摄得到视频并保存视频。
结合第一方面,在一种可能的实现方式中,方法还包括:在环境亮度在第一照度值和第二照度值之间的情况下,环境亮度越亮,第一传感器的感光度和第二传感器的感光度越小。
这样,在低亮场景中,随着环境变亮,可以逐渐减小得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度。随着环境变暗,可以逐渐增加得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度。这样,电子设备拍摄得到的视频帧也是逐渐变亮或者逐渐变暗的,可以提升视频拍摄效果。
结合第一方面,在一种可能的实现方式中,方法还包括:在环境亮度在第一照度值和第二照度值之间的情况下,环境亮度越亮,第一传感器的感光度和第二传感器的感光度越小。
这样,在中亮场景中,随着环境变亮,可以逐渐减小第一传感器的感光度和第二传感器的感光度。随着环境变暗,可以逐渐增加第一传感器的感光度和第二传感器的感光度。这样,电子设备拍摄得到的视频帧也是逐渐变亮或者逐渐变暗的,可以提升视频拍摄效果。
结合第一方面,在一种可能的实现方式中,第一传感器和第二传感器的曝光时长均为
第一曝光时长。
这样,在模式切换过程中,第一传感器和第二传感器的曝光时长不变,仅改变感光度,避免相邻两帧视频帧出现闪烁的情况,影响视觉效果。
结合第一方面,在一种可能的实现方式中,得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度之间的比值不变。
这样,在低亮场景中,随着环境亮度变亮或者变暗,得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度成比例增加或者减少,避免动态范围的差异。
结合第一方面,在一种可能的实现方式中,第一传感器的感光度和第二传感器的感光度之间的比值不变。
这样,在中亮场景中,随着环境亮度变亮或者变暗,第一传感器和第二传感器的感光度成比例增加或者减少,避免动态范围的差异。
结合第一方面,在一种可能的实现方式中,还包括:在环境亮度大于等于第二照度值的情况下,环境亮度越亮,第一曝光时长不变,第二曝光时长越短。
这样,在高亮场景中,随着环境变亮,可以逐渐减小得到第九图像的曝光时长。随着环境变暗,可以逐渐增加得到第九图像的曝光时长。这样,电子设备拍摄得到的视频帧也是逐渐变亮或者逐渐变暗的,可以提升视频拍摄效果。
结合第一方面,在一种可能的实现方式中,方法还包括:在环境亮度等于第二照度值的情况下,第一曝光时长等于第二曝光时长。
结合第一方面,在一种可能的实现方式中,方法包括:电子设备通过调节第一传感器的模拟增益和/或数字增益调节第一传感器的感光度;电子设备通过调节第二传感器的模拟增益和/或数字增益调节第二传感器的感光度。
结合第一方面,在一种可能的实现方式中,第一传感器还包括第一电容,电子设备通过调节第一传感器的模拟增益和/或数字增益调节第一传感器的感光度,具体包括:在第一电容为LOFIC电容的情况下,电子设备通过调节第一传感器的数字增益调节第一传感器的感光度;在第一电容不是LOFIC电容的情况下,电子设备通过调节第一传感器的模拟增益和/或数字增益调节第一传感器的感光度。
第二方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行如第一方面或第一方面的任意一种实施方式的方法。
第三方面,本申请实施例提供了一种计算机程序产品,包含指令,当该计算机程序产品在电子设备上运行时,使得该电子设备执行如第一方面或第一方面的任意一种实施方式的方法。
第四方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得该电子设备执行如第一方面或第一方面的任意一种实施方式的方法。
对于第二方面至第四方面中有益效果的描述,们可以参考第一方面中有益效果的描述,本申请在此不再赘述。
图1A-图1E为本申请提供的一组UI图;
图2为本申请提供的一种DCG图像的成像原理示意图;
图3为本申请提供的一种DCG图像的动态范围示意图;
图4为本申请提供的一种LCG通路和HCG通路得到的图像在不同照度值下对应的信噪比;
图5A-图5C为本申请提供的另一组UI图;
图6为本申请实施例提供的一种电子设备100的硬件结构示意图;
图7为本申请实施例提供的一种电子设备100的软件结构示意图;
图8A-图8C为本申请提供的一组进入录像预览界面的示意图;
图8D为本申请提供的一种开始录制视频的示意图;
图8E-图8F为本申请实施例提供的一组基于低亮高动态模式输出录制视频帧的示意图;
图8G-图8H为本申请实施例提供的一组基于中亮高动态模式输出录制视频帧的示意图;
图8I为本申请实施例提供的一种基于高亮高动态模式输出录制视频帧的示意图;
图9为本申请实施例提供的一种电子设备100显示预览视频帧和录制视频帧的方法流程示意图;
图10为本申请实施例提供的一种图像传感器在不同工作模式之间切换的示意图;
图11为本申请实施例提供的一种电子设备100软硬件协作的示意图;
图12为本申请提供的一种视频拍摄方法的流程示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或者特性可以包含在本实施例申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是相同的实施例,也不是与其它实施例互斥的独立的或是备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及所述附图中术语“第一”、“第二”、“第三”等是区别于不同的对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤或单元,或者可选地,还包括没有列出的步骤或单元,或者可选地还包括这些过程、方法、产品或设备固有的其它步骤或单元。
附图中仅示出了与本申请相关的部分而非全部内容。在更加详细地讨论示例性实施例之前,应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流
程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
在本说明书中使用的术语“部件”、“模块”、“系统”、“单元”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件或执行中的软件。例如,单元可以是但不限于在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或分布在两个或多个计算机之间。此外,这些单元可从在上面存储有各种数据结构的各种计算机可读介质执行。单元可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一单元交互的第二单元数据。例如,通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。
首先对本申请涉及的术语进行解释。
(1)、环境亮度和亮度场景
环境亮度可以指拍摄物体在接受光线的照射后,其反射光被图像传感器捕捉到的光照强度(或者被称为照度)。基于光照强度的差异,可以将环境亮度划分为不同的亮度场景,亮度场景可以包括但不仅限于高亮场景、中亮度场景、以及低亮场景等。
本申请中所提及的图像传感器的形式,可以是半导体芯片,包括但不限于电荷耦合器件(chargecoupledevice,CCD)和互补金属氧化物(ComplementaryMetal-Oxide-Semiconductor)等。
示例性的,不同的亮度场景可以对应于不同的亮度范围,例如,高亮场景对应的亮度范围可以为大于2000勒克斯(lux),中亮度场景对应的亮度范围可以为2000lux-200lux,低亮场景对应的亮度范围可以为200lux-0ux。
可以理解的是,本申请实施例中描述的亮度场景可以不限于上述三种;并且,该三种亮度场景分别对应的亮度范围仅作为一种示例,不同亮度场景下所对应的亮度范围的取值也可以为其他数值,本申请实施例中对此不做限定。
(2)、ISO
在胶片时代,ISO感光度是衡量传统相机所用的胶片感光速度标准的国际统一指标,感光度是由所购买的胶片决定的,数值是固定的,是胶片本身的一种属性。而数码相机、手机相机是通过电子的图像传感器CCD或者COMS感应入射光线的强弱,为了与传统相机所使用的胶片统一计量单位,引入了ISO感光度的概念,因此数码相机的ISO同样反映了其感光速度。ISO数字越大,代表对光线越敏感,ISO数字越小,代表对光线越不敏感。
以CMOS为例,CMOS的工作原理为:(1)光子进入光电二极管,光电二极管吸收光子的能量被激发产生电子;(2)电子输出到势阱;(3)势阱两端产生模拟的电压信号;(4)使用程控增益放大器对模拟的电压信号进行模拟放大得到放大后的电压信号;(5)将放大后的电压信号输入模拟电路,基于模拟电路中的模拟增益(analoggain,AG)对放大后的电压信号进一步放大;(6)对进一步放大后的电压信号进行模数转换;(7)将数字信号输入数字电路,基于数字电路中的数字增益(digitalgain,DG)对数字信号进行放大。
其中,第(4)步骤中对模拟的电压信号进行放大的放大倍数为转换增益(ConversionGain,CG),第(4)步骤中的CG、第(5)步中的AG和第(7)步骤中的DG合起来可以理解为ISO。在一些实施例中,CG*AG*DG=ISO。其中,CG为固定的。可以通过调节AG和/或DG改变ISO的大小。
通常,像素中允许的电压摆幅(voltageswing)的大小在进行传感器设计时确定,之后电压摆幅是固定不变的。
(3)、动态范围(dynamicrange,DR)
图像传感器具有动态范围,图像传感器的动态范围可以指图像传感器感知拍摄场景中最暗照度值与最亮照度值的能力,即能够体现图像亮度值的能力。在大多数场景下,图像传感器的动态范围越大,图像传感器可感知的光照强度的范围就越广,那么相机拍摄得到的图像中的图像细节就更丰富。图像传感器能够感知的动态范围是有限的,一般由满阱容量(fullwellcapacity,FWC)决定。
满阱容量指的是单个像素点的势阱所能容纳的电子总数。光子照射在图像传感器表面,被吸收的光子会转换为电子,这些电荷存储在像素的势阱中。势阱可以容纳电荷的最大容量就是满阱容量,满阱容量也可以被称为最大阱容。达到满阱容量时会产生过曝的图像。图像传感器的满阱容量越大,单个像素的势阱所能容纳的电子总数越多,也就越不易过曝。
传感器设计好之后,电压摆幅是固定的,ISO可以对传感器的满阱容量产生明显的影响。具体地,假设像素允许的电压摆幅为Vmax,Vmax=CG*ISO*V,其中,V表示势阱两端产生的电压。在Vmax和CG固定的情况下,ISO越大,允许势阱两端产生的模拟电压V越小,也就是说,势阱所能容纳的电子数Q=C*V就越小,满阱容量就越小。其中,C表示势阱的电容,通常情况下,C是不变的。
也就是说,满阱容量会受ISO的影响,ISO越小,满阱容量越大,ISO越大,满阱容量越小,可以通过调节ISO的大小,来调节单个像素的满阱容量大小。
在一些实施例中,动态范围可以基于图像传感器感知到的拍摄场景中的最暗照度值与最亮照度值得到。
示例性的,动态范围的表达式可以是:DR=20log10(bright/dark);其中,DR是指动态范围,bright可以指图像传感器感知的最亮的照度值,dark可以指图像传感器感知的最暗的照度值。通过该表达式可以建立起环境的动态范围与环境的光照强度的对应关系。
(4)、高动态范围HDR
高动态范围HDR场景可以指传感器的动态范围小于拍摄场景的动态范围,拍摄得到的图像不能准确地呈现超出该传感器亮度值范围的场景的内容。例如当环境亮度超出图像传感器的最大动态范围值时,拍摄的图像中缺少亮区内容。当环境亮度小于图像传感器的最小动态范围值时,拍摄的图像缺少暗区细节,成像效果不好。
通常,自然界的动态范围超过100dB,而高端的传感器其动态范围才可达到78dB,消费级传感器的动态范围大约为60dB。在拍摄时,传感器的动态范围如果小于拍摄场景的动态范围,就会产生动态范围溢出问题,相机成像会损失暗区细节或亮区内容。
例如,图像传感器的动态范围为20dB~78dB,而环境的动态范围在1dB~100dB之间。环境的动态范围大于图像传感器的动态范围,拍摄的图像缺少暗区细节和亮区内容,此时成像效果不好。
例如,图1A是本申请实施例提供的一种人眼观察的自然场景图,该场景的亮度值范围为1dB~100dB。其中,第一区域1011的亮度值范围为1dB~15dB,第二区域1012的亮度值范围为80~100dB。
传感器的动态范围在20dB~78dB。由于该场景的动态范围超出了传感器的动态范围,当对该场景进行拍照时,拍摄出来的图像不能准确地呈现超出该传感器亮度值范围的场景的内容。图1B是对图1A中的自然场景进行拍照所得到的效果图,在图1A中第一区域1011的亮度值范围为1dB~15dB,属于阴影区域,第二区域1012的亮度值范围为80dB~100dB,属于明亮区域。由于这两个区域的亮度值范围均超过传感器的亮度值范围,因此,在图1B中出现了HDR问题,即:在图1B中,第一区域整体看起来黑色,分不清该区域中的物体,第二区域整体看起来就是一片白色,分不清蓝天白云。
(5)、双转换增益(dualconversiongain,DCG)
具有DCG能力的图像传感器,一个像素有两个势阱,两个势阱对应不同的满阱容量以及不同的转换增益,大满阱容量对应低转换增益(lowconversiongain,LCG)、低感光度,小满阱容量对应高转换增益(highconversiongain,HCG)、高感光度。这样,图像传感器可以在同一场景下使用两个势阱(两种感光度)和两种转换增益,一次曝光获取两张图像:高感光模式下的图像和低感光模式下的图像,高感光模式下的图像和低感光模式下的图像的采集时刻相同,高感光模式下的图像和低感光模式下的图像的曝光时间也相同。再由电子设备将高感光模式下的图像和低感光模式下的图像合成一张图像,得到DCG图像。其中,高感光模式下的图像旨在恢复暗区细节,低感光模式下的图像旨在压制过曝区域,恢复亮区内容。这样,可以通过HCG降低图像传感器可感知的最小动态范围值,通过LCG提高图像传感器可感知的最大动态范围值,从而提高了图像传感器的动态范围。
示例性的,对于普通的图像传感器来说,可感知的动态范围为20dB~78dB之间,而具有DCG能力的图像传感器来说,可感知的动态范围可以达到1dB~100dB之间。
例如,环境的动态范围在10dB~80dB之间,而具有DCG能力的图像传感器的动态范围也在1dB~100dB之间,那么具有DCG能力的图像传感器可以获取到拍摄的图像的暗区细节和亮区内容,成像效果比较好。
在图像传感器的动态范围小于环境的动态范围的情况下,可以通过DCG方案提升图像传感器的动态范围。具体的,可以通过LCG输出低感光模式下的图像,通过HCG输出高感光模式下的图像,低感光模式下的图像可用于压制过曝区域,恢复亮区内容,高感光模式下的图像可用于恢复暗区细节。
示例性的,图1C为图像传感器输出的低感光模式下的图像,从图1C可以发现,在该图像的暗光区域(例如,第一区域1011)的物体比较清晰,在该图像的强光区域的内容不能显示清楚(例如,无法区分第二区域1012中的蓝天白云)。
示例性的,图1D为图像传感器输出的高感光模式下的图像,从图1D可以发现,在该
图像的暗光区域的内容不能显示清楚(例如,在第一区域1011显示出来一片黑色,无法区分该区域中的物体),在该图像的强光区域能清楚显示内容(例如,可以清楚地分清第一区域3012中的蓝天白云)。
将图1C所示的低感光模式下的图像和图1D所示的高感光模式下的图像合成,可以得到图1E所示的DCG图像。从图1E中可以看出,DCG图像中的暗光区域和强光区域的内容都清楚的显示出来(例如,第一区域1011中的物品和第二区域1012中的蓝天白云都清楚地显示出来)。
图2示出了DCG图像的成像原理。
如图2所示,binning(合并)是一种图像读出模式。电子设备在拍摄图像的过程中,目标对象反射的光线被摄像头采集,以使得该反射的光线传输至图像传感器。图像传感器上包括多个感光元件,每个感光元件采集到的电荷为一个像素。将相邻的像元中感应的电荷加在一起,以一个像素的模式读出,并对像素信息执行binning操作。具体地说,binning可以将n×n个像素合并为一个像素。例如,binning可以是将相邻的2×2个像素合成为一个像素,也就是说,相邻2×2个像素的像素信息以一个像素的形式呈现。示例性的,如图2所示,当图像为一个4×4的像素时,binning可以将相邻的2×2个像素合成为一个像素,使得图像传感器可以将4×4的图像合并为2×2的图像,并将该2×2的图像作为图像传感器得到的binning图像,该binning图像是一帧图像。通过像素合并模式输出图像,可以增加像素的感光面积,以提升暗区对光感应的灵敏度。
当图像传感器支持DCG能力时,图像传感器可以通过DCG的方式输出图像,以提升图像的动态范围,提高图像的成像效果。
如图2所示,图像传感器在将相邻的n×n个像素合成一个像素之后,在基于合成的像素输出图像之前,图像传感器可以进一步的使用两种转换增益,例如分别基于HCG通路以及LCG通路得到两种转换增益下的出图数据,例如可以将合成后的像素输入LCG通路合成低感光模式下的图像,将合成后的像素输入HCG通路合成高感光模式下的图像。具体的,图像传感器将合成的像素分别经过LCG电路、模拟放大、模数转换、数字放大后输出LCG图像。图像传感器将合成的像素分别经过HCG电路、模拟放大、模数转换、数字放大后输出HCG图像。图像传感器再将LCG图像和HCG图像进行融合,得到融合后的DCG图像,并输出DCG图像。需要说明的是,LCG通路和HCG通路中的ISO不同,对应的LCG图像和HCG图像的动态范围不同。
如图3所示,HCG图像的动态范围可以是10dB-50dB,LCG图像的动态范围可以是20dB-100dB,最后合成得到的DCG图像的动态范围可以是10dB-100dB。这样,提升了图像传感器成像的动态范围。
(6)、信噪比
衡量图像好坏的重要标准是图像的信躁比(signalnoiseratio,SNR)。通过LCG通路和HCG通路得到的图像的信噪比有以下特征。
图4示出了LCG通路和HCG通路得到的图像在不同照度值下对应的信噪比。从图4中可以看出,HCG通路在低照度值场景(也可以说是低亮场景)下,输出的HCG图像的
信噪比较高,图像比较清晰。LCG通路在低照度值场景(也可以说是低亮场景)下,输出的LCG图像的信噪比发生了明显衰减,图像比较模糊。
那么在低亮场景下,若将HCG图像和LCG图像合并得到DCG图像,虽然提高了成像的动态范围,但是HCG图像和LCG图像的融合部分会出现明显的噪声分层。
示例性的,图5A示出了在低亮场景下通过LCG通路输出的LCG图像。从图5A和图1C对比可以看出,在低亮场景下,LCG通路输出的LCG图像信噪比降低,图像模糊。
图5B示出了在低亮场景下通过HCG通路输出的HCG图像,从图5B中可以看出,在低亮场景下,HCG通路输出的HCG图像比LCG通路输出的LCG图像清晰。
将图5A所示的LCG图像和图5B所示的HCG图像进行合成,可以得到图5C所示的DCG图像。从图5C中可以看出,DCG图像中第二区域1012中的蓝天白云都清楚地显示出来,由于第二区域1012中的蓝天白云是从HCG图像中合成的。但是第一区域1011中的物品图像是从LCG图像中合成的,而LCG图像的信噪比和HCG图像的信噪比差异较大,图5C中第一区域1011中的物品图像和其他区域的图像的清晰度不一致,出现了噪声分层。
因此,通过HCG通路得到的HCG图像更适合应用在低亮场景下。
基于上述介绍,在拍摄视频场景中,当图像传感器的动态范围小于环境的动态范围时,可以通过DCG能力提升图像传感器的动态范围,从而提升视频帧的动态范围。但是,DCG方案在太暗或者太亮的场景中存在以下弊端。
在低亮场景(例如夜景模式)中,光照强度较弱,图像传感器可感知的照度值也比较低。若通过LCG通路和HCG通路分别输出两帧图像帧合成DCG图像,将DCG图像作为在低亮场景下获取到的视频帧,由图4、图5A和图5C实施例可知,HCG通路输出的HCG图像和LCG通路输出的LCG图像,在低亮场景下,合成的图像会出现明显的噪声分层,成像效果不好。
在高亮场景(例如室外场景)中,光照强度较强,图像传感器可感知的照度值也比较高,而单个像素的满阱容量也是有限的。当环境太亮,导致单个像素的满阱容量溢出后,会产生过曝的图像。此时成像效果也不好。
因此,通过DCG方案,也没办法解决在不同亮度场景下出现的成像效果不好的问题。
基于此,为了解决在录像中出现的成像效果不好的问题,本申请提供了一种视频拍摄方法,可以在不同亮度场景中,提升视频拍摄效果。
该录像可以包括开始录像前的预览状态和开始录像后的预览状态。
图像传感器可以实时监测环境亮度和环境动态范围。
在环境动态范围小于图像传感器的动态范围的情况下,图像传感器可以工作在低动态模式,并以binning方式输出视频帧。
在环境动态范围大于图像传感器的动态范围的情况下,图像传感器可以从低动态模式切换至高动态模式。在高动态模式下,可以提升图像传感器的动态范围,使得高动态模式下图像传感器的动态范围大于环境动态范围。
在图像传感器切换至高动态模式后,图像传感器可以判断环境亮度,并基于环境亮度
确定出图像传感器的工作模式。不同环境亮度范围内,高动态模式下图像传感器的工作模式不同。这样,可以提升图像传感器在高动态模式下的成像效果,避免在低亮场景中出现噪声分成或者在高亮场景中出现过曝的图像。对于高动态模式下图像传感器的各个工作模式以及如何切换高动态模式下图像传感器的各个工作模式的,可以参考下文中的详细描述。
本申请以下实施例将以开始录像后的预览状态中,图像传感器如何切换工作模式为例进行说明。
下面,对电子设备100的硬件结构进行介绍。
电子设备100可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobilepersonalcomputer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personaldigitalassistant,PDA)、增强现实(augmentedreality,AR)\虚拟现实(virtualreality,VR)设备等。本申请实施例对该电子设备100的具体类型不作特殊限制。
请参见图6,图6是本申请实施例提供的一种电子设备100的硬件结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universalserialbus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriberidentificationmodule,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(applicationprocessor,AP),调制解调处理器,图形处理器(graphicsprocessingunit,GPU),图像信号处理器(imagesignalprocessor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digitalsignalprocessor,DSP),基带处理器,和/或神经网络处理器(neural-networkprocessingunit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像
处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquidcrystaldisplay,LCD),有机发光二极管(organiclight-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganiclightemittingdiode的,AMOLED),柔性发光二极管(flexlight-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantumdotlightemittingdiodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(chargecoupleddevice,CCD)或互补金属氧化物半导体(complementarymetal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universalflashstorage,UFS)等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺
仪传感器180B可以用于拍摄防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。
在本申请实施例中,电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
如图7所示,该电子设备可包括:应用程序层、应用程序框架、硬件抽象层(hardwareabstractionlayer,HAL)层及内核层(kernel)。其中:
应用程序层可以包括一系列应用程序包。如图7所示,应用程序包可以包括相机应用,图库,日历,地图,音乐,短信息,通话等应用程序。应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramminginterface,API)和编程框架。应用程序
框架层包括一些预先定义的函数。如图7所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
硬件抽象层可以包括多个功能模块。例如,感知模块、图像处理器等。
其中,感知模块用于基于图像传感器采集的帧视频帧,确定出环境的动态范围和环境亮度。并基于环境的动态范围和环境亮度确定出图像传感器的工作模式,实现动态切换图像传感器的工作模式。例如,感知模块连续m帧均确定出环境的动态范围大于图像传感器的动态范围,那么感知模块可以确定出图像传感器需要切换至高动态模式。感知模块再基于感知的环境亮度确定出高动态模式下图像传感器的工作模式,不同环境亮度范围内,高动态模式下图像传感器的工作模式不同。
图像处理器,用于对视频帧进行前处理和后处理,得到预览视频帧和录制视频帧。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动等。
摄像头驱动用于当接收到位于应用程序层的相机应用发送的触发命令时,触发摄像头开启。
硬件层主要包括显示屏和相机模组中的组件,例如摄像头等,摄像头可以包括镜头、镜片和图像传感器等。上述组件用于在内核层中相应驱动的控制下,开启工作。例如,摄像头可以在摄像头驱动的控制下,开启并采集图像。摄像头中的图像传感器也可以在内核层中摄像头驱动的控制下,切换摄像头中图像传感器的工作模式。
下面介绍本申请提供的一些拍摄的场景。
1、进入录像预览界面(图8A~图8C)。
图8A示例性示出了电子设备100上的用于展示电子设备100安装的应用程序的示例性用户界面710。
用户界面710显示了一个放置有应用图标的页面,该页面可包括多个应用图标(例如,天气应用图标、日历应用图标、相册应用图标、便签应用图标、电子邮件应用图标、应用商店应用图标、设置应用图标等等)。上述多个应用图标下方还可显示有页面指示符,以表明当前显示的页面与其他页面的位置关系。页面指示符的下方有多个应用图标(例如,相机应用图标711、浏览器应用图标、信息应用图标、拨号应用图标)。应用图标在页面切换时保持显示。
可理解,相机应用图标711为相机应用程序的图标。相机应用图标711可以用于触发启动相机应用程序。相机应用程序是智能手机、平板电脑等电子设备上的一款图像拍摄的应用程序,本申请对该应用程序的名称不做限制。
需要说明的是,图8A所示的用户界面710仅为本申请提供的一个示例,不应视为对本申请的限制。也就是说,用户界面710可以显示更多或更少的内容,本申请对此不作限定。
电子设备100可以检测到作用于相机应用图标711的用户操作(比如触摸/点击操作),响应于该操作,电子设备100可以显示图8B所示的拍摄界面720。拍摄界面720可以是相机应用程序的默认拍照模式的用户界面,用户可以在该界面上预览图像并完成拍照。也就是说,用户可以通过点击相机应用图标711来打开相机应用程序的拍摄界面720。
可理解,本申请中所提及的用户操作可以包括但不限于触摸、点击、声控、手势等操作,本申请对此不作限制。
如图8B所示,拍摄界面720可包括模式栏721、拍摄控件722、预览窗723、回看控件724、摄像头翻转控件725和快捷功能区726。
模式栏721中可包括有多个拍摄模式选项,例如“夜景”、“人像”、“拍照”、“录像”等等。不同的拍摄模式可为用户提供不同效果的拍摄服务。用户可根据不同的需求选择多个拍摄模式中的任一拍摄模式进行拍摄。例如,“拍照”可以为默认的拍摄模式,用于拍摄照片。“录像”用于录制视频。“夜景”模式适用于光线较暗的拍摄场景,例如夜晚。“人像”模式适用于拍摄主体为人物的拍摄场景。电子设备100还可提供更多拍摄模式,例如“大光圈”、“电影”、“专业”等等,这里不再一一例举说明。
拍摄控件722用于触发拍照。电子设备100可检测是否有作用于拍摄控件722的用户操作,例如点击操作。当检测到作用于拍摄控件722的用户操作后,电子设备100可生成拍照指令。电子设备100可根据拍照指令获取对应时间戳摄像头上报的图像,然后保存为照片。
预览窗723可用于实时地显示摄像头上报的图像。在不同的拍摄模式下,电子设备100可对摄像头上报的图像进行处理,提升图像的显示效果。例如,在“人像”模式下,电子设备100可对摄像头上报的图像中的背景进行虚化以凸显人像。这里,预览窗723可实时地显示经过不同拍摄模式对应的图像处理算法处理后的图像,以使得用户可以实时地感知不同拍摄模式对应的拍摄效果。
回看控件724可用于浏览已拍摄的照片/视频的缩略图。当检测到作用于回看控件724的用户操作后,电子设备100也可显示该缩略图对应的最佳照片。
摄像头翻转控件725可用于监测触发翻转摄像头的用户操作。电子设备100可以检测
到作用于摄像头翻转控件725的用户操作,例如触摸操作,响应于该操作,电子设备100可以翻转用于拍摄的摄像头,例如将后置摄像头切换为前置摄像头,或者将前置摄像头切换为后置摄像头。
快捷功能区726可包括主角录像模式的控件726A、AI场景识别控件726B、闪光灯控件726C、色彩模式控件726D、设置控件726E等。主角录像模式的控件726A可用于在开启时触发电子设备100识别预览画面中多个人物中的主角人物。AI场景识别控件726B可用于在开启时触发电子设备100识别预览画面中的拍摄场景,当前AI场景识别控件726B处于关闭状态。闪光灯控件726C可用于触发电子设备100开启或关闭闪光灯。色彩模式控件726D可用于触发电子设备100使用色彩滤镜对摄像头采集到的图像进行处理。该设置控件726E可用于设置电子设备100的拍摄参数(例如,图像尺寸、图像的存储格式,等等)。
拍摄界面720中还可以包含更多或更少的控件,本申请实施例对此不作限定。
电子设备100可检测到作用于模式栏721中拍摄模式选项的用户操作,并根据上述用户操作变更当前所使用的拍摄模式。上述用户操作例如左滑/右滑操作。例如,当检测到拖拽模式栏721向左滑动(左滑操作)并使得浮标停止在“录像”选项时,电子设备100可切换到“录像”模式,并显示图8C所示的录像界面810。录像界面810也可以被称为录像预览界面。
如图8C所示,在进入“录像”模式后,电子设备100可以在预览窗723中显示预览视频帧,电子设备100可将原来“拍照”模式对应的预览界面切换为“录像”模式对应的预览界面。具体的,电子设备100可将原来“拍照”模式的拍摄控件722切换为“录像”模式的开始录像控件812。同时,电子设备100可在预览窗723中显示时间戳控件811。时间戳控件811用于指示已录制视频的时长。在开始录制视频之前,时间戳控件811中显示的时间为0。在开始录制视频之后,时间戳控件811中显示的时间随着录制视频时长增加而增加。
可选的,在电子设备100进入“录像”模式并显示录像预览界面之后,电子设备100可以开始判断环境动态范围。并确定进入低动态模式还是高动态模式。
2、若环境动态范围小于图像传感器动态范围,图像传感器工作在低动态模式,并基于低动态模式输出预览视频帧。
若环境动态范围大于图像传感器动态范围,图像传感器工作在高动态模式,并基于高动态模式输出预览视频帧。
可选的,在电子设备100进入“录像”模式并显示录像预览界面之后,电子设备100可以开始判断环境动态范围。并确定进入低动态模式还是高动态模式。这样,若环境动态范围大于电子设备100中图像传感器的动态范围时,在电子设备100开始拍摄视频之前,图像传感器已经进入高动态模式了,图像传感器可以基于高动态模式输出预览视频帧。在电子设备100开始拍摄视频之后,图像传感器可以直接基于高动态模式输出录制视频帧。
在电子设备100进入“录像”模式并显示录像预览界面之后,电子设备100可以基于预览视频帧确定出环境动态范围和图像传感器动态范围的大小关系。
若电子设备100基于连续n帧预览视频帧均确定出环境动态范围大于图像传感器动态
范围的情况下,n为大于等于1的正整数,电子设备100可以将图像传感器由低动态模式切换为高动态模式。反之,则图像传感器工作在低动态模式。可选的,电子设备100中图像传感器默认的工作模式为低动态模式。
其中,低动态模式,可以指电子设备100通过binning方式生成视频帧。低动态模式下,图像传感器的动态范围是没有改变的。
高动态模式,可以指图像传感器通过双感光模式,或者通过长曝光和短曝光模式,提升图像传感器的动态范围。图像传感器在高动态模式下的工作模式又可以分为低亮高动态模式、中亮高动态模式和高亮高动态模式。对于高动态模式的具体解释,可以参考下文的介绍。
在电子设备100的图像传感器切换至高动态模式之前,还需要确定出切换至高动态模式中的哪一种工作模式。基于前述介绍,在低亮场景(例如夜景)下,通过HCG通路输出的HCG图像和LCG通路输出的LCG图像,合成的图像会出现噪声分层,成像效果不好。
在高亮场景(例如室外场景)中,单个像素的满阱容量也是有限的,当环境太亮,导致单个像素的满阱容量溢出后,会产生过曝的图像。此时成像效果也不好。
因此,电子设备100还需要判断环境亮度,并基于环境亮度进入高动态模式中的不同工作模式。
示例性的,若电子设备100基于预览视频帧确定出环境动态范围大于电子设备100中图像传感器的动态范围,且环境亮度小于第一照度值,则电子设备100可以控制图像传感器进入低亮高动态模式。
若电子设备100基于预览视频帧确定出环境动态范围大于电子设备100中图像传感器的动态范围,且环境亮度大于第一照度值小于第二照度值,则电子设备100可以控制图像传感器进入中亮高动态模式。
若电子设备100基于预览视频帧确定出环境动态范围大于电子设备100中图像传感器的动态范围,且环境亮度大于第二照度值,则电子设备100可以控制图像传感器进入高亮高动态模式。
示例性的,如图8D所示,在电子设备100确认出环境动态范围大于电子设备100中图像传感器的动态范围,且环境亮度小于第一照度值的情况下,图像传感器可以基于低亮高动态模式输出预览视频帧,并将预览视频帧显示在图8D所示的预览窗723中。
电子设备100可以接收用户针对开始录像控件812的用户操作,开始录制视频。
如图8D所示,电子设备100可检测到作用于开始录像控件812的用户操作。响应于上述操作,电子设备100可开始录制视频。对应的,电子设备100可显示图8E所示的视频录制界面。电子设备100可将原来开始录像控件812切换为结束录像控件814。
如图8E所示,录像界面810还可包括控件813。控件813可用于在录像过程中接收用户的拍摄操作,抓拍照片并保存照片。
可选的,在其他实施例中,电子设备100也可以在开始拍摄视频后,才基于录制视频帧确定出环境动态范围和图像传感器动态范围的大小关系,在确定是否切换图像传感器的
工作模式,本申请对此不做限定。
(1)、环境亮度小于第一照度值,图像传感器工作在低亮高动态模式,并基于低亮高动态模式输出录制视频帧(图8E-图8F)。
如图8E所示,电子设备100中的图像传感器可以基于低亮高动态模式输出录制视频帧,并将录制视频帧显示在图8E所示的预览窗723中。
可选的,若在电子设备100录制视频的过程中,由于拍摄位置的变化,或者自然环境的变化,导致环境亮度变亮或者变暗。在环境亮度还是小于第一照度值的情况下,图像传感器还是工作在低亮高动态模式下,电子设备100可以改变图像传感器的感光度,使得图像传感器合成的录制视频帧的亮度是缓慢变亮或者缓慢变暗的,避免录制视频帧的亮度突变影响用户的视觉体验。
例如,在环境亮度变暗的情况下,电子设备100可以调高图像传感器的感光度,使得图像传感器合成的录制视频帧的亮度是缓慢变暗的。
再例如,在环境亮度变亮的情况下,电子设备100可以降低图像传感器的感光度,使得图像传感器合成的录制视频帧的亮度是缓慢变亮的。示例性的,如图8F所示,在环境亮度变亮但是环境亮度小于第一照度值的情况下,电子设备100可以显示在图8F所示的录制视频帧。图8F所示的录制视频帧的亮度比图8E所示的录制视频帧的亮度高。
随着录制时间的延长,时间戳控件811中显示的时间也逐渐延长。
在一些实施例中,若环境亮度变亮后,导致环境亮度大于第一照度值但是小于第二照度值,那么电子设备100可以控制图像传感器进入中亮高动态模式。
可选的,电子设备100可以在连续m帧视频帧均确定出环境亮度大于第一照度值小于第二照度值的情况下,电子设备100可以控制图像传感器进入中亮高动态模式。m为大于等于1的正整数。
(2)、环境亮度大于第一照度值小于第二照度值,图像传感器工作在中亮高动态模式,并基于中亮高动态模式输出录制视频帧(图8G-图8H)。
如图8G所示,电子设备100中的图像传感器可以基于中亮高动态模式输出录制视频帧,并将录制视频帧显示在图8G所示的预览窗723中。
可选的,若在电子设备100录制视频的过程中,由于拍摄位置的变化,或者自然环境的变化,导致环境亮度变亮或者变暗。在环境亮度还是大于第一照度值小于第二照度值的情况下,图像传感器还是工作在中亮高动态模式下,电子设备100可以改变图像传感器的感光度,使得图像传感器合成的录制视频帧的亮度是缓慢变亮或者缓慢变暗的,避免录制视频帧的亮度突变影响用户的视觉体验。
例如,在环境亮度变暗的情况下,若环境亮度小于第一照度值,则电子设备100可以将图像传感器的工作模式切换至低亮高动态工作模式。
例如,在环境亮度变暗的情况下,但是环境亮度大于第一照度值小于第二照度值,电子设备100可以调高图像传感器的感光度,使得图像传感器合成的录制视频帧的亮度是缓慢变暗的。
再例如,在环境亮度变亮的情况下,但是环境亮度大于第一照度值小于第二照度值,
电子设备100可以降低图像传感器的感光度,使得图像传感器合成的录制视频帧的亮度是缓慢变亮的。示例性的,如图8H所示,在环境亮度变亮但是环境亮度大于第一照度值小于第二照度值的情况下,电子设备100可以显示在图8H所示的录制视频帧。图8H所示的录制视频帧的亮度比图8G所示的录制视频帧的亮度高。
随着录制时间的延长,时间戳控件811中显示的时间也逐渐延长。
在一些实施例中,若环境亮度变亮后,导致环境亮度大于第二照度值,那么电子设备100可以控制图像传感器进入高亮高动态模式。
可选的,电子设备100可以在连续m帧视频帧均确定出环境亮度大于第二照度值的情况下,电子设备100可以控制图像传感器进入高亮高动态模式。
(3)、环境亮度大于第二照度值,图像传感器工作在高亮高动态模式,并基于高亮高动态模式输出录制视频帧(图8I)。
高亮高动态模式与中亮高动态模式或者低亮高动态模式不同,不同之处在于,高亮高动态模式对应高亮环境。在高亮环境中,像素的满阱容量也是有限的,并且已经到达最大值,导致像素的势阱无法承载更多的电荷导致电荷溢出,会导致图像过爆。为了恢复过爆图像,电子设备100可以通过短曝光获取到一帧录制视频帧,并通过该短曝光录制视频帧恢复过爆图像。
如图8I所示,电子设备100中的图像传感器可以基于高亮高动态模式输出录制视频帧,并将录制视频帧显示在图8I所示的预览窗723中。
可选的,若在电子设备100录制视频的过程中,由于拍摄位置的变化,或者自然环境的变化,导致环境亮度变亮或者变暗。在环境亮度还是大于第二照度值的情况下,图像传感器还是工作在高亮高动态模式下,电子设备100可以改变短曝光帧的曝光时长,使得图像传感器合成的录制视频帧的亮度是缓慢变亮或者缓慢变暗的,避免录制视频帧的亮度突变影响用户的视觉体验。
例如,在环境亮度变暗的情况下,若环境亮度小于第二照度值,则电子设备100可以将图像传感器的工作模式切换至中亮高动态工作模式。
在环境亮度变暗的情况下,但是环境亮度大于第二照度值,电子设备100可以调高短曝光帧的曝光时长,使得图像传感器合成的录制视频帧的亮度是缓慢变暗的。
再例如,在环境亮度变亮的情况下,但是环境亮度大于第二照度值,电子设备100可以降低短曝光帧的曝光时长,使得图像传感器合成的录制视频帧的亮度是缓慢变亮的。
随着录制时间的延长,时间戳控件811中显示的时间也逐渐延长。
可选的,上述实施例仅是将图像传感器在高动态模式下的工作模式分为了三类,即低亮高动态模式、中亮高动态模式和高亮高动态模式。在其他实施例中,不仅限于这三类高动态工作模式,还可以将图像传感器在高动态模式下的工作模式划分为更多或者更少的类别,本申请对此不做限定。
在一些实施例中,在将电子设备100中图像传感器切换至高动态之前,电子设备100确定出环境亮度大于第二照度值。电子设备100可以先切换至中亮高动态模式,在逐渐减
小图像传感器的感光度。之后,再将电子设备100中图像传感器切换至高亮高动态模式。这样,使得电子设备100生成的录制视频帧的亮度是逐渐变亮的。
在一些实施例中,在将电子设备100中图像传感器切换至高动态之前,电子设备100确定出环境亮度大于第二照度值。电子设备100也可以直接将图像传感器切换至高亮高动态模式。
从上述图8D-图8E所示的实施例中可以看出,随着环境亮度的变化,电子设备100可以动态切换图像传感器的工作模式,不仅提升了电子设备100拍摄视频的动态范围,视频中录制视频帧的亮度也可以随着环境亮度的变化而变化,提升了录制视频帧的成像效果。
下面,结合图9,对电子设备100如何显示预览视频帧和录制视频帧的具体流程进行详细说明。请参见图9,图9是本申请实施例提供的一种视频拍摄方法的流程图。该方法的实现可基于电子设备内的应用层(如相机应用)、硬件抽象层(hardwareabstractlayer,HAL)之间的交互合作,其中应用层主要涉及相机应用中的CameraUI、存图模块这几个模块;HAL层主要涉及感知模块。如图9所示,电子设备显示预览视频帧和录制视频帧的具体流程如下:
显示视频预览界面并显示预览视频帧(S901-S915)。
S901、启动相机应用。
系统桌面可检测到用户打开相机应用的操作,例如用户点击“相机”的桌面图标。示例性的,如上述图8A实施例所示,当系统桌面检测到针对相机应用图标711的输入操作后,启动CameraUI模块。当相机应用启动完成后,CameraUI模块可以显示上述图8B所示的拍摄界面720。相机应用为电子设备100中具有拍照功能的应用程序。CameraUI模块可负责相机应用的人机交互,例如控制拍摄界面及其中的界面元素的显示及响应拍摄界面中发生的用户操作。
S902、CameraUI模块接收用户的第一输入操作。
示例性的,第一输入可以为针对模式栏721中拍摄模式选项的用户操作,例如,第一输入可以是拖拽模式栏721向左滑动的用户操作,并使得浮标停止在“录像”选项。
S903、响应于第一输入操作,CameraUI模块显示录像预览界面。
响应于第一输入操作,电子设备100进入“录像”模式,并显示图8C所示的录像预览界面。CameraUI模块可以在预览窗723中显示预览视频帧。
S904、响应于第一输入操作,图像传感器基于低动态模式输出预览视频帧。
在进入“录像”模式后,电子设备100默认图像传感器是以低动态模式输出预览视频帧的。也就是说,低动态模式下,不会调整图像传感器的动态范围,电子设备100通过binning方式生成预览视频帧。
S905、图像传感器将实时生成的预览视频帧发送至感知模块。
S906、图像传感器将实时生成的预览视频帧发送至CameraUI模块。
图像传感器在生成预览视频帧之后,图像传感器将预览视频帧分别发送至感知模块和CameraUI模块。
感知模块可以基于预览视频帧获取到环境亮度和环境动态范围。
CameraUI模块可将预览视频帧显示在预览窗723中。
S906也可以在S905之前执行,S906也可以和S905同时执行,本申请对此不做限定。
S907、CameraUI模块在预览窗中显示低动态模式输出的预览视频帧。
CameraUI模块在接收到图像传感器发送的预览视频帧后,CameraUI模块可以将图像传感器基于低动态模式输出的预览视频帧显示在预览窗723中。
示例性的,图像传感器基于低动态模式输出的预览视频帧可以是图8C中预览窗723内显示的预览视频帧。
S905和S907可以是实时性/周期性/不定时执行的,使得CameraUI模块可以刷新预览窗723中显示的预览视频帧。
S908、感知模块基于预览视频帧获取到环境动态范围和环境亮度。
S908也可以在S907之前执行,S908也可以和S907同时执行,本申请对此不做限定。
S909、感知模块将环境动态范围和环境亮度发送至图像传感器。
感知模块在获取到环境动态范围和环境亮度之后,将环境动态范围和环境亮度发送至图像传感器。
可选的,感知模块可以基于预览视频帧的灰度直方图或者平均亮度数值的方式,确定出环境亮度。
由之前描述可知,可以基于环境亮度的照度值划分为不同的亮度场景。例如低亮场景、中亮场景和高亮场景。不同亮度场景的亮度范围不同,例如低暗场景的照度值小于第一照度值,中亮场景的照度值大于第一照度值小于第二照度值,高亮场景的照度值大于第二照度值。
在一种可能的实现方式中,电子设备100内存储有不同亮度场景对应的灰度直方图,灰度直方图用于表示图像中像素点的亮度分布情况,该亮度可以理解为图像为YUV格式时的亮度。
每一种亮度场景下可以包括一个或多个灰度直方图。感知模块可以基于预览视频帧得到预览视频帧的灰度直方图。并分别计算该预览视频帧的灰度直方图和不同亮度场景对应的灰度直方图的相似度,在相似度大于第一阈值的情况下,感知模块可以确定出当前的亮度场景。例如,若感知模块计算该预览视频帧的灰度直方图和低亮场景下预置的灰度直方图的相似度大于第一阈值,则感知模块可以确定出当前拍摄场景为低亮场景,并确定当前的环境亮度。
在其他可能的实现方式中,感知模块可以分别统计预览视频帧中的像素点的平均照度值,并基于平均照度值,确定出环境亮度,进而确定出亮度场景。例如,感知模块确定出预览视频帧中的像素点的平均照度值小于第一照度值,那么感知模块可以确定出当前拍摄场景为低亮场景,预览视频帧中的像素点的平均照度值即为当前的环境亮度。
不仅限于以上两种实现方式,感知模块还可以通过其他的方式确定出环境亮度,本申请对此不做限定。
S906,S908和S909也可以是实时性/周期性/不定时执行的,使得图像传感器可以基于环境动态范围和环境亮度动态切换不同的工作模式。
可选的,也可以不执行S906、S908和S909。可以通过另外的测光传感器确定环境亮度和环境动态范围。电子设备100的摄像头中可以设置有测光传感器。可理解,测光传感器可以用于测定被摄对象反射的光亮度。即反射式测光。测光传感器可以包括测光元件。入射光线通过电子设备100的镜头以及反光板折射,进入内置的测光传感器,测光传感器可以获取到环境亮度以及环境动态范围。
S910、图像传感器需确认出环境动态范围是否大于图像传感器的动态范围。
图像传感器的动态范围在出厂时已经设置好了。图像传感器在接收感知模块发送的环境动态范围和环境亮度后,可以比较环境动态范围的图像传感器的动态范围的大小关系。
在环境动态范围大于图像传感器的动态范围的情况下,执行S911,图像传感器切换至高动态模式。
如图8C所示,当图像传感器的动态范围小于环境动态范围时,图像传感器基于低动态模式输出的预览视频帧中的图像细节看不清楚,例如,图8C中的亮区内容(例如蓝天白云)和暗区细节(物品)看不清楚。
在环境动态范围小于图像传感器的动态范围的情况下,执行S914,图像传感器还是工作在低动态模式。
可选的,在图像传感器基于连续n帧预览视频帧均确认出环境动态范围大于图像传感器的动态范围的情况下,n为大于等于1的正整数,图像传感器再执行S911。反之,图像传感器执行S914。
S911、图像传感器需确认出环境亮度是否大于第一照度值。
由前述描述可知,在中亮场景下,HCG通路输出的HCG图像和LCG通路输出的LCG图像的信噪比均比较好。但是随着环境亮度降低,在低亮场景(例如夜景)下,LCG通路输出的LCG图像的信噪比会发生明显衰减,那么通过HCG通路输出的HCG图像和LCG通路输出的LCG图像合成的预览视频帧会出现明显的噪声分层,成像效果不好。
随着环境亮度升高,高亮场景(例如室外场景)中,单个像素的满阱容量也是有限的,当环境太亮,导致单个像素的满阱容量溢出后,会产生过曝的图像。通过HCG通路输出的HCG图像和LCG通路输出的LCG图像合成的预览视频帧会出现过爆区域,成像效果也不好。
那么图像传感器可以在高动态模式下,可以基于不同的环境亮度范围切换不同的工作模式,以解决上述低亮场景或者高亮场景中存在的成像问题。
因此,图像传感器在确定出进入高动态模式之前,需要获取到环境亮度,并基于不同的环境亮度范围切换不同的高动态工作模式。
导致环境动态范围大于图像传感器的动态范围的原因,可以是环境过亮导致环境动态范围大于图像传感器的动态范围,也可以是环境太暗导致环境动态范围小于图像传感器的动态范围。因此图像传感器还需确认出环境亮度是否大于第一照度值。
在环境亮度小于第一照度值的情况下,说明是环境过暗导致环境动态范围大于图像传感器的动态范围,那么图像传感器可以切换至低亮高动态工作模式。即执行S912。
在环境亮度大于第一照度值的情况下,说明是环境过亮导致环境动态范围大于图像传
感器的动态范围,那么图像传感器可以切换至中亮高动态工作模式。即执行S913。
可选的,环境亮度大于第一照度值,可以包括环境亮度大于第二照度值和环境亮度大于第一照度值小于第二照度值这两种情况。即环境亮度大于第一照度值,可以包括高亮场景和中亮场景这两种情况。
若当前亮度场景为中亮场景,图像传感器可以先切换至中亮高动态工作模式。
若当前亮度场景为高亮场景,图像传感器可以先切换至中亮高动态工作模式,再切换至高亮高动态工作模式,可以使得电子设备100显示的预览视频帧的亮度是逐渐变亮的过程。
若当前亮度场景为高亮场景,图像传感器也可以直接切换至高亮高动态工作模式,本申请对此不做限定。
需要说明的是,S910和S911也可以由感知模块执行。在感知模块确定出图像传感器需要由低动态模式切换为低亮高动态模式时,感知模块可以向图像传感器发送切换通知,图像传感器在接收到通知后切换至低亮高动态模式。
在感知模块确定出图像传感器需要由低动态模式切换为中亮高动态模式时,感知模块可以向图像传感器发送切换通知,图像传感器在接收到切换通知后切换至中亮高动态模式。
在感知模块确定出图像传感器无需切换工作模式时,感知模块可以不向图像传感器发送通知,图像传感器一直工作在低动态模式。感知模块也可以向图像传感器发送通知,图像传感器在接收到切换通知后继续工作在低动态模式。
S912、图像传感器由低动态模式切换为低亮高动态模式,基于低亮高动态模式输出预览视频帧。
在环境动态范围大于图像传感器的动态范围,且环境亮度小于第一照度值的情况下,图像传感器可以切换至低亮高动态工作模式。图像传感器可以基于低亮高动态模式输出预览视频帧。
接下来介绍图像传感器如何由低动态模式切换为低亮高动态模式的。
在一些实施例中,在低亮场景中,HCG通路输出的HCG图像的信噪比比较好,可以通过HCG通路基于不同的感光度输出两帧HCG图像,并将这两帧HCG图像合成得到低亮高动态模式下的预览视频帧。
在低亮场景中,通过HCG通路得到的两帧HCG图像可以被称为第一HCG图像和第二HCG图像。其中,得到第一HCG图像的HCG通路的感光度和得到第二HCG图像的HCG通路的感光度不同。例如,得到第一HCG图像的HCG通路的感光度高于得到第二HCG图像的HCG通路的感光度。将第一HCG图像和第二HCG图像合成,得到预览视频帧。第一HCG图像可用于得到预览视频帧中的暗区细节,第二HCG图像可用于得到预览视频帧中的亮区内容。
在一种可能的实现方式中,可以将低亮场景中的图像传感器的工作模式设置为一种工作模式。在该实现方式中,低亮场景中,得到第一HCG图像的HCG通路的感光度和得到
第二HCG图像的HCG通路的感光度是固定的。
在其他可能的实现方式中,也可以将低亮场景划分为多个亮度范围,每一个亮度范围对应的图像传感器的工作模式不同。也就是说,可以将低亮场景中的图像传感器的工作模式设置为多种工作模式。在该实现方式中,低亮场景中,得到第一HCG图像的HCG通路的感光度和得到第二HCG图像的HCG通路的感光度是可以随着环境亮度的变化而变化的。这样,在低亮场景中,随着环境亮度变暗或者变亮,图像传感器也可以动态地调整HCG通路的感光度,使得在低亮场景下电子设备100拍摄得到的预览视频帧的亮度可以随着环境亮度的变化而变化。
可选的,在低亮场景中,随着环境亮度的变化,得到第一HCG图像的HCG通路的感光度和得到第二HCG图像的HCG通路的感光度的变化幅度可以是相同的。例如环境变亮,得到第一HCG图像的HCG通路的感光度和得到第二HCG图像的HCG通路的感光度减小幅度是相同的。环境变暗,得到第一HCG图像的HCG通路的感光度和得到第二HCG图像的HCG通路的感光度增大幅度也是相同的。这样,得到第一HCG图像的HCG通路的感光度和得到第二HCG图像的HCG通路的感光度的比值是相同的,前后两帧预览视频帧的动态范围维持不变,保证了前后两帧预览视频帧的图像内容不会发生突变。
可选的,在低亮场景中,随着环境亮度的变化,得到第一HCG图像的HCG通路的曝光时长和得到第二HCG图像的HCG通路的曝光时长维持不变且是人工光源闪烁周期的整数倍,其中人工光源闪烁周期可以是电子设备100接入的交流电频率两倍的倒数。这样不会发生交流电频闪,交流电频闪即电子设备100拍摄得到的预览视频帧中的画面随时间的变化忽亮忽暗。
由前述描述可知,图像传感器的感光度由CG、AG和DG共同决定。而CG是固定不变的,可以通过调节AG和/或DG的大小来调节图像传感器的感光度。
图像传感器中用于承载电子的电容可以分为LOFIC电容和非LOFIC电容。在图像传感器中用于承载电子的电容为非LOFIC电容的情况下,可以通过调节AG和/或DG的大小来调节图像传感器的感光度。在图像传感器中用于承载电子的电容为LOFIC电容的情况下,仅可以通过调节DG的大小来调节图像传感器的感光度。
优选地,在承载电子的电容为非LOFIC电容的情况下,通过AG调节图像传感器的感光度带来的噪声比通过节DG调节图像传感器的感光度带来的噪声小,成像效果好。
本申请以下实施例将以如何调节AG来调节图像传感器的感光度为例进行说明,通过调节DG来调节图像传感器的感光度的具体实现,可以参考调节AG来调节图像传感器的感光度的具体实现,本申请在此不做赘述。
在没有调节AG和/或DG之前,LCG通路和HCG通路的感光度是预设好的,LCG通路的感光度和HCG通路的感光度的比值是固定的。示例性的,LCG通路的感光度可以是100*AG*DG,其中,CG的取值可以为100。HCG通路的感光度可以是400*AG*DG,其中,CG的取值可以为400,LCG通路的感光度:HCG通路的感光度=1:4。
需要说明的是,在其他实施例中,LCG通路和HCG通路的初始AG和初始DG可以
不同,LCG通路和HCG通路的初始AG和初始DG也可以是其他值,LCG通路和HCG通路的CG也可以是其他值,本申请对此不做限定。
表1
表1示出了一种低亮场景下,图像传感器中拍摄参数的取值。拍摄参数包括但不仅限于感光度和曝光时长。
在表1中,当环境亮度小于200Lux时,电子设备100可以确定出当前亮度场景为低亮场景,图像传感器可以工作在低亮高动态模式。当图像传感器工作在低亮高动态模式时,图像传感器得到第一HCG图像的HCG通路的感光度为400*2AG*DG,曝光时长为10ms。图像传感器得到第二HCG图像的HCG通路的感光度为400*32AG*DG,曝光时长也为10ms。
示例性的,当图像传感器确定出要由低动态模式切换为低亮高动态模式时,图像传感器可以设置曝光时长为10ms,在将HCG通路中的感光度分别设置为400*2AG*DG和400*32AG*DG,得到第一HCG图像和第二HCG图像。再将第一HCG图像和第二HCG图像合成,得到图像传感器在低亮高动态模式下得到的预览视频帧。
在表1所示的实施例中,在图像传感器进入低亮高动态模式后,若环境亮度变暗或者环境亮度变亮,只要环境亮度没有超过200Lux,则图像传感器可以一直按照表1所示的拍摄参数得到预览视频帧。
需要说明的是,表1中示出的低亮高动态模式下图像传感器拍摄参数的取值还可以是其他值,本申请对此不做限定。
表2
表2示出了另一种低亮场景下,图像传感器中拍摄参数的取值。
表2所示的实施例又将低亮场景划分为了多个不同的亮度范围。不同亮度范围中得到第一HCG图像和第二HCG图像的HCG通路的感光度不同。
例如,可以将低亮场景进一步划分为4个亮度范围。200Lux~150Lux亮度范围、150Lux~100Lux亮度范围、100Lux~50Lux亮度范围、50Lux~0Lux亮度范围。
不仅限于上述4个亮度范围,还可以将低亮场景划分为更多或者更少的亮度范围,本申请对此不做限定。
当环境亮度在200Lux~150Lux亮度范围内时,可以将曝光时长设置为10ms,HCG通路的感光度设置为400*AG*DG,得到第一HCG图像。再将HCG通路的感光度设置为400*AG*DG,得到第二HCG图像。
当环境亮度在150Lux~100Lux亮度范围内时,可以将曝光时长设置为10ms,HCG通路的感光度设置为400*2AG*DG,得到第一HCG图像。再将HCG通路的感光度设置为400*32AG*DG,得到第二HCG图像。
当环境亮度在100Lux~50Lux亮度范围内时,可以将曝光时长设置为10ms,HCG通路的感光度设置为400*4AG*DG,得到第一HCG图像。再将HCG通路的感光度设置为400*64AG*DG,得到第二HCG图像。
当环境亮度在50Lux~0Lux亮度范围内时,可以将曝光时长设置为10ms,HCG通路的感光度设置为400*8AG*DG,得到第一HCG图像。再将HCG通路的感光度设置为400*128AG*DG,得到第二HCG图像。
可选的,在低亮场景中,在环境亮度变暗或者变亮时,图像传感器在调节HCG通路的感光度的时候,使得调整前后,得到第一HCG图像的HCG通路的感光度和第二HCG图
像之间的感光度的比值是相同的。例如,当环境亮度在200Lux~150Lux亮度范围内时,得到第一HCG图像的HCG通路的感光度和第二HCG图像之间的感光度的比值是1:16。当环境亮度在150Lux~100Lux亮度范围内时,得到第一HCG图像的HCG通路的感光度和第二HCG图像之间的感光度的比值也是1:16。当环境亮度在100Lux~50Lux亮度范围内时,得到第一HCG图像的HCG通路的感光度和第二HCG图像之间的感光度的比值也是1:16。当环境亮度在50Lux~0Lux亮度范围内时,得到第一HCG图像的HCG通路的感光度和第二HCG图像之间的感光度的比值也是1:16。
可选的,低亮场景中,随着环境亮度的变化,得到第一HCG图像的HCG通路的曝光值和得到第二HCG图像的HCG通路的曝光时长始终是10ms,交流电频率可以是50hz,人工光源闪烁周期为1/100=10ms。
示例性的,当图像传感器确定出要由低动态模式切换为低亮高动态模式时。图像传感器需要基于环境亮度确定出图像传感器的拍摄参数。示例性的,若当前环境亮度为140Lux,则图像传感器可以确定出当前环境亮度在150Lux~100Lux亮度范围内,图像传感器可以设置曝光时长为10ms,将HCG通路中的感光度分别设置为400*AG*DG和400*16AG*DG,得到多帧预览视频帧。图像传感器再将HCG通路中的感光度分别设置为400*2AG*DG和400*32AG*DG,得到多帧预览视频帧。若之后环境亮度持续在150Lux~100Lux亮度范围内,图像传感器可以持续基于400*2AG*DG和400*32AG*DG的感光度输出预览视频帧。
在表2所示的实施例中,在图像传感器进入低亮高动态模式后,若环境亮度变暗或者环境亮度变亮,图像传感器可以实时基于环境亮度切换不同的拍摄参数。例如,在环境亮度变暗时,图像传感器可以调高感光度,在环境亮度变亮时,图像传感器可以调低感光度。使得在低亮场景下图像传感器拍摄得到的预览视频帧的亮度可以随着环境亮度的变化而变化。
需要说明的是,表2中示出的低亮高动态模式下图像传感器拍摄参数的取值还可以是其他值,本申请对此不做限定。
在一些实施例中,上述低亮场景下图像传感器中拍摄参数的取值可以存储在配置文件中。该配置文件可以被调用。
S913、图像传感器由低动态模式切换为中亮高动态模式,基于中亮高动态模式输出预览视频帧。
在环境动态范围大于图像传感器的动态范围,且环境亮度大于第一照度值的情况下,图像传感器可以切换至中亮高动态工作模式。图像传感器可以基于中亮高动态模式输出预览视频帧。
接下来介绍图像传感器如何由低动态模式切换为中亮高动态模式的。
在中亮场景下,HCG通路输出的HCG图像和LCG通路输出的LCG图像的信噪比均比较好,成像效果也比较好。那么可以分别通过HCG通路得到HCG图像和通过LCG通路得到LCG图像,再将HCG图像和LCG图像合成得到预览视频帧。
在一种可能的实现方式中,可以将中亮场景中的图像传感器的工作模式置为一种工作
模式。在该实现方式中,中亮场景中,得到HCG通路的感光度和LCG通路的感光度是固定的。
在其他可能的实现方式中,也可以将中亮场景划分为多个亮度范围,每一个亮度范围对应的图像传感器的工作模式不同。也就是说,可以将低亮场景中的图像传感器的工作模式置为多种工作模式。在该实现方式中,中亮场景中,HCG通路的感光度和LCG通路的感光度是可以随着环境亮度的变化而变化的。这样,在中亮场景中,随着环境亮度变暗或者变亮,图像传感器也可以动态地调整HCG通路和LCG通路的感光度,使得在中亮场景下电子设备100拍摄得到的预览视频帧的亮度可以随着环境亮度的变化而变化。
与S912中调节图像传感器的感光度的原理类似,本申请也以通过AG调节图像传感器的感光度为例进行说明。
可选的,在中亮场景中,随着环境亮度的变化,HCG通路的感光度和LCG通路的感光度的变化幅度可以是相同的。例如环境变亮,HCG通路的感光度和LCG通路的感光度减小幅度是相同的。环境变暗,HCG通路的感光度和LCG通路的感光度增大幅度也是相同的。这样,HCG通路的感光度和LCG通路的感光度的比值是相同的,前后两帧预览视频帧的动态范围维持不变,保证了前后两帧预览视频帧的图像内容不会发生突变。
可选的,在中亮场景中,随着环境亮度的变化,HCG通路的曝光时长和LCG通路的曝光时长维持不变且是人工光源闪烁周期的整数倍,这样不会发生交流电频闪。
表3
表3示出了一种中亮场景下,图像传感器中拍摄参数的取值。拍摄参数包括但不仅限于感光度和曝光时长。
在表3中,当环境亮度大于200Lux小于2000Lux时,电子设备100可以确定出当前亮度场景为中亮场景,图像传感器可以工作在中亮高动态模式。当图像传感器工作在中亮高动态模式时,得到LCG图像的LCG通路的感光度为100*2AG*DG,曝光时长为10ms。得到HCG图像的LCG通路的感光度为400*8AG*DG,曝光时长也为10ms。
示例性的,当图像传感器确定出要由低动态模式切换为中亮高动态模式时,图像传感器可以设置曝光时长为10ms,再将LCG通路的感光度设置为100*2AG*DG和将HCG通路的感光度设置为400*8AG*DG,得到LCG图像和HCG图像。再将HCG图像和HCG图像合成,得到图像传感器在中亮高动态模式下得到的预览视频帧。
在表3所示的实施例中,在图像传感器进入中亮高动态模式后,若环境亮度变暗或者环境亮度变亮,只要环境亮度大于200Lux小于2000Lux,则图像传感器可以一直按照表3所示的拍摄参数得到预览视频帧。
需要说明的是,表3中示出的中亮高动态模式下图像传感器拍摄参数的取值还可以是其他值,本申请对此不做限定。
表4
表4示出了另一种中亮场景下,图像传感器中拍摄参数的取值。
表4所示的实施例又将中亮场景划分为了多个不同的亮度范围。不同亮度范围中LCG通路和HCG通路的感光度不同。
例如,可以将中亮场景进一步划分为4个亮度范围。2000Lux~1400Lux亮度范围、1400Lux~800Lux亮度范围、800Lux~400Lux亮度范围、400Lux~200Lux亮度范围。
不仅限于上述4个亮度范围,还可以将中亮场景划分为更多或者更少的亮度范围,本申请对此不做限定。
当环境亮度在2000Lux~1400Lux亮度范围内时,可以将曝光时长设置为10ms,LCG通路的感光度设置为100*AG*DG,得到LCG图像。HCG通路的感光度设置为400*4AG*DG,得到HCG图像。
当环境亮度在1400Lux~800Lux亮度范围内时,可以将曝光时长设置为10ms,LCG通路的感光度设置为100*4AG*DG,得到LCG图像。HCG通路的感光度设置为400*16AG*DG,得到HCG图像。
当环境亮度在800Lux~400Lux亮度范围内时,可以将曝光时长设置为10ms,LCG通路的感光度设置为100*16AG*DG,得到LCG图像。HCG通路的感光度设置为400*64AG*DG,得到HCG图像。
当环境亮度在400Lux~200Lux亮度范围内时,可以将曝光时长设置为10ms,LCG通路的感光度设置为100*64AG*DG,得到LCG图像。HCG通路的感光度设置为400*256AG*DG,得到HCG图像。
可选的,在中亮场景中,在环境亮度变暗或者变亮时,图像传感器在调节LCG通路和HCG通路的感光度的时候,使得调整前后,得到LCG通路的感光度和HCG通路的感光度的比值是相同的。例如,当环境亮度在2000Lux~1400Lux亮度范围内时,LCG通路的感光度和HCG通路的感光度的比值是1:16。当环境亮度在1400Lux~800Lux亮度范围内时,LCG通路的感光度和HCG通路的感光度的比值也是1:16。当环境亮度在800Lux~400Lux亮度范围内时,LCG通路的感光度和HCG通路的感光度的比值也是1:16。当环境亮度在400Lux~200Lux亮度范围内时,LCG通路的感光度和HCG通路的感光度的比值也是1:16。
可选的,低亮场景中,随着环境亮度的变化,得到第一HCG图像的HCG通路的曝光值和得到第二HCG图像的HCG通路的曝光时长始终是10ms。
示例性的,当图像传感器确定出要由低动态模式切换为中亮高动态模式时。图像传感器需要基于环境亮度确定出图像传感器的拍摄参数的取值。示例性的,若当前环境亮度为1500Lux,则图像传感器可以确定出当前环境亮度在1400Lux~800Lux亮度范围内,图像传感器可以设置曝光时长为10ms,将LCG通路的感光度设置为100*AG*DG和将LCG通路的感光度设置为400*4AG*DG,得到多帧预览视频帧。再将LCG通路的感光度设置为100*4AG*DG和将LCG通路的感光度设置为400*16AG*DG,得到多帧预览视频帧。若之后环境亮度持续在1400Lux~800Lux亮度范围内,图像传感器可以持续基于100*4AG*DG和400*16AG*DG的感光度输出预览视频帧。
在表4所示的实施例中,在图像传感器进入中亮高动态模式后,若环境亮度变暗或者环境亮度变亮,图像传感器可以实时基于环境亮度切换不同的拍摄参数。例如,在环境亮度变暗时,图像传感器可以调高感光度,在环境亮度变亮时,图像传感器可以调低感光度。使得在中亮场景下图像传感器拍摄得到的预览视频帧的亮度可以随着环境亮度的变化而变化。
需要说明的是,表4中示出的中亮高动态模式下图像传感器拍摄参数的取值还可以是其他值,本申请对此不做限定。
在一些实施例中,上述中亮场景下图像传感器中拍摄参数的取值可以存储在配置文件中。该配置文件可以被调用。
在一些实施例中,由S911中的描述可知,确定出环境动态范围大于第一照度值,还可以包括环境亮度大于第二照度值的情况,即还包括高亮场景的情况。
图像传感器可以先按照表3或者表4的方法由低动态模式切换为中亮高动态模式。再由中亮高动态模式切换为高亮高动态模式。
接下来介绍图像传感器如何从中亮高动态模式切换为高亮高动态模式的。
在高亮场景下,维持LCG通路和DCG通路的感光度和曝光时长不变,还需要通过短曝光获取到一帧预览视频帧,并通过该短曝光预览视频帧恢复过爆图像。
表5
表5示出了高亮场景下,图像传感器中拍摄参数的取值。
表5所示的实施例又将高亮场景划分为了3个不同的亮度范围。不同亮度范围中短曝光预览视频帧的曝光时长不同。若之后环境亮度持续在150Lux~100Lux亮度范围内,图像传感器可以持续基于400*2AG*DG和400*32AG*DG的感光度输出预览视频帧
例如,可以将高亮场景进一步划分为不仅限于3个亮度范围。2000Lux~2600Lux亮度范围、2600Lux~3200Lux亮度范围、3200Lux以上亮度范围。
不仅限于上述3个亮度范围,还可以将高亮场景划分为更多或者更少的亮度范围,本申请对此不做限定。
当环境亮度在2000Lux~2600Lux亮度范围内时,先将曝光时长设置为10ms,LCG通路的感光度设置为100*AG*DG,得到LCG图像。HCG通路的感光度设置为400*4AG*DG,得到HCG图像。再将曝光时长设置为10ms,得到短曝光图像帧。先将LCG图像和HCG图像合成长曝光图像帧,再将长曝光图像帧和短曝光图像帧合成预览视频帧。
当环境亮度在2600Lux~3200Lux亮度范围内时,先将曝光时长设置为10ms,LCG通路的感光度设置为100*AG*DG,得到LCG图像。HCG通路的感光度设置为400*4AG*DG,得到HCG图像。再将曝光时长设置为5ms,得到短曝光图像帧。先将LCG图像和HCG图像合成长曝光图像帧,再将长曝光图像帧和短曝光图像帧合成预览视频帧。
当环境亮度在3200Lux以上亮度范围内时,先将曝光时长设置为10ms,LCG通路的感光度设置为100*AG*DG,得到LCG图像。HCG通路的感光度设置为400*4AG*DG,得到HCG图像。再将曝光时长设置为2.5ms,得到短曝光图像帧。先将LCG图像和HCG图像合成长曝光图像帧,再将长曝光图像帧和短曝光图像帧合成预览视频帧。
这样,在高亮场景下,随着亮度的增加,可以逐渐减小短曝光图像帧的曝光时长,以提升预览视频帧的动态范围,从而可以恢复得到亮区内容。
例如,2600Lux~3200Lux亮度范围内合成的预览视频帧动态范围大于2000Lux~2600Lux亮度范围内合成的预览视频帧动态范围。3200Lux以上亮度范围内合成的预览视频帧动态范围大于2600Lux~3200Lux亮度范围内合成的预览视频帧动态范围。
示例性的,当图像传感器确定出要由中亮高动态模式切换为中亮高动态模式时。图像
传感器需要基于环境亮度确定出图像传感器的拍摄参数的取值。示例性的,若当前环境亮度为2800Lux,则图像传感器可以确定出当前环境亮度在2600Lux~3200Lux亮度范围内。图像传感器可以先基于2000Lux~2600Lux亮度范围内图像传感器的拍摄参数拍摄得到多帧预览视频帧。再最终由2600Lux~3200Lux亮度范围图像传感器的拍摄参数拍摄得到多帧预览视频帧。若之后环境亮度持续在2600Lux~3200Lux亮度范围内,图像传感器可以持续基于2600Lux~3200Lux亮度范围图像传感器的拍摄参数输出预览视频帧。
在表5所示的实施例中,在图像传感器进入高亮高动态模式后,若环境亮度变暗或者环境亮度变亮,图像传感器可以实时基于环境亮度切换不同的拍摄参数。例如,在环境亮度变暗时,图像传感器可以调高短曝光图像帧的曝光时长。在环境亮度变亮时,图像传感器可以降低短曝光图像帧的曝光时长。使得在高亮场景下图像传感器拍摄得到的预览视频帧的亮度可以随着环境亮度的变化而变化。
S914、图像传感器基于低动态模式输出预览视频帧。
在图像传感器确认出环境动态范围小于图像传感器动态范围的情况下,图像传感器可以工作在低动态模式,并基于低动态模式输出预览视频帧。
S915、CameraUI模块在预览窗中显示低亮高动态模式输出的预览视频帧。
示例性的,若在开始拍摄视频之前,图像传感器已切换至低亮高动态模式,那么图像传感器可以基于表1或者表2所示的拍摄参数得到预览视频帧,并将预览视频帧发送至CameraUI模块。CameraUI模块可以在预览窗中显示低亮高动态模式输出的预览视频帧。
这样,在开始录制视频之前,图像传感器已经切换至高动态模式。在开始录制视频之后,图像传感器可以直接基于高动态模式录制视频。
显示视频录制界面并开始录制视频(S916-S924)。
S916、CameraUI模块接收用户的第二输入操作。
S917、响应于第二输入操作,图像传感器基于低亮高动态模式输出录制视频帧。
图像传感器基于低亮高动态模式输出录制视频帧的实现方式,和图像传感器基于低亮高动态模式输出预览视频帧的实现方式类似,可以参考S912中的描述,本申请在此不再赘述。
S918、响应于第二输入操作,CameraUI模块显示视频录制界面。
S919、CameraUI模块在视频录制界面的预览窗中显示基于低亮高动态模式输出的录制视频帧。
示例性的,第二输入操作可以是图8D所示的针对开始录像控件812的用户操作。
响应于第二输入操作,电子设备100开始录制视频,并显示图8E所示的视频录制界面,CameraUI模块可以在预览窗723中显示基于低亮高动态模式输出的录制视频帧。
S920、图像传感器将基于低亮高动态模式输出的录制视频帧发送至存图模块。
响应于第二操作,图像传感器将基于低亮高动态模式输出的录制视频帧发送至存图模
块,使得存图模块可以保存基于低亮高动态模式输出的录制视频帧。
S921、在环境亮度大于第一照度值小于第二照度值的情况下,图像传感器从低亮高动态模式切换为中亮高动态模式,并基于中亮高动态模式输出录制视频帧。
可选的,在图像传感器连续m帧视频帧均确定出环境亮度大于第一照度值小于第二照度值的情况下,图像传感器可以从低亮高动态模式切换为中亮高动态模式,并基于中亮高动态模式输出录制视频帧。m为大于等于1的正整数。
图像传感器基于中亮高动态模式输出录制视频帧的实现方式,和图像传感器基于中亮高动态模式输出预览视频帧的实现方式类似,可以参考S913中的描述,本申请在此不再赘述。
S922、图像传感器将基于中亮高动态模式输出录制视频帧发送至存图模块。
在图像传感器进入中亮高动态模式后,图像传感器可以基于中亮高动态模式输出录制视频帧,并将中亮高动态模式下输出的录制视频帧发送至存图模块,使得存图模块可以保存基于中亮高动态模式输出的录制视频帧。
S923、在环境亮度大于第二照度值的情况下,图像传感器由中亮高动态模式切换为高亮高动态模式,并基于高亮高动态模式输出录制视频帧。
可选的,在图像传感器连续m帧视频帧均确定出环境亮度大于第二照度值的情况下,图像传感器可以从中亮高动态模式切换为高亮高动态模式,并基于高亮高动态模式输出录制视频帧。m为大于等于1的正整数。
图像传感器基于高亮高动态模式输出录制视频帧的实现方式,和图像传感器基于高亮高动态模式输出预览视频帧的实现方式类似,可以参考S913中的描述,本申请在此不再赘述。
S924、图像传感器将基于高亮高动态模式输出录制视频帧发送至存图模块。
在图像传感器进入高亮高动态模式后,图像传感器可以基于高亮高动态模式输出录制视频帧,并将高亮高动态模式下输出的录制视频帧发送至存图模块,使得存图模块可以保存基于高亮高动态模式输出的录制视频帧。
在一些实施例中,在S919-S920之后,在图像传感器监测到环境亮度大于第二照度值的情况下,图像传感器可以先执行S921-S922,再执行S923-S924。
在其他实施例中,在S919-S920之后,在图像传感器监测到环境亮度大于第二照度值的情况下,图像传感器也可以不执行S921-S922,直接执行S923-S924。
可选的,S919-S924仅示出了一种示例,并不构成限定。图像传感器可以实时基于监测到的环境亮度,切换不同的工作模式。
图10示出了一种图像传感器在不同工作模式之间切换的示意图。
如图10所示,图像传感器的工作模式包括但不仅限于低动态模式、低亮高动态模式、
中亮高动态模式和高亮高动态模式等。
在电子设备100开启相机应用并进入“录像”模式后,图像传感器工作在低动态模式。图像传感器可以实时监测环境动态范围和环境亮度,以图像传感器确认是否需切换工作模式。
在一些实施例中,在图像传感器进入低动态模式后,若图像传感器监测到环境动态范围大于图像传感器动态范围,且环境亮度大于第一照度值的情况下,图像传感器可以由低动态模式切换为中亮高动态模式,并基于中亮高动态模式输出视频帧。
在图像传感器进入中亮高动态模式后,图像传感器也可以基于环境亮度动态切换至其他工作模式。
可选的,在图像传感器进入中亮高动态模式后,若图像传感器监测到环境动态范围小于图像传感器动态范围,图像传感器可以再切换至低动态模式,并基于低动态模式输出视频帧。
可选的,在图像传感器进入中亮高动态模式后,若图像传感器监测到环境动态范围大于的图像传感器动态范围且环境亮度小于第一照度值,图像传感器可以由中亮高动态模式切换为低亮高动态模式,并基于低亮高动态模式输出视频帧。
可选的,在图像传感器进入中亮高动态模式后,若图像传感器监测到环境动态范围大于的图像传感器动态范围且环境亮度大于第二照度值,图像传感器可以由中亮高动态模式切换为高亮高动态模式,并基于高亮高动态模式输出视频帧。
在其他实施例中,在图像传感器进入低动态模式后,若图像传感器监测到环境动态范围大于图像传感器动态范围,且环境亮度小于第一照度值的情况下,图像传感器可以由低动态模式切换为低亮高动态模式,并基于低亮高动态模式输出视频帧。
在图像传感器进入低亮高动态模式后,图像传感器也可以基于环境亮度动态切换至其他工作模式。
可选的,在图像传感器进入低亮高动态模式后,若图像传感器监测到环境动态范围小于图像传感器动态范围,图像传感器可以再切换至低动态模式,并基于低动态模式输出视频帧。
可选的,在图像传感器进入低亮高动态模式后,若图像传感器监测到环境动态范围大于的图像传感器动态范围且环境亮度大于第一照度值小于第二照度值,图像传感器可以由低亮高动态模式切换为中亮高动态模式,并基于中亮高动态模式输出视频帧。
可选的,在图像传感器进入低亮高动态模式后,若图像传感器监测到环境动态范围大于的图像传感器动态范围且环境亮度大于第二照度值,在一种可能的实现方式中,图像传感器可以先由低亮高动态模式切换为中亮高动态模式,再由中亮高动态模式切换为高亮高动态模式。在其他可能的实现方式中,图像传感器可以直接由低亮高动态模式切换为高亮高动态模式。
在图像传感器进入高亮高动态模式后,图像传感器也可以基于环境亮度动态切换至其他工作模式。
可选的,若图像传感器监测到环境亮度大于第一照度值小于第二照度值,图像传感器可以由高亮高动态模式切换为中亮高动态模式,并基于中亮高动态模式输出视频帧。
可选的,若图像传感器监测到环境亮度小于第二照度值,在一种可能的实现方式中,图像传感器可以先由高亮高动态模式切换为中亮高动态模式,再由中亮高动态模式切换为低亮高动态模式。在其他可能的实现方式中,图像传感器可以直接由高亮高动态模式切换为低亮高动态模式。
结束录制视频并显示视频预览界面,保存录制视频(S925-S930)。
S925、CameraUI模块接收用户的第三输入操作。
示例性的,第三输入操作可以是针对结束录像控件814的输入操作(例如单击),响应于用户的输入操作,电子设备100可将结束录像控件814切换为开始录像控件812。并保存录制的视频。
S926、存图模块保存多帧录制视频帧,并基于多帧录制视频帧生成第一视频。
响应于第三输入操作,存图模块保存多帧录制视频帧,并基于多帧录制视频帧生成第一视频。存图模块可以基于多帧录制视频帧的时间先后顺序,生成第一视频,第一视频包括多帧录制视频帧。
S927、响应于第三输入操作,CameraUI模块显示录像预览界面。
响应于第三输入操作,在停止录制视频后,CameraUI模块可以显示录像预览界面。并在录像预览界面的预览窗中显示预览视频帧。
S928、响应于第三输入操作,图像传感器基于高亮高动态模式输出预览视频帧。
示例性的,若在CameraUI模块接收用户的第三输入之前,图像传感器工作在高亮高动态模式,若在CameraUI模块接收用户的第三输入时,图像传感器将基于高亮高动态模式输出预览视频帧。
S929、图像传感器将基于高亮高动态模式输出的预览视频帧发送至CameraUI模块。
S930、CameraUI模块在预览窗中显示图像传感器基于高亮高动态模式输出的预览视频帧。
可选的,CameraUI模块在预览窗中显示图像传感器基于高亮高动态模式输出的预览视频帧后,电子设备100可以执行S908-S914所示的实施例在预览窗中显示预览视频帧。
下面从电子设备软硬件协作的视角,结合图11说明本实施例的具体实现。
如图11所示,摄像头用于采集图像,当被拍摄对象的反射光通过镜头,在镜片上折射后,汇聚在图像传感器上。图像传感器可以将光信号转换成模拟电信号。该模拟电信号从图像传感器和传感器前端(sensorfront-end,SFE)旁路输出,再经过数模转换器输出。可理解,数模传感器输出的为摄像头采集的原始数字图像,即RAW视频帧。
其中,在低亮高动态模式和中亮高动态模式下,图像传感器可以生成两帧视频帧。在一种可能的实现方式中,图像传感器可以将两帧视频帧合成为一帧视频帧。在其他可能的实现方式中,图像传感器可以将这两帧视频帧发送至传感器前端,传感器前端将这两帧视频帧合成为一帧视频帧。
在高亮高动态模式下,图像传感器可以生成三帧视频帧。其中两帧是长曝光视频帧,一帧是短曝光视频帧。在一种可能的实现方式中,图像传感器将这两帧长曝光视频帧合成为一帧视频帧,图像传感器再将合成的这一帧视频帧发送至传感器前端,传感器前端再将合成的这一帧视频帧和短曝光视频帧合成为一帧视频帧。在其他可能的实现方式中,图像传感器可以将这两帧长曝光视频帧和短曝光视频帧发送至传感器前端,传感器前端再将两帧长曝光视频帧和短曝光视频帧合成为一帧视频帧。
像信号处理器ISP用于将来自摄像头的RAW视频帧进行相关处理并生成待显示的视频帧,待显示的视频帧可以是YUV(或理解为亮度和色度)格式的视频帧。图像信号处理器再将YUV格式的视频帧发送给显示屏进行显示。ISP可以包括图像处理器后端(imageprocessingengine,IPE)、图像处理器前端(imagefront-endengine,IFE)、I/O控制接口等。
首先,图像处理器前端用于对视频帧进行处理的过程可以包括下述一种或多种,例如:去坏点校正处理、RAW域降噪处理、黑电平校正处理、光学阴影校正处理、自动白平衡处理、颜色插值处理、色彩校正处理、全局色调映射处理、或图像转换处理等,本申请实施例中对视频帧前处理过程不做限定。
图像处理器前端再将前处理后的视频帧发送至图像处理器后端,图像处理器后端可以对前处理后的视频帧进行后处理,一方面,图像处理器后端可以将后处理后的视频帧序列作为预览视频流或者录制视频流。预览视频流或者录制视频流可以通过I/O控制接口显示在显示屏上。另一方面,图像处理器后端可以将后处理后的视频帧序列发送至感知模块,使得感知模块可以基于后处理后的视频帧序列获取到环境动态范围和环境亮度。感知模块再将环境动态范围和环境亮度发送至图像传感器,使得图像传感器可以基于环境动态范围和环境亮度切换不同的工作模式。
可选的,摄像头还可以包括测光传感器,测光传感器可以监测环境亮度和环境动态范围。
在一些实施例中,在录制视频的过程中,电子设备100接收用户针对控件813的输入操作(例如单击),电子设备100可以将用户单击控件813的时刻对应的录制视频帧保存在图库中。
该视频帧后处理可以包括下述一种或多种,例如:图像矫正及调整处理、局部色调映射处理、以及伽马(Gamma)校正处理等步骤。在图像矫正及调整处理中,图像处理器后端可以对当前视频帧进行防抖处理。在局部色调映射处理中,图像处理器后端可以实现对视频帧的整体亮度进行调整,使得亮度调整后的画面可以更接近于真实世界中呈现的亮度。在Gamma校正处理中,图像处理器后端可以对视频帧进行亮度调整,使其可以保留更多的亮部和暗部细节,压缩对比度,保留更多的色彩信息。
当电子设备100接收到用户针对结束录像控件814的输入操作(例如单击)后,可以将录制视频流保存在图库中。
图12为本申请提供的一种视频拍摄方法的流程示意图。
S1201、电子设备显示拍摄界面,拍摄界面用于显示摄像头拍摄的图像。
电子设备包括摄像头模组,摄像头模组包括图像传感器和双转换增益传感器,双转换增益传感器包括第一传感器和第二传感器,第一传感器的转换增益小于第二传感器的转换增益。
其中,双转换增益传感器可以位于图像传感器内部,双转换增益传感器也可以独立于图像传感器。
第一传感器可以被称为低转换增益传感器,第二传感器可以被称为高转换增益传感器。
在一些实施例中,第一传感器也可以被称为LCG通路。第二传感器也可以被称为HCG通路。
拍摄界面可以是图8B所示的拍摄界面720。
拍摄界面也可以是图8C所示的录像界面810。
拍摄界面也可以是图8E所示的录像界面810。
S1202、在环境亮度小于第一照度值的情况下,电子设备通过第二传感器按照第一感光度将图像传感器输出的第一原始图像处理成第一图像,通过第二传感器按照第二感光度将第一原始图像处理成第二图像,第一感光度小于第二感光度。
S1203、电子设备将第一图像和第二图像合成第三图像,并在拍摄界面显示第三图像。
在一些实施例中,第一图像可以被称为第一HCG图像。
在一些实施例中,第二图像可以被称为第二HCG图像。
示例性的,第一感光度可以是表1所示的400*2AG*DG。
示例性的,第二感光度可以是表1所示的400*32AG*DG。
示例性的,第一感光度也可以是表2所示的得到第一HCG图像的多个感光度。
示例性的,第二感光度也可以是表2所示的得到第二HCG图像的多个。
S1204、在环境亮度在第一照度值和第二照度值之间的情况下,电子设备通过第一传感器按照第三感光度将图传感器输出的第二原始图像处理成第四图像,通过第二传感器按照第四感光度将第二原始图像处理成第五图像,第三感光度小于第四感光度,第四感光度小于第二感光度。
S1205、电子设备将第四图像和第五图像合成第六图像,并在拍摄界面显示第六图像。
第一照度值、第二照度值可以是一个具体值,也可以指一个范围。
例如,第一照度值可以是200Lux~0Lux。
第二照度值可以是2000Lux~200Lux。
这里,200Lux可以属于低亮场景的环境亮度,也可以属于中亮场景的环境亮度,本申请对此不做限定。
在一些实施例中,第四图像可以被称为LCG图像。
在一些实施例中,第五图像可以被称为HCG图像。
示例性的,第三感光度可以是表3所示的100*2AG*DG。
示例性的,第四感光度可以是表3所示的400*8AG*DG。
示例性的,第三感光度也可以是表4所示的得到LCG图像的多个感光度。
示例性的,第四感光度也可以是表4所示的得到HCG图像的多个感光度。
通过该方法,一方面可以提升电子设备在拍摄视频过程中的动态范围。另一方面,电子设备可以基于环境亮度,自动切换不同的拍摄模式。具体的,在低亮场景中,第一传感器的性噪比低,第二传感器的性噪比比较高,通过第二传感器分别通输出两帧图像合成视频帧,不会出现噪声分层的问题,且视频帧的成像效果也好。在中亮场景中,第一传感器的性噪比和第二传感器的性噪比相当,且第一传感器的性噪比和第二传感器的性噪比也比较高,通过第一传感器和第二传感器输出两帧图像合成一帧视频帧,视频帧的成像效果也比较好。
在一种可能的实现方式中,方法还包括:在环境亮度大于等于第二照度值的情况下,电子设备以第一曝光时长控制图像传感器输出第三原始图像,以第二曝光时长控制图像传感器输出第四原始图像;电子设备通过第一传感器按照第三感光度将第三原始图像处理成第七图像,通过第二传感器按照第四感光度将第三原始图像处理成第八图像;电子设备基于合并方式将第四原始图像处理成第九图像;电子设备将第七图像、第八图像和第九图像合成第十图像,并在拍摄界面显示第十图像。
在一些实施例中,第七图像可以被称为LCG图像。
在一些实施例中,第八图像可以被称为HCG图像。
在一些实施例中,第九图像可以被称为短曝光预览视频帧或者短曝光录制视频帧。
这样,在高亮场景中,输出长曝光帧图像(第七图像和第八图像)和短曝光帧图像(第九图像),将第七图像和第八图像和第九图像融合得到一帧图像,即第十图像。可以解决高亮场景中,单个像素的满阱容量溢出后,会产生过曝的图像的问题。可以通过第十图像恢复过爆图像。
在一种可能的实现方式中,拍摄界面还包括录像结束按钮;方法还包括:电子设备接收用户针对录像结束按钮的第一操作;响应于第一操作,电子设备保存第一视频,第一视频包括第三图像和第六图像,或者第一视频包括第三图像、第六图像和第十图像。
示例性的,录像结束按钮可以是图8E所示的结束录像控件814。
这样,该方法可以适用于视频拍摄场景,并基于该方法拍摄得到视频。
在一种可能的实现方式中,拍摄界面还包括录像开始按钮。
示例性的,录像开始按钮可以是图8C所示的开始录像控件812。
这样,该方法可以适用于视频拍摄预览场景。在视频拍摄预览界面中,电子设备先工作在地动态模式,在确定出环境动态范围大于图像传感器动态范围的情况下,电子设备可以切换至高动态模式,例如低亮高动态模式或者中亮高动态面模式或者高亮高动态模式。那么在电子设备进入视频拍摄界面后,电子设备可以直接以低亮高动态模式或者中亮高动态模式或者高亮高动态模式拍摄得到视频并保存视频。
在一种可能的实现方式中,方法还包括:在环境亮度在第一照度值和第二照度值之间的情况下,环境亮度越亮,第一传感器的感光度和第二传感器的感光度越小。
这样,在低亮场景中,随着环境变亮,可以逐渐减小得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度。随着环境变暗,可以逐渐增加得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度。这样,电子设备拍摄得到的视频帧也是逐渐变亮或者逐渐变暗的,可以提升视频拍摄效果。
具体的,可以参考表2实施例中的描述。
在一种可能的实现方式中,方法还包括:在环境亮度在第一照度值和第二照度值之间的情况下,环境亮度越亮,第一传感器的感光度和第二传感器的感光度越小。
这样,在中亮场景中,随着环境变亮,可以逐渐减小第一传感器的感光度和第二传感器的感光度。随着环境变暗,可以逐渐增加第一传感器的感光度和第二传感器的感光度。这样,电子设备拍摄得到的视频帧也是逐渐变亮或者逐渐变暗的,可以提升视频拍摄效果。
具体的,可以参考表4实施例中的描述。
在一种可能的实现方式中,第一传感器和第二传感器的曝光时长均为第一曝光时长。
这样,在模式切换过程中,第一传感器和第二传感器的曝光时长不变,仅改变感光度,避免相邻两帧视频帧出现闪烁的情况,影响视觉效果。
例如,第一曝光时长可以均为10ms。
在一种可能的实现方式中,得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度之间的比值不变。
这样,在低亮场景中,随着环境亮度变亮或者变暗,得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度成比例增加或者减少,避免动态范围的差异。
示例性的,得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度之间的比值为1:16。
在一种可能的实现方式中,第一传感器的感光度和第二传感器的感光度之间的比值不变。
这样,在中亮场景中,随着环境亮度变亮或者变暗,第一传感器和第二传感器的感光度成比例增加或者减少,避免动态范围的差异。
示例性的,第一传感器的感光度和第二传感器的感光度之间的比值为1:16。
这样,在切换传感器模式前后,第一传感器的感光度和第二传感器的感光度之间的比值为1:16。得到第一图像的第二传感器的感光度和得到第二图像的第二传感器的感光度之间的比值也为1:16。
在一种可能的实现方式中,还包括:在环境亮度大于等于第二照度值的情况下,环境亮度越亮,第一曝光时长不变,第二曝光时长越短。
这样,在高亮场景中,随着环境变亮,可以逐渐减小得到第九图像的曝光时长。随着环境变暗,可以逐渐增加得到第九图像的曝光时长。这样,电子设备拍摄得到的视频帧也
是逐渐变亮或者逐渐变暗的,可以提升视频拍摄效果。
具体的,可以参考表5实施例中的描述。
在一种可能的实现方式中,方法还包括:在环境亮度等于第二照度值的情况下,第一曝光时长等于第二曝光时长。
示例性的,第二照度值可以是2000Lux~2600Lux。
第一曝光时长和第二曝光时长为10ms。
在一种可能的实现方式中,方法包括:电子设备通过调节第一传感器的模拟增益和/或数字增益调节第一传感器的感光度;电子设备通过调节第二传感器的模拟增益和/或数字增益调节第二传感器的感光度。
在一种可能的实现方式中,第一传感器还包括第一电容,电子设备通过调节第一传感器的模拟增益和/或数字增益调节第一传感器的感光度,具体包括:在第一电容为LOFIC电容的情况下,电子设备通过调节第一传感器的数字增益调节第一传感器的感光度;在第一电容不是LOFIC电容的情况下,电子设备通过调节第一传感器的模拟增益和/或数字增益调节第一传感器的感光度。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘SolidStateDisk)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
总之,以上所述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
Claims (16)
- 一种视频拍摄方法,其特征在于,所述电子设备包括摄像头模组,所述摄像头模组包括图像传感器和双转换增益传感器,所述双转换增益传感器包括第一传感器和第二传感器,所述第一传感器的转换增益小于所述第二传感器的转换增益,所述方法包括:所述电子设备显示拍摄界面,所述拍摄界面用于显示所述摄像头拍摄的图像;在环境亮度小于第一照度值的情况下,所述电子设备通过所述第二传感器按照第一感光度将所述图像传感器输出的第一原始图像处理成第一图像,通过所述第二传感器按照第二感光度将所述第一原始图像处理成第二图像,所述第一感光度小于所述第二感光度;所述电子设备将所述第一图像和所述第二图像合成第三图像,并在所述拍摄界面显示所述第三图像;在环境亮度在第一照度值和第二照度值之间的情况下,所述电子设备通过所述第一传感器按照第三感光度将所述图传感器输出的第二原始图像处理成第四图像,通过所述第二传感器按照第四感光度将所述第二原始图像处理成第五图像,所述第三感光度小于所述第四感光度,所述第四感光度小于所述第二感光度;所述电子设备将所述第四图像和所述第五图像合成第六图像,并在所述拍摄界面显示所述第六图像。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:在环境亮度大于等于第二照度值的情况下,所述电子设备以第一曝光时长控制所述图像传感器输出第三原始图像,以第二曝光时长控制所述图像传感器输出第四原始图像;所述电子设备通过所述第一传感器按照所述第三感光度将所述第三原始图像处理成第七图像,通过所述第二传感器按照所述第四感光度将所述第三原始图像处理成第八图像;所述电子设备基于合并方式将所述第四原始图像处理成第九图像;所述电子设备将所述第七图像、所述第八图像和所述第九图像合成第十图像,并在所述拍摄界面显示所述第十图像。
- 根据权利要求1或2所述的方法,其特征在于,所述拍摄界面还包括录像结束按钮;所述方法还包括:所述电子设备接收用户针对所述录像结束按钮的第一操作;响应于所述第一操作,所述电子设备保存第一视频,所述第一视频包括所述第三图像和所述第六图像,或者所述第一视频包括所述第三图像、所述第六图像和所述第十图像。
- 根据权利要求1或2所述的方法,其特征在于,所述拍摄界面还包括录像开始按钮。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:在环境亮度小于所述第一照度值的情况下,环境亮度越亮,得到所述第一图像的所述第二传感器的感光度和得到所述第二图像的所述第二传感器的感光度越小。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:在环境亮度在所述第一照度值和所述第二照度值之间的情况下,环境亮度越亮,所述第一传感器的感光度和第二传感器的感光度越小。
- 根据权利要求5或6所述的方法,其特征在于,所述第一传感器和所述第二传感器的曝光时长均为第一曝光时长。
- 根据权利要求5所述的方法,其特征在于,得到所述第一图像的所述第二传感器的感光度和得到所述第二图像的所述第二传感器的感光度之间的比值不变。
- 根据权利要求6所述的方法,其特征在于,所述第一传感器的感光度和所述第二传感器的感光度之间的比值不变。
- 根据权利要求2所述的方法,其特征在于,所述方法还包括:在环境亮度大于等于所述第二照度值的情况下,环境亮度越亮,所述第一曝光时长不变,所述第二曝光时长越短。
- 根据权利要求2或10所述的方法,其特征在于,所述方法还包括:在环境亮度等于所述第二照度值的情况下,所述第一曝光时长等于所述第二曝光时长。
- 根据权利要求1-11任一项所述的方法,其特征在于,所述方法包括:所述电子设备通过调节所述第一传感器的模拟增益和/或数字增益调节所述第一传感器的感光度;所述电子设备通过调节所述第二传感器的模拟增益和/或数字增益调节所述第二传感器的感光度。
- 根据权利要求12所述的方法,所述第一传感器还包括第一电容,其特征在于,所述电子设备通过调节所述第一传感器的模拟增益和/或数字增益调节所述第一传感器的感光度,具体包括:在所述第一电容为LOFIC电容的情况下,所述电子设备通过调节所述第一传感器的数字增益调节所述第一传感器的感光度;在所述第一电容不是LOFIC电容的情况下,所述电子设备通过调节所述第一传感器的模拟增益和/或数字增益调节所述第一传感器的感光度。
- 一种电子设备,其特征在于,所述电子设备包括处理器和存储器;所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述处理器调用所述计算机指令以执行上述权利要求1-13任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,用于存储计算机指令,当所述计算机指令在电子设备上运行时,使得所述服务器执行上述权利要求1-13中的任一项所述的方法。
- 一种计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行上述权利要求1-13中的任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310601145.6 | 2023-05-25 | ||
| CN202310601145.6A CN117692783B (zh) | 2023-05-25 | 2023-05-25 | 一种视频拍摄方法及电子设备 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| WO2024239779A1 true WO2024239779A1 (zh) | 2024-11-28 |
| WO2024239779A9 WO2024239779A9 (zh) | 2025-03-20 |
Family
ID=90130747
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/082987 Ceased WO2024239779A1 (zh) | 2023-05-25 | 2024-03-21 | 一种视频拍摄方法及电子设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (2) | CN119031249A (zh) |
| WO (1) | WO2024239779A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119031249A (zh) * | 2023-05-25 | 2024-11-26 | 荣耀终端有限公司 | 一种视频拍摄方法及电子设备 |
| CN119767136A (zh) * | 2024-12-03 | 2025-04-04 | 维沃移动通信有限公司 | 拍摄模式切换方法、装置及电子设备 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20200095829A (ko) * | 2019-02-01 | 2020-08-11 | 삼성전자주식회사 | 플로팅 디퓨전 및 확장 패턴을 갖는 반도체 소자 |
| CN113038042A (zh) * | 2021-03-22 | 2021-06-25 | 豪威科技(上海)有限公司 | 双转换增益图像传感器 |
| CN114245050A (zh) * | 2020-09-09 | 2022-03-25 | 三星电子株式会社 | 图像传感器 |
| CN117692783A (zh) * | 2023-05-25 | 2024-03-12 | 荣耀终端有限公司 | 一种视频拍摄方法及电子设备 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107635101B (zh) * | 2017-10-27 | 2020-07-03 | Oppo广东移动通信有限公司 | 拍摄方法、装置、存储介质和电子设备 |
| KR102827227B1 (ko) * | 2020-02-11 | 2025-07-01 | 삼성전자주식회사 | 전자 장치 및 그의 hdr 영상 생성 방법 |
| CN114466134A (zh) * | 2021-08-17 | 2022-05-10 | 荣耀终端有限公司 | 生成hdr图像的方法及电子设备 |
| CN116055890B (zh) * | 2022-08-29 | 2024-08-02 | 荣耀终端有限公司 | 生成高动态范围视频的方法和电子设备 |
-
2023
- 2023-05-25 CN CN202411124847.0A patent/CN119031249A/zh active Pending
- 2023-05-25 CN CN202310601145.6A patent/CN117692783B/zh active Active
-
2024
- 2024-03-21 WO PCT/CN2024/082987 patent/WO2024239779A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20200095829A (ko) * | 2019-02-01 | 2020-08-11 | 삼성전자주식회사 | 플로팅 디퓨전 및 확장 패턴을 갖는 반도체 소자 |
| CN114245050A (zh) * | 2020-09-09 | 2022-03-25 | 三星电子株式会社 | 图像传感器 |
| CN113038042A (zh) * | 2021-03-22 | 2021-06-25 | 豪威科技(上海)有限公司 | 双转换增益图像传感器 |
| CN117692783A (zh) * | 2023-05-25 | 2024-03-12 | 荣耀终端有限公司 | 一种视频拍摄方法及电子设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2024239779A9 (zh) | 2025-03-20 |
| CN117692783B (zh) | 2024-08-30 |
| CN119031249A (zh) | 2024-11-26 |
| CN117692783A (zh) | 2024-03-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113824873B (zh) | 一种图像处理的方法及相关电子设备 | |
| WO2020168956A1 (zh) | 一种拍摄月亮的方法和电子设备 | |
| CN114463191B (zh) | 一种图像处理方法及电子设备 | |
| CN116055890A (zh) | 生成高动态范围视频的方法和电子设备 | |
| WO2024093432A1 (zh) | 拍摄帧率控制方法、电子设备、芯片系统及可读存储介质 | |
| CN113630558B (zh) | 一种摄像曝光方法及电子设备 | |
| WO2024239779A9 (zh) | 一种视频拍摄方法及电子设备 | |
| CN116055855B (zh) | 图像处理方法及其相关设备 | |
| CN115272138B (zh) | 图像处理方法及其相关设备 | |
| US20250363965A1 (en) | Image processing method and electronic device | |
| CN116193269B (zh) | 一种曝光模式切换方法及相关设备 | |
| CN117499779B (zh) | 一种图像预览方法、设备以及存储介质 | |
| CN116723382A (zh) | 一种拍摄方法及相关设备 | |
| EP4221185B1 (en) | Photographing method and related apparatus | |
| CN116723417B (zh) | 一种图像处理方法和电子设备 | |
| CN115550556B (zh) | 一种曝光强度调节方法及相关装置 | |
| CN118450275B (zh) | 一种拍摄方法及相关设备 | |
| CN117956299B (zh) | 拍摄月亮的方法和电子设备 | |
| CN113891008B (zh) | 一种曝光强度调节方法及相关设备 | |
| CN119865686B (zh) | 一种图像处理方法和电子设备 | |
| CN115426458B (zh) | 光源检测方法及其相关设备 | |
| WO2025146120A1 (zh) | 一种拍摄方法、电子设备及存储介质 | |
| WO2025044681A1 (zh) | 图像显示方法、电子设备及计算机可读存储介质 | |
| CN119254904A (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: 24810028 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |