CN116708954B - Photographing method and electronic equipment - Google Patents

Photographing method and electronic equipment Download PDF

Info

Publication number
CN116708954B
CN116708954B CN202211733908.4A CN202211733908A CN116708954B CN 116708954 B CN116708954 B CN 116708954B CN 202211733908 A CN202211733908 A CN 202211733908A CN 116708954 B CN116708954 B CN 116708954B
Authority
CN
China
Prior art keywords
camera
value
image
brightness
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.)
Active
Application number
CN202211733908.4A
Other languages
Chinese (zh)
Other versions
CN116708954A (en
Inventor
杨路浩
丁志兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211733908.4A priority Critical patent/CN116708954B/en
Publication of CN116708954A publication Critical patent/CN116708954A/en
Application granted granted Critical
Publication of CN116708954B publication Critical patent/CN116708954B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The application provides a photographing method and electronic equipment, and relates to the technical field of photographing. The method can enable the brightness of the picture to be in natural transition in the process of switching the camera, and the problem that the picture is not naturally switched due to overlarge brightness difference is solved. The method comprises the following steps: the electronic equipment displays a shooting preview interface, wherein the shooting preview interface comprises a first image from a first camera; responding to the operation of adjusting the zoom magnification by a user, and acquiring the current zoom magnification by the electronic equipment; under the condition that the current zoom magnification reaches a preset first zoom magnification, the electronic equipment is switched from the first camera to the second camera; if the difference value between the first brightness value and the second brightness value is greater than or equal to a first threshold value, the electronic equipment displays a second image from the second camera on the shooting preview interface; the second image is obtained by shooting the second camera according to a first exposure value, and the first exposure value corresponds to the first brightness value.

Description

Photographing method and electronic equipment
Technical Field
The present application relates to the field of photographing technologies, and in particular, to a photographing method and an electronic device.
Background
With the development of terminal devices and semiconductor technology, more and more terminal devices are configured with a plurality of cameras having different focal lengths. For terminal devices having cameras with different focal lengths, by adjusting zoom (zoom) magnification thereof, an object at a close distance or a far distance can be clearly photographed.
Currently, during shooting, a user can manually adjust the zoom magnification. In order to ensure the definition of the photographed pictures under different focal lengths, the terminal device detects that the user adjusts the zoom magnification to a preset magnification, and then switches from one camera to the other. However, in practical application, due to disparity and inconsistency of optical performance of the camera, images seen by a user cannot be aligned in a switching process of the camera, and phenomena such as obvious brightness and white balance change and the like cause a problem of blocking in the switching process.
Disclosure of Invention
The embodiment of the application provides a photographing method and electronic equipment, which are used for solving the problem of unnatural picture transition in the camera switching process.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
In a first aspect, the present application provides a photographing method, applied to an electronic device including a first camera and a second camera, where a view finding range of the first camera is different from a view finding range of the second camera, the method includes: the electronic equipment displays a shooting preview interface, wherein the shooting preview interface comprises a first image from a first camera; responding to the operation of adjusting the zoom magnification by a user, and acquiring the current zoom magnification by the electronic equipment; under the condition that the current zoom magnification reaches a preset first zoom magnification, the electronic equipment is switched from the first camera to the second camera; if the difference value between the first brightness value and the second brightness value is greater than or equal to a first threshold value, the electronic equipment displays a second image from the second camera on the shooting preview interface; the first brightness value is used for reflecting the ambient brightness when the first camera shoots, the second brightness value is used for reflecting the ambient brightness when the second camera shoots last time, the second image is obtained by shooting the second camera according to the first exposure value, and the first exposure value corresponds to the first brightness value.
It can be understood that when the difference value between the first brightness value and the second brightness value is greater than or equal to the first threshold value, the first brightness value capable of accurately reflecting the current ambient brightness is utilized to determine the first exposure value, and the second camera is controlled to shoot based on the first exposure value to obtain the second image, so that the brightness value of the second image is more adaptive to the current ambient brightness, the risk of exposure abnormality of the second image is reduced, the brightness of the picture in the process of switching the camera can be transited naturally, and the problem of unnatural picture switching caused by overlarge brightness difference is weakened.
In one embodiment provided in the first aspect, the method further comprises: if the difference value between the first brightness value and the second brightness value is smaller than the first threshold value, the electronic equipment displays a third image from the second camera on the shooting preview interface; the third image is an image obtained by shooting by the second camera according to a second exposure value, and the second exposure value corresponds to the second brightness value.
In one embodiment provided in the first aspect, the method further comprises: and under the condition that the difference value between the current zoom magnification and the preset first zoom magnification is smaller than a second threshold value, the electronic equipment acquires a first brightness value and a second brightness value. Therefore, the electronic equipment can acquire the first exposure value or the second exposure value before the current zoom magnification reaches the first zoom magnification, and when the current zoom magnification reaches the preset first zoom magnification, the electronic equipment can directly shoot according to the first exposure value or the second exposure value to obtain a second image or a third image, so that the time spent by the electronic equipment for displaying the second image or the third image in the switching process is reduced, and the effect of weakening the picture blocking phenomenon during the switching of the camera is achieved.
In an embodiment provided in the first aspect, the first luminance value is a luminance value of an image captured by the first camera when a difference between the current zoom magnification and the preset first zoom magnification is smaller than a second threshold, and the second luminance value is a luminance value of a last frame image captured by the second camera last time, or is an average value of luminance values of last multi-frame images captured by the second camera last time.
In one embodiment provided in the first aspect, the method further comprises: and under the condition that the current zoom magnification reaches a preset first zoom magnification, the electronic equipment acquires a first brightness value and a second brightness value.
In an implementation manner provided in the first aspect, the first luminance value is a luminance value of a last frame of image shot by the first camera or a mean value of luminance values of a last multiple frames of images shot by the first camera in a process that the electronic device is switched from the first camera to the second camera; the second brightness value is the brightness value of the last frame of image shot by the second camera last time, or is the average value of the brightness values of the last frames of images shot by the second camera last time.
In an embodiment of the first aspect, the electronic device further includes a multispectral camera, and the first luminance value is a luminance value of a last frame of image shot by the multispectral camera or a mean value of luminance values of a last multiframe of image shot by the multispectral camera in a process of switching the electronic device from the first camera to the second camera; the second brightness value is the brightness value of the last frame of image shot by the multispectral camera when the second camera shoots the last time, or is the average value of the brightness values of the last multiframe of image shot by the multispectral camera when the second camera shoots the last time.
In one embodiment provided in the first aspect, the first exposure value corresponding to the first luminance value includes: the first exposure value is determined according to the first brightness value, and the first exposure value is in negative correlation with the first brightness value.
In one embodiment provided in the first aspect, the method further comprises: the electronic device reads a second exposure value from a prestored corresponding relation according to the second brightness value, wherein the prestored corresponding relation comprises a corresponding relation between the second brightness value and the second exposure value.
In a second aspect, the present application provides a chip system comprising one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a wire. The chip system described above may be applied to an electronic device including a communication module and a memory. The interface circuit is for receiving signals from a memory of the electronic device and transmitting the received signals to the processor, the signals including computer instructions stored in the memory. When executed by a processor, the electronic device may perform the method as described in the first aspect and any one of its possible designs.
In a third aspect, the present application provides a computer-readable storage medium comprising computer instructions. When executed on an electronic device (such as a mobile phone) the computer instructions cause the electronic device to perform the method as described in the first aspect and any one of its possible designs.
In a fourth aspect, the application provides a computer program product which, when run on an electronic device, causes the electronic device to carry out the method according to the first aspect and any one of its possible designs.
In a fifth aspect, the present application provides an electronic device, including: a memory, a first camera, a second camera, and one or more processors; the memory, the first camera, and the second camera are coupled with the processor; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of the first aspect and any one of its possible designs.
The technical effects of any one of the design manners of the fourth aspect to the fifth aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
FIG. 1 is a schematic view of a scene provided in an embodiment of the present application;
FIG. 2 is an interface diagram of a set of electronic devices according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
Fig. 4 is a flowchart of a photographing method according to an embodiment of the present application;
FIG. 5 is an interface diagram of a set of electronic devices according to an embodiment of the present application;
FIG. 6 is an interface diagram of yet another set of electronic devices provided in accordance with an embodiment of the present application;
FIG. 7 is an interface diagram of another set of electronic devices according to an embodiment of the present application;
FIG. 8A is a schematic diagram of an image frame according to an embodiment of the present application;
FIG. 8B is a schematic diagram of another image frame according to an embodiment of the present application;
FIG. 9 is an interface diagram of yet another set of electronic devices provided in accordance with an embodiment of the present application;
FIG. 10 is a flowchart of a photographing method according to an embodiment of the present application;
FIG. 11 is a flowchart of still another photographing method according to an embodiment of the present application;
Fig. 12 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
For clarity and conciseness in the description of the embodiments below and for ease of understanding to those skilled in the art, a brief introduction to related concepts or technologies is first presented.
Optical zoom (optical zoom) is one of the most important camera functions that currently attracts users. Among them, optical zooming is generated by a change in the position of three parties, a camera (or referred to as a lens), an object, and a focus. When the imaging surface moves in the horizontal direction, the visual angle and the focal length can be changed, and the scenery farther becomes clearer, so that the progressive feeling of the object can be given.
The shutter is a device for controlling the time of light entering the camera to determine the exposure time of an image. The longer the shutter remains in the open state, the more light that enters the camera, and the longer the exposure time corresponding to the image. Conversely, the shorter the shutter remains in the open state, the less light enters the camera and the shorter the corresponding exposure time of the image.
The exposure time refers to the time required for the shutter to open in order to project light onto the photosensitive surface of the photosensitive material of the camera. The exposure time is determined by the sensitivity of the photosensitive material and the illuminance on the photosensitive surface. The longer the exposure time, the more light enters the camera, the shorter the exposure time, and the less light enters the camera. Thus, a long exposure time is required in a dark scene and a short exposure time is required in a backlight scene.
The aperture value (f-number) is the ratio of the focal length of the lens (lens) in the camera to the diameter of the lens through which light passes. The larger the aperture value, the more light that enters the camera. The smaller the aperture value, the less light enters the camera.
An Exposure Value (EV) is a value indicating the lens light-transmitting capability of the camera by combining the exposure time and the aperture value. The exposure value may be defined as:
where EV is exposure value, N is aperture value, t is exposure time in seconds.
ISO, for measuring the sensitivity of the backsheet to light, i.e. the sensitivity or gain. For a non-sensitive film, a longer exposure time is required to achieve the same imaging as the brightness of the sensitive film. For sensitive negatives, a shorter exposure time is required to achieve the same imaging as the brightness of the insensitive negative.
The automatic exposure (automatic exposure, AE) is an algorithm that automatically adjusts the shooting parameters so that the brightness value of the acquired image is within a reasonable gray scale. Wherein the photographing parameters include an exposure value, an exposure time, an aperture value, and ISO.
Illustratively, the exposure value may be any one of-24, -4, -3, -2, -1, 0,1, 2, 3, 4, and 24, and the electronic device may determine that an exposure image is captured by using an algorithm (such as an AE algorithm), where different exposure values correspond to different exposure images. For example, the exposure image corresponding to EV0 is used to instruct the electronic device to capture the exposure image by the determined exposure value 0 when the electronic device achieves exposure by the algorithm. And the exposure image corresponding to the EV-2 is used for indicating the exposure image captured by the determined exposure value-2 when the electronic equipment realizes exposure through an algorithm. And the exposure image corresponding to EV1 is used for indicating the exposure image captured by the determined exposure value 1 when the electronic equipment realizes exposure through an algorithm. And so on, and will not be described in detail herein.
Wherein, every 1 increase in exposure value will change one-step exposure, i.e. the exposure (which is the integral of the illuminance received by a certain surface element of the object surface in time t) is doubled, for example, the exposure time or the aperture area is doubled. Then an increase in exposure value will correspond to a slower shutter speed and a smaller f-value. From this, EV0 is increased by 2 relative to EV-2, changing the two-shift exposure; similarly, EV1 increases the exposure value by 1 with respect to EV0, changing the one-stop exposure.
Here, when the exposure value EV is equal to 0, the exposure value is generally the optimum exposure value under the current illumination condition. Correspondingly, the exposure image correspondingly acquired by the electronic device under the EV0 condition is the best exposure image under the current illumination condition, and the best exposure image can also be called as a reference exposure image.
Currently, a terminal device supporting zooming is basically configured with three cameras, which are generally combined into an ultra-wide-angle camera, a wide-angle camera (also referred to as a main camera), and a tele camera. Here, the field of view (FOV) of the three cameras is different, and the equivalent focal length is also different, that is, the viewing ranges of the three cameras are different. Typically, when a user is facing a distant object, the zoom magnification will tend to be enlarged on the camera, thereby zooming in on the object. Based on different zoom multiplying power and different object distances, the camera with different focal lengths is used for video recording and photographing, so that clear pictures can be obtained.
That is, in order to ensure the definition of a picture when photographing objects at different distances, a user may manually adjust the zoom magnification. In the zooming process, after the zooming multiplying power reaches a certain value, the terminal equipment can switch different cameras. For example, in a process in which the zoom magnification is increasing from a minimum value, the terminal device may sequentially use the ultra-wide-angle camera, the wide-angle camera, and the telephoto camera to perform photographing. Due to disparity and inconsistency of optical performance of cameras, a phenomenon of blocking exists in the images in the switching process of the three cameras, and switching is not natural.
In one embodiment, in order to make transition between pictures before and after the camera is switched natural, in a process that the terminal device is switched from one camera to another camera (may also be referred to as a camera to be switched), the terminal device may take an exposure value of the camera to be switched when the camera to be switched is last shot as the exposure value of the camera to be switched at this time, and make the camera to be switched shoot based on the exposure value to obtain an image.
However, the method is only suitable for the situation that the ambient brightness is relatively close when the camera to be switched shoots twice. If the ambient brightness is lower in the previous shooting and higher in the current shooting, the image obtained by the current shooting is subjected to overexposure; if the ambient brightness is higher in the previous shooting and lower in the current shooting, the underexposure condition will occur in the shooting. For example, as shown in fig. 1 (a), a user first turns on a camera application at night when the light is dark, and turns off the camera application after taking a plurality of frames of images by using a tele camera. Then, as shown in (b) of fig. 1, the user moves to daytime in which the light is bright to open the camera application of the terminal device. In this case, as shown in (a) of fig. 2, the terminal device may display an interface 101 of the camera application, the interface 101 including a viewfinder 102 and a zoom bar 103. Wherein the viewfinder 102 displays an image 102a from the main camera. The zoom bar 103 indicates a zoom magnification of 1.0x. In response to the user's operation to move the zoom bar 103 to the left, on the one hand, the terminal device increases the zoom magnification, and on the other hand, as shown in (b) of fig. 2, the image in the viewfinder 102 gradually increases. When the zoom magnification is changed to 2.0x, the terminal device switches the main camera to the tele camera. Meanwhile, the terminal device may acquire an exposure value of the last frame image photographed by the telephoto camera in the scene shown in (a) of fig. 1, and control the telephoto camera to photograph based on the exposure value, and display an image 102b shown in (c) of fig. 2 in the viewfinder frame 102. The image 102b is captured by a tele camera, but the exposure value corresponding to the image 102b is an exposure value at low brightness, so that the image 102b may be overexposed. Thereafter, the terminal apparatus continues to take a photograph with the telephoto camera to obtain an image, adjusts an exposure value of the image with the AE algorithm, and displays an image 102c as shown in (d) of fig. 2 in the viewfinder frame 102. The exposure value corresponding to the image 102c is an exposure value adjusted by the AE algorithm, and is attached to the current ambient brightness, and the exposure degree of the image 102c is smaller than that of the image 102b.
Therefore, if the difference of the ambient brightness of the camera to be switched is large when the camera to be switched shoots twice, the situation that the exposure of the image shot by the camera to be switched is abnormal can be caused, so that the transition of the pictures before and after the camera is switched is not smooth and natural.
In view of the above, the present application provides a photographing method applied to an electronic device including a first camera and a second camera. The method comprises the following steps: the electronic equipment displays a shooting preview interface, wherein the shooting preview interface comprises a first image from a first camera; responding to the operation of adjusting the zoom magnification by a user, and acquiring the current zoom magnification by the electronic equipment; under the condition that the current zoom magnification reaches a preset first zoom magnification, the electronic equipment is switched from the first camera to the second camera; if the difference value between the first brightness value and the second brightness value is greater than or equal to a first threshold value, the electronic equipment displays a second image from the second camera on the shooting preview interface; the first brightness value is used for reflecting the ambient brightness when the first camera shoots, the second brightness value is used for reflecting the ambient brightness when the second camera shoots last time, the second image is obtained by shooting the second camera according to the first exposure value, and the first exposure value corresponds to the first brightness value.
The environmental brightness of the second camera when the electronic device starts the camera application last time can be understood as the environmental brightness of the second camera when the last frame of image is shot in the shooting process. For example, the second camera is a wide-angle camera (may also be referred to as a main camera), and if the electronic device uses the wide-angle camera to capture n frames of images after the electronic device starts the camera application last time and then closes the camera application, the environmental brightness of the second camera when the second camera captures the n frames of images last time is the environmental brightness of the second camera when the second camera captures the n frames of images. For another example, the second camera is a tele camera, and if the electronic device uses the tele camera to shoot m frames of images when the electronic device starts the camera application for the first time and does not use the tele camera to shoot the camera application for the last time, the environmental brightness of the second camera when shooting the m frames of images is the environmental brightness of the second camera when shooting the m frames of images.
It can be understood that when the difference value between the first brightness value and the second brightness value is greater than or equal to the first threshold value, the first brightness value capable of accurately reflecting the current ambient brightness is utilized to determine the first exposure value, and the second camera is controlled to shoot based on the first exposure value to obtain the second image, so that the brightness value of the second image is more adaptive to the current ambient brightness, the risk of exposure abnormality of the second image is reduced, the brightness of the picture in the process of switching the camera can be transited naturally, and the problem of unnatural picture switching caused by overlarge brightness difference is weakened.
The electronic device may be a device with a plurality of cameras having different viewing ranges, such as 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 (augmented reality, AR) device, a Virtual Reality (VR) device, an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) device, a wearable device, a vehicle-mounted device, an intelligent home device, and/or a smart city device, which are not particularly limited in the embodiment of the present application.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 3, the electronic device may include: processor 210, external memory interface 220, internal memory 221, usb interface 230, charge management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, headset interface 270D, sensor module 280, keys 290, motor 291, indicator 292, camera 293, display 294, and subscriber identity module (subscriber identification module, SIM) card interface 295, etc.
Processor 210 may include, among other things, one or more processing units, such as: processor 210 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 (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. The processor 210 may be a neural hub and a command center of the electronic device. The processor 210 may generate operation control signals according to the instruction operation code and the timing signals to complete instruction fetching and instruction execution control.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 210 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include an integrated circuit (inter-INTEGRATED CIRCUIT, I2C) interface, an integrated circuit built-in audio (inter-INTEGRATED CIRCUIT SOUND, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The external memory interface 220 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device. The external memory card communicates with the processor 210 through an external memory interface 220 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
Internal memory 221 may be used to store computer executable program code that includes instructions. The processor 210 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 221. For example, in an embodiment of the present application, the processor 210 may include a memory program area and a memory data area by executing instructions stored in the internal memory 221.
The storage program area may store, among other things, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, a configuration file of the motor 291, etc. The storage data area may store data created during use of the electronic device (e.g., audio data, phonebook, etc.), and so forth. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The charge management module 240 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 240 may also provide power to the electronic device through the power management module 241 while charging the battery 242.
The power management module 241 is used for connecting the battery 242, and the charge management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and/or the charge management module 240 and provides power to the processor 210, the internal memory 221, the external memory, the display 294, the camera 293, the wireless communication module 260, and the like. In some embodiments, the power management module 241 and the charge management module 240 may also be provided in the same device.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like. In some embodiments, antenna 1 and mobile communication module 250 of the electronic device are coupled, and antenna 2 and wireless communication module 260 are coupled, such that the electronic device may communicate with a network and other devices through wireless communication techniques.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 250 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on an electronic device. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), or the like. The mobile communication module 250 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The mobile communication module 250 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be disposed in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be provided in the same device as at least some of the modules of the processor 210.
The wireless communication module 260 may provide solutions for wireless communication including WLAN (e.g., (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near Field Communication (NFC), infrared (IR), etc. applied on an electronic device.
The wireless communication module 260 may be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 may also receive a signal to be transmitted from the processor 210, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
The electronic device may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an ear-headphone interface 270D, an application processor, and the like. Such as music playing, recording, etc.
The sensor module 280 may include sensors such as pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and bone conduction sensors. The electronics can collect various data via the sensor module 280.
The electronic device implements display functions through the GPU, the display screen 294, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
The display 294 is used to display images, videos, and the like. The display 294 includes a display panel.
The electronic device may implement shooting functions through an ISP, a camera 293, a video codec, a GPU, a display 294, an application processor, and the like. The ISP is used to process the data fed back by the camera 293. The camera 293 is used to capture still images or video. In some embodiments, the electronic device may include N cameras 293, where N is a positive integer greater than 1, and the N cameras 293 have different viewing ranges.
Keys 290 include a power on key, a volume key, etc. The keys 290 may be mechanical keys. Or may be a touch key. The motor 291 may generate a vibration alert. The motor 291 may be used for incoming call vibration alerting or for touch vibration feedback. The indicator 292 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message indicating a missed call, a notification, etc. The SIM card interface 295 is for interfacing with a SIM card. The SIM card may be inserted into the SIM card interface 295 or removed from the SIM card interface 295 to enable contact and separation from the electronic device. The electronic device may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 295 may support Nano SIM cards, micro SIM cards, and the like.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device. In other embodiments, the electronic device may also include more or fewer modules than provided in the foregoing embodiments, and different interfaces or a combination of multiple interfaces may be used between the modules in the foregoing embodiments.
The photographing method provided by the embodiment of the application is specifically described below by taking electronic equipment as a mobile phone and referring to the attached drawings.
Fig. 4 is a flowchart of a photographing method according to an embodiment of the present application, where the method may be applied to the electronic device shown in fig. 3.
As shown in fig. 4, the photographing method provided by the present application includes:
s401, the electronic equipment displays a shooting preview interface.
The shooting preview interface comprises a first image from a first camera. The first camera can be any one of an ultra-wide angle camera, a wide angle camera or a long-focus camera.
In an alternative embodiment, the electronic device receives an operation of starting a camera application by a user, and displays the shooting preview interface. For example, taking an electronic device as a mobile phone, as shown in (a) of fig. 5, a main interface 501 (which may also be referred to as a desktop) of the mobile phone includes an icon 501a of a camera application, the mobile phone may receive a click operation of the icon 501a of the camera application by a user (i.e., an operation of opening the camera application by the user), and in response to the click operation, as shown in (b) of fig. 5, the mobile phone may display an interface 502 (i.e., a shooting preview interface). The interface 502 includes a first image 502a and a zoom bar 503 (which may also be referred to as a first control). The zoom bar 503 indicates that the current zoom magnification is 1.0x, and the camera corresponding to the zoom magnification is a wide-angle camera, that is, the first image 502a is an image from the wide-angle camera. That is, in this case, the first camera is a wide-angle camera.
As shown in (b) of fig. 5, the zoom bar 503 is vertically disposed, and the zoom magnification can be reduced or increased by moving the zoom bar 503 downward or upward. Note that, the expression form of the zoom bar 503 may be other, for example, in other embodiments, the zoom bar 503 may be horizontally disposed, and the zoom magnification may be changed by moving the zoom bar 503 to the left or right; still alternatively, the zoom bar 503 may be curved, and the zoom magnification may be changed by rotating the zoom bar 503 clockwise or counterclockwise.
In another alternative embodiment, the shooting preview interface may be an interface when the zoom magnification is at any value within the zoom range. For example, the shooting preview interface is an interface when the zoom magnification is 2.0x, and in this case, the first camera is a tele camera. For another example, the shooting preview interface is an interface when the zoom magnification is 0.5x, and in this case, the first camera is an ultra-wide angle camera.
S402, responding to the operation of adjusting the zoom magnification by a user, and acquiring the current zoom magnification by the electronic equipment.
In an alternative embodiment, the operation of the user to adjust the zoom magnification may be an operation of the user to move the zoom bar 503. For example, the electronic device may receive an operation of the user to move the zoom bar 503 upward or downward. In response to an operation of the user moving the zoom bar 503, the electronic apparatus adjusts the zoom magnification, and displays a screen obtained after zooming in the interface 502. For example, if the user wishes to acquire more details of the target, the user may move the zoom bar 503 upward as shown in (a) of fig. 6. In response to this operation, the electronic apparatus may increase the zoom magnification, and display the image obtained after zooming. Illustratively, as shown in (b) of fig. 6, the zoom magnification is changed from 1.0x to 2.0x (i.e., the current zoom magnification is 2.0 x), and the electronic device displays an image 502b in the interface 502, the image 502b being larger than the image 502 a. If the user wishes to be able to take more content in the vicinity, the zoom bar 503 may be moved downward, and in response to this operation, the electronic apparatus may zoom out the zoom magnification, and display the image obtained after zooming.
In another alternative embodiment, the operation of the user to adjust the zoom magnification may be an operation of the user to pinch or pinch on the current viewfinder screen by two fingers. For example, as shown in (a) of fig. 7, the electronic apparatus may receive an operation in which the user kneads on the interface 502 by two fingers, and in response to the operation, as shown in (b) of fig. 7, the zoom magnification is reduced from 1.0x to 0.5x (i.e., the current zoom magnification is 0.5 x), while the image displayed on the interface 502 is also reduced.
In other embodiments, the operation of adjusting the zoom magnification by the user may further include other operations, such as adjusting the zoom magnification by a physical key (e.g., a volume key+, a volume key-) and the like, which are not particularly limited herein.
It will be appreciated that the current zoom magnification is changed in real time during the user adjustment of the zoom magnification.
S403, when the current zoom magnification reaches a preset first zoom magnification, the electronic equipment is switched from the first camera to the second camera.
That is, in the process of adjusting the zoom magnification by the user, the electronic device may determine in real time whether the current zoom magnification reaches the preset first zoom magnification. And under the condition that the current zoom magnification reaches a preset first zoom magnification, the electronic equipment is switched from the first camera to the second camera. The view finding range of the first camera is different from the view finding range of the second camera. The second camera may be any one of an ultra-wide angle camera, a wide angle camera or a tele camera, which satisfies that the view finding range of the first camera is different from the view finding range of the second camera.
The first zoom magnification is a preset magnification threshold, and is related to the optical performance of the second camera. The wider the view angle of the second camera is, the smaller the corresponding multiplying power threshold value is. For example, when the first camera is an ultra-wide angle camera and the second camera is a wide angle camera, the first zoom magnification may be 1.0x; for another example, when the first camera is a wide-angle camera and the second camera is an ultra-wide-angle camera, the first zoom magnification may be 0.5x; for another example, when the first camera is a wide-angle camera and the second camera is a telephoto camera, the first zoom magnification may be 2.0x.
S404, the electronic device acquires the first brightness value and the second brightness value.
The first brightness value can be used for reflecting the ambient brightness of the first camera when shooting, and the second brightness value is used for reflecting the ambient brightness of the second camera when last working. The higher the brightness value is, the higher the ambient brightness is when the camera shoots.
In an optional implementation manner, the first brightness value may be a brightness value of a last frame of image shot by the first camera in a process that the electronic device is switched from the first camera to the second camera; or the average value of the brightness values of the last frames of images shot by the first camera in the process that the electronic equipment is switched from the first camera to the second camera. The second brightness value may be the brightness value of the last frame of image last shot by the second camera, or the average value of the brightness values of the last frames of images last shot by the second camera.
In another alternative embodiment, the electronic device includes a multispectral camera. The multispectral camera is a device which expands towards two directions of infrared light and ultraviolet light on the basis of visible light, and simultaneously receives information radiated or reflected by the same target on different narrow spectral bands respectively through the combination of various optical filters or optical splitters and various photosensitive films so as to obtain photos of the target in different spectral bands. Compared with a common camera, the multispectral camera has a larger spectrum detection range, and the obtained image can reflect the ambient brightness more accurately. It should be noted that, when the camera works, the multispectral camera is always in a working state. For example, after the electronic device starts the camera application, the wide-angle camera is in a working state by default, and meanwhile, the multispectral camera is also in a working state, and through analyzing and calculating the image shot by the multispectral camera, the brightness value corresponding to each frame of image can be determined so as to reflect the ambient brightness. After the electronic equipment is switched from the first camera to the second camera, the multispectral camera is still in a working state. In this case, the first luminance value may be a luminance value of a last frame image photographed by the multispectral camera in a process of switching from the first camera to the second camera; or the average value of the brightness values of the last frames of images shot by the multispectral camera in the process that the electronic equipment is switched from the first camera to the second camera. The second brightness value can be the brightness value of the last frame of image shot by the multispectral camera when the second camera works last time; or, when the second camera works last time, the average value of the brightness values of the last frames of images shot by the multispectral camera is the average value of the brightness values of the last frames of images shot by the multispectral camera.
It is understood that, compared with the method of determining a luminance value using an image captured by a multispectral camera, the luminance value may be determined using an image captured by the first camera or the second camera itself, and the first luminance value and the second luminance value may be determined to reflect the ambient luminance without increasing the multispectral camera.
It should be noted that, in the process of switching the electronic device from the first camera to the second camera, the electronic device may calculate the brightness value of each frame of image captured by the first camera or the multispectral camera by using the AE algorithm, and store the brightness value. For example, the electronic device may divide the image into a plurality of small areas, and take an average luminance value of the plurality of small areas as the luminance value of the image. In addition, after each camera application is started, the electronic equipment can also calculate and store the brightness value of the last frames of images shot by each camera and the shooting parameters corresponding to the brightness value, so that the electronic equipment can conveniently and directly read the first brightness value and the second brightness value.
S405, the electronic device judges whether the difference value between the first brightness value and the second brightness value is greater than or equal to a first threshold value.
If the difference between the first luminance value and the second luminance value is greater than or equal to the first threshold, the electronic device may execute S406; if the difference between the first luminance value and the second luminance value is smaller than the first threshold, the electronic device may execute S407.
It will be appreciated that the first luminance value more accurately reflects the current ambient luminance. If the difference between the first brightness value and the second brightness value is greater than or equal to the first threshold, it indicates that there is a large difference between the ambient brightness of the current shooting and the ambient brightness of the last shooting, and if the shooting parameters used for shooting the last frame or frames of images by the second camera are directly adopted for shooting, the obtained images are most likely to be exposed abnormally, so that the electronic device can execute S406.
If the difference between the first brightness value and the second brightness value is smaller than the first threshold value, the ambient brightness of the current shooting is closer to the ambient brightness of the last shooting. Taking into account the difference between the sensitization of the first camera and the sensitization of the second camera, the electronic device may directly take the shooting parameters used by the last shooting of the last frame or several frames of images by the second camera to obtain a third image, i.e. execute S407.
The first threshold value may be a value that is positively correlated with the absolute value of the second luminance value. Illustratively, the first threshold may be a preset multiple of the absolute value of the second luminance value, the preset multiple being a value greater than 0, for example 0.2, 0.3, etc. That is, in the case where |LV1-LV2|Σ n|LV2|, the electronic apparatus executes S406; in the case where |lv1-LV2| < n|lv2|, the electronic apparatus executes S407. Wherein LV1 is a first brightness value, LV2 is a second brightness value, n is a preset multiple, and LV2 is an absolute value of LV 2. It should be noted that, the preset multiple in the case where the electronic device includes the multispectral camera may be different from the preset multiple in the case where the electronic device does not include the multispectral camera.
It should be noted that, |lv1-LV2| < n|lv2| is only one expression of the relationship satisfied by the first luminance value and the second luminance value. In other embodiments, other expressions may have the same meaning as |LV1-LV2| < n|LV2|. For example, m1 < (LV 1/LV 2) < m2 corresponds to (m 1-1) LV2 < LV1-LV2 < (m 2-1) LV2; when |m2-1|= |m1-1|=n, m1 < (LV 1/LV 2) < m2 corresponds to |lv1-LV2| < n|lv2|. In other words, S405 may also be understood as determining whether the ratio of the first luminance value to the second luminance value is outside the first range, where the first range is (m 1, m 2), and |m2-1|= |m1-1|. If the ratio of the first luminance value to the second luminance value is outside the first range, the electronic device executes S406; if the ratio of the first luminance value to the second luminance value is within the first range, the electronic device performs S407.
In an alternative embodiment, the electronic device may also execute S407 if the first luminance value LV1 is less than or equal to 0. This is because when LV 1.ltoreq.0, it indicates that the camera is not on or there is a malfunction, i.e. there is an abnormality in the first luminance value, which no longer has a reference value.
S406, the electronic device displays a second image from the second camera on the shooting preview interface.
That is, in a case where the current zoom magnification reaches the first zoom magnification and the difference between the first luminance value and the second luminance value is greater than or equal to the first threshold, the electronic device switches from the first camera to the second camera, and displays the second image from the second camera at the photographing preview interface.
The second image is an image obtained by shooting by the second camera according to a first exposure value, and the first exposure value corresponds to the first brightness value. Specifically, the electronic device may determine a shooting parameter according to the first exposure value by using an AE algorithm, and further shoot according to the shooting parameter to obtain a second image. For example, considering that the fixed value of the camera is fixed, the electronic device may utilize the first exposure value andAnd calculating the exposure time, and shooting based on the exposure time to obtain a second image. It can be understood that the electronic device determines the first exposure value by using the first brightness value capable of accurately reflecting the current ambient brightness, and controls the second camera to shoot based on the first exposure value to obtain the second image, so that the brightness value of the second image is more adapted to the current ambient brightness, even if the second image is exposed normally.
In this embodiment, the first exposure value is inversely related to the first brightness value. That is, the larger the first luminance value, the smaller the first exposure value. In an optional implementation manner, the electronic device is preconfigured with a correspondence table of brightness values and exposure values, and the electronic device can query the correspondence table according to the first brightness value to obtain the first exposure value. The correspondence table may be exemplarily shown in table 1:
TABLE 1
Brightness value Exposure value
4.25 1.66E+09
8.5 1.20E+09
17 8.10E+08
34 5.00E+08
68 1.55E+08
90 8.00E+06
105 5000000
130 1500000
160 300000
200 100000
Wherein 1.66E+09 is 1.66×10 9, 1.20E+09 is 1.20×10 9, and so on. As shown in table 1, when the first luminance value is 4.25, it can be determined that the first exposure value is 1.66e+09; when the first luminance value is 160, the first exposure value may be determined to be 300000.
In an alternative embodiment, if the first luminance value is not the luminance value shown in table 1, the electronic device may determine a luminance range in which the first luminance value is located, and determine the first exposure value based on an exposure value range corresponding to the luminance range. For example, the first brightness value is 50, and is located in the interval 34-68; the exposure value range corresponding to the interval 34 to 68 is 5.00e+08 to 1.55e+08, and the exposure value change amount corresponding to the luminance value of each unit is determined to be 1.01e+07, so that the first exposure value when the first luminance value is 50 is determined to be 3.3834e+08.
After the first camera is switched to the second camera, the second camera can continuously shoot k frames of images, wherein the k frames of images are all images obtained by shooting by the second camera according to the shooting parameters determined by the first exposure value. Where k is an integer greater than 1, for example, 2,3, 4, etc. After the second camera continuously shoots k frames of images, the electronic equipment can predict the exposure value of each frame of image by using an AE algorithm and control the second camera to shoot based on the exposure value of each frame of image to obtain a corresponding image frame. For example, as shown in fig. 8A, the electronic device may determine an exposure value of the k frame image according to a brightness value (i.e., a first brightness value) of a last frame image captured by the first camera in a process of switching the first camera to the second camera, and control the second camera to capture the k frame image based on the exposure value. Then, the electronic equipment can determine the exposure value of the (k+1) th frame image based on the brightness value of the (1) th frame image in the k frame images, so that the second camera shoots according to the exposure value of the (k+1) th frame image to obtain the (k+1) th frame image; the electronic equipment can determine the exposure value of the (k+2) th frame image based on the brightness value of the (2) th frame image in the (k) th frame image, so that the second camera shoots according to the exposure value of the (k+2) th frame image to obtain the (k+2) th frame image; the electronic device may determine an exposure value of the k+3 frame image based on the luminance value of the 3 rd frame image in the k frame images, so that the second camera shoots according to the exposure value of the k+3 frame image to obtain the k+3 frame image, and so on.
For another example, as shown in fig. 8B, the electronic device may determine an exposure value of the k frame image according to a brightness value (i.e., a first brightness value) of the last frame image captured by the first camera in the process of switching the first camera to the second camera, and control the second camera to capture the k frame image based on the exposure value. Then, the electronic equipment can determine the exposure value of the k+1st frame image based on the brightness value of the k frame image, so that the second camera shoots according to the exposure value of the k+1st frame image to obtain the k+1st frame image; the electronic equipment can determine the exposure value of the k+2 frame image based on the brightness value of the k+1 frame image, so that the second camera shoots according to the exposure value of the k+2 frame image to obtain the k+2 frame image; the electronic device may determine an exposure value of the k+3 frame image based on the brightness value of the k+2 frame image, so that the second camera shoots according to the exposure value of the k+3 frame image to obtain the k+3 frame image, and so on. In summary, after the second camera continuously shoots k frames of images, the electronic device can automatically adjust shooting parameters by using an AE algorithm.
S407, the electronic device displays a third image from the second camera on the photographing preview interface.
That is, in a case where the current zoom magnification reaches the first zoom magnification and the difference between the first luminance value and the second luminance value is smaller than the first threshold, the electronic device switches from the first camera to the second camera, and displays a third image from the second camera at the photographing preview interface.
The third image is an image obtained by shooting by the second camera according to a second exposure value corresponding to the second brightness value. In an alternative embodiment, the electronic device stores a second exposure value corresponding to the second brightness value and a shooting parameter corresponding to the second exposure value in advance. When the difference value between the first brightness value and the second brightness value is smaller than the first threshold value, the electronic equipment can directly read the second exposure value, and inquire corresponding shooting parameters according to the second exposure value, so that the second camera is controlled to shoot according to the inquired shooting parameters to obtain a third image. Since the second brightness value is also relatively close to the current ambient brightness, the obtained third image has a smaller probability of abnormal exposure.
In an alternative embodiment, the electronic device may also control the second camera to take the second image according to the first exposure value when the difference between the first luminance value and the second luminance value is smaller than the first threshold value. However, compared with the electronic device controlling the second camera to shoot according to the first exposure value to obtain the second image, the electronic device needs to query the first exposure value according to the first brightness value and the corresponding relation table, and further determines the exposure parameter according to the first exposure value by utilizing the AE algorithm, and the electronic device controlling the second camera to shoot according to the second exposure value to obtain the third image can obtain the corresponding shooting parameter only by performing simple reading action, so that the third image with normal exposure can be obtained, the processing process can be simplified, and the calculation resource can be saved.
When the difference between the first brightness value and the second brightness value is smaller than the first threshold, the second camera can continuously shoot k frames of images according to the second exposure value corresponding to the second brightness value after the first camera is switched to the second camera. After the second camera continuously shoots k frames of images, the electronic device can also predict the exposure value of each frame of image by using an AE algorithm, and control the second camera to shoot based on the exposure value of each frame of image to obtain a corresponding image frame, the principle is similar to that shown in fig. 8A and 8B, and details refer to fig. 8A, 8B and related text descriptions, which are not repeated here.
With respect to the photographing method provided in the above embodiment, in the scene shown in fig. 1, this embodiment provides a possible specific example, as described below. As shown in fig. 9 (a), the terminal device may display an interface 901 of a camera application, the interface 901 including a viewfinder 902 and a zoom bar 903. The view finder 902 displays an image 902a from the main camera. The zoom bar 903 indicates a zoom magnification of 1.0x. In response to the user's operation to move the zoom bar 903 to the left, on the one hand, the terminal device increases the zoom magnification, and on the other hand, as shown in (b) in fig. 9, the image in the viewfinder 902 gradually increases. When the zoom magnification is changed to 2.0x, the terminal device switches the main camera to the tele camera. Meanwhile, the terminal device may acquire an exposure value of the last frame image photographed by the telephoto camera in the scene shown in (a) of fig. 1, and control the telephoto camera to photograph based on the exposure value, and display an image 902b shown in (c) of fig. 9 in the viewfinder 902. If the difference between the first brightness value and the second brightness value is greater than or equal to the first threshold, the image 902b is a second image obtained by shooting by the second camera according to the first exposure value; if the difference between the first brightness value and the second brightness value is smaller than the first threshold, the image 902b is a third image obtained by shooting by the second camera according to the second exposure value corresponding to the second brightness value. As can be seen from comparing fig. 2 and fig. 9, the brightness of the image 902b is more natural than the brightness of the image 102b, i.e. the brightness of the picture can be naturally transited during the camera switching process, so that the picture switching is more natural.
In an alternative embodiment, the electronic device may obtain the first luminance value and the second luminance value when the difference between the current zoom magnification and the preset first zoom magnification is smaller than the second threshold, and determine whether the difference between the first luminance value and the second luminance value is greater than or equal to the first threshold.
In this case, the first luminance value may be a luminance value of an image captured by the first camera when a difference between the current zoom magnification and the preset first zoom magnification is smaller than the second threshold. The second luminance value is the same as the luminance value in S404, and will not be described herein.
That is, in the process of adjusting the zoom magnification by the user, the electronic device may determine in real time whether the difference between the current zoom magnification and the first zoom magnification is smaller than the second threshold. When the difference between the current zoom magnification and the first zoom magnification is smaller than the second threshold, the current zoom magnification can be considered to be close to the first zoom magnification, and the first brightness value and the second brightness value are acquired at the moment. The electronic device may then determine whether a difference between the first luminance value and the second luminance value is greater than or equal to a first threshold. If the difference between the first brightness value and the second brightness value is greater than or equal to the first threshold, the electronic device may determine a first exposure value according to the first brightness value, switch from the first camera to the second camera when the current zoom magnification reaches a preset first zoom magnification, and display a second image from the second camera on the shooting preview interface. If the difference between the first brightness value and the second brightness value is smaller than the first threshold, the electronic device can read a second exposure value corresponding to the second brightness value, switch from the first camera to the second camera and display a third image from the second camera on the shooting preview interface when the current zoom magnification reaches the preset first zoom magnification.
It can be understood that, when the difference between the current zoom magnification and the preset first zoom magnification is smaller than the second threshold, the electronic device obtains the first brightness value and the second brightness value, so that the electronic device can obtain the first exposure value or the second exposure value before the current zoom magnification reaches the first zoom magnification, and when the current zoom magnification reaches the preset first zoom magnification, the electronic device can directly shoot according to the first exposure value or the second exposure value to obtain the second image or the third image, so that the time spent by the electronic device for displaying the second image or the third image in the switching process is reduced, and the effect of weakening the picture blocking phenomenon during the switching of the camera is achieved.
With respect to the photographing method provided in the above embodiment, in the case where the electronic device does not include a multispectral camera, this embodiment provides a possible specific example, as shown in fig. 10, which includes the following steps:
Step 1, a user opens a camera application on the electronic equipment, and a main camera of the electronic equipment works.
Step 2, the electronic device calculates and records a first brightness value LV1 of the last frame image shot by the main camera.
Step 3, the user adjusts the zoom magnification to a first zoom magnification (for example, 0.5 x), and the electronic device is switched from the main camera to the ultra-wide-angle camera.
And 4, the electronic equipment reads the second brightness value LV2 of the last frame of image shot by the ultra-wide-angle camera when the last camera application is closed.
In the step 5, the step of the method, the electronic device determines whether |LV1-LV2| < n|LV2| holds.
And 6, under the condition that |LV1-LV2| < n|LV2|, the electronic equipment takes a second exposure value corresponding to the stored second brightness value LV2 as an initial value of an AE algorithm to determine shooting parameters, and controls the second camera to shoot according to the determined shooting parameters to obtain a third image.
And 7, under the condition that the absolute value of LV1-LV2 is not less than n absolute value of LV2, the electronic equipment determines a first exposure value according to the first brightness value LV1, takes the first exposure value as an initial value of an AE algorithm to determine shooting parameters, and controls a second camera to shoot according to the determined shooting parameters to obtain a second image.
With respect to the photographing method provided in the above embodiment, in the case where the electronic device includes a multispectral camera, this embodiment provides a possible specific example, as shown in fig. 11, which includes the following steps:
step 1, a user opens a camera application on the electronic equipment, and a main camera and a multispectral camera of the electronic equipment work.
Step 2, the electronic device calculates and records a first brightness value LV1 of the last frame image shot by the multispectral camera.
Step 3, the user adjusts the zoom magnification to a first zoom magnification (for example, 0.5 x), and the electronic device is switched from the main camera to the ultra-wide-angle camera.
And 4, the electronic equipment reads the second brightness value LV2 of the last frame of image shot by the multispectral camera when the last camera application is closed.
And 5, the electronic equipment judges whether m1 < (LV 1/LV 2) < m2 is true or not.
And 6, when m1 < (LV 1/LV 2) < m2, the electronic equipment takes a second exposure value corresponding to the stored second brightness value LV2 as an initial value of an AE algorithm to determine shooting parameters, and controls the second camera to shoot according to the determined shooting parameters to obtain a third image.
And 7, under the condition that LV1/LV2 is less than m1 or LV1/LV2 is more than m2, the electronic equipment determines a first exposure value according to the first brightness value LV1, takes the first exposure value as an initial value of an AE algorithm to determine shooting parameters, and controls a second camera to shoot according to the determined shooting parameters to obtain a second image.
In summary, when the difference between the first brightness value and the second brightness value is greater than or equal to the first threshold, the first brightness value capable of accurately reflecting the current ambient brightness is used to determine the first exposure value, and the second camera is controlled to shoot based on the first exposure value to obtain the second image, so that the brightness value of the second image is more adaptive to the current ambient brightness; when the difference value between the first brightness value and the second brightness value is smaller than the first threshold value, the second brightness value can reflect the current environment brightness more accurately, at the moment, a second exposure value corresponding to the second brightness value is directly read, the second camera is controlled to shoot based on the second exposure value, and a third image adaptive to the current environment brightness can be obtained. Therefore, the brightness of the image shot by the second camera is always matched with the ambient brightness, the risk of exposure abnormality of the second image can be reduced, the brightness of the picture in the process of switching the camera can be transited naturally, and the problem of unnatural picture switching caused by overlarge picture brightness difference is weakened.
Some embodiments of the application provide an electronic device that may include: a memory, a first camera, a second camera, and one or more processors. The memory, the first camera, and the second camera are coupled to the processor. The memory is for storing computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device may perform the various functions or steps performed by the electronic device in the method embodiments described above. The structure of the electronic device may refer to the structure of the electronic device shown in fig. 3.
Embodiments of the present application also provide a system-on-a-chip (SoC) system including at least one processor 1201 and at least one interface circuit 1202 as shown in fig. 12. The processor 1201 and the interface circuit 1202 may be interconnected by wires. For example, interface circuit 1202 may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, the interface circuit 1202 may be used to send signals to other devices (e.g., the processor 1201 or a touch screen of an electronic apparatus). The interface circuit 1202 may, for example, read instructions stored in memory and send the instructions to the processor 1201. The instructions, when executed by the processor 1201, may cause the electronic device to perform the various steps described in the embodiments above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
Embodiments of the present application also provide a computer readable storage medium, where the computer readable storage medium includes computer instructions, which when executed on an electronic device, cause the electronic device to perform the functions or steps performed by the electronic device in the method embodiments described above.
The embodiment of the application also provides a computer program product, which when run on an electronic device, causes the electronic device to execute the functions or steps executed by the electronic device in the above-mentioned method embodiment.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A photographing method, which is applied to an electronic device including a first camera and a second camera, wherein a view finding range of the first camera is different from a view finding range of the second camera, the method comprising:
The electronic device displays a shooting preview interface, wherein the shooting preview interface comprises a first image from the first camera;
responding to the operation of adjusting the zoom magnification by a user, and acquiring the current zoom magnification by the electronic equipment;
Under the condition that the current zoom magnification reaches a preset first zoom magnification, the electronic equipment is switched from the first camera to the second camera;
If the difference value between the first brightness value and the second brightness value is greater than or equal to a first threshold value, the electronic equipment displays a second image from the second camera on the shooting preview interface; the first brightness value is a brightness value of a last frame of image shot by the first camera or a mean value of brightness values of a last frame of image shot by the first camera in the process that the electronic equipment is switched from the first camera to the second camera, the second brightness value is a brightness value of a last frame of image shot by the second camera when the second camera shoots last time or a mean value of brightness values of a last frame of image shot by the second camera when the second camera shoots last time, and the second image is an image shot by the second camera according to a first exposure value, wherein the first exposure value corresponds to the first brightness value;
If the difference value between the first brightness value and the second brightness value is smaller than the first threshold value, the electronic equipment displays a third image from the second camera on the shooting preview interface; the third image is an image obtained by shooting by the second camera according to a second exposure value, and the second exposure value corresponds to the second brightness value.
2. The method according to claim 1, wherein the method further comprises:
and under the condition that the difference value between the current zoom magnification and the preset first zoom magnification is smaller than a second threshold value, the electronic equipment acquires the first brightness value and the second brightness value.
3. The method according to claim 2, wherein the first luminance value is a luminance value of an image photographed by the first camera when a difference between the current zoom magnification and a preset first zoom magnification is smaller than the second threshold, and the second luminance value is a luminance value of a last frame image photographed by the second camera last time or a mean value of luminance values of last multi-frame images photographed by the second camera last time.
4. The method according to claim 1, wherein the method further comprises:
And under the condition that the current zoom magnification reaches the preset first zoom magnification, the electronic equipment acquires the first brightness value and the second brightness value.
5. The method of claim 4, wherein the electronic device further comprises a multispectral camera, the first luminance value is a luminance value of a last frame of image captured by the multispectral camera or a mean value of luminance values of last frames of image captured by the multispectral camera in a process that the electronic device switches from the first camera to the second camera, and the second luminance value is a luminance value of a last frame of image captured by the multispectral camera when the second camera captured last time or a mean value of luminance values of last frames of image captured by the multispectral camera when the second camera captured last time.
6. The method according to any one of claims 1 to 5, wherein,
The first exposure value corresponding to the first brightness value includes: the first exposure value is determined according to the first brightness value, and the first exposure value and the first brightness value are in negative correlation.
7. The method according to any one of claims 1-5, further comprising:
and the electronic equipment reads the second exposure value from a prestored corresponding relation according to the second brightness value, wherein the prestored corresponding relation comprises a corresponding relation between the second brightness value and the second exposure value.
8. An electronic device, the electronic device comprising: a memory, a first camera, a second camera, and one or more processors; the memory, the first camera, and the second camera are coupled with the processor;
Wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-7.
9. A computer-readable storage medium comprising computer instructions;
The computer instructions, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-7.
CN202211733908.4A 2022-12-30 2022-12-30 Photographing method and electronic equipment Active CN116708954B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211733908.4A CN116708954B (en) 2022-12-30 2022-12-30 Photographing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211733908.4A CN116708954B (en) 2022-12-30 2022-12-30 Photographing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN116708954A CN116708954A (en) 2023-09-05
CN116708954B true CN116708954B (en) 2024-06-11

Family

ID=87843970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211733908.4A Active CN116708954B (en) 2022-12-30 2022-12-30 Photographing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116708954B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278850A (en) * 2023-10-30 2023-12-22 荣耀终端有限公司 Shooting method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851122A (en) * 2017-02-27 2017-06-13 上海兴芯微电子科技有限公司 The scaling method and device of the auto exposure parameter based on dual camera system
CN110351487A (en) * 2019-08-26 2019-10-18 Oppo广东移动通信有限公司 Control method, control device, electronic equipment and storage medium
CN110798626A (en) * 2019-12-02 2020-02-14 重庆紫光华山智安科技有限公司 Automatic exposure adjusting method, system and equipment
CN110933302A (en) * 2019-11-27 2020-03-27 维沃移动通信有限公司 Shooting method and electronic equipment
CN111183632A (en) * 2018-10-12 2020-05-19 华为技术有限公司 Image capturing method and electronic device
CN111432143A (en) * 2020-04-10 2020-07-17 展讯通信(上海)有限公司 Control method, system, medium and electronic device for switching camera modules
CN114125314A (en) * 2021-11-23 2022-03-01 展讯通信(上海)有限公司 Brightness synchronization method, device, storage medium and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851122A (en) * 2017-02-27 2017-06-13 上海兴芯微电子科技有限公司 The scaling method and device of the auto exposure parameter based on dual camera system
CN111183632A (en) * 2018-10-12 2020-05-19 华为技术有限公司 Image capturing method and electronic device
CN110351487A (en) * 2019-08-26 2019-10-18 Oppo广东移动通信有限公司 Control method, control device, electronic equipment and storage medium
CN110933302A (en) * 2019-11-27 2020-03-27 维沃移动通信有限公司 Shooting method and electronic equipment
CN110798626A (en) * 2019-12-02 2020-02-14 重庆紫光华山智安科技有限公司 Automatic exposure adjusting method, system and equipment
CN111432143A (en) * 2020-04-10 2020-07-17 展讯通信(上海)有限公司 Control method, system, medium and electronic device for switching camera modules
CN114125314A (en) * 2021-11-23 2022-03-01 展讯通信(上海)有限公司 Brightness synchronization method, device, storage medium and equipment

Also Published As

Publication number Publication date
CN116708954A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
WO2022262260A1 (en) Photographing method and electronic device
WO2020073959A1 (en) Image capturing method, and electronic device
CN109005366A (en) Camera module night scene image pickup processing method, device, electronic equipment and storage medium
CN114092364B (en) Image processing method and related device
CN112532859A (en) Video acquisition method and electronic equipment
CN113810598B (en) Photographing method, electronic device and storage medium
CN113596316B (en) Photographing method and electronic equipment
CN113810604B (en) Document shooting method, electronic device and storage medium
WO2022252780A1 (en) Photographing method and electronic device
CN113630558B (en) Camera exposure method and electronic equipment
CN113364976B (en) Image display method and electronic equipment
CN116347224B (en) Shooting frame rate control method, electronic device, chip system and readable storage medium
CN116708954B (en) Photographing method and electronic equipment
WO2021032117A1 (en) Photographing method and electronic device
CN113452898A (en) Photographing method and device
CN117177062B (en) Camera switching method and electronic equipment
CN113810590A (en) Image processing method, electronic device, medium, and system
CN113364975B (en) Image fusion method and electronic equipment
CN116546316A (en) Method for switching cameras and electronic equipment
CN113497880A (en) Method for shooting image and electronic equipment
CN112312034B (en) Exposure method and device of image acquisition module, terminal equipment and storage medium
CN115426458B (en) Light source detection method and related equipment thereof
CN116709014B (en) Micro-distance mode identification method and electronic equipment
RU2807091C1 (en) Image merger method and electronic device
CN116055871B (en) Video processing method and related equipment thereof

Legal Events

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