Shooting method and device
By using multiple cameras in electronic devices to acquire images and perform correction processing, the tilt problem caused by a single field of view angle when the user's handheld device is photographed is solved, and the shooting effect and user experience are improved.
Patent Information
- Application Number
- CN202210753449.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-06-29
AI Technical Summary
When a user takes a handheld electronic device, due to the single field of view angle range and the tilt of the device, the subject has poor effects such as tilting, and the existing horizon correction method is poor.
By using multiple cameras to collect the screen in an electronic device, lock the target object selected by the user, display it in the target area of the second shooting preview interface, and perform correction processing, and shoot with multiple field angle ranges of multiple cameras to ensure the target Objects are in fixed areas of the preview interface.
It improves the correction effect during image shooting, improves the user's shooting experience, and can keep the target object in a fixed area when the user shifts the device slightly, enhancing the success rate of correction recognition.
Smart Images

Figure CN115037879B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to a shooting method and a device thereof. Background Art
[0002] With the popularization of electronic devices, people are increasingly using electronic devices to capture images or videos.
[0003] When a user holds an electronic device to take photos, the shooting field angle is relatively single and the electronic device is often tilted when the user holds the electronic device, which may cause the photographed object to be tilted and other adverse effects. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a shooting method and a device thereof, which can solve the problem of poor correction effect when shooting images.
[0005] In a first aspect, an embodiment of the present application provides a shooting method, the method comprising:
[0006] Receiving a first input from a user on a target object displayed in a first shooting preview interface of the electronic device;
[0007] In response to the first input, displaying the target object in a target area of a second shooting preview interface based on images captured by multiple cameras of the electronic device;
[0008] The image displayed on the second shooting preview interface is corrected and photographed to obtain a target image.
[0009] In a second aspect, an embodiment of the present application provides a photographing device, the device comprising:
[0010] A first input module, used to receive a first input from a user on a target object displayed in a first shooting preview interface of the electronic device;
[0011] A first display module, configured to display the target object in a target area of a second shooting preview interface based on images captured by multiple cameras of the electronic device in response to the first input;
[0012] The image correction module is used to correct the image displayed on the second shooting preview interface and shoot it to obtain a target image.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.
[0016] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.
[0017] In an embodiment of the present application, by locking the target object selected by the user while the user is using the electronic device to take pictures, the content that the user wants to shoot, that is, the target object, is displayed in the target area of the second shooting preview interface based on the images captured by multiple cameras in the electronic device, and then correction processing and shooting are performed based on the second shooting preview interface to obtain the target image. In this way, since the embodiment of the present application shoots the target object based on multiple field of view angle ranges corresponding to multiple cameras, even if the user slightly offsets the electronic device, the multi-camera shooting technology can be used to present the target object that the user wants to shoot in a fixed area of the shooting preview interface, thereby facilitating correction processing and shooting of the target object, thereby improving the correction effect during image shooting and enhancing the user's shooting experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flowchart of a shooting method provided by an embodiment of the present application;
[0019] Figure 2 is a schematic diagram of the focus tracking recognition process provided by this application;
[0020] Figure 3 is a schematic diagram of the correction shooting preview interface provided by this application;
[0021] Figure 4 is a flowchart of a shooting method provided by another embodiment of the present application;
[0022] Figure 5 This is a schematic diagram of the first scenario of the camera switching process provided by this application;
[0023] Figure 6 This is a schematic diagram of the second scenario of the camera switching process provided by this application;
[0024] Figure 7This is a schematic diagram of the second scenario of the camera switching process provided by this application;
[0025] Figure 8 It is a schematic diagram of a scene of a target object centering display process provided by the present application;
[0026] Fig. 9 is a structural block diagram of a photographing device provided by an embodiment of the present application;
[0027] Fig.10 is a structural block diagram of an electronic device provided by an embodiment of the present application;
[0028] Fig.11 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] The following is a detailed description of the shooting method and device provided by the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0032] At present, as users use electronic devices to take photos more and more frequently, the requirements for the shooting effect of electronic devices are also getting higher and higher. For example, when a user takes an image or video, a horizon correction process is required. The horizon correction process can be aimed at the problem of tilted lines in the picture collected by the camera due to the tilted field of view of the camera, and the tilted lines are corrected so that the lines that are actually parallel to the horizontal plane remain parallel to the horizontal plane in the image or video taken, and the lines that are actually perpendicular to the horizontal plane remain perpendicular to the horizontal plane in the image or video taken.
[0033] However, under the existing horizon correction shooting method, the electronic device always performs recognition and correction based on the content collected by a single camera. Due to the single field of view angle range, the recognition and correction effect is poor.
[0034] Based on this, the present application provides a shooting method, which can be applied to correct shooting scenes. Figure 1-Figure 8 The shooting method provided in the embodiment of the present application is described in detail. It should be noted that the shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method provided in the embodiment of the present application is described by taking a shooting device executing the shooting method as an example.
[0035] Figure 1 It is a flowchart of a shooting method provided by an embodiment of the present application.
[0036] like Figure 1 As shown, the shooting method may include steps: S110-S130, which are described in detail below.
[0037] S110: Receive a first input from a user on a target object displayed in a first shooting preview interface of an electronic device.
[0038] In the embodiment of the present application, the electronic device may include multiple cameras, and the first shooting preview interface may be a preview interface displayed when shooting is performed using one of the cameras.
[0039] In addition, the first input may be an input in which the user selects the target object displayed in the first shooting preview interface. The input method of the first input includes but is not limited to single-click, double-click, long press, etc. The target object includes but is not limited to a person, an object, a person and an object, etc.
[0040] Exemplarily, after the user selects the target object to be photographed through the first input, an object lock frame may be displayed in the first shooting preview interface and disappear after a preset time, so that the user can determine whether the selected target object is the object the user wants to photograph.
[0041] In some specific examples, when a user uses a mobile phone to shoot a certain object, the user can open the camera software in the mobile phone, enter the horizon correction mode, and display the preview interface of the current mobile phone camera on the screen, that is, the first shooting preview interface. When the user points the mobile phone camera at the object to be shot, the object to be shot can be displayed in the first shooting preview interface. Figure 2 As shown, if the user double-clicks to select the target object 21 displayed in the current preview interface, the focus tracking recognition can be turned on. After the target object 21 is recognized, the corresponding lock frame 22 can be displayed and the target object 21 can be locked. The lock frame 22 can disappear after 3 seconds, but the focus tracking will not be canceled.
[0042] S120: In response to the first input, the target object is displayed in a target area of the second shooting preview interface based on images captured by multiple cameras of the electronic device.
[0043] Here, after the user selects the target object, the locked target object can be displayed in the target area of the second shooting preview interface through the preset focus tracking algorithm and multiple cameras set on the electronic device. Among them, the multiple cameras set can include any multiple cameras of the main camera, 5X camera, 2X camera or wide-angle camera, for example.
[0044] In addition, the location of the target area can be determined according to actual needs, for example, it can be the central location area of the second shooting preview interface, or it can be other areas that are convenient for correction processing, which is not limited here.
[0045] Exemplarily, this embodiment may select a camera having an optimal field of view for a target object from multiple cameras provided on the electronic device according to a preset focus tracking algorithm, so that the target object can be displayed in the central position area of the shooting preview interface.
[0046] S130, correcting and photographing the image displayed on the second shooting preview interface to obtain a target image.
[0047] Here, the image frame displayed on the second shooting preview interface may be corrected to obtain a corrected shooting preview interface, and then shooting may be performed based on the corrected shooting preview interface to obtain a target image. The correction process may be, for example, a horizon correction process.
[0048] For example, the image information collected by the camera can be corrected in real time according to the preset horizon correction recognition algorithm, and the following can be obtained: Figure 3 The correction shooting preview interface shown in the figure may include a correctable area 31, and a preview image after horizon correction processing may be displayed in the correctable area 31.
[0049] In some implementations, after obtaining the correction shooting preview interface, the shooting method provided in the embodiment of the present application may further include:
[0050] receiving a second input from the user on the correction shooting preview interface;
[0051] In response to the second input, correction shooting is performed based on the correction shooting preview interface to obtain a target image.
[0052] Here, the second input may be a shooting trigger input performed by the user based on the corrected shooting preview interface obtained after horizon correction processing. The input method corresponding to the second input may include clicking a shooting button, or controlling the shooting through voice commands.
[0053] In some examples, the user can click on Figure 3 The photo button in the correction shooting preview interface shown is pressed to obtain the image displayed in the correctable area 31, that is, the target image.
[0054] In this way, by performing image capture based on the final correction capture preview interface after correction processing, the target object that the user wants to capture can always be kept within the target area, thereby improving the correction effect of the target object.
[0055] In addition, before the above S130, it can also be determined whether it is currently necessary to re-perform object tracking and recognition. If so, return to execute S120, if not, execute S130.
[0056] For example, if the user cancels the focus tracking, for example, by clicking Figure 2 , you can restore the default camera to shoot and restore the zoom ratio, such as 1x zoom range. When the user re-selects another object for focus tracking, the focus tracking state of the selected object can be triggered again.
[0057] Therefore, by locking the target object selected by the user while the user is using the electronic device to take pictures, the content that the user wants to shoot, that is, the target object, is displayed in the target area of the second shooting preview interface based on the images captured by multiple cameras in the electronic device, and then correction processing and shooting are performed based on the second shooting preview interface to obtain the target image. In this way, since the embodiment of the present application shoots the target object based on multiple field of view angle ranges corresponding to multiple cameras, even if the user slightly offsets the electronic device, the multi-camera shooting technology can be used to present the target object that the user wants to shoot in a fixed area of the shooting preview interface, which makes it easier to correct and shoot the target object, thereby improving the correction effect during image shooting and enhancing the user's shooting experience.
[0058] Based on the above S110-S130, in some embodiments, as Figure 4 As shown, the above S120 may specifically include:
[0059] S1201, determining a display area corresponding to a target object in a first shooting preview interface;
[0060] S1202, when the display area does not match the target area, switching a first camera in the electronic device that captures the target object to a second camera;
[0061] S1203: Capture a target object through the second camera, and display the target object in a target area of the second shooting preview interface.
[0062] Here, the mismatch between the display area and the target area may include at least one of position mismatch and size mismatch.
[0063] Exemplarily, when the display area does not match the target area, the camera being used, i.e., the first camera, can be switched to adjust the field of view angle range, and then the target object is photographed based on the field of view angle range corresponding to the switched camera, i.e., the second camera, so that the target object is displayed in the target area of the second shooting preview interface, thereby achieving the effect of matching the display area corresponding to the target object with the size of the target area.
[0064] In addition, after switching to the second camera, if the target object is still not displayed in the target area of the second shooting preview interface, the magnification of the second camera can be adjusted until the target object is displayed in the target area so that the display area corresponding to the target object matches the size of the target area.
[0065] In this way, by switching the first camera being used to the second camera when there is a mismatch between the display area corresponding to the target object and the target area, a shooting field of view matching the target object can be obtained, so that the target object is displayed in the target area of the second shooting preview interface. In this way, the success rate of correction and recognition of the target object can be improved, and the correction effect can be improved.
[0066] In addition, in some implementations, before the step of switching the first camera for capturing the target object in the electronic device to the second camera, the shooting method provided in the embodiment of the present application may further include:
[0067] Obtaining difference information between the display area and the target area;
[0068] According to the difference information, a target camera whose field of view angle matches the target object is determined from multiple cameras, and the target camera includes the second camera.
[0069] Here, the difference information may include at least one of size difference information and position difference information. The number of target cameras may be one or more, that is, there may be one or more cameras whose field of view angles match the target object, and then a camera is randomly selected or selected according to a preset rule as the second camera to be finally switched.
[0070] In this way, by determining the camera whose field of view matches the target object from multiple cameras based on the difference information between the display area and the target area, and then determining to switch to the second camera, the camera suitable for the target object can be accurately found, thereby improving the camera switching efficiency and quickly locating the suitable camera for the current shooting scene.
[0071] In some embodiments, the step of determining, from a plurality of cameras, a target camera whose field of view matches the target object according to the difference information, wherein the target camera includes a second camera, may specifically include:
[0072] When it is determined according to the difference information that the display area is smaller than the target area, a camera having a smaller field of view angle than the first camera is determined from the multiple cameras as the target camera;
[0073] When it is determined according to the difference information that the display area is larger than the target area, or the position offset of the display area relative to the target area exceeds a preset threshold, a camera having a field of view greater than the first camera is determined from multiple cameras as the target camera.
[0074] In some specific examples, if the camera currently being used is the main camera, such as Figure 5 As shown in FIG. 1 , when the target object 51 for tracking is identified to be close, the display area 52 corresponding to the target object 51 is larger than the target area 53. Therefore, according to the size difference information between the two, the wide-angle camera with a larger field of view than the main camera can be automatically switched to obtain a better field of view; Figure 6 As shown in FIG. 1 , when the target object 61 is far away, the display area 62 corresponding to the target object 61 is smaller than the target area 63. Therefore, according to the size difference information between the two, the 2X camera with a smaller field of view than the main camera can be automatically switched to the display area 62 corresponding to the target object 61. Figure 6 5X camera as shown; Figure 7 As shown, if the mobile phone offsets the target object 71, the target object 71 may not be fully displayed in the preview image taken by the current camera, that is, the position difference between the display area 72 and the target area 73 corresponding to the target object 71 is relatively large. For example, if the position offset of the display area 72 relative to the target area 73 exceeds a preset threshold, the camera can be automatically switched to a wide-angle camera with a larger field of view than the main camera based on the position difference information between the two.
[0075] In addition, if Figure 6 As shown, if the user moves the phone slightly, the 5X camera can be switched to the 2X camera, the main camera lens or the wide-angle lens to obtain a larger field of view, and then the magnification can be adjusted so that the target object of focus is displayed in the center of the camera preview interface.
[0076] In this way, by determining a camera whose field of view angle matches the target object from multiple cameras according to the size difference or position difference between the display area and the target area, a camera suitable for the target object can be accurately found.
[0077] Based on this, in some implementations, when the positions of the display area and the target area do not match, the shooting method provided in the embodiment of the present application may further include:
[0078] Acquire a region image corresponding to the display region in the first shooting preview interface;
[0079] The regional image is displayed in the target area of the second shooting preview interface.
[0080] For example, after switching the camera, if the target object is still not displayed in the target area of the second shooting preview interface, the area image corresponding to the display area in the first shooting preview interface can be cropped, and the cropped area image can be moved to the target area of the second shooting preview interface so that the target object is displayed in the target area.
[0081] In some specific examples, such as Figure 8 As shown, if the camera currently used by the mobile phone is the main camera, when the target object 81 is close and offset relative to the mobile phone camera, the mobile phone can automatically switch to the wide-angle lens and crop the image of the area 82 where the target object 81 is located, and then display the area image within the area 82 in the center of the shooting preview interface.
[0082] In this way, through image cropping, when the target object cannot be displayed in the target area even through lens switching, the regional image corresponding to the target object can be moved as a whole to the target area for display, thereby ensuring that the target object can be displayed in the target area of the shooting preview interface.
[0083] In addition, in some possible implementations, when there are multiple target cameras, S130 may specifically include:
[0084] Based on each camera in the target camera, the image displayed on the second shooting preview interface is subjected to horizon correction processing to obtain a correctable area in the correction shooting preview interface corresponding to each camera;
[0085] Determine a third camera from the target cameras according to the area of the correctable region;
[0086] Shooting is performed based on the correction shooting preview interface corresponding to the third camera to obtain a target image.
[0087] Here, when there are multiple target cameras, the size of the correctable area in the correction shooting preview interface corresponding to different target cameras may be different. Therefore, the camera with the best field of view angle can be selected for shooting based on the effective area of the correctable area determined by each target camera.
[0088] For example, after determining the target object for tracking focus, it can be determined whether to take a photo. In the process of determining whether to take a photo, the camera with the best correction effect is selected from the multiple optional target cameras through the horizon correction recognition algorithm, that is, the third camera, as the camera used for the final photo. Among them, the basic principle of the horizon correction recognition algorithm can be to identify the effective area of the correctable area displayed in the correction shooting preview interface.
[0089] Based on this, the step of determining the third camera from the target cameras according to the area of the correctable area may specifically include:
[0090] The camera with the largest correctable area among the target cameras is determined as the third camera.
[0091] Here, the larger the area of the correctable region is, the higher the probability of successfully correcting and identifying the target object is, and the better the correction effect is. Therefore, the camera with the largest area of the correctable region can be determined as the camera finally used.
[0092] In this way, by determining the third camera to be used for the final shooting based on the area of the correctable area in the correction shooting preview interface during the final shooting process, the identified camera with the optimal field of view can be used for horizon correction processing and the final shooting process, thereby further improving the correction effect and the success rate of correction.
[0093] It should be noted that the application scenarios described in the above-mentioned embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Ordinary technicians in this field can know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0094] Based on the same inventive concept, the present application also provides a photographing device. Fig. 9 The photographing device provided in the embodiment of the present application is described in detail.
[0095] Fig. 9 It is a structural block diagram of a shooting device provided by an embodiment of the present application.
[0096] like Fig. 9 As shown, the photographing device 900 may include:
[0097] The first input module 901 is used to receive a first input from a user on a target object displayed in a first shooting preview interface of the electronic device;
[0098] A first display module 902, configured to display the target object in a target area of the second shooting preview interface based on images captured by multiple cameras of the electronic device in response to the first input;
[0099] The image correction module 903 is used to correct the image displayed on the second shooting preview interface and shoot it to obtain a target image.
[0100] The above-mentioned photographing device 900 is described in detail below, as follows:
[0101] In one embodiment, the first display module 902 may specifically include:
[0102] An area determination submodule, used to determine a display area corresponding to the target object in the first shooting preview interface;
[0103] A camera switching submodule, configured to switch a first camera in the electronic device that captures the target object to a second camera when the display area does not match the target area;
[0104] The display submodule is used to capture the target object through the second camera and display the target object in the target area of the second shooting preview interface.
[0105] In one embodiment, the first display module 902 may further include:
[0106] A difference acquisition submodule, used for acquiring difference information between the display area and the target area before switching the first camera for capturing the target object in the electronic device to the second camera;
[0107] A target determination submodule is used to determine, based on the difference information, a target camera whose field of view matches the target object from among the multiple cameras, wherein the target camera includes the second camera.
[0108] In one embodiment, the first display module 902 may further include:
[0109] An image acquisition submodule, configured to acquire an area image corresponding to the display area in the first shooting preview interface when the display area and the target area do not match each other in position;
[0110] The image display submodule is used to display the regional image in the target area of the second shooting preview interface.
[0111] In one embodiment, the image correction module 903 includes:
[0112] A correction processing submodule, used for performing horizon correction processing on the image displayed on the second shooting preview interface based on each of the target cameras when there are multiple target cameras, so as to obtain a correctable area in the correction shooting preview interface corresponding to each camera;
[0113] A camera determination submodule, configured to determine a third camera from the target cameras according to the area of the correctable region;
[0114] The image shooting submodule is used to shoot based on the correction shooting preview interface corresponding to the third camera to obtain the target image.
[0115] In one embodiment, the camera determination submodule includes:
[0116] The maximum area determination unit is used to determine the camera with the largest correctable area among the target cameras as the third camera.
[0117] Therefore, by locking the target object selected by the user while the user is using the electronic device to take pictures, the content that the user wants to shoot, that is, the target object, is displayed in the target area of the second shooting preview interface based on the images captured by multiple cameras in the electronic device, and then correction processing and shooting are performed based on the second shooting preview interface to obtain the target image. In this way, since the embodiment of the present application shoots the target object based on multiple field of view angle ranges corresponding to multiple cameras, even if the user slightly offsets the electronic device, the multi-camera shooting technology can be used to present the target object that the user wants to shoot in a fixed area of the shooting preview interface, which makes it easier to correct and shoot the target object, thereby improving the correction effect during image shooting and enhancing the user's shooting experience.
[0118] The shooting device in the embodiment of the present application may be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than a terminal. Exemplarily, the electronic device may be a mobile phone, a camera, a camcorder, a tablet computer, a laptop computer, a PDA, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., which is not specifically limited in the embodiment of the present application.
[0119] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0120] The shooting device provided in the embodiment of the present application can achieve Figures 1 to 8 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0121] Optional, such as Fig.10 As shown, an embodiment of the present application also provides an electronic device 1000, including a processor 1001 and a memory 1002, wherein the memory 1002 stores programs or instructions that can be executed on the processor 1001, and when the program or instructions are executed by the processor 1001, the various steps of the above-mentioned shooting method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0122] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0123] Fig.11 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0124] The electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, and a processor 1110 and other components.
[0125] Those skilled in the art will appreciate that the electronic device 1100 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.11 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0126] The user input unit 1107 is used to receive a first input from a user on a target object displayed in a first shooting preview interface of the electronic device;
[0127] A display unit 1106, configured to display the target object in a target area of the second shooting preview interface based on images captured by multiple cameras of the electronic device in response to the first input;
[0128] The processor 1110 is used to correct and shoot the image displayed on the second shooting preview interface to obtain a target image.
[0129] Therefore, by locking the target object selected by the user while the user is using the electronic device to take pictures, the content that the user wants to shoot, that is, the target object, is displayed in the target area of the second shooting preview interface based on the images captured by multiple cameras in the electronic device, and then correction processing and shooting are performed based on the second shooting preview interface to obtain the target image. In this way, since the embodiment of the present application shoots the target object based on multiple field of view angle ranges corresponding to multiple cameras, even if the user slightly offsets the electronic device, the multi-camera shooting technology can be used to present the target object that the user wants to shoot in a fixed area of the shooting preview interface, which makes it easier to correct and shoot the target object, thereby improving the correction effect during image shooting and enhancing the user's shooting experience.
[0130] Optionally, the processor 1110 is further configured to determine a display area corresponding to the target object in the first shooting preview interface; if the display area does not match the target area, switch a first camera for capturing the target object in the electronic device to a second camera;
[0131] The display unit 1106 is further configured to capture the target object through the second camera and display the target object in the target area of the second shooting preview interface.
[0132] Optionally, the processor 1110 is further used to obtain difference information between the display area and the target area; and determine, based on the difference information, a target camera whose field of view angle matches the target object from the multiple cameras, wherein the target camera includes the second camera.
[0133] Optionally, the processor 1110 is further configured to obtain a region image corresponding to the display region in the first shooting preview interface when the display region and the target region do not match each other in position;
[0134] The display unit 1106 is further configured to display the area image in the target area of the second shooting preview interface.
[0135] Optionally, the processor 1110 is further configured to perform horizon correction processing on the image displayed on the second shooting preview interface based on each camera in the target camera to obtain a correctable area in the corrected shooting preview interface corresponding to each camera; and determine a third camera from the target camera according to the area of the correctable area;
[0136] The processor 1110 is further configured to shoot based on the correction shooting preview interface corresponding to the third camera to obtain the target image.
[0137] Optionally, the processor 1110 is further used to determine the camera with the largest correctable area among the target cameras as the third camera.
[0138] Therefore, by determining the third camera to be used in the final shooting based on the area of the correctable area in the correction shooting preview interface, the camera with the optimal field of view can be used for horizon correction processing, thereby further improving the correction effect and the success rate of the correction.
[0139] It should be understood that in the embodiment of the present application, the input unit 1104 may include a graphics processor (Graphics Processing Unit, GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and at least one of other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0140] The memory 1109 can be used to store software programs and various data. The memory 1109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1109 may include a volatile memory or a non-volatile memory, or the memory 1109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0141] The processor 1110 may include one or more processing units; optionally, the processor 1110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1110.
[0142] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0143] 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 computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0144] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0145] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0146] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0147] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0149] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A shooting method, characterized in that: include: Receiving a first input from a user on a target object displayed in a first shooting preview interface of the electronic device; In response to the first input, displaying the target object in a target area of a second shooting preview interface based on images captured by multiple cameras of the electronic device; Correcting and photographing the image displayed on the second shooting preview interface to obtain a target image; The displaying of the target object in a target area of a second shooting preview interface based on images captured by multiple cameras of the electronic device includes: Determining a display area corresponding to the target object in the first shooting preview interface; In the case where the display area does not match the target area, switching a first camera in the electronic device that captures the target object to a second camera; Capturing the target object through the second camera, and displaying the target object in the target area of the second shooting preview interface; The step of capturing the target object by using the second camera and displaying the target object in the target area of the second shooting preview interface includes: The target object is captured by the second camera, and when the display area corresponding to the target object matches the target area, the target object is displayed in the target area of the second shooting preview interface; In the case that the display area corresponding to the target object does not match the target area, cropping the area image corresponding to the display area; The cropped regional image is displayed in the target area of the second shooting preview interface.
2. The method according to claim 1, characterized in that Before switching the first camera in the electronic device to capture the target object to the second camera, the method further includes: Acquiring difference information between the display area and the target area; According to the difference information, a target camera whose field of view angle matches the target object is determined from the multiple cameras, and the target camera includes the second camera.
3. The method according to claim 2, characterized in that Determining, from the plurality of cameras, a target camera whose field of view angle matches the target object according to the difference information, comprises: In a case where it is determined according to the difference information that the display area is smaller than the target area, determining, from the multiple cameras, a camera having a smaller field of view angle than the first camera as the target camera; When it is determined according to the difference information that the display area is larger than the target area, or the position offset of the display area relative to the target area exceeds a preset threshold, a camera having a field of view greater than that of the first camera is determined from the multiple cameras as the target camera.
4. The method according to claim 2, characterized in that: In the case that there are multiple target cameras, the step of correcting and photographing the image displayed on the second shooting preview interface to obtain the target image includes: Based on each camera in the target camera, performing horizon correction processing on the image displayed on the second shooting preview interface to obtain a correctable area in the corrected shooting preview interface corresponding to each camera; Determining a third camera from the target cameras according to the area of the correctable region; Shooting is performed based on the correction shooting preview interface corresponding to the third camera to obtain the target image.
5. A photographing device, characterized in that: include: A first input module, used to receive a first input from a user on a target object displayed in a first shooting preview interface of the electronic device; A first display module, configured to display the target object in a target area of a second shooting preview interface based on images captured by multiple cameras of the electronic device in response to the first input; An image correction module, used for correcting and photographing the image displayed on the second shooting preview interface to obtain a target image; The first display module comprises: An area determination submodule, used to determine a display area corresponding to the target object in the first shooting preview interface; A camera switching submodule, configured to switch a first camera in the electronic device that captures the target object to a second camera when the display area does not match the target area; A display submodule, configured to capture the target object through the second camera and display the target object in the target area of the second shooting preview interface; The display submodule is also used for: The target object is captured by the second camera, and when the display area corresponding to the target object matches the target area, the target object is displayed in the target area of the second shooting preview interface; In the case that the display area corresponding to the target object does not match the target area, cropping the area image corresponding to the display area; The cropped regional image is displayed in the target area of the second shooting preview interface.
6. The device according to claim 5, characterized in that The first display module also includes: A difference acquisition submodule, used for acquiring difference information between the display area and the target area before switching the first camera for capturing the target object in the electronic device to the second camera; A target determination submodule is used to determine, based on the difference information, a target camera whose field of view matches the target object from among the multiple cameras, wherein the target camera includes the second camera.
7. The device according to claim 6, characterized in that The target determination submodule includes: a first determining unit, configured to determine, from the plurality of cameras, a camera having a smaller field of view angle than the first camera as the target camera when it is determined according to the difference information that the display area is smaller than the target area; A second determination unit is used to determine, from the multiple cameras, a camera having a field of view greater than that of the first camera as the target camera when it is determined according to the difference information that the display area is larger than the target area, or when the position offset of the display area relative to the target area exceeds a preset threshold.
8. The device according to claim 6, characterized in that The image correction module comprises: a correction processing submodule, configured to, when there are multiple target cameras, perform horizon correction processing on the image displayed on the second shooting preview interface based on each of the target cameras, so as to obtain a correctable area in the correction shooting preview interface corresponding to each camera; A camera determination submodule, configured to determine a third camera from the target cameras according to the area of the correctable region; The image shooting submodule is used to shoot based on the correction shooting preview interface corresponding to the third camera to obtain the target image.