CN112887612B - Shooting method and device and electronic equipment - Google Patents

Shooting method and device and electronic equipment Download PDF

Info

Publication number
CN112887612B
CN112887612B CN202110113015.9A CN202110113015A CN112887612B CN 112887612 B CN112887612 B CN 112887612B CN 202110113015 A CN202110113015 A CN 202110113015A CN 112887612 B CN112887612 B CN 112887612B
Authority
CN
China
Prior art keywords
shooting
image
exposure time
exposure
cameras
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
CN202110113015.9A
Other languages
Chinese (zh)
Other versions
CN112887612A (en
Inventor
李伟华
曾柏泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110113015.9A priority Critical patent/CN112887612B/en
Publication of CN112887612A publication Critical patent/CN112887612A/en
Application granted granted Critical
Publication of CN112887612B publication Critical patent/CN112887612B/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/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • 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/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Abstract

The application discloses a shooting method, a shooting device and electronic equipment, and belongs to the technical field of camera shooting. The method is applied to electronic equipment comprising a plurality of cameras, and comprises the following steps: determining a plurality of exposure durations required for shooting a scene area to be shot in a preset mode; distributing corresponding exposure time length for each camera according to the exposure time lengths; controlling each camera to sequentially perform exposure shooting according to the corresponding exposure duration; and processing the images shot by the cameras according to the scene area to generate a target shot image. According to the shooting method provided by the embodiment of the application, when the preset mode shooting is carried out on the scene area to be shot, the required multiple exposure time lengths are distributed to the cameras, so that the total time consumption of exposure shooting is greatly shortened compared with a mode that one camera is used for carrying out exposure shooting according to the exposure time lengths in sequence.

Description

Shooting method and device and electronic equipment
Technical Field
The application belongs to the technical field of camera shooting, and particularly relates to a shooting method, a shooting device and electronic equipment.
Background
Currently, with the development of technology, more and more smart phones support the super night scene mode for taking pictures.
The super night scene mode is used as a mode with high user utilization rate, and a plurality of frames of pictures need to be shot by utilizing long-time exposure, and then fusion is carried out through a software algorithm, so that the pictures with clear details, superior brightness and less noise are shot.
However, in the existing mode of shooting a super night scene picture, one camera is controlled to perform multi-frame exposure shooting, which easily results in long shooting time and brings inconvenience to users.
Disclosure of Invention
The embodiment of the application aims to provide a shooting method, which can solve the problem that the existing super night scene shooting mode consumes long time.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a shooting method, which is applied to an electronic device including multiple cameras, where the method includes:
determining a plurality of exposure durations required for shooting a scene area to be shot in a preset mode;
distributing corresponding exposure time length for each camera according to the exposure time lengths;
controlling each camera to sequentially perform exposure shooting according to the corresponding exposure duration;
and processing the images shot by the cameras according to the scene areas to generate target shot images.
In a second aspect, an embodiment of the present application provides a shooting device applied to an electronic device including a plurality of cameras, where the shooting device includes:
the second determining module is used for determining a plurality of exposure durations required by shooting a scene area to be shot in a preset mode;
the distribution module is used for distributing corresponding exposure duration for each camera according to the plurality of exposure durations;
the shooting module is used for controlling each camera to sequentially carry out exposure shooting according to the corresponding exposure duration;
and the image processing module is used for processing the images shot by the cameras according to the scene areas to generate target shot images.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, a plurality of exposure durations required for shooting a scene area to be shot in a preset mode are determined; then distributing corresponding exposure time length for each camera according to the plurality of exposure time lengths, and controlling each camera to carry out exposure shooting in sequence according to the corresponding exposure time length; and finally, processing the images shot by the cameras according to the scene area to generate a target shot image. In the shooting mode, the electronic equipment comprises a plurality of cameras, and when the preset mode shooting is carried out on the scene area to be shot, a plurality of required exposure time lengths are distributed to the cameras, so that the total time consumption of the exposure shooting is greatly shortened compared with the mode of carrying out the exposure shooting by utilizing one camera according to the exposure time lengths in sequence, and the problem that the time consumption of the existing super night scene shooting mode is long can be solved.
Drawings
Fig. 1 is a flowchart illustrating steps of a photographing method according to an embodiment of the present application;
FIG. 2 is a first display effect diagram of a preview image in the embodiment of the present application;
FIG. 3 is a second display effect diagram of a preview image in the embodiment of the present application;
FIG. 4 is a third display effect diagram of a preview image in the embodiment of the present application;
FIG. 5 is a schematic diagram illustrating an operation of selecting an overexposure area in an embodiment of the present application;
FIG. 6 is a schematic diagram of an image processing process according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an image processing process in another embodiment of the present application;
fig. 8 is a schematic structural diagram of a shooting device provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The shooting method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, a flowchart illustrating steps of a shooting method provided in an embodiment of the present application is shown, where the method is applied to an electronic device including a plurality of cameras, and the method may include steps 200 to S500.
In the embodiment of the application, the shooting method is applied to electronic equipment with two or more cameras. The electronic equipment comprises a plurality of cameras, so that when a plurality of frames of images need to be exposed and shot, the total shooting time is shortened by controlling the cameras to simultaneously carry out exposure shooting. Optionally, the electronic device may be a mobile phone, a tablet computer, a camera, and the like.
Step 200, determining a plurality of exposure time lengths required for shooting a scene area to be shot in a preset mode.
In the step 200, the preset mode is a shooting mode in which the camera is correspondingly controlled to perform exposure shooting for different durations according to the brightness distribution of the scene area to be shot, and then the images are synthesized into a target shooting image, and the preset mode may be a super night scene shooting mode.
In the step 200, because exposure shooting with different durations needs to be performed for a plurality of times according to the brightness distribution of the scene area when shooting in the preset mode, the exposure duration required for each exposure shooting can be determined according to the brightness distribution of the scene area to be shot, so as to determine each exposure duration in the process of performing exposure shooting with different durations for a plurality of times.
And 300, distributing corresponding exposure time length for each camera according to the plurality of exposure time lengths.
In the step 300, the multiple exposure durations determined in the step 200 are correspondingly allocated to different cameras included in the electronic device, so that the total duration of exposure shooting required by each camera is less than the total duration of the multiple exposure durations, and the sum of the total durations of exposure shooting required by the multiple cameras is equal to the total duration of the multiple exposure durations.
Optionally, when the step 300 is executed, corresponding exposure time lengths are allocated to each camera according to a plurality of exposure time lengths, and a difference between total exposure time lengths of the cameras is minimized. Because the subsequent cameras start exposure shooting at the same time, when the difference value of the total exposure time of each camera is minimum, the total time consumption from the start of exposure shooting to the completion of exposure shooting corresponding to the total exposure time is the shortest, and the time required for shooting the scene area image in the preset mode can be shortened to the maximum extent.
And step 400, controlling each camera to sequentially perform exposure shooting according to the corresponding exposure duration.
In the above step 400, the cameras are controlled to start exposure shooting, and each camera performs exposure shooting in sequence according to the exposure time allocated in the step 300. The number of the exposure time periods allocated to each camera is indefinite and may be 0, 1 or more, and it can be understood that exposure shooting is not performed when the number of the exposure time periods corresponding to the cameras is 0; when the exposure time allocated to the camera is multiple, when the exposure shooting is completed according to one of the allocated exposure time, the exposure shooting is continuously performed according to the next allocated exposure time until the exposure shooting is completed according to each exposure time allocated to the camera.
In the step 400, because a plurality of exposure durations required for shooting the scene area of the preset mode are correspondingly allocated to different cameras in advance, the total duration required for exposure shooting of each camera is smaller than the total duration of the exposure durations, and because each camera starts exposure shooting at the same time, the total duration from the time when the electronic device starts exposure shooting to the time when all the cameras finish exposure shooting is obviously smaller than the total duration of the exposure durations, so that the time consumption for shooting in the preset mode is greatly shortened, and the problem that the existing super night scene shooting mode consumes a long time is effectively solved.
And 500, processing the images shot by the cameras according to the scene areas to generate target shot images.
In the step 500, according to the range of the scene area, the plurality of images shot by the cameras in the step 400 through exposure are cut into images with the same size by using a picture synthesis technology, and then the images are fused, so that the target shot image which is matched with the luminance distribution of the scene area, clear in detail, superior in luminance, and less in noise can be generated.
The shooting method provided by the embodiment of the application comprises the steps of firstly determining a plurality of exposure durations required for shooting a scene area to be shot in a preset mode; then distributing corresponding exposure time length for each camera according to the plurality of exposure time lengths, and controlling each camera to carry out exposure shooting in sequence according to the corresponding exposure time length; and finally, processing the images shot by the cameras according to the scene area to generate a target shot image. In the shooting mode, the electronic equipment comprises a plurality of cameras, and when the preset mode shooting is carried out on the scene area to be shot, a plurality of required exposure time lengths are distributed to the cameras, so that the total time consumption of the exposure shooting is greatly shortened compared with the mode of carrying out the exposure shooting by utilizing one camera according to the exposure time lengths in sequence, and the problem that the time consumption of the existing super night scene shooting mode is long can be solved.
Optionally, in an implementation manner of the photographing method provided by the embodiment of the present invention, the step 200 includes steps 201 to S203.
Step 201, obtaining brightness information of the scene area to be shot.
In step 201, the brightness data of the scene area to be photographed in the preview image of the electronic device is read, and information including brightness distribution, that is, the brightness information is obtained.
Step 202, determining each sub-area contained in the scene area according to the brightness information; wherein the brightness of each sub-region is different.
In step 202, since the brightness information describes the brightness distribution of the scene area, the scene area may be divided into a plurality of sub-areas according to the brightness information, so that the brightness of each sub-area is different.
Step 203, determining the number of times of shooting required for shooting according to the brightness of each sub-area and the exposure time of each shooting.
In step 203, when the exposure shooting is performed according to the exposure time length matching the brightness of the sub-regions, the scene picture corresponding to the sub-regions can be shot more clearly, and the brightness of each sub-region is different, if the shooting is performed according to the brightness of each sub-region, how many times of exposure shooting is required for how many sub-regions are required, and the exposure time length of each exposure shooting is matched with the brightness of the corresponding sub-region, so that the shooting times required for shooting according to the brightness of each sub-region and the exposure time length of each shooting can be determined.
In the above embodiment, it is determined that, from the beginning of shooting according to the lowest brightness region of the matching scene region, the exposure duration is sequentially increased until the shooting times required in the process of shooting according to the highest brightness region of the matching scene region and the exposure duration of each shooting are reached according to the brightness information of the scene region to be shot, so that a preset mode image with clear level, clarity and less noise can be shot.
In step 100, the first input is a confirmation input for a scene area to be photographed, and the range of the scene area should be less than or equal to the field angle range corresponding to the camera with the highest multiple among the cameras.
Optionally, the first input may specifically include a selection operation of the user on a scene area in the preview image of the captured scene, for example, a selection operation such as clicking, cursor locking, circle selection, and the like. Optionally, the first input may also include a zoom ratio set by the user on the preview image interface, that is, the preview image is combined with the zoom ratio to calculate and determine the scene area to be photographed.
Optionally, in an implementation manner, the shooting method provided in the embodiment of the present invention further includes steps 101 to 103 before step 200.
Step 101, in response to the first input of the user in the preview image, determining a scaling.
In step 101, the first input is a confirmation input for a zoom ratio, which may specifically include a selection operation of a user on the zoom ratio in the preview image, and specifically may be a trigger operation on a preset control in the preview image, or an execution action of a preset gesture. The preset control is used for determining the scaling ratio, and the corresponding scaling ratio is determined by operating the preset control through gestures such as sliding, clicking and the like. The preset gesture is a gesture for adjusting the scaling, and the scaling can be adjusted through the preset gesture.
And 102, displaying the outline of the shooting picture corresponding to the scaling in the preview image.
In step 102, after the zoom ratio is determined, a shooting picture contour corresponding to the determined zoom ratio is displayed in the preview image, so that the user can intuitively know the determined shooting area range, and a specific shooting scene area is determined according to the shooting picture contour.
For example, when photographing in the preset mode using a wide 1X camera and a tele 2X camera, the preview image display effect of the photographing interface is as shown in fig. 2, where a solid line frame a is a field angle range of the wide 1X camera and a solid line frame b is a field angle range of the tele 2X camera in fig. 2, and a dashed line frame c representing the range of the photographing scene area needs to be within the solid line frame b.
And 103, responding to the second input of the user in the outline of the shooting picture, and determining the area selected by the second input as the area of the scene to be shot.
In step 103, the second input is an input for selecting a scene area to be photographed in the shooting picture outline, and may specifically be a selection operation performed in the shooting picture outline, and a specific limit or range of the scene area to be photographed is determined by the selection operation.
Specifically, the second input may be an operation that the user slides in the outline of the shot picture by using a finger, and the sliding track forms a closed loop, so that the user can customize the shot track according to the preference or the requirement of the user, and the personalized requirement of the user is met; the second input may also be a click operation on a preset shooting shape, where the preset shooting shape is a preset shooting picture shape, the size of the preset shooting shape can be adjusted as needed, and the preset shooting shape may be a rectangle, a heart, or a circle.
The method and the device are suitable for the situation that the user has the personalized shooting scene area, the range of the scene area to be shot is selected through the second character input, shooting and image processing can be subsequently carried out according to the scene area selected in the range, and the target shooting image in the preset mode is obtained.
For example, when the preset mode photographing is performed by using the wide-angle 1X camera and the tele 2X camera, the preview image display effect of the photographing interface is as shown in fig. 3, a solid line frame a is a field angle range of the wide-angle 1X camera, a solid line frame b is a field angle range of the tele 2X camera, and a photographing screen outline corresponding to the zoom ratio is displayed in a manner of a dotted line frame c, and the user may further frame a range d of a scene area to be photographed in the dotted line frame c in a personalized manner.
In the embodiment, the shooting picture contour corresponding to the zoom ratio in the preview image is convenient for the user to intuitively know the determined shooting range, and the scene area which is specifically needed to be shot by the user is drawn in a personalized manner according to the shooting picture contour.
Alternatively, in an implementation manner, in the shooting method provided by the embodiment of the present invention, the step 300 includes steps 301 to S305.
Step 301, determining an average exposure time required by each camera according to the plurality of exposure times and the plurality of cameras.
In step 301, the sum of the multiple exposure time lengths is divided by the number of cameras included in the electronic device, and an average exposure time length value required for each camera is calculated.
Step 302, determining a first exposure time length which is greater than or equal to the average time length in the plurality of exposure time lengths.
In the step 302, each exposure time is compared with the average value of the time, and the exposure time greater than or equal to the average value of the time is determined as the first exposure time.
And 303, respectively allocating each first exposure time length to different cameras in the multiple cameras.
In the step 303, since the first exposure time is greater than or equal to the average value of the time, only one first exposure time is allocated to the camera, and no other exposure time is allocated to the camera; the camera to which the first exposure time period is allocated is any one of a plurality of cameras.
And step 304, determining a second exposure time length which is smaller than the average value of the time lengths in the plurality of exposure time lengths.
In step 304, each exposure time length is compared with the average value of the time lengths, and the exposure time length smaller than the average value of the time lengths is determined as a second exposure time length.
Step 305, allocating at least one second exposure time length to a first camera in the plurality of cameras, so that the difference between the sum of the first exposure time lengths allocated to the second camera and the average value of the time lengths is minimum;
the first camera is any one of the cameras except for the camera with the first exposure time.
In step 305, the first camera is any one of the cameras except for the first exposure time period allocated to the multiple cameras, that is, the other cameras except for the first exposure time period allocated to the multiple cameras; since the second exposure time length is less than the average time length, at least one second exposure time length needs to be allocated to the first camera, and the difference between the sum of the second exposure time lengths allocated to the first camera and the average time length is minimized, so that the difference between the sum of the exposure time lengths allocated to the cameras is minimized.
The above embodiment is suitable for scenes in which the number of exposure durations is greater than the number of cameras.
In this scenario, assuming that the electronic device includes x cameras, a set T = { T1, T2, …, tn, …, ty } of y exposure durations required for shooting a scene area in a preset mode, where n ∈ [1,y ], a specific execution step of the foregoing embodiment is as follows:
calculating an exposure time average value aver = sum (tn)/x;
establishing an exposure time length list Lm and a total exposure time length Tm for each camera, and initializing the total exposure time length to 0, namely Tm =0;
extracting the current maximum value tmax in the set T, and deleting the tmax from the set T to realize the updating of the set T;
if tmax is larger than or equal to aver, the tmax value is put into an exposure time length list Lm corresponding to one camera, and no other exposure time lengths tn are added into the list;
if tmax is smaller than aver, putting tmax into a list Lm corresponding to another camera and updating Tm = Tm + tmax, then calculating difference value delta = aver-Tm, and selecting exposure time duration tn with the minimum difference value with delta from the rest set T to be put into the list Lm until the sum Tm of the exposure time durations of the list Lm corresponding to the current camera is larger than the average value aver;
and circularly executing the steps until the exposure time length in the set T is extracted, and finishing the process of distributing the corresponding exposure time length for each camera.
For example, in the case where the exposure time periods are 100ms, 200ms, 500ms, 700ms, 1s, and 1.5s, respectively, the exposure time periods are allocated to the wide-angle 1X camera and the telephoto 2X camera, and the exposure time period list and the total exposure time period of each camera are shown in table 1:
TABLE 1
Figure BDA0002919741540000101
According to table 1, after the two cameras start exposure shooting according to the corresponding exposure time lists respectively, the wide-angle 1X camera can sequentially execute exposure shooting with exposure time lengths of 1.5s and 500ms, and the tele 2X camera can sequentially execute exposure shooting with exposure time lengths of 1s, 700ms, 200ms and 100ms, so that the total exposure time lengths of the wide-angle 1X camera and the tele 2X camera are both 2s, and the two cameras can complete exposure shooting at the same time and obtain 6 shot images in total; if any one of the cameras respectively exposes and shoots according to the exposure duration, at least 4s is needed; by comparison, the shooting mode provided by the embodiment can greatly shorten the total time required by a plurality of images required by the preset mode.
In the above embodiment, the multiple exposure time periods required for shooting the scene area in the preset mode are averagely grouped into multiple cameras as much as possible, so that the total exposure time of each camera is ensured to be similar, and the time spent on exposure when different cameras shoot simultaneously is reduced.
Optionally, in an embodiment, before the step 400, the method further includes a step 401, and the step 500 includes steps 501 to 505.
Step 401, receiving a third input of the user in the preview image, and determining a target sub-region.
In step 401, the third input is a confirmation input for the target sub-area in the preview image, and may specifically be a selection operation performed in the preview image, and a specific position and a specific range of the target sub-area in the preview image are determined by the selection operation.
Specifically, the third input may be an operation that the user slides in the preview image with a finger, and a sliding track forms a closed loop, so that the user can customize the target sub-region according to the preference or requirement of the user, and the personalized requirement of the user is met; the third input may also be a click operation on a preset region shape, where the preset region shape is a preset target sub-region shape, the size of the preset region shape may be adjusted as needed, and the preset region shape may be a rectangle, heart, or circle.
Step 501, obtaining a first image with the longest exposure time in each image.
In step 501, an image captured according to the longest exposure time of the plurality of exposure times is extracted as the first image.
Step 502, a first sub-image corresponding to the target sub-area is intercepted from the first image.
In the step 502, the image of the position of the target sub-area in the first image is captured according to the position of the target sub-area in the preview image, so as to obtain the first sub-image, where the first sub-image is an image obtained by shooting the target sub-area selected by the user according to the longest exposure time, and thus, the overexposure shooting of the selected area according to the user requirement can be realized.
Step 503, correspondingly cutting each second image into a third image according to the scene area; the second image is an image except the first image in a plurality of images shot by each camera.
In step 503, since the field angle ranges of the cameras are different, in order to accurately fuse the multiple images captured by the cameras, all the second images except the first image in the multiple images need to be cropped according to the range size of the scene area, so that each third image obtained by cropping includes the same scene area as the predetermined scene area to be captured and the size of each third image is the same.
Step 504, replacing the second sub-image corresponding to the target sub-area in each third image with the first sub-image.
In the step 504, the image of the position of the target subregion in each third image is captured according to the position of the target subregion in the preview image to obtain the second sub-image, and the second sub-image is replaced by the first sub-image, so that the image of the position of the target subregion in each third image obtained after the replacement processing is obtained by shooting according to the longest exposure time.
And 505, superposing and fusing the replaced third images into a target shooting image.
In the step 505, since the size and the shooting scene area of each third image are the same, the third images after the replacement processing in the step 505 can be aligned and superimposed by using a picture synthesis technology, and can be fused into a target shooting image, and the target shooting image not only matches the brightness distribution of the shooting scene area, so that the details are clear and the noise is less, but also realizes the effect of performing overexposure shooting on the target sub-area selected by the user.
The embodiment is suitable for the super night scene mode shooting scene of the overexposure shooting area specified by the user. In the scene, a user can activate the preview image to display the pop-up frame of the 'selection over-exposure area' by long-pressing any one position of the preview image and then click the pop-up frame, wherein the specific display effect is shown in fig. 4; then selecting an overexposure area through double-finger screen clicking operation, so as to determine the target sub-area, wherein the specific operation is shown in fig. 5;
then, determining a plurality of exposure durations required for shooting a scene area of a preset mode, and allocating corresponding exposure durations to each camera, so as to control each camera to sequentially carry out exposure shooting according to the corresponding exposure durations; for example, when the wide 1X camera and the tele 2X camera are used to take pictures in a preset mode, the images taken by the cameras are as shown in fig. 6;
the image with the longest exposure time in the multiple images shot by each camera in the image capturing method in FIG. 6 is extracted, a first sub-image corresponding to the high exposure area selected by the user is captured, meanwhile, the image content corresponding to the position part of the high exposure area selected by the user in other images shot by each camera is removed, then the removed part is replaced by the first sub-image, and then each image is overlapped and fused, so that the final target shot image can be obtained.
In the above embodiment, the user determines the target sub-area that needs to be subjected to the overexposure shooting in the preview image, then the first sub-image corresponding to the target sub-area is captured from the first image with the longest exposure time in each image, and the first sub-image is used to replace the images at the same position of the target sub-area in other images in each image, so that the images subjected to the overexposure shooting at the target sub-area selected by the user can be synthesized.
Alternatively, in an implementation manner, the shooting method provided by the embodiment of the present invention includes steps 506 to S507 in step 500.
Step 506, correspondingly cutting the image shot by each camera into a fourth image according to the scene area.
In the step 506, since the field angle ranges of the cameras are different, in order to accurately fuse the multiple images captured by the cameras, all of the multiple images need to be cropped according to the range of the scene area, so that the size of each fourth image obtained after cropping is exactly matched with the scene area.
And 507, overlapping and fusing the fourth images into a target shooting image.
In step 507, since the sizes of the fourth images and the shooting scene area are the same, the fourth images may be aligned and superimposed by using a picture synthesis technique, and then may be fused into a target shooting image, where the target shooting image matches the luminance distribution of the shooting scene area, so that the details are clear and the noise is small.
The embodiment is suitable for the super night scene mode shooting scene with the overexposure shooting area not specified by the user. In the scene, a plurality of exposure time lengths required for shooting a scene area of a super night scene mode are determined, corresponding exposure time lengths are distributed for each camera, each camera is controlled to carry out exposure shooting in sequence according to the corresponding exposure time lengths, then a plurality of images shot by each camera are cut based on the shot scene area, and then alignment, superposition and fusion are carried out, so that a super night scene picture with clear details, superior brightness and less noise is obtained.
For example, when the wide-angle 1X camera and the tele 2X camera are used to take photos in a preset mode, images taken by the cameras are as shown in fig. 7;
and (3) clipping a plurality of images shot by each camera in the image 7 according to a preset scene area, so that the sizes of the clipped images are the same as those of the corresponding scene areas, and then overlapping and fusing to obtain a final target shot image.
In the above embodiment, the plurality of images shot by each camera are cut based on the shot scene area, and then are aligned, overlapped and fused to obtain the super night scene picture with clear details, superior brightness and less noise.
Optionally, in an embodiment, before the step 100 is executed, the electronic device is further controlled to enter a super night scene shooting mode in which the electronic device can shoot according to a preset mode, and the subsequent step 100 is executed only when the electronic device is in the super night scene shooting mode, otherwise, the electronic device enters a conventional shooting mode and performs conventional shooting, so that a user can select to turn on or turn off the super night scene shooting mode as required.
It should be noted that, in the shooting method provided in the embodiment of the present application, the execution subject may be a terminal device, or a control module in the terminal device for executing the loading shooting method. In the embodiment of the present application, a shooting method implemented by a terminal device is taken as an example to describe the shooting method provided in the embodiment of the present application.
Referring to fig. 8, a schematic structural diagram of a shooting device provided in an embodiment of the present application is shown, where the shooting device is applied to an electronic device including multiple cameras, and as shown in fig. 8, the shooting device includes:
a second determining module 81, configured to determine a plurality of exposure durations required for shooting a scene area to be shot in a preset mode;
the distribution module 82 is configured to distribute a corresponding exposure duration for each camera according to the multiple exposure durations;
the shooting module 83 is used for controlling each camera to sequentially perform exposure shooting according to the corresponding exposure duration;
and an image processing module 84, configured to process the images captured by the cameras according to the scene area, and generate a target captured image.
Optionally, in the shooting apparatus, the second determining module 81 includes:
the first acquisition unit is used for acquiring the brightness information of the scene area to be shot;
a first determining unit, configured to determine, according to the brightness information, each sub-area included in the scene area; wherein the brightness of each sub-region is different;
and the second determining unit is used for determining the shooting times required for shooting according to the brightness of each subarea and the exposure time length of each shooting.
Optionally, in the shooting apparatus, the allocating module 82 includes:
the third determining unit is used for determining the average exposure time length required by each camera according to the multiple exposure time lengths and the multiple cameras;
a fourth determination unit configured to determine a first exposure time length that is greater than or equal to the average value of the time lengths among the plurality of exposure time lengths;
a first allocation unit, configured to allocate each of the first exposure durations to different cameras in the multiple cameras respectively;
a fifth determining unit configured to determine a second exposure time period that is smaller than the average value of the time periods among the plurality of exposure time periods;
a second allocating unit, configured to allocate at least one second exposure time length to each first camera in the multiple cameras, so that a difference between a sum of the second exposure time lengths allocated to the second cameras and the time length average value is minimized;
the first camera is any one of the plurality of cameras except for the first exposure time length.
Optionally, the apparatus further comprises:
the third determining module is used for receiving a third input of a user in the preview image and determining a target subarea before the step of controlling each camera to sequentially perform exposure shooting according to the corresponding exposure duration;
the image processing module 84 includes:
the second acquisition unit is used for acquiring a first image with the longest exposure time in each image;
the intercepting unit is used for intercepting a first sub-image corresponding to the target sub-area from the first image;
the first cropping unit is used for correspondingly cropping each second image into a third image according to the scene area; the second image is an image except the first image in a plurality of images shot by each camera;
a replacing unit, configured to replace a second sub-image corresponding to the target sub-area in each third image with the first sub-image;
and the first fusion unit is used for superposing and fusing the replaced third images into the target shooting image.
Optionally, in the photographing apparatus, the image processing module 84 includes:
the second clipping unit is used for correspondingly clipping the images shot by the cameras into fourth images according to the scene areas;
and the second fusion unit is used for superposing and fusing the fourth images into a target shooting image.
Optionally, the photographing apparatus further includes a first determining module, and the first determining module includes:
a sixth determining unit configured to determine a scaling in response to the first input by the user in the preview image;
a display unit, configured to display a captured picture contour corresponding to the zoom ratio in the preview image;
and the seventh determining unit is used for responding to the second input of the user in the shooting picture outline, and determining the area selected by the second input as the area of the scene to be shot.
The shooting device in the embodiment of the present application may be a device, and may also be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiment of the present application is not particularly limited.
The photographing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, which is not specifically limited in the embodiment of the present application.
The shooting device provided in the embodiment of the present application can implement each process implemented by the shooting device in the method embodiments of fig. 1 to 7, and is not described herein again to avoid repetition.
In the embodiment of the present application, a second determining module 81 determines a plurality of exposure durations required for shooting a scene area to be shot in a preset mode; then, the distribution module 82 distributes the corresponding exposure time length for each camera according to the plurality of exposure time lengths, and the shooting module 83 controls each camera to carry out exposure shooting in sequence according to the corresponding exposure time length; finally, the image processing module 84 processes the images captured by the cameras according to the scene area to generate the target captured image. In the shooting mode, the electronic equipment comprises a plurality of cameras, and when the preset mode shooting is carried out on the scene area to be shot, a plurality of required exposure time lengths are distributed to the cameras, so that the total time consumption of the exposure shooting is greatly shortened compared with the mode of carrying out the exposure shooting by utilizing one camera according to the exposure time lengths in sequence, and the problem that the time consumption of the existing super night scene shooting mode is long can be solved.
Optionally, an embodiment of the present application further provides an electronic device, which includes a processor, a memory, and a program or an instruction stored in the memory and capable of running on the processor, where the program or the instruction is executed by the processor to implement each process of the foregoing shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 90 includes, but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.
Those skilled in the art will appreciate that the electronic device 90 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 910 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.
The user input unit 909 includes a display interface in the embodiment of the present application;
the input unit 904, in the embodiment of the present application, includes a plurality of cameras;
a processor 910, configured to determine a plurality of exposure durations required for shooting a scene area to be shot in a preset mode; distributing corresponding exposure time length for each camera according to the exposure time lengths; controlling each camera to sequentially perform exposure shooting according to the corresponding exposure duration; and processing the images shot by the cameras according to the scene area to generate a target shot image.
The electronic equipment provided by the embodiment of the application comprises the multiple cameras, and when the preset mode shooting is carried out on the scene area to be shot, the needed multiple exposure time durations are distributed to the cameras, so that the total time consumption of the exposure shooting is greatly shortened compared with a mode of carrying out the exposure shooting by utilizing one camera according to the exposure time durations in sequence, and the problem that the time consumption of the existing super night scene shooting mode is long can be solved.
Optionally, the processor 910 is specifically configured to obtain brightness information of the scene area to be photographed; determining each sub-area contained in the scene area according to the brightness information; wherein the brightness of each sub-region is different; and determining the shooting times required for shooting according to the brightness of each sub-area and the exposure time length of each shooting.
Optionally, the processor 910 is specifically configured to determine, according to the multiple exposure durations and the multiple cameras, an average exposure duration value required by each camera; determining a first exposure time length which is greater than or equal to the average time length in the plurality of exposure time lengths; assigning each of the first exposure durations to a different one of the plurality of cameras, respectively; determining a second exposure time length smaller than the average value of the time lengths in the plurality of exposure time lengths; allocating at least one second exposure time length for each first camera in the plurality of cameras, so that the difference between the sum of the second exposure time lengths allocated to the second cameras and the average value of the time lengths is minimum; the first camera is any one of the cameras except for the camera with the first exposure time.
Optionally, the processor 910 is further configured to receive a third input in the preview image from the user through the user input unit 909 before the step of controlling each camera to perform exposure shooting in sequence according to the corresponding exposure duration, and determine a target sub-region; the method comprises the steps of acquiring a first image with the longest exposure time in each image; intercepting a first sub-image corresponding to the target sub-area from the first image; correspondingly cutting each second image into a third image according to the scene area; the second image is an image except the first image in a plurality of images shot by each camera; replacing a second sub-image corresponding to the target sub-area in each third image with the first sub-image; and superposing and fusing the replaced third images into a target shooting image.
Optionally, the processor 710 is further configured to determine a scaling ratio in response to the first input in the preview image by the user before the step of determining a plurality of exposure time lengths required for capturing the preset mode of the scene area to be captured; displaying the outline of the shooting picture corresponding to the scaling in the preview image; in response to the second input of the user in the shooting picture outline, determining the area selected by the second input as the area of the scene to be shot.
Optionally, the processor 910 is specifically configured to correspondingly crop the image captured by each camera into a fourth image according to the scene area; and superposing and fusing the fourth images into a target shooting image.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above shooting method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
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 a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatuses in the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions recited, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
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 or portions thereof that contribute to the prior art 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 (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A shooting method is applied to electronic equipment comprising a plurality of cameras, and is characterized by comprising the following steps:
determining a plurality of exposure durations required for shooting a scene area to be shot in a preset mode;
distributing corresponding exposure time length for each camera according to the exposure time lengths to enable the difference value between the total exposure time lengths of the cameras to be minimum;
controlling each camera to carry out exposure shooting according to the corresponding exposure duration;
and processing the images shot by the cameras according to the scene areas to generate target shot images.
2. The photographing method according to claim 1, wherein the step of determining a plurality of exposure time periods required to photograph the scene area of a preset mode includes:
acquiring brightness information of the scene area to be shot;
determining each sub-area contained in the scene area according to the brightness information; wherein the brightness of each sub-region is different;
and determining the shooting times required for shooting according to the brightness of each sub-area and the exposure time length of each shooting.
3. The shooting method according to claim 1, wherein the step of allocating a corresponding exposure time period to each camera according to the plurality of exposure time periods comprises:
determining an average exposure time length required by each camera according to the exposure time lengths and the cameras;
determining a first exposure time length which is greater than or equal to the average time length in the plurality of exposure time lengths;
assigning each of the first exposure durations to a different one of the plurality of cameras, respectively;
determining a second exposure duration of the plurality of exposure durations that is less than the average of the durations;
allocating at least one second exposure time length for each first camera in the plurality of cameras, so that the difference between the sum of the second exposure time lengths allocated to the first cameras and the average value of the time lengths is minimum;
the first camera is any one of the cameras except for the camera with the first exposure time.
4. The shooting method according to claim 1, wherein before the step of controlling each of the cameras to perform exposure shooting in sequence for the corresponding exposure time period, the method further comprises:
receiving a third input of the user in the preview image, and determining a target sub-area;
the step of processing the images shot by the cameras according to the scene area to generate a target shot image includes:
acquiring a first image with the longest exposure time in each image;
intercepting a first sub-image corresponding to the target sub-area from the first image;
correspondingly cutting each second image into a third image according to the scene area; the second image is an image except the first image in a plurality of images shot by each camera;
replacing a second sub-image corresponding to the target sub-area in each third image with the first sub-image;
and superposing and fusing the replaced third images into a target shooting image.
5. The shooting method according to claim 1, wherein the step of processing the images shot by the cameras according to the scene area to generate the target shot image comprises:
correspondingly cutting the images shot by the cameras into fourth images according to the scene areas;
and superposing and fusing the fourth images into a target shooting image.
6. The photographing method according to claim 1, wherein before the step of determining a plurality of exposure time periods required to photograph a scene area to be photographed of a preset pattern, the method further comprises:
determining a zoom ratio in response to a first input by a user in a preview image;
displaying the outline of the shooting picture corresponding to the scaling in the preview image;
and in response to a second input of the user in the shooting picture outline, determining the area selected by the second input as the area of the scene to be shot.
7. A shooting device is applied to electronic equipment comprising a plurality of cameras, and is characterized by comprising:
the second determining module is used for determining a plurality of exposure durations required by shooting a scene area to be shot in a preset mode;
the distribution module is used for distributing corresponding exposure time length for each camera according to the plurality of exposure time lengths so as to enable the difference value between the total exposure time lengths of the cameras to be minimum;
the shooting module is used for controlling each camera to sequentially carry out exposure shooting according to the corresponding exposure duration;
and the image processing module is used for processing the images shot by the cameras according to the scene areas to generate target shot images.
8. The photographing apparatus according to claim 7, wherein the second determination module includes:
the first acquisition unit is used for acquiring the brightness information of the scene area to be shot;
a first determining unit, configured to determine, according to the brightness information, each sub-region included in the scene region; wherein the brightness of each sub-region is different;
and the second determining unit is used for determining the shooting times required for shooting according to the brightness of each subarea and the exposure time length of each shooting.
9. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the photographing method according to any one of claims 1-6.
10. A readable storage medium, characterized in that the readable storage medium stores thereon a program or instructions which, when executed by a processor, implement the steps of the photographing method according to any one of claims 1 to 6.
CN202110113015.9A 2021-01-27 2021-01-27 Shooting method and device and electronic equipment Active CN112887612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110113015.9A CN112887612B (en) 2021-01-27 2021-01-27 Shooting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110113015.9A CN112887612B (en) 2021-01-27 2021-01-27 Shooting method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112887612A CN112887612A (en) 2021-06-01
CN112887612B true CN112887612B (en) 2022-10-04

Family

ID=76052786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110113015.9A Active CN112887612B (en) 2021-01-27 2021-01-27 Shooting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112887612B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007194687A (en) * 2006-01-17 2007-08-02 Seiko Epson Corp Imaging apparatus
CN106331510A (en) * 2016-10-31 2017-01-11 维沃移动通信有限公司 Backlight photographing method and mobile terminal
WO2018018771A1 (en) * 2016-07-29 2018-02-01 宇龙计算机通信科技(深圳)有限公司 Dual camera-based photography method and system
CN108335272A (en) * 2018-01-31 2018-07-27 青岛海信移动通信技术股份有限公司 A kind of method and apparatus of shooting picture
WO2018228467A1 (en) * 2017-06-16 2018-12-20 Oppo广东移动通信有限公司 Image exposure method and device, photographing device, and storage medium
CN110177221A (en) * 2019-06-25 2019-08-27 维沃移动通信有限公司 The image pickup method and device of high dynamic range images
CN110493538A (en) * 2019-08-16 2019-11-22 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007194687A (en) * 2006-01-17 2007-08-02 Seiko Epson Corp Imaging apparatus
WO2018018771A1 (en) * 2016-07-29 2018-02-01 宇龙计算机通信科技(深圳)有限公司 Dual camera-based photography method and system
CN106331510A (en) * 2016-10-31 2017-01-11 维沃移动通信有限公司 Backlight photographing method and mobile terminal
WO2018228467A1 (en) * 2017-06-16 2018-12-20 Oppo广东移动通信有限公司 Image exposure method and device, photographing device, and storage medium
CN108335272A (en) * 2018-01-31 2018-07-27 青岛海信移动通信技术股份有限公司 A kind of method and apparatus of shooting picture
CN110177221A (en) * 2019-06-25 2019-08-27 维沃移动通信有限公司 The image pickup method and device of high dynamic range images
CN110493538A (en) * 2019-08-16 2019-11-22 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112887612A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN112135046B (en) Video shooting method, video shooting device and electronic equipment
CN112714255B (en) Shooting method and device, electronic equipment and readable storage medium
CN113141450B (en) Shooting method, shooting device, electronic equipment and medium
CN112887609B (en) Shooting method and device, electronic equipment and storage medium
CN113766129A (en) Video recording method, video recording device, electronic equipment and medium
CN112887617B (en) Shooting method and device and electronic equipment
CN112954210A (en) Photographing method and device, electronic equipment and medium
CN111857512A (en) Image editing method and device and electronic equipment
CN112087579B (en) Video shooting method and device and electronic equipment
CN108683847B (en) Photographing method, device, terminal and storage medium
CN112738401B (en) Zooming method and device and electronic equipment
CN112511743B (en) Video shooting method and device
CN113709368A (en) Image display method, device and equipment
CN112437232A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN112887612B (en) Shooting method and device and electronic equipment
CN112887624B (en) Shooting method and device and electronic equipment
CN112653841B (en) Shooting method and device and electronic equipment
CN113596331B (en) Shooting method, shooting device, shooting equipment and storage medium
CN112887616B (en) Photographing method and photographing apparatus
CN114666490B (en) Focusing method, focusing device, electronic equipment and storage medium
CN111586296B (en) Image capturing method, image capturing apparatus, and storage medium
CN111654623B (en) Photographing method and device and electronic equipment
CN114286004A (en) Focusing method, shooting device, electronic equipment and medium
CN112367464A (en) Image output method and device and electronic equipment
CN114430456A (en) Image capturing method, image capturing apparatus, and 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