CN107040723B - Imaging method based on double cameras, mobile terminal and storage medium - Google Patents

Imaging method based on double cameras, mobile terminal and storage medium Download PDF

Info

Publication number
CN107040723B
CN107040723B CN201710293301.1A CN201710293301A CN107040723B CN 107040723 B CN107040723 B CN 107040723B CN 201710293301 A CN201710293301 A CN 201710293301A CN 107040723 B CN107040723 B CN 107040723B
Authority
CN
China
Prior art keywords
camera
image
images
exposure
mobile terminal
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
CN201710293301.1A
Other languages
Chinese (zh)
Other versions
CN107040723A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710293301.1A priority Critical patent/CN107040723B/en
Publication of CN107040723A publication Critical patent/CN107040723A/en
Application granted granted Critical
Publication of CN107040723B publication Critical patent/CN107040723B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio

Abstract

The application provides an imaging method based on double cameras, a mobile terminal and a storage medium. The method comprises the following steps: in a preview mode, controlling the first camera and the second camera to respectively acquire images at different focus positions; and after receiving the photographing instruction, controlling the first camera and the second camera to photograph images, and synthesizing the photographed images into a target image. This application is through the image that first camera and second camera gathered with different focus positions to the synthetic image that will gather the image is as final shooting image, can generate the image that the exposure degree is normal, effectively avoids the condition of image overexposure. Therefore, the imaging effect of the image can be effectively guaranteed, the imaging quality is improved, and the use experience of a user is improved.

Description

Imaging method based on double cameras, mobile terminal and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to an imaging method based on two cameras, a mobile terminal, and a storage medium.
Background
With the development of intelligent mobile terminals and the high-speed growth of mobile internet, the photographing function of mobile terminals is more and more powerful, and many users take the mobile terminals as a portable photographing tool, so that the quality of the photographing effect becomes an important index for the users to measure the quality of the mobile terminals.
For the current mobile terminal, when taking a picture, the user can only take a picture by using a single camera. Therefore, when a user takes a picture with the mobile terminal, the quality of the picture can only be adjusted according to the parameters of the camera. However, when the photographed target scene is greatly affected by the illumination, the photo is overexposed, and the real target scene cannot be restored. If the user wants to further process the imaging effect of the image, the image processing method needs to be realized by image processing application software of a third party. However, the image optimization method using the third-party image processing application software needs to process the image as a whole, and therefore, the optimization effect of the image cannot be expected by the user.
Therefore, how to improve the imaging quality of the shot image and improve the extreme experience of the user is a continuously pursued target in the technical field of the mobile terminal at present.
Disclosure of Invention
The application mainly aims to provide an imaging method based on two cameras and a mobile terminal, and aims to solve the problem that in the prior art, the imaging effect of the mobile terminal cannot meet the expectation of a user.
In order to achieve the purpose of the application, the following technical scheme is adopted in the application:
in accordance with an aspect of the present application, there is provided a dual-camera based imaging method, including:
in a preview mode, controlling the first camera and the second camera to respectively acquire images at different focus positions;
and after receiving a photographing instruction, controlling the first camera and the second camera to photograph images, and synthesizing the photographed images into a target image.
Optionally, before controlling the first camera and the second camera to respectively acquire images at different focus positions, the method further includes;
detecting a focus position setting instruction;
and setting the focus position of the first camera and/or the second camera according to the focus setting instruction.
Optionally, after controlling the first camera and the second camera to respectively acquire images at different focal positions, the method further includes:
detecting an exposure level change instruction;
and adjusting the exposure of the composite image of the images collected by the first camera and the second camera according to the exposure change instruction.
Optionally, before detecting the exposure level change instruction, the method further includes:
performing split-screen display on a composite image of images acquired by the first camera and the second camera and a black-and-white effect image of the composite image in the same viewing interface; and the composite image is positioned in a first split screen of the same viewing interface, and the black-and-white effect image is positioned in a second split screen.
Optionally, the exposure level modification instruction includes modifying position information and values of three color channels of red, green and blue.
According to an aspect of the present application, there is provided a mobile terminal including a processor, a memory, a first camera, and a second camera;
the processor is used for executing the imaging program of the double cameras stored in the memory so as to realize the following steps:
in a preview mode, controlling the first camera and the second camera to respectively acquire images at different focus positions;
and after receiving a photographing instruction, controlling the first camera and the second camera to photograph images, and synthesizing the photographed images into a target image.
Optionally, before the step of controlling the images acquired by the first camera and the second camera at different focus positions, the processor is further configured to execute an imaging program of the dual cameras stored in the memory, so as to implement the following steps:
detecting a focus position setting instruction;
and setting the focus position of the first camera and/or the second camera according to the focus setting instruction.
Optionally, after the step of controlling the images acquired by the first camera and the second camera at different focus positions, the processor is further configured to execute an imaging program of the dual cameras stored in the memory, so as to implement the following steps:
after controlling the first camera and the second camera to respectively acquire images at different focus positions, detecting an exposure change instruction;
and adjusting the exposure of the composite image of the images collected by the first camera and the second camera according to the exposure change instruction.
Optionally, after detecting the exposure level change instruction, the processor is further configured to execute an imaging program of the dual cameras stored in the memory to implement the following steps:
performing split-screen display on a composite image of images acquired by the first camera and the second camera and a black-and-white effect image of the composite image in the same viewing interface; and the composite image is positioned in a first split screen of the same viewing interface, and the black-and-white effect image is positioned in a second split screen.
Optionally, the processor is further configured to execute an imaging program of the dual cameras stored in the memory, so as to implement the following steps:
detecting the exposure altering instruction comprising altering position information and three color channel values of red, green and blue.
According to an aspect of the present application, there is provided a computer-readable storage medium storing one or more programs, which are executable by one or more processors, to implement the above-described dual-camera based imaging method.
According to the imaging method based on the two cameras, the mobile terminal and the storage medium, the images collected by the first camera and the second camera at different focal positions are used, the composite image of the collected images is used as the final shot image, the image with normal exposure can be generated, and the condition of overexposure of the image is effectively avoided. Therefore, the imaging effect of the image can be effectively guaranteed, the imaging quality is improved, and the use experience of a user is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present application;
FIG. 2 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
FIG. 3 is a flowchart of a dual-camera based imaging method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a split-screen display of a captured image according to an embodiment of the present application;
fig. 5 is a block diagram of a mobile terminal according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present application may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given taking a mobile terminal as an example, and it will be understood by those skilled in the art that the configuration according to the embodiment of the present application can be applied to a fixed type terminal in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present application, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex-Long Term Evolution), and TDD-LTE (Time Division duplex-Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope of not changing the essence of the application.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present application, a communication network system on which the mobile terminal of the present application is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present disclosure, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and charging functions Entity) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present application is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, various embodiments of the method of the present application are proposed.
The imaging method based on the two cameras provided by the embodiment of the application is particularly suitable for being applied to the mobile terminal. In addition to the above hardware structure, the mobile terminal in the present application adopts a form of dual cameras, that is, includes a first camera and a second camera. The positions of the two cameras in the mobile terminal are not specifically limited, and it needs to be ensured that the two cameras need to be located side by side on the same side of the mobile terminal when photographing. For example, the two cameras are arranged side by side on the back of the mobile terminal, or the cameras are rotatable and can face the front of the mobile terminal or face the passive of the mobile terminal. When the user needs to take a picture, the two cameras rotate to the same side. Wherein, two cameras can be transversely set up side by side, also can vertically set up side by side.
Example 1
Based on the structure of the mobile terminal, an imaging method based on two cameras provided in an embodiment of the present application is provided, as shown in fig. 3, specifically including the following steps:
step 301, in the preview mode, controlling the first camera and the second camera to respectively acquire images at different focus positions.
Wherein in this step, when the camera function is turned on, a preview mode is entered. In preview mode, the imaging effect can be seen in real time. The color image and the black-and-white image are the same part of the images collected by the two cameras in real time, and the different collected parts are not displayed in the collected images.
In this embodiment, the first camera and the second camera respectively capture images at different focus positions, for example, the first camera is used for capturing near-focus character information, and the second camera is used for capturing far-focus background information.
Optionally, in this step, before controlling the first camera and the second camera to respectively acquire images at different focus positions, the method further includes:
detecting a focus setting instruction;
and setting the focus position of the first camera and/or the second camera according to the focus setting instruction.
Specifically, after entering a preview mode, split-screen display is performed on images acquired by a first camera and a second camera in the same viewing interface; the image collected by the first camera is displayed in the first split screen, and the image collected by the second camera is displayed in the second split screen.
Here, the manner of the split screen display may be various. For example, an up-down display mode, a left-right display mode, or a nested display mode may be employed. In order to ensure that the images displayed by the two cameras are consistent, preferably, the display of equal screen portions, that is, the up-down or left-right display modes, can also be adopted.
Specifically, before images collected by a first camera and a second camera at different focus positions respectively, focus setting instructions are detected in a first split screen and a second split screen respectively; when the focus setting instruction is detected in a certain split screen, the focus position of the camera corresponding to the split screen is set.
Step 302, after receiving the photographing instruction, synthesizing the images photographed by the first camera and the second camera into a target image.
In the step, after a photographing instruction is received, the first camera is controlled to photograph the first image and the second camera is controlled to photograph the second image at the same time, and the target image is a composite image of the first image and the second image. When the target image is synthesized, the mobile terminal needs to process the target image after receiving a photographing instruction triggered by the user through the touch corresponding key.
Optionally, when the first image and the second image are synthesized into the target image, the method specifically includes:
acquiring an out-of-focus region of a first image;
regions of the second image corresponding to out-of-focus regions of the first image are stitched into the first image.
For example, the first camera captures the information of the person with a close-focus lens, and when the sunlight proportion in the background is strong, the background of the image captured by the first camera is overexposed; and the second camera takes the background information with an afocal lens, so the presented background is very clear and the exposure is relatively moderate. Therefore, when the first image and the second image are synthesized into the target image, the background of the second image is spliced into the first image, so that the exposure of the close shot and the background of the generated target image are normal, and the imaging effect is optimized.
Specifically, because the focal positions selected by the two cameras are different, when images are synthesized, the situation that the definition is inconsistent near the splicing position may occur. Based on the above example, when the first camera is in close focus, the person is very clear and the background may appear blurred, while the second camera is in focus on the background at a distance, so the background is very clear and the person at a close distance is relatively blurred. Therefore, the temperature of the molten metal is controlled,
optionally, in this embodiment, when the first image and the second image are synthesized into the target image, the method further includes:
acquiring definition information of a first image and a second image of a composite image; and processing the definition of the synthesized image according to a preset algorithm so as to enable the splicing position of the first image and the second image to be more natural.
The selectable preset algorithm can be used for judging the definition of the first image and the definition of the second image, and selecting lower definition as the definition of the synthesized image; alternatively, the average of the degrees of sharpness of the first image and the second image is selected as the degree of sharpness of the composite image. The adjustment of the sharpness may of course also be achieved by other algorithms, which are not described here.
Therefore, the definition of the spliced images is adjusted, the final imaging effect is optimized, the imaging quality of the photos is improved, and the use experience of users is improved.
Based on the above, in the imaging method based on the two cameras provided in the embodiment of the application, the two cameras are used for setting different focuses to acquire images, and the images shot by the two cameras are synthesized, so that the image with normal exposure can be generated, and the condition of overexposure of the image is effectively avoided. Therefore, the imaging effect of the image can be effectively guaranteed and the use experience of the user is improved through the embodiment.
Example 2
As shown in fig. 3, an imaging method based on two cameras provided in another embodiment of the present application specifically includes the following steps based on the above-mentioned embodiment:
step 301, in the preview mode, controlling the first camera and the second camera to respectively acquire images at different focus positions.
In this embodiment, when the first camera and the second camera are controlled to respectively acquire images at different focus positions, the method further includes: and displaying a composite image of the images acquired by the first camera and the second camera in a viewing interface. The composite image here is a preview image of the target image. By displaying the composite image in the preview state, the user can determine the best photographing time, and the use experience of the user is improved.
Further, after displaying a composite image of the images acquired by the first camera and the second camera in the viewing interface, the method further includes:
detecting an exposure level change instruction;
and adjusting the exposure of the synthesized image according to the exposure changing instruction.
Specifically, an adjustment button may be provided in the viewing interface, and when the user triggers the function by specifying a touch gesture, the exposure level change instruction may be detected.
Optionally, when the exposure level of the synthesized image is adjusted, the exposure level may be adjusted by a preset algorithm.
For example, if the average value of the pixel exposure values in the region is greater than the preset threshold, the exposure level is reduced to the preset threshold. Or, if the exposure value is smaller than the preset threshold, adjusting the exposure degree to the preset threshold. The preset algorithm is only for illustration, and other methods for adjusting the exposure level are also possible and are within the scope of the present application.
Optionally, the exposure of the black-and-white image is adjusted by the user according to actual needs. The exposure adjustment instruction comprises an adjustment position of a user and a required adjustment value. When the adjustment is carried out, the method comprises the following steps:
and detecting the area to be adjusted and the exposure value to be adjusted, and adjusting the corresponding area according to the exposure value, so that the requirements of users can be met.
Step 302, after receiving the photographing instruction, synthesizing the images photographed by the first camera and the second camera into a target image.
In the step, after a photographing instruction is received, the first camera is controlled to photograph the first image and the second camera is controlled to photograph the second image. When the first image and the second image are synthesized into a target image, acquiring an out-of-focus area of the first image; regions of the second image corresponding to out-of-focus regions of the first image are stitched into the first image.
Based on the above, the imaging method based on the two cameras provided in the embodiment of the application collects images by setting different focuses through the two cameras, and adjusts the exposure of the synthesized image of the images collected by the two cameras, so that the images shot by the two cameras are synthesized, and the images with normal exposure can be generated, and the panorama is clear.
Example 3
As shown in fig. 3, an imaging method based on two cameras provided in another embodiment of the present application specifically includes the following steps based on the above-mentioned embodiment:
step 301, in the preview mode, controlling the first camera and the second camera to respectively acquire images at different focus positions.
Optionally, in this embodiment, when the first camera and the second camera are controlled to respectively capture images at different focal positions, a composite image of the images captured by the first camera and the second camera and a black-and-white effect image of the composite image are displayed in a same viewing interface in a split-screen manner; the composite image is positioned in a first split screen of the same viewing interface, and the black-and-white effect image of the composite image is positioned in a second split screen.
Since the exposure of the composite image is directly reflected in the black-and-white effect image, the user can determine the position of the abnormal exposure in the composite image through the black-and-white effect image.
Further, after the images acquired by the first camera and the second camera are displayed in a composite image viewing interface, the method further comprises:
detecting an exposure level change instruction in the second split screen;
and adjusting the exposure of the composite image and the black-and-white effect image according to the exposure change instruction.
Specifically, an adjustment button may be provided in the second split-screen view finding interface, and when the user triggers the function by specifying a touch gesture, the exposure level change instruction may be detected.
Optionally, the exposure modification instruction includes modified position information and values of three color channels of RGB.
Wherein the location information is selectable by a user. The values of the three RGB color channels can be set by the user. In the embodiment, through the adjustment of the three channels of RGB, the overexposure of the image is effectively prevented, the situation that the color of the image is distorted is also effectively prevented, and the imaging quality is improved.
Step 302, after receiving the photographing instruction, synthesizing the images photographed by the first camera and the second camera into a target image.
For example, as shown in fig. 4, the display frame No. 1 (the first split screen) and the display frame No. 2 (the second split screen) correspond to each other in the screen (the viewing interface) of the mobile terminal. And the No. 1 display frame displays the composite image of the No. 1 camera and the No. 2 camera. The display frame No. 2 displays the black and white effect image of the composite image.
After a user adjusts the focus in the mobile terminal, the combined image of the No. 1 camera and the No. 2 camera and the black-and-white effect image of the combined image can be respectively obtained in the No. 1 display frame and the No. 2 display frame. A user confirms whether the black-and-white effect image has the overexposure condition, when the overexposure condition exists, the user can have three keys of 'R', 'G' and 'B' on the top of the No. 2 display frame, after any key is selected, the overexposure position is selected in a finger smearing mode, the degree of exposure is adjusted by sliding the button until the user satisfaction state appears in the No. 1 color display frame, and a high-quality picture which can restore the real life scene by 100% can be shot by clicking a shooting button below a screen.
Based on the above, in the imaging method based on two cameras provided in the embodiment of the present application, whether the target image is over-exposed is determined according to the black-and-white effect image of the image synthesized by the two cameras, and when the target image is over-exposed, the over-exposure position of the image can be adjusted in the viewing interface, so that the image presentation effect can better meet the requirements of the user; meanwhile, in the embodiment, exposure values of three color channels of RGB at the position of overexposure can be adjusted, the imaging effect of the image is effectively improved, and the use experience of a user is ensured.
Example 4
Based on the structure of the mobile terminal, the mobile terminal provided in an embodiment of the present application is provided. As shown in fig. 5, the mobile terminal includes a processor 110, a memory 109, a first camera 121, and a second camera 122; the first camera 121 and the second camera 122 need to be located at the same side of the mobile terminal side by side when photographing for collecting images; wherein the processor 110 is configured to execute the dual-camera imaging program stored in the memory 109 to implement the following steps:
in the preview mode, images acquired by the first camera 121 and the second camera 122 at different focus positions are controlled;
when receiving the photographing instruction, the first camera 121 and the second camera 122 are controlled to photograph images, and the photographed images are synthesized into a target image.
Optionally, before the step of controlling the images acquired by the first camera 121 and the second camera 122 at different focus positions, the processor 110 is further configured to execute an imaging program of the two cameras stored in the memory 109, so as to implement the following steps:
detecting a focus position setting instruction;
advancing the focus position of the first camera 121 and/or the second camera 122 according to the focus setting instruction
And (4) setting rows. Wherein, optionally, after entering the preview mode, the processor 110 is further configured to execute the storage
A dual-camera imaging program stored in the device 109 to implement the steps of:
images acquired by the first camera 121 and the second camera 122 are displayed in a split screen mode in the same viewing interface; the image collected by the first camera 121 is displayed in the first split screen, and the image collected by the second camera 122 is displayed in the second split screen.
The split-screen display mode can be various. For example, an up-down display mode, a left-right display mode, or a nested display mode may be employed. In order to ensure that the images displayed by the two cameras are consistent, preferably, the display of equal screen portions, that is, the up-down or left-right display modes, can also be adopted.
Optionally, before the step of acquiring images at different focus positions by the first camera 121 and the second camera 122, the processor 110 is further configured to execute a dual-camera imaging program stored in the memory 109, so as to implement the following specific steps:
detecting focus setting instructions in the first split screen and the second split screen respectively;
when the focus setting instruction is detected in a certain split screen, the focus position of the camera corresponding to the split screen is set.
When the step of synthesizing the images shot by the first camera 121 and the second camera 122 into the target image is implemented by the processor 110 after receiving the shooting instruction, the first camera 121 is controlled to shoot the first image and the second camera 122 is controlled to shoot the second image at the same time, and the target image is a synthesized image of the first image and the second image.
Optionally, the processor 110 is further configured to execute the imaging program of the dual cameras stored in the memory 109, so as to implement the following specific steps:
acquiring an out-of-focus region of a first image;
regions of the second image corresponding to out-of-focus regions of the first image are stitched into the first image.
Optionally, in this embodiment, when the first image and the second image are synthesized into the target image, the processor 110 is further configured to execute the imaging program of the dual cameras stored in the memory 109, so as to implement the following steps:
acquiring definition information of a first image and a second image of a composite image;
and processing the definition of the synthesized image according to a preset algorithm so as to enable the splicing position of the first image and the second image to be more natural.
Wherein, the optional preset algorithm may be: judging the definition of the first image and the definition of the second image, and selecting the lower definition as the definition of the synthesized image; alternatively, the average of the degrees of sharpness of the first image and the second image is selected as the degree of sharpness of the composite image. The adjustment of the sharpness may of course also be achieved by other algorithms, which are not described here.
Therefore, the definition of the spliced images is adjusted, the final imaging effect is optimized, the imaging quality of the photos is improved, and the use experience of users is improved.
Based on the above, the mobile terminal provided in the embodiment of the application collects images by adopting the two cameras to set different focuses, and synthesizes the images shot by the two cameras, so that the images with normal exposure can be generated, and the condition of overexposure of the images is effectively avoided. Therefore, the imaging effect of the image can be effectively guaranteed and the use experience of the user is improved through the embodiment.
Example 5
In another embodiment of the present application, based on the foregoing embodiments, the mobile terminal includes a processor 110, a memory 109, a first camera 121, and a second camera 122;
the processor 110 is configured to execute the dual-camera imaging program stored in the memory 109 to implement the following steps:
in the preview mode, images acquired by the first camera 121 and the second camera 122 at different focus positions are controlled;
when receiving the photographing instruction, the first camera 121 and the second camera 122 are controlled to photograph images, and the photographed images are synthesized into a target image.
Optionally, the processor 110 is configured to execute a dual-camera imaging program stored in the memory 109 to implement the following steps:
when the first camera 121 and the second camera 122 are controlled to capture images at different focal positions, a composite image of the images captured by the first camera 121 and the second camera 122 is displayed on the viewing interface. The composite image here is a preview image of the target image. By displaying the composite image in the preview state, the user can determine the best photographing time, and the use experience of the user is improved.
Further, after the step of displaying in the composite image view interface where the first camera 121 and the second camera 122 capture images, the processor 110 is configured to execute the imaging program of the dual cameras stored in the memory 109 to implement the following steps:
detecting an exposure level change instruction;
and adjusting the exposure of the synthesized image according to the exposure changing instruction.
Specifically, an adjustment button may be provided in the viewing interface, and when the user triggers the function by specifying a touch gesture, the exposure level change instruction may be detected.
Alternatively, when the processor 110 implements the step of adjusting the exposure level of the synthesized image, it may be implemented by an algorithm preset in the memory 109.
Optionally, the exposure adjustment instruction includes an adjustment position of the user and a required adjustment value. The processor 110 is configured to execute the dual-camera imaging program stored in the memory 109 to implement the following steps:
and detecting the area to be adjusted and the exposure value to be adjusted, and adjusting the corresponding area according to the exposure value, so that the requirements of users can be met.
Optionally, the processor 110 is configured to execute a dual-camera imaging program stored in the memory 109 to implement the following steps:
acquiring an out-of-focus region of a first image;
regions of the second image corresponding to out-of-focus regions of the first image are stitched into the first image.
Based on the above, the mobile terminal that provides in this application embodiment sets up different focuses through adopting two cameras and gathers the image to adjust the exposure of the composite image of the image that two cameras were gathered, consequently synthesize when the image of shooing with two cameras, can generate the image that the exposure is normal, and the panorama is comparatively clear image, consequently, through this embodiment, can effectively guarantee the imaging effect of image, improve user's use and experience.
Example 6
The mobile terminal provided by the further embodiment of the present application is based on the above-mentioned embodiment. But it is different from the above-described embodiment that the processor 110 implements the image display and the image adjustment steps.
Specifically, in this embodiment, in controlling the images acquired by the first camera 121 and the second camera 122 at different focus positions, respectively, the processor 110 is configured to execute an imaging program of the dual cameras stored in the memory 109 to implement the following steps:
performing split-screen display on a composite image of images acquired by the first camera 121 and the second camera 122 and a black-and-white effect image of the composite image in the same viewing interface; the composite image is positioned in a first split screen of the same viewing interface, and the black-and-white effect image of the composite image is positioned in a second split screen.
Since the exposure of the composite image is directly reflected in the displayed black-and-white effect image, the user can determine the position of the exposure abnormality in the composite image through the black-and-white effect image.
In this embodiment, after displaying in the composite image viewfinder interface where the first camera 121 and the second camera 122 capture images, the processor 110 is configured to execute the dual-camera imaging program stored in the memory 109 to implement the following steps:
detecting an exposure level change instruction in the second split screen;
and adjusting the exposure of the composite image and the black-and-white effect image according to the exposure change instruction.
Specifically, an adjustment button may be provided in the second split-screen view finding interface, and when the user triggers the function by specifying a touch gesture, the exposure level change instruction may be detected. Optionally, the exposure modification instruction includes modified position information and values of three color channels of RGB.
Wherein the location information is selectable by a user. The values of the three RGB color channels can be set by the user. In the embodiment, through the adjustment of the three channels of RGB, the overexposure of the image is effectively prevented, the situation that the color of the image is distorted is also effectively prevented, and the imaging quality is improved.
Based on the above, the mobile terminal provided in the embodiment of the present application determines whether the target image is over-exposed according to the black-and-white effect image of the image synthesized by the two cameras, and when the target image is over-exposed, the over-exposed position of the image can be adjusted in the viewing interface, so that the image presenting effect can better meet the user requirement; meanwhile, in the embodiment, exposure values of three color channels of RGB at the position of overexposure can be adjusted, the imaging effect of the image is effectively improved, and the use experience of a user is ensured.
Example 7
The embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium herein stores one or more programs. Among other things, computer-readable storage media may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above. When the one or more programs in the computer readable storage medium are executable by the one or more processors, the method for imaging based on two cameras provided in any of embodiments 1-3 above is implemented.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method of the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (7)

1. An imaging method based on dual cameras, comprising:
in a preview mode, controlling a first camera and a second camera to acquire images at different focus positions respectively;
performing split-screen display on a composite image of images acquired by the first camera and the second camera and a black-and-white effect image of the composite image in the same viewing interface; the composite image is positioned in a first split screen of the same viewing interface, and the black-and-white effect image is positioned in a second split screen;
detecting an exposure level change instruction; adjusting the exposure of a composite image of the images collected by the first camera and the second camera according to the exposure change instruction;
and after receiving a photographing instruction, controlling the first camera and the second camera to photograph images, and synthesizing the photographed images into a target image.
2. The method of claim 1, wherein the method further comprises, prior to controlling the first camera and the second camera to acquire images at different focus positions, respectively;
detecting a focus position setting instruction;
and setting the focus position of the first camera and/or the second camera according to the focus setting instruction.
3. The method of claim 1, wherein the exposure modification instruction includes modifying position information and values of three color channels, red, green, and blue.
4. A mobile terminal is characterized in that the mobile terminal comprises a processor, a memory, a first camera and a second camera;
the processor is used for executing the imaging program of the double cameras stored in the memory so as to realize the following steps:
in a preview mode, controlling a first camera and a second camera to acquire images at different focus positions respectively;
performing split-screen display on a composite image of images acquired by the first camera and the second camera and a black-and-white effect image of the composite image in the same viewing interface; the composite image is positioned in a first split screen of the same viewing interface, and the black-and-white effect image is positioned in a second split screen;
detecting an exposure level change instruction; adjusting the exposure of a composite image of the images collected by the first camera and the second camera according to the exposure change instruction;
and after receiving a photographing instruction, controlling the first camera and the second camera to photograph images, and synthesizing the photographed images into a target image.
5. The mobile terminal of claim 4, wherein prior to the step of controlling the images captured by the first camera and the second camera at different respective focal positions, the processor is further configured to execute a dual-camera imaging program stored in the memory to implement the steps of:
detecting a focus position setting instruction;
and setting the focus position of the first camera and/or the second camera according to the focus setting instruction.
6. The mobile terminal of claim 4, wherein the processor is further configured to execute a dual-camera imaging program stored in the memory to implement the steps of:
detecting the exposure altering instruction comprising altering position information and three color channel values of red, green and blue.
7. A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs which are executable by one or more processors to implement the method of any one of claims 1 to 3.
CN201710293301.1A 2017-04-28 2017-04-28 Imaging method based on double cameras, mobile terminal and storage medium Active CN107040723B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710293301.1A CN107040723B (en) 2017-04-28 2017-04-28 Imaging method based on double cameras, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710293301.1A CN107040723B (en) 2017-04-28 2017-04-28 Imaging method based on double cameras, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107040723A CN107040723A (en) 2017-08-11
CN107040723B true CN107040723B (en) 2020-09-01

Family

ID=59538709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710293301.1A Active CN107040723B (en) 2017-04-28 2017-04-28 Imaging method based on double cameras, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN107040723B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633235B (en) * 2017-09-27 2020-12-25 Oppo广东移动通信有限公司 Unlocking control method and related product
CN107566738A (en) * 2017-10-13 2018-01-09 维沃移动通信有限公司 A kind of panorama shooting method, mobile terminal and computer-readable recording medium
CN107566742B (en) * 2017-10-27 2020-05-22 Oppo广东移动通信有限公司 Shooting method, shooting device, storage medium and electronic equipment
CN109120858B (en) * 2018-10-30 2021-01-15 努比亚技术有限公司 Image shooting method, device, equipment and storage medium
CN111858811B (en) * 2020-07-20 2023-07-28 北京百度网讯科技有限公司 Method and device for constructing interest point image, electronic equipment and storage medium
CN113592734B (en) * 2021-07-23 2024-01-23 北京字节跳动网络技术有限公司 Image processing method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547069A (en) * 2012-01-19 2012-07-04 西安联客信息技术有限公司 Mobile terminal and image split-screen processing method therefor
CN104333703A (en) * 2014-11-28 2015-02-04 广东欧珀移动通信有限公司 Method and terminal for photographing by virtue of two cameras
CN104349063A (en) * 2014-10-27 2015-02-11 东莞宇龙通信科技有限公司 Method, device and terminal for controlling camera shooting
CN105376396A (en) * 2014-08-07 2016-03-02 Lg电子株式会社 Mobile terminal and controlling method thereof
CN105827990A (en) * 2016-01-22 2016-08-03 维沃移动通信有限公司 Automatic exposure method and mobile terminal
CN106550194A (en) * 2016-12-26 2017-03-29 珠海格力电器股份有限公司 Photographic method, device and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547069A (en) * 2012-01-19 2012-07-04 西安联客信息技术有限公司 Mobile terminal and image split-screen processing method therefor
CN105376396A (en) * 2014-08-07 2016-03-02 Lg电子株式会社 Mobile terminal and controlling method thereof
CN104349063A (en) * 2014-10-27 2015-02-11 东莞宇龙通信科技有限公司 Method, device and terminal for controlling camera shooting
CN104333703A (en) * 2014-11-28 2015-02-04 广东欧珀移动通信有限公司 Method and terminal for photographing by virtue of two cameras
CN105827990A (en) * 2016-01-22 2016-08-03 维沃移动通信有限公司 Automatic exposure method and mobile terminal
CN106550194A (en) * 2016-12-26 2017-03-29 珠海格力电器股份有限公司 Photographic method, device and mobile terminal

Also Published As

Publication number Publication date
CN107040723A (en) 2017-08-11

Similar Documents

Publication Publication Date Title
CN106937039B (en) Imaging method based on double cameras, mobile terminal and storage medium
CN107302663B (en) Image brightness adjusting method, terminal and computer readable storage medium
CN107040723B (en) Imaging method based on double cameras, mobile terminal and storage medium
CN108900790B (en) Video image processing method, mobile terminal and computer readable storage medium
CN107820014B (en) Shooting method, mobile terminal and computer storage medium
CN108848294B (en) Shooting parameter adjusting method, terminal and computer readable storage medium
CN107438163B (en) Photographing method, terminal and computer readable storage medium
CN110072061B (en) Interactive shooting method, mobile terminal and storage medium
CN108419008B (en) Shooting method, terminal and computer readable storage medium
CN107240072B (en) Screen brightness adjusting method, terminal and computer readable storage medium
CN111885307B (en) Depth-of-field shooting method and device and computer readable storage medium
CN111064895B (en) Virtual shooting method and electronic equipment
CN109348137B (en) Mobile terminal photographing control method and device, mobile terminal and storage medium
CN113179374A (en) Image processing method, mobile terminal and storage medium
CN109120858B (en) Image shooting method, device, equipment and storage medium
CN112188082A (en) High dynamic range image shooting method, shooting device, terminal and storage medium
CN108200352B (en) Method, terminal and storage medium for adjusting picture brightness
CN112367443A (en) Photographing method, mobile terminal and computer-readable storage medium
CN110177207B (en) Backlight image shooting method, mobile terminal and computer readable storage medium
CN110086993B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN108093233B (en) Image processing method, terminal and computer readable storage medium
CN113347372A (en) Shooting light supplement method, mobile terminal and readable storage medium
CN109510941B (en) Shooting processing method and device and computer readable storage medium
CN111787234A (en) Shooting control method and device and computer readable storage medium
CN108495033B (en) Photographing regulation and control method and device and computer readable storage medium

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