Shooting method and related equipment thereof
By dynamically adjusting the zoom ratio and using the buffer in the cropping upper limit to make up for the insufficient margin between cameras, the image jump problem when switching cameras is solved, smooth switching of multiple cameras is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202411226931.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-10-03
AI Technical Summary
In electronic devices, due to the physical gaps and viewing angle differences between cameras, the imaging content and size jump during zooming, making it impossible to switch cameras smoothly.
By dynamically adjusting the zoom ratio, the second zoom ratio is processed as N times the second zoom ratio, ensuring that the N times cropping size is smaller than the cropping upper limit, and using the buffer in the cropping upper limit to make up for the problem of insufficient margin, thereby achieving smooth switching of multiple cameras.
It achieves smooth switching between multiple cameras and improves user experience.
Smart Images

Figure CN120751259A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a shooting method and related equipment. Background Art
[0002] With the development of shooting functions in electronic devices, camera applications are increasingly used in electronic devices. To obtain a better photo taking experience, current electronic devices are usually equipped with multiple cameras, each corresponding to a different focal length.
[0003] When shooting, electronic devices can switch between cameras with different focal lengths to perform zoom shooting in response to user input. They can also process the captured images using digital zoom to accommodate various high-magnification shooting scenarios. However, during zooming, due to the physical distance and viewing angle differences between cameras, image content and size can fluctuate between camera switches, preventing smooth camera switching.
[0004] Therefore, during the shooting process, how to smoothly switch cameras becomes a problem that needs to be solved urgently. Summary of the Invention
[0005] The present application provides a shooting method and related equipment, which dynamically adjusts the zoom ratio and processes the first zoom ratio according to the second zoom ratio to ensure that the cropping size corresponding to the second zoom ratio is smaller than the cropping upper limit, so that the buffer in the cropping upper limit can be used to make up for the problem of insufficient margin, thereby achieving smooth switching of multiple cameras.
[0006] In a first aspect, a shooting method is provided, which is applied to an electronic device, wherein the electronic device includes a first camera and a second camera, and the method includes: opening a camera application; displaying a first image and a zoom ratio control, wherein the zoom ratio control displays a first zoom ratio, and the first image is an image captured by the first camera and cropped according to a size corresponding to the first zoom ratio; upon receiving a first zoom operation, the current zoom ratio displayed by the zoom ratio control is switched from the first zoom ratio to a second zoom ratio; displaying a second image, wherein when the zoom ratio range used for background processing is [C, N×B), the second image is an image captured by the first camera and cropped according to the size of a minimum cropping frame; wherein N×B>C>B>A, A is the first zoom ratio, B is the second zoom ratio, C is the zoom ratio upper limit preset for the first camera, and N is an integer greater than or equal to 2.
[0007] In an embodiment of the present application, by dynamically adjusting the zoom ratio, the second zoom ratio is processed as N times the second zoom ratio, ensuring that the cropping size corresponding to the N times the second zoom ratio is smaller than the cropping upper limit, so that the Buffer in the cropping upper limit can be used as the margin to make up for the problem of insufficient margin. In this way, when the offset value between multiple cameras meets the margin, smooth switching of multiple cameras can be achieved, thereby improving the user experience.
[0008] Buffer indicates the area remaining after subtracting the preview size corresponding to the second zoom factor from the cropping upper limit. The cropping upper limit is also called the minimum cropping frame.
[0009] In combination with the first aspect, in certain implementations of the first aspect, when the current zoom ratio displayed by the zoom ratio control switches from the first zoom ratio to the second zoom ratio, the zoom ratio range used for background processing is (A, N×B].
[0010] In an embodiment of the present application, in response to a zoom operation, the zoom ratio processed in the background is dynamically adjusted so that the zoom ratio used for processing in the background is expanded N times, which is different from the zoom ratio displayed in the foreground, so that smooth zooming can be achieved before the zoom ratio corresponding to the cropping upper limit is reached; after the zoom ratio corresponding to the cropping upper limit is reached, since the first camera crops according to a fixed minimum cropping frame size, the buffer in the minimum cropping frame can be used to make up for the problem of insufficient margin. Therefore, the background processes according to the dynamically adjusted zoom ratio, which can cover the jump caused by the physical distance between multiple cameras, thereby achieving smooth switching of multiple cameras and improving user experience.
[0011] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: determining the upper limit C of the zoom ratio preset for the first camera based on the size of the original image captured by the first camera and the size of the display image sent for display at the first zoom ratio; and setting the maximum value of the zoom ratio range used for background processing to N×B according to the second zoom ratio and the upper limit C of the zoom ratio preset for the first camera.
[0012] It should be understood that, under the first zoom ratio, the size of the displayed image is the size of the displayed first image.
[0013] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when the zoom ratio range used for processing in the background is (A, C), for each zoom ratio, obtaining the original image captured by the first camera; for the original image, cropping according to the size of the cropping frame with margin corresponding to each zoom ratio to obtain the actual image; at least aligning the actual image with the image captured by the second camera; cropping according to the size of the display image corresponding to each zoom ratio to obtain the second image and display it.
[0014] In an embodiment of the present application, before the zoom magnification reaches the preset zoom magnification upper limit C of the first camera, the first camera crops the image according to the size of the cropping frame with the margin to obtain the actual image, and after alignment with the image of the second camera, crops the image a second time to obtain the display image and sends it for display.
[0015] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when the zoom ratio range used for processing in the background is [C, N×B), for each zoom ratio, obtaining the original image captured by the first camera; for the original image, cropping according to the minimum cropping frame size to obtain the actual image; at least aligning the actual image with the image captured by the second camera; cropping according to the size of the display image corresponding to each zoom ratio to obtain the second image and display it, thereby achieving smooth zoom of the FOV.
[0016] In the embodiment of the present application, before the zoom ratio reaches the actual zoom ratio upper limit N×B of the first camera, the first camera crops the image according to a fixed minimum cropping frame size to obtain the actual image. After alignment with the image of the second camera, the image is cropped a second time to obtain the display image and sent for display. Because the first camera can use the buffer within the minimum cropping frame to compensate for insufficient margins when cropping according to the fixed minimum cropping frame size, the background processing according to the dynamically adjusted zoom ratio can offset the jump caused by the physical spacing between multiple cameras, thereby achieving smooth switching between multiple cameras and improving the user experience.
[0017] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when the zoom ratio used for background processing is N×B, acquiring the image captured by the second image and processing the image to obtain the second image and then sending it for display.
[0018] In an embodiment of the present application, N×B is the actual upper limit of the zoom ratio of the first camera. When the zoom ratio used for processing by the background is equal to N×B, the background switches from the first camera to the second camera for display.
[0019] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: obtaining the original image captured by the first camera; cropping the original image according to the size of the cropping frame with margin corresponding to the first zoom ratio to obtain the actual image; and cropping the actual image according to the size of the display image corresponding to the first zoom ratio and then displaying it.
[0020] In combination with the first aspect, in certain implementations of the first aspect, after starting the camera application, the method further includes: obtaining depth information of the photographed object; when the depth information is greater than a distance threshold, determining that it is a close-range scene.
[0021] In an embodiment of the present application, when the shooting scene is a close-range scene, since the object to be shot is close to the electronic device, the jump caused by the physical distance between the first camera and the second camera has a relatively obvious impact on the image. Therefore, it is necessary to execute the shooting method provided by the present application to solve the problem of the jump so that the switching between multiple cameras can be smooth.
[0022] In combination with the first aspect, in certain implementations of the first aspect, the second zoom ratio is a preset switching point for switching from the first camera display to the second camera display.
[0023] In an embodiment of the present application, when the zoom ratio switches from the first camera to the second camera, the first camera and the second camera need to switch smoothly. Therefore, the zoom ratio needs to be dynamically adjusted subsequently.
[0024] In combination with the first aspect, in certain implementations of the first aspect, the second zoom ratio is any zoom ratio in a target zoom ratio range, the minimum value of the target zoom ratio range is the minimum value of the zoom ratio range corresponding to when Margin cannot cover the deviation value between the first camera and the second camera, and the maximum value of the target zoom ratio range is a preset switching point for switching from displaying with the first camera to displaying with the second camera.
[0025] In an embodiment of the present application, the shooting method provided by the present application aims to solve the problem of uneven switching between the first camera and the second camera. When the Margin range cannot cover the offset value between the first camera and the second camera, the images output by the first camera and the second camera will not be aligned, thereby affecting the switching. Therefore, the zoom ratio that cannot cover the offset can be dynamically adjusted.
[0026] In combination with the first aspect, in some implementations of the first aspect, the first zoom operation includes: a click operation, a voice operation, or an air gesture operation on the displayed zoom ratio control.
[0027] In combination with the first aspect, in some implementations of the first aspect, the first camera includes a wide-angle camera, and / or the second camera includes a telephoto camera or an ultra-wide-angle camera.
[0028] According to a second aspect, an electronic device is provided, comprising: one or more processors, a memory, a first camera, and a second camera; the memory is coupled to the one or more processors, the memory being configured to store computer program code, the computer program code comprising computer instructions, and the one or more processors invoking the computer instructions to cause the electronic device to execute:
[0029] Open the camera application; display a first image and a zoom ratio control, where the zoom ratio control displays a first zoom ratio, and the first image is obtained by cropping the image captured by the first camera according to the size corresponding to the first zoom ratio; upon receiving a first zoom operation, the current zoom ratio displayed by the zoom ratio control is switched from the first zoom ratio to the second zoom ratio; display a second image, and when the zoom ratio range used for background processing is [C, N×B), the second image is obtained by cropping the image captured by the first camera according to the size of the minimum cropping frame; wherein N×B>C>B>A, A is the first zoom ratio, B is the second zoom ratio, C is the preset zoom ratio upper limit of the first camera, and N is an integer greater than or equal to 2.
[0030] It should be understood that the expansion, limitation, explanation and description of the relevant content in the above-mentioned first aspect also apply to the same content in the second aspect.
[0031] In a third aspect, a chip system is provided, which is applied to an electronic device, and the chip system includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute any one of the shooting methods in the first aspect.
[0032] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by an electronic device, the electronic device executes any one of the shooting methods in the first aspect.
[0033] In a fifth aspect, a computer program product is provided, comprising: a computer program code, which, when executed by an electronic device, enables the electronic device to execute any one of the shooting methods in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic diagram of a hardware system of an electronic device applicable to the present application;
[0035] Figure 2 is a schematic diagram of a software system for an electronic device applicable to the present application;
[0036] Figure 3 This is a schematic diagram of an arrangement of multiple cameras on an electronic device provided by an embodiment of the present application;
[0037] Figure 4 This is a schematic diagram of zoom ratios corresponding to different types of cameras provided in an embodiment of the present application;
[0038] Figure 5 This is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0039] Figure 6 It is a schematic diagram of a set of image flows involved in the prior art;
[0040] Figure 7 This is a diagram of the offset and margin values of the main camera and telephoto camera;
[0041] Figure 8 This is a schematic diagram of the main camera's output at different zoom ratios;
[0042] Figure 9 This is a diagram of the theoretical and actual images produced by the main camera when the zoom ratio is infinite;
[0043] Figure 10 This is a schematic diagram of the image produced by the main camera when the zoom ratio exceeds the upper limit;
[0044] Figure 11 is a schematic flow chart of a shooting method provided in an embodiment of the present application;
[0045] Figure 12 1 is a diagram showing the correspondence between multiple cameras and zoom ratios provided in an embodiment of the present application;
[0046] Figure 13 This is a schematic diagram of a display interface and corresponding output image provided by an embodiment of the present application;
[0047] Figure 14 is a schematic diagram of a set of image flows involved in the embodiments of the present application;
[0048] Figure 15 is a schematic flow chart of another shooting method provided in an embodiment of the present application;
[0049] Figure 16 is a schematic flow chart of another shooting method provided in an embodiment of the present application;
[0050] Figure 17This is a schematic diagram of an application scenario of zoom switching provided by an embodiment of the present application;
[0051] Figure 18 This is a schematic diagram of an application scenario of zoom switching provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In the embodiments of this application, the terms "first," "second," and the like are used for descriptive purposes only and should not be understood to indicate or imply relative importance or to implicitly indicate the number of the technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0053] First, some of the terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0054] 1. Field of view (FOV) in optical instruments is the angle formed by the two edges of the maximum range through which the image of the target object can pass through the lens, with the lens as the vertex. The size of the field of view angle determines the field of view of the optical instrument. The larger the field of view angle, the greater the field of view and the smaller the optical magnification. In other words, the target object will not be captured by the lens if it exceeds this angle. The shorter the focal length, the wider the horizontal field of view, and therefore the smaller the image. The horizontal field of view narrows as the focal length increases, and the object being photographed also increases in size.
[0055] 2. Registration refers to the matching of geographic coordinates of different images obtained by different imaging methods within the same area. This includes three aspects: geometric correction, projection transformation, and uniform scale.
[0056] 3. Zoom ratio: The zoom ratio is used to indicate the zoom size of an electronic device when shooting.
[0057] The above is a brief introduction to the nouns involved in the embodiments of this application, and no further details will be given below.
[0058] The hardware system, software system and application scenarios of the electronic device provided in the embodiments of the present application are described below with reference to the accompanying drawings.
[0059] Exemplarily, the electronic device 100 may be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, an in-vehicle electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, etc. The embodiments of the present application do not impose any restrictions on the specific type of the electronic device 100.
[0060] See also Figure 1 The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0061] It should be noted that Figure 1 The structure shown does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include Figure 1 More or fewer components than those shown, or the electronic device 100 may include Figure 1 Combinations of some of the components shown, or alternatively, the electronic device 100 may include Figure 1 Subassemblies of some of the components shown. Figure 1 The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). The different processing units may be independent devices or integrated devices.
[0063] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0064] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0065] Exemplarily, the processor 110 can be used to execute the shooting method of the embodiment of the present application; for example, the method includes: opening a camera application; displaying a first image and a zoom ratio control, the zoom ratio control displays a first zoom ratio, and the first image is the image captured by the first camera and cropped according to the size corresponding to the first zoom ratio; receiving a first zoom operation, the current zoom ratio displayed by the zoom ratio control is switched from the first zoom ratio to the second zoom ratio; displaying a second image, when the zoom ratio range used for background processing is [C, N×B), the second image is the image captured by the first camera and cropped according to the size of the minimum cropping frame; wherein N×B>C>B>A, A is the first zoom ratio, B is the second zoom ratio, C is the upper limit of the zoom ratio preset for the first camera, and N is an integer greater than or equal to 2.
[0066] Figure 1 The connection relationship between the modules shown is only for illustrative purposes and does not limit the connection relationship between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of the multiple connection modes in the above embodiments.
[0067] The wireless communication function of the electronic device 100 can be implemented through components such as the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
[0068] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0069] Electronic device 100 can implement display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0070] Display screen 194 may be used to display images or videos.
[0071] For example, in an embodiment of the present application, the display screen 194 may be used to display the second image.
[0072] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0073] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can perform algorithmic optimization on image noise, brightness, and color. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0074] The camera 193 (also called the lens) is used to capture still images or videos. It can be triggered to turn on through application instructions to realize the photo function, such as capturing images of any scene. The camera may include components such as an imaging lens, a filter, and an image sensor. The light emitted or reflected by the object enters the imaging lens, passes through the filter, and finally converges on the image sensor. The imaging lens is mainly used to focus the light emitted or reflected by all objects in the photographic field of view (also called the scene to be photographed, the target scene, or the scene image that the user expects to capture) to form an image; the filter is mainly used to filter out excess light waves in the light (for example, light waves other than visible light, such as infrared); the image sensor can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The image sensor is mainly used to perform photoelectric conversion on the received light signal, convert it into an electrical signal, and then transmit the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB, YUV, etc.
[0075] Exemplarily, the gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake. The gyroscope sensor 180B can also be used in scenarios such as navigation and somatosensory games.
[0076] In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
[0077] Among them, the camera 193 can be located in the front of the electronic device 100 or in the back of the electronic device 100. The specific number and arrangement of the cameras can be set according to needs, and this application does not impose any restrictions.
[0078] Exemplarily, the electronic device 100 includes a front camera and a rear camera. For example, the front camera or the rear camera may include one or more cameras. Taking the example of the electronic device 100 having four rear cameras, when the electronic device 100 activates the four rear cameras for shooting, the shooting method provided in the embodiments of the present application can be used.
[0079] Alternatively, the camera is provided on an external accessory of the electronic device 100, and the external accessory is rotatably connected to the frame of the mobile phone, and the angle formed between the external accessory and the display screen 194 of the electronic device 100 is any angle between 0 and 360 degrees. For example, when the electronic device 100 takes a selfie, the external accessory drives the camera to rotate to a position facing the user. Of course, when the mobile phone has multiple cameras, only some of the cameras can be provided on the external accessory, and the remaining cameras can be provided on the electronic device 100 body. This embodiment of the application does not impose any restrictions on this.
[0080] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0081] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0082] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used in scenarios such as navigation and somatosensory games.
[0083] Accelerometer 180E can detect the magnitude of the acceleration of electronic device 100 in various directions (generally the x-axis, y-axis, and z-axis). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. Accelerometer 180E can also be used to identify the posture of electronic device 100, which can serve as an input parameter for applications such as landscape / portrait switching and pedometers.
[0084] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, for example, in a photography scenario, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0085] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0086] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement functions such as unlocking, accessing application locks, taking photos, and answering calls.
[0087] The touch sensor 180K is also referred to as a touch-sensitive device. The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also referred to as a touch screen. The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor 180K can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100 and at a different location from the display screen 194.
[0088] The hardware system of the electronic device 100 is described in detail above. The software system of the electronic device 100 is introduced below.
[0089] Figure 2 Schematic diagram of the software system of the electronic device provided in an embodiment of the present application.
[0090] like Figure 2 As shown, the system architecture may include an application layer 210 , an application framework layer 220 , a hardware abstraction layer 230 , a driver layer 240 and a hardware layer 250 .
[0091] The application layer 210 may include applications such as camera application, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0092] The application framework layer 220 provides an application programming interface (API) and a programming framework for the application programs of the application layer; the application framework layer may include some predefined functions.
[0093] For example, the application framework layer 220 may include a camera access interface, which may include camera management and camera devices. The camera management may be used to provide an access interface for managing the camera, and the camera device may be used to provide an interface for accessing the camera.
[0094] The hardware abstraction layer 230 is used to abstract the hardware. For example, the hardware abstraction layer may include a camera abstraction layer and other hardware device abstraction layers; the camera hardware abstraction layer may call camera algorithms.
[0095] For example, the hardware abstraction layer 230 includes a camera hardware abstraction layer and a camera algorithm; the camera algorithm may include a software algorithm for image processing.
[0096] Exemplarily, the camera algorithm library may include algorithms corresponding to the shooting method provided in the embodiments of the present application.
[0097] For example, the algorithm in the camera algorithm may refer to a code that does not rely on specific hardware implementation; for example, a code that can generally be run in a CPU, etc.
[0098] The driver layer 240 is used to provide drivers for different hardware devices. For example, the driver layer may include a camera driver.
[0099] The hardware layer 250 is located at the bottom layer of the operating system; Figure 3 As shown, the hardware layer 250 may include camera 1, camera 2, camera 3, etc. Among them, camera 1, camera 2, camera 3 may correspond to multiple cameras on the electronic device.
[0100] For ease of understanding, the following takes the electronic device 100 as an example of a mobile phone having the above-mentioned software and hardware structure, and first describes in detail the camera on the electronic device 100 to which the method provided in the embodiment of the present application is applicable.
[0101] The electronic device to which the method provided in the embodiment of the present application is applicable has at least multiple cameras 193, for example, three types of cameras 193; the three types of cameras are a main camera (for example, a wide-angle camera), an ultra-wide-angle camera and a telephoto camera; the three cameras can be used to shoot the same scene to be shot.
[0102] Optionally, the electronic device 100 may also have other cameras 193. The type of cameras 193 and the number of each type of camera 193 may be set as needed, and the embodiment of the present application does not impose any restrictions on this.
[0103] For example, Figure 3 As shown, the electronic device 100 may have three cameras 193 as an example for explanation; the arrangement of the three cameras may be as follows Figure 3 As shown in (a) in , or as Figure 3 As shown in (b) in FIG; for example, the three cameras 193 can be a main camera 1931 (for example, a wide-angle camera), an ultra-wide-angle camera 1932 and a telephoto camera 1933.
[0104] It should be understood that the above are only examples of two arrangements, and other arrangements are also possible; the specific arrangement can be designed and changed as needed, and the embodiments of the present application do not impose any restrictions on this.
[0105] It should be noted that if Figure 3 As shown in (c) in the figure, when the above three cameras are shooting, the field of view angle range corresponding to the main camera 1931 is usually larger than the field of view angle range corresponding to the telephoto camera 1933; and the field of view angle range corresponding to the ultra-wide-angle camera 1932 is larger than the field of view angle range corresponding to the main camera 1931; there may be an overlap between the field of view angle of the ultra-wide-angle camera 1932 and the field of view angle of the main camera 1931; that is, the ultra-wide-angle camera 1932 can capture the scene content captured by the main camera 1931 and the scene content around it.
[0106] It should be understood that Figure 3 As shown in (c) in the figure, the field of view of the telephoto camera 1933 is smaller than that of the main camera 1931. The field of view of the main camera 1931 and the field of view of the telephoto camera 1933 may overlap; that is, the main camera 1931 can capture the scene content captured by the telephoto camera 1933 and the surrounding scene content. The field of view of the ultra-wide-angle camera 1932 and the field of view of the telephoto camera 1933 may overlap; that is, the ultra-wide-angle camera 1932 can capture the scene content captured by the telephoto camera 1933 and the surrounding scene content.
[0107] Among them, the ultra-wide-angle camera 1932 is suitable for shooting close-ups due to its smaller focusing distance; and the ultra-wide-angle camera 1932 is suitable for shooting scenes with a larger field of view; the main camera 1931 is more suitable for shooting portraits due to its higher clarity, while the telephoto camera 1933 is more suitable for shooting distant close-ups.
[0108] For example, Figure 4 As shown, the zoom ratio of the ultra-wide-angle camera can be less than M times the zoom ratio; the zoom ratio range of the wide-angle camera, i.e., the main camera, can be [M, N); the zoom ratio of the telephoto camera can be greater than or equal to N times the zoom ratio.
[0109] For example, M can be 1 and N can be 2.5; then the zoom magnification of the ultra-wide-angle camera is less than 1x zoom magnification (1X); the zoom magnification range of the wide-angle camera is 1x zoom magnification to 2.5x zoom magnification [1X~2.5X); the zoom magnification of the telephoto camera is greater than or equal to 2.5x zoom magnification.
[0110] It should be understood that during the shooting process of an electronic device, the greater the zoom ratio, the smaller the corresponding field of view angle.
[0111] The following combination Figure 5 The application scenarios of the shooting method provided in the embodiments of the present application are illustrated with examples.
[0112] The method in the embodiments of the present application can be applied to photo-taking scenarios, preview scenarios, video recording scenarios, or video call scenarios, etc.; through the method in the embodiments of the present application, smooth switching of different cameras in electronic devices can be achieved, thereby improving the user's shooting experience and image quality.
[0113] For example, the preview scenarios include but are not limited to the following scenarios:
[0114] Photo preview, aperture preview, night scene preview, portrait preview, video preview or professional preview, etc.
[0115] It should be understood that the preview scene may refer to a scene in which the electronic device captures an image before a button indicating shooting is clicked in a certain shooting mode.
[0116] In one example, if Figure 5 As shown in (a) in the figure, after the electronic device enters the camera application, it can turn on the default photo mode; in the photo mode, the electronic device can enter the default shooting mode, which can refer to a shooting mode in which the wide-angle camera is used as the main camera and the zoom ratio is a single zoom ratio (1X), and the electronic device displays the image captured by the main camera; Figure 5 As shown in (b), in response to the user's click operation on the numbers indicating different zoom ratios in the zoom ratio control S (i.e., point-to-zoom operation), when the zoom ratio meets the zoom range corresponding to the telephoto camera, such as 2.5X, the electronic device can switch to display the image captured by the telephoto camera.
[0117] For example, the shooting method in the embodiment of the present application can also be applied to a video call scenario, wherein the video call scenario may include but is not limited to the following scenarios:
[0118] Video calls, video conferencing applications, long and short video applications, live video applications, online video courses, portrait intelligent mirroring application scenarios, system camera recording function video recording, video surveillance, or smart cat-eye and other portrait shooting scenarios, etc.
[0119] It should be understood that the above is an example of an application scenario and does not limit the application scenario of this application.
[0120] by Figure 3 Taking the electronic device shown in FIG. 1 as an example, the ultra-wide-angle camera 1932, the main camera 1931, and the telephoto camera 1933 are physically located at a certain distance from each other. Figure 3As shown in (b), it is assumed that the center of the main camera 1931 and the center of the ultra-wide-angle camera 1932 are located on the same horizontal line, and the vertical distance between the center of the telephoto camera 1933 and the horizontal line is 18.2 mm; the distance between the vertical line passing through the center of the main camera and the vertical line passing through the center of the telephoto camera 1933 is 10.1 mm; the distance between the vertical line passing through the center of the ultra-wide-angle camera 1932 and the vertical line passing through the center of the telephoto camera 1933 is 9.2 mm.
[0121] Currently, since the ultra-wide-angle camera 1932, the main camera 1931, and the telephoto camera 1933 are physically located at a certain distance from each other, the field of view angles corresponding to the different cameras are not only different in size, but also inevitably have deviations in the center. Figure 3 As shown in (c) in the figure, the field of view angle range corresponding to the telephoto camera 1933 is close to the upper edge of the field of view angle range corresponding to the main camera 1931, and the field of view angle range corresponding to the main camera 1931 is close to the left edge of the field of view angle range corresponding to the ultra-wide-angle camera 1932. Therefore, in a preview scene or a recording scene, if the zoom factor is increased (for example, from 1X to 10X) in response to a user operation, when the camera used to capture images is switched from the main camera 1931 to the telephoto camera 1933, due to the different field of view angle ranges and center points of the two cameras, the previous and next frames in the previewed or recorded video may include partially different imaging content, or the corresponding region of interest (ROI) may be disjointed, resulting in visual jumps.
[0122] It should be understood that the ROI may indicate the entire content or a portion of the content within the field of view when the camera is shooting.
[0123] For example, Figure 6 is a set of image streams involved in the prior art. Figure 6 As shown in (a) to (c) in the figure, assuming that the zoom ratio gradually increases during the zoom process, the main camera first captures the image and displays it. When the zoom switching point is reached, the telephoto camera is switched to capture the image and displays it. Before and after the switching, due to the different field of view angle ranges and centers of the main camera and the telephoto camera, and often due to insufficient tolerance (Margin), the images displayed before and after the switching will have an offset (Offset) jump, resulting in non-smooth multi-camera zoom switching, and thus leading to a poor user experience.
[0124] It should be noted that Offset refers to the offset value from the main camera to the telephoto camera, or from the main camera to the ultra-wide-angle camera; Margin refers to the tolerance reserved when the main camera and the telephoto camera, or the main camera and the ultra-wide-angle camera are aligned, which can include the offset value and the rotation amount.
[0125] For example, Figure 7 Schematic diagram of the field of view of the main camera 1931 and the telephoto camera. Figure 7 As shown, the offset value between the main camera 1931 and the telephoto camera 1933 is Offset1, and the tolerance reserved when the main camera 1931 and the telephoto camera 1933 are aligned is Margin1. Since Offset1 exceeds Margin1, when switching from the main camera 1931 to the telephoto camera 1933, the images displayed before and after the switch will have an offset jump.
[0126] In view of this, an embodiment of the present application provides a shooting method; in an embodiment of the present application, the method can be applied to an electronic device including multiple cameras, by dynamically adjusting the zoom ratio, processing the second zoom ratio as N times the second zoom ratio, ensuring that the cropping size corresponding to the N times the second zoom ratio is smaller than the cropping upper limit, so that the Buffer in the cropping upper limit can be used as Margin to make up for the problem of insufficient Margin. In this way, when the Offset value between multiple cameras meets the Margin, smooth switching of multiple cameras can be achieved, thereby improving user experience.
[0127] Buffer indicates the area remaining after subtracting the preview size corresponding to the second zoom factor from the cropping upper limit. The cropping upper limit is also called the minimum cropping frame.
[0128] The following combination Figures 8 to 10 The cutting rules involved in the embodiment of the present application are described in detail, and then combined with Figures 11 to 13 The schematic flowchart of the shooting method provided in the embodiment of the present application is described in detail.
[0129] It should be understood that in an embodiment of the present application, the electronic device includes a first camera and a second camera; wherein the first camera and the second camera are cameras of different types, the minimum zoom ratio adapted by the first camera is 1X, and the minimum zoom ratio adapted by the second camera is 1.8X.
[0130] like Figure 8As shown in (a), it is assumed that the size of the original image output by the first camera is 4000×3000, in pixels; when the zoom ratio is 1X, the corresponding cropping frame size is 2800×2100; if the margin to be reserved when the first camera and the second camera are aligned is 20% (10% on one side), then the size of the cropping frame with margin can be calculated to be (2800×2100)×1.2=3360×2520, that is, when the zoom ratio of the first camera is 1X, the size of the actual image output is 3360×2520, and the size of the preview image sent for display after other processing is 2800×2100.
[0131] like Figure 8 As shown in (b), when the zoom ratio is 1.2X, the cropping frame size is 2400×1800. At this time, by calculation, the cropping frame size with margin can be obtained as (2400×1800)×1.2=2880×2160. That is, when the zoom ratio of the first camera is 1.2X, the size of the actual image output is 2880×2160, and the size of the preview image sent for display after other processing is 2400×1800.
[0132] like Figure 8 As shown in (c) of Figure 1, at a zoom ratio of 2.5X, the cropping frame size is 1600×1200. At this point, the cropping frame size with margin is calculated to be (1600×1200)×1.2=1920×1440. That is, at a zoom ratio of 2.5X, the actual image output by the first camera is 1920×1440, and after alignment with the image captured by the second camera, the preview image size displayed is 1600×1200. The calculation methods for cropping frame sizes and cropping frame size with margin for zoom ratios greater than 1.8X are similar and are not detailed here.
[0133] It should be understood that as the zoom ratio increases, the FOV theoretically decreases, so the cropping frame on the original image also decreases, and the size of the cropping frame with margin also decreases accordingly. Figure 9 As shown in (a) in the figure, when the zoom ratio is infinite, the size of the cropping frame on the original image should be infinitely close to 0, and the size of the cropping frame with margin should also be infinitely close to 0. However, Figure 9As shown in (b) of the figure, due to hardware limitations, once the zoom ratio reaches a certain level, the cropping frame size on the original image becomes fixed and no longer decreases. For example, assuming the upper limit or minimum cropping frame size is 1200×900, then after the first camera reaches a certain zoom ratio, regardless of the size of the final preview image sent for display, the actual image output by the first camera before processing is fixed at 1200×900 and no longer decreases.
[0134] like Figure 10 As shown in (a), assuming that the upper limit of the zoom ratio is 3.33X, when the zoom ratio of the first camera is equal to 3.33X, the cropping frame size on the original image is 1000×750; at this time, by calculation, the cropping frame size with Margin can be obtained as (1000×750)×1.2=1200×900, which is exactly the minimum cropping frame size; that is, when the zoom ratio of the first camera is 3.33X, the size of the actual image output is 1200×900, and the size of the preview image sent for display after alignment with the image captured by the second camera is 1000×750. The first camera can still output and display the image normally.
[0135] like Figure 10 As shown in (b), assuming that the zoom ratio continues to increase, the size of the preview image needs to be 800×600, which is smaller than the minimum cropping frame size; when the margin is still 20%, it can be calculated that the cropping frame size with margin needs to be (800×600)×1.2=960×720, which is still smaller than the minimum cropping frame size. In this way, the cropping frame size with margin will be cropped according to the minimum cropping frame size of 1200×900, that is, the size of the actual image of the first camera is still 1200×900; in this way, after cropping according to the minimum cropping frame size and removing the size of the preview image from the minimum cropping frame size, the remaining area (that is, the buffer) can be used as the margin, which is equivalent to expanding the margin ratio; through calculation, it can be seen that the expanded margin is actually 50%.
[0136] like Figure 10As shown in (c), assuming that the zoom ratio continues to increase, the size of the preview image needs to be 600×450, which is smaller than the minimum cropping frame size. When the margin is still 20%, it can be calculated that the cropping frame size with margin needs to be (600×450)×1.2=720×540, which is still smaller than the minimum cropping frame size. In this case, the cropping frame size with margin will be cropped according to the minimum cropping frame size, that is, the actual image size of the first camera is still 1200×900; in this way, cropping according to the minimum cropping frame size is equivalent to expanding the margin ratio; through calculation, it can be seen that the expanded margin is actually 100%.
[0137] Afterwards, based on the above Figure 10 It can be seen that if the zoom ratio continues to increase, no matter what the size of the preview image sent for display after alignment and other processing is, the size of the cropping frame with margin will be cropped according to the minimum cropping frame size, that is, the size of the actual image of the first camera is fixed at 1200×900; thus, cropping according to the minimum cropping frame size is equivalent to enlarging the margin ratio, and the enlarged margin ratio is much larger than the preset margin ratio.
[0138] It should be understood that, in combination with the above example, assuming that the vertical distance decomposed in the offset value from the first camera to the second camera due to the physical distance is 200, the unit is pixel, then Figure 8 In the image shown in (a), the zoom ratio is 1X. Figure 8 In the image shown in (b), the zoom ratio is 1.2X. At this time, the second camera has not yet started, and the alignment of the first camera and the second camera is not involved.
[0139] However, in Figure 8 In the image shown in (c), the zoom ratio is 2.5X. When it exceeds 1.8X, the margin ratio on one side is 10%, and the vertical tolerance range is equivalent to 160. The jump caused by the physical spacing will be outside the tolerance range. In other words, even if the actual image size of the first camera before alignment is the cropping frame size with margin, it cannot cover the jump caused by the physical spacing. Then, the actual image output by the first camera will not be aligned with the image captured by the second camera.
[0140] Similarly, in Figure 10In the image shown in (a), the zoom ratio is 3.33X, the single-side margin ratio is 10%, and the vertical tolerance range is equivalent to 100. The jump caused by the physical spacing is still outside the tolerance range. That is, the actual image size output by the first camera before alignment is the minimum cropping frame size, which cannot cover the jump caused by the physical spacing between the first and second cameras. Therefore, the actual image output by the first camera is still not aligned with the image captured by the second camera.
[0141] However, in Figure 10 In the image shown in (b), when the zoom ratio exceeds 3.33X to 5X, the margin ratio on one side is 25%, and the vertical tolerance range is equivalent to 200. The jump caused by the physical distance is exactly equal to the tolerance range and does not affect the image alignment of the first camera and the second camera. Figure 10 In the image shown in (c), when the zoom ratio continues to increase, the margin ratio on one side is 50%, and the vertical tolerance range is equivalent to 300. The jump caused by the physical spacing is within the tolerance range and does not affect the image alignment of the first camera and the second camera.
[0142] Based on the above example, it can be seen that when the zoom ratio increases and reaches a certain level, the first camera crops according to the cropping frame with margin, and the actual image size output by the first camera before alignment can no longer cover the jump caused by the physical distance between the first camera and the second camera; however, after the zoom ratio exceeds the upper limit of the zoom ratio, when the first camera crops according to the fixed minimum cropping frame size, the actual image size output by the first camera before alignment can theoretically cover the jump caused by the physical distance between the first camera and the second camera.
[0143] In this regard, the shooting method provided in the embodiment of the present application dynamically adjusts the zoom ratio, processes the first zoom ratio according to the cropping size corresponding to the second zoom ratio, and determines that the cropping size corresponding to the second zoom ratio is smaller than the cropping upper limit, so that the buffer in the cropping upper limit can be used to make up for the problem of insufficient margin, cover the jump caused by the physical distance between the first camera and the second camera, and realize smooth switching of multiple cameras.
[0144] Based on this, the shooting method provided in the embodiment of the present application is introduced in detail below.
[0145] Figure 11 is a schematic flow chart of the shooting method provided in the embodiment of the present application. Figure 1The electronic device shown is executed; the method 300 includes steps S310 to S340, and steps S310 to S340 are described in detail below.
[0146] S310. Start the camera application.
[0147] For example, the user may instruct the electronic device to start the camera application by clicking the icon of the “Camera” application.
[0148] For example, when the electronic device is in the lock screen state, the user can instruct the electronic device to launch the camera application by swiping right on the electronic device's display. Alternatively, when the electronic device is in the lock screen state and the lock screen interface includes a camera application icon, the user can instruct the electronic device to launch the camera application by clicking the camera application icon. Alternatively, when the electronic device is running another application, the application has permission to call the camera application; the user can instruct the electronic device to launch the camera application by clicking the corresponding control. For example, when the electronic device is running an instant messaging application, the user can instruct the electronic device to launch the camera application by selecting the camera function control.
[0149] It should be understood that the above is an example of the operation of opening the camera application; the camera application can also be opened by voice instructions or other operations to instruct the electronic device; this application does not impose any limitation on this.
[0150] It should also be understood that launching the camera application may refer to running the camera application.
[0151] S320: Display the first image and a zoom ratio control, where the zoom ratio control displays a current zoom ratio of A. The first image is an image captured by the first camera and cropped to a size corresponding to the zoom ratio A.
[0152] For example, the first camera may be Figure 3 The wide-angle camera, main camera shown, or other cameras with a larger field of view than the telephoto camera.
[0153] Exemplarily, the zoom ratio control can be a draggable or clickable sliding axis, and a plurality of numbers indicating different zoom ratios are displayed on the sliding axis; or, the zoom ratio control can include a plurality of clickable options, and a number indicating a different zoom ratio is displayed on each option.
[0154] For example, Figure 5 The control S shown in is a zoom ratio control including three selectable options, wherein the zoom ratios displayed on the three options are 0.6X, 1X, and 2.5X respectively; Figure 5As shown in (a) in FIG, when the camera application is opened, the option indicating 1X in the middle is selected by default, in response to the user's click operation, as shown in FIG. Figure 5 As shown in (b), the option indicating 2.5X on the right is selected. At this time, the zoom ratio is switched from 1X to 2.5X through the point-to-point zoom operation.
[0155] Exemplarily, the first image may be an RGB image captured by the main camera, or in other words, the first image may be an RGB image obtained by processing a series of camera algorithms from a Raw image captured by the main camera.
[0156] For example, if the zoom ratio A is 1X, the first image is obtained by cropping the image captured by the first camera according to the size corresponding to 1X. Figure 8 As shown in (a), the image captured by the first camera is the original image, and the first image is obtained by cropping the cropping frame size 3360×2520 with a margin corresponding to 1X.
[0157] For another example, the zoom ratio A is 1.2X, and the first image is obtained by cropping the image captured by the first camera according to the size corresponding to 1.2X. Figure 8 As shown in (b), the image captured by the first camera is the original image, and the first image is obtained by cropping the cropping frame size 2880×2160 with a margin corresponding to 1.2X.
[0158] Optionally, after cropping the image captured by the first camera to the size corresponding to the zoom factor A, other image processing may be performed. This image processing may include a second cropping operation, where the second cropping operation refers to cropping from the cropping frame size with margins to the cropping frame size without margins, or cropping to the size of the preview image to be displayed. Furthermore, this image processing may include other processing, which is not limited in this embodiment of the present application.
[0159] For example, Figure 17 The preview image shown in (a) is the first image captured and displayed by the first camera. For example, Figure 18 The video image shown in (a) is the first image captured and displayed by the first camera.
[0160] Optionally, when displaying the first image captured by the first camera, the depth corresponding to the photographed object may also be captured.
[0161] Illustratively, before displaying the first image, the first camera may further perform disparity detection on the content in the first image to determine the depths corresponding to different photographed objects included in the first image.
[0162] For example, Figure 17 As shown in (a), when the first camera sends the first image for display, it can perform parallax detection to determine the depth corresponding to different photographed objects. The depth information can be displayed on the first image or not, and this application does not limit this.
[0163] It should be understood that the first image may include one or more photographed objects, and when displayed, a detection frame may be displayed simultaneously for each photographed object determined based on AI detection.
[0164] It should also be understood that the type of subject can be preset as needed. For example, when the type is set to face, the target object can be used to indicate a face recognized in the first image. The type of subject can also include plants, animals, etc. This embodiment of the application does not impose any restrictions on this.
[0165] S330: Upon receiving a first zoom operation, the current zoom ratio displayed by the zoom ratio control is switched from A to B, where B>A.
[0166] Optionally, receiving the first zoom operation may include: receiving the first zoom operation for a zoom magnification control.
[0167] It should be understood that the zoom operation for the zoom ratio control may indicate an operation instruction of the user, or may indicate a zoom operation instruction automatically triggered by the electronic device based on AI detection. The target object is one of the photographic objects included in the first image.
[0168] Exemplarily, when the first zoom operation indicates an operation instruction triggered by the user, the zoom operation may include a click operation, voice operation, air gesture operation, etc. for the options included in the zoom ratio control. The embodiments of the present application do not impose any restrictions on this.
[0169] For example, Figure 17 (a) and Figure 17 As shown in (b), when the electronic device displays one or more photographic objects and a zoom ratio control, the zoom operation may include a click operation on the target object in the first image and a click operation on the zoom ratio control; or, the zoom operation may also include a click operation on the target object in the first image and a voice operation on the zoom ratio control. It should be understood that when the zoom operation includes two operations, when executing, the user needs to first perform a click operation on the target object, and then perform a click operation or a voice operation on the zoom ratio control. The zoom operation can also be other operations, or the zoom operation can also include three or more sub-operations, and the embodiments of the present application do not impose any restrictions on this.
[0170] Optionally, the current zoom ratio B is a preset switching point for switching from the first camera display to the second camera display.
[0171] It should be understood that when the zoom ratio switches from the first camera to the second camera, the first camera and the second camera need to switch smoothly. Therefore, the zoom ratio needs to be dynamically adjusted later.
[0172] For example, before receiving the first zoom operation, the current zoom ratio A displayed by the zoom ratio control is 1X, that is, the option indicated by 1X is selected; when the first zoom operation is the user clicking the 2.5X option included in the zoom ratio control, the option indicated by 2.5X is selected, that is, the current zoom ratio displayed by the zoom ratio control switches from 1X to 2.5X. 2.5X is the preset switching point for switching from the first camera to the second camera.
[0173] Optionally, the current zoom ratio B is any zoom ratio in the target zoom ratio range, the minimum value of the target zoom ratio range is the minimum value of the zoom ratio range corresponding to when the Margin range cannot cover the offset value between the first camera and the second camera, and the maximum value of the target zoom ratio range is the preset switching point from the first camera display to the second camera display.
[0174] It should be understood that the shooting method provided in this application aims to solve the problem of uneven switching between the first camera and the second camera. When the Margin range cannot cover the offset value between the first camera and the second camera, the images output by the first camera and the second camera will not be aligned, thereby affecting the switching.
[0175] For example, combined with Figure 8 and Figure 10In the example shown, assume that the vertical distance factored into the offset between the first and second cameras due to physical distance is 200. When the zoom ratio is 2X, the margin ratio on one side is 10%, and the vertical tolerance range is equivalent to 200. The jump caused by physical distance is exactly equal to the tolerance range. When the zoom ratio exceeds 2X, the margin range cannot cover the jump caused by physical distance, and the images of the first and second cameras will no longer be aligned. When the zoom ratio reaches 5X, the jump caused by physical distance is again exactly equal to the tolerance range. Therefore, the zoom ratio range where the margin range cannot cover the offset value is (2X, 5X), excluding the endpoints. The preset switching point from the first camera to the second camera is 2.5X. Therefore, the minimum value of the target zoom ratio range is 2X, and the maximum value is 2.5X. Therefore, zoom ratio B can be any value within the target zoom ratio range (2X, 2.5X), such as 2.1X, 2.5X, etc.
[0176] S340: Display and save the second image.
[0177] When the zoom ratio range used for background processing is [C, N×B), the second image is obtained by cropping the image captured by the first camera according to the size of the minimum cropping frame, N×B>C>B>A, N is an integer greater than or equal to 2, and C is the preset upper limit of the zoom ratio of the first camera.
[0178] It should be noted that the crop size corresponding to the upper limit of the zoom ratio preset by the first camera is the size of the minimum crop frame, such as Figure 10 As shown in (a) in .
[0179] On this basis, the zoom ratio range used by the background for processing also includes (A, C) and N×B. In this zoom ratio range, the second image is obtained by cropping the image captured by the first camera according to the sizes corresponding to A to C respectively; when the zoom ratio used by the background for processing is N×B, the second image is obtained by cropping the image captured by the second camera.
[0180] For example, Figure 12 (a) and Figure 13 As shown in (a) in the figure, assuming that the current zoom ratio displayed on the current UI switches from 1X A to 2.5X B, and the upper limit of the zoom ratio C preset by the first camera is 3.33X, the zoom ratio range processed by the background will be dynamically adjusted to expand the zoom ratio to an integer multiple of the current zoom ratio B. For example, if N = 2, N × B = 5X, 5X > 3.33X, Figure 12 As shown in (b) in the figure, the zoom ratio range used for background processing is (1X, 5X). In the zoom ratio range of (1X, 3.33X), as shown in Figure 8 (a) to Figure 8 As shown in (c) and Figure 13 As shown in (c) in the figure, the size of the preview image to be output is larger than the minimum cropping frame. Therefore, after the first camera captures the image, it will crop the original image according to the size of the cropping frame with margin corresponding to each zoom ratio to obtain the actual image. In the zoom ratio range of (1X, 1.8X), the actual image is subjected to other image processing and then displayed. In the zoom ratio range of [1.8X, 3.33X), the actual image is aligned with the image captured by the second camera, and then the preview image is obtained after a second cropping and displayed.
[0181] In the zoom ratio range of [3.33X, 5X), Figure 10 (a) Figure 10 As shown in (b) and Figure 13 As shown in (c) in the figure, the size of the preview image to be output is smaller than the minimum cropping frame. Therefore, after the first camera captures the image, it will be cropped according to the fixed minimum cropping frame size. The buffer size in the minimum cropping frame is larger, so the buffer in the minimum cropping frame can be used to make up for the problem of insufficient margin. When the images of the first camera and the second camera are subsequently aligned, the jump caused by the physical distance between the first camera and the second camera can be covered. When the zoom ratio used for background processing is equal to 5X, as shown in Figure 12 As shown in (b), the first camera is switched to the second camera. At this time, the second image is obtained by capturing the image with the second camera.
[0182] It should be understood that in this example, N is 2, and the actual upper limit of the zoom magnification of the first camera is 5X. When N is other values, the actual upper limit of the zoom magnification of the first camera changes accordingly, that is, the switching point from the first camera to the second camera in the background also changes accordingly, and this embodiment of the application is not limited to this.
[0183] Exemplarily, the first image may be an RGB image, and the corresponding second image may be an RGB image.
[0184] It should be understood that the current zoom ratio displayed by the zoom ratio control switches from A to B, where B>A. Therefore, the first zoom operation is an operation of increasing the zoom ratio. When the zoom ratio is increased, the size of the subject included in the second image is larger than the size of the subject included in the first image.
[0185] Optionally, the target object in the second image is centered in the second image.
[0186] Optionally, the second image includes the entire content or a portion of the target object. Figure 18 As shown, assuming that the target object is the fourth subject, after magnification, the second image may include the entire fourth subject, or the second image may also include partial content of the fourth subject, such as the face of the fourth subject; when further magnified, the second image may also include a partial face of the fourth subject.
[0187] Optionally, in order to smoothly enlarge the target object displayed by the electronic device during the zoom process, the above S340 can be executed multiple times in a loop, and the target object in the second image obtained each time is larger than the target object obtained last time. That is, in response to the zoom operation, based on the zoom magnification range dynamically adjusted in the background for processing, the electronic device obtains and displays multiple second images, and the multiple second images all include the target object, and the target objects in the multiple second images gradually increase from the original size. The number of loop executions and the magnitude of the size change can be set as needed, and this application does not limit this. Among them, the original size indicates the size of the target object in the first image.
[0188] It should be understood that S340 may be executed while S330 is being executed, or S340 may be executed after S330 is executed. This embodiment of the present application does not impose any limitation on this.
[0189] For example, when in the preview scene, the second image can be displayed. Wherein, the preview shooting mode includes but is not limited to: shooting modes such as night scene preview mode, video preview mode, photo preview mode, and portrait preview mode.
[0190] Exemplarily, when in a video recording scene, the second image may be displayed and saved.
[0191] Optionally, the method further includes:
[0192] In response to a first zoom operation;
[0193] Determine whether the zoom ratio of the electronic device meets the zoom ratio range of the first camera foreground display and the second camera background operation.
[0194] Exemplarily, in response to the first zoom operation, when the current zoom ratio B is equal to a preset switching point for switching from the first camera to the second camera (such as a zoom ratio of 2.5X), or when the current zoom ratio B is any zoom ratio in a target zoom ratio range, the target zoom ratio range is, for example, (2X, 2.5X], the minimum value of the target zoom ratio range is the minimum value of the zoom ratio corresponding to the offset value between the first camera and the second camera that cannot be covered by the margin range, and the maximum value of the target zoom ratio range is the preset switching point for switching from the first camera to the second camera.
[0195] At this time, in response to the first zoom operation, the shooting method provided in the embodiment of the present application is executed, and the zoom magnification range for processing is dynamically adjusted in the background. The maximum value of the adjusted zoom magnification range is N times the maximum value of the target zoom magnification range, so that the maximum value of the adjusted zoom magnification range exceeds the zoom magnification upper limit preset by the first camera. In this way, when used for processing, after exceeding the preset zoom magnification upper limit, it will be cropped according to the size of the minimum cropping frame, so that the buffer in the minimum cropping frame can be used to make up for the problem of insufficient margin and cover the jump between the first camera and the second camera.
[0196] An embodiment of the present application provides a shooting method and related equipment. In the embodiment of the present application, in response to a zoom operation, the zoom magnification of the background processing is dynamically adjusted so that the zoom magnification used for background processing is expanded N times, which is different from the zoom magnification displayed on the foreground. Therefore, before the zoom magnification reaches the zoom magnification upper limit preset by the first camera, the first camera can obtain the actual image after cropping according to the size of the cropping frame with Margin, aligning it with the image of the second camera, and then cropping it a second time to obtain a preview image and display it; before the zoom magnification reaches the actual zoom magnification upper limit of the first camera, the first camera obtains the actual image after cropping according to the fixed minimum cropping frame size, aligning it with the image of the second camera, and then cropping it a second time to obtain a preview image and display it; when the zoom magnification is equal to the actual zoom magnification upper limit of the first camera, the second camera is switched to capture the image and display it. Since the first camera can use the buffer in the minimum cropping frame to make up for the insufficient margin when cropping according to the fixed minimum cropping frame size, the background processes according to the dynamically adjusted zoom ratio to cover the jump caused by the physical distance between multiple cameras, thereby achieving smooth switching of multiple cameras and improving the user experience.
[0197] For example, Figure 14 is a set of image streams involved in this application. Figure 14 (a), (b) to Figure 14 As shown in (c), during the zoom process, the zoom ratio displayed on the foreground switches from 1X to 2.5X, and the zoom ratio used for background processing is [1X, 5X). After processing at 5X, after exceeding the upper limit of the zoom ratio of 3.33X, the second image can be obtained by cropping according to the fixed minimum cropping frame size for display. The buffer in the minimum cropping frame size is used to cover the offset value between the first camera and the second camera. In this way, the content captured by the first camera and the second camera can be aligned, and the FOV of the image stream can be smoothly enlarged, and the camera can be switched smoothly during the zoom process.
[0198] Figure 15A schematic flowchart exemplarily shows another shooting method of the electronic device 100 .
[0199] Taking the first camera as a main camera and the second camera as a telephoto camera as an example, the method 400 includes S401 to S411; S401 to S411 are described in detail below.
[0200] S401: Obtain depth information of the object.
[0201] For example, the distance to an object can be determined by emitting energy and measuring the time or phase change of its reflection. For example, a TOF (Time of Light) camera and structured light technology can be used to actively measure the distance to obtain the depth information of the object.
[0202] S402: Determine whether the depth information is greater than a distance threshold. If so, execute S403; if not, execute S404.
[0203] The distance threshold can be set and modified as needed, and this application does not limit this.
[0204] For example, the distance threshold may be set to 20 cm or 30 cm.
[0205] S403: When the depth information is greater than the distance threshold, it is determined to be a long-distance scene, and the existing multi-camera switching process is executed.
[0206] S404: When the depth information is less than or equal to the distance threshold, it is determined to be a close-range scene, and S405 is executed.
[0207] For example, assuming that the distance threshold is 20cm, when the electronic device determines that the depth information of the object being photographed is greater than 20cm, the shooting scene is a long-distance scene. At this time, since the object is far away from the electronic device, the jump caused by the physical distance between the first camera and the second camera does not have a significant impact on the image. Therefore, it can be ignored and the existing multi-camera switching process is executed. When the depth information is less than or equal to 20cm, the shooting scene is a close-range scene. At this time, since the object is close to the electronic device, the jump caused by the physical distance between the first camera and the second camera has a relatively significant impact on the image. Therefore, it is necessary to execute the shooting method provided by this application to solve the jump problem so that multi-camera switching can be smooth.
[0208] S405: Determine that the current zoom ratio is A, obtain the original image captured by the first camera, crop the original image according to the size of the cropping frame with margin corresponding to the zoom ratio A, align the original image with the image captured by the second camera, and perform other processing. Crop the original image a second time according to the size of the display image corresponding to the zoom ratio A and send the image for display. In addition, the zoom ratio control displays the current zoom ratio as A.
[0209] S406: Upon receiving a point-to-zoom operation, the current zoom ratio displayed by the zoom ratio control is switched from A to B, where B>A.
[0210] S407 : Determine a preset upper limit C of the zoom magnification of the first camera according to the size of the original image captured by the first camera and the size of the displayed image when the zoom magnification is A.
[0211] S408. According to the current zoom magnification B and the zoom magnification upper limit C preset for the first camera, the maximum zoom magnification used for background processing is set to N×B, where N×B>C>B>A, where N is an integer greater than or equal to 2.
[0212] S409. The zoom ratio range used for background processing is (A, N×B). When the zoom ratio falls within the zoom ratio range (A, C), for each zoom ratio, the original image captured by the first camera is obtained and cropped according to the size of the cropping frame with margin corresponding to the zoom ratio. After alignment with the image captured by the second camera, the original image is cropped for a second time according to the size of the display image corresponding to the zoom ratio and displayed. This image is the second image.
[0213] S410. When the zoom ratio falls within the zoom ratio range of [C, N×B), for each zoom ratio, obtain the original image captured by the first camera and crop it according to the size of a fixed minimum cropping frame. After aligning it with the image captured by the second camera and performing other processing, crop it a second time according to the size of the display image corresponding to the zoom ratio and send it for display. This image is the second image.
[0214] S411: When the zoom ratio is N×B, obtain an image captured by the second camera, process it to obtain a second image, and send it for display.
[0215] For example, the image captured by the first camera may be a RAW image, a YUV image, or an RGB image captured by the main camera; the image captured by the second camera may be a RAW image, a YUV image, or an RGB image captured by the telephoto camera.
[0216] In an embodiment of the present application, in response to a zoom operation, the zoom magnification of the background processing is dynamically adjusted, so that the zoom magnification used for background processing is increased by N times, which is different from the zoom magnification displayed on the foreground. Therefore, before the zoom magnification reaches the preset zoom magnification upper limit of the first camera, the first camera crops the image according to the size of the cropping frame with margin to obtain the actual image, aligns it with the image of the second camera, and then crops it again to obtain the display image for display. Before the zoom magnification reaches the actual zoom magnification upper limit of the first camera, the first camera crops the image according to the fixed minimum cropping frame size to obtain the actual image, aligns it with the image of the second camera, and then crops it again to obtain the display image for display. When the zoom magnification equals the actual zoom magnification upper limit of the first camera, the second camera is switched to capture the image and display it. Because the first camera can use the buffer in the minimum cropping frame to compensate for the insufficient margin when cropping according to the fixed minimum cropping frame size, the background processing according to the dynamically adjusted zoom magnification can offset the jump caused by the physical distance between multiple cameras, thereby achieving smooth switching between multiple cameras and improving the user experience.
[0217] Figure 16 A schematic flowchart exemplarily shows another shooting method of the electronic device 100 .
[0218] The method 500 includes S501 to S509 ; S501 to S509 are described in detail below.
[0219] S501: Acquire an image captured by a main camera.
[0220] Exemplarily, the image captured by the main camera may be a Raw image captured by the wide-angle camera; or, the image captured by the main camera may be a Raw image captured by the ultra-wide-angle camera.
[0221] S502: First front-end processing.
[0222] Optionally, the first front-end processing may include a related algorithm for converting the Raw image captured by the main camera into a YUV image; this application does not impose any limitation on the algorithm.
[0223] For example, the first front-end processing may refer to an image processing algorithm executed in the ISP to convert a raw image into a YUV image. The first front-end processing may also include subsequent operations such as cropping and magnification based on the zoom ratio in response to a zoom operation.
[0224] S503: Acquire an image captured by the telephoto camera.
[0225] Exemplarily, the image captured by the telephoto camera may be a Raw image captured by the telephoto camera.
[0226] Optionally, S504 and S501 may be executed simultaneously, or S504 and S501 may be executed sequentially.
[0227] S504: Second front-end processing.
[0228] Optionally, the second front-end processing may include a related algorithm for converting the Raw image captured by the telephoto camera into a YUV image; this application does not impose any limitation on the algorithm.
[0229] For example, the second front-end processing may refer to an image processing algorithm executed in the ISP to convert a raw image into a YUV image. The second front-end processing may also include subsequent operations such as cropping and magnification based on the zoom ratio in response to a zoom operation.
[0230] For example, when the shooting scene is a long-distance scene, when the zoom ratio is 1X to 1.8X, only S501 is executed. When the zoom ratio is 1.8X to 2.5X, S501 and S503 are executed simultaneously. When the zoom ratio is 2.5X or above, only S503 is executed.
[0231] S505: First backend processing.
[0232] Exemplarily, the first back-end processing includes but is not limited to: brightening processing, denoising processing, saturation adjustment processing, cropping processing or deformation processing.
[0233] S506: Smoothing process (or alignment process).
[0234] Exemplarily, smoothing is performed on the image stream captured by the main camera and the image stream captured by the telephoto camera. This can be understood as the input smoothing data being two image streams, while the smoothed image stream is a single image stream. For example, the image stream captured by the main camera and the image stream captured by the telephoto camera are corrected based on the image stream captured by the main camera. For example, this smoothing process can also include intra-frame smoothing and inter-frame smoothing.
[0235] In an embodiment of the present application, the smoothing process may also include the shooting method provided by the present application. When executing S506, when the shooting scene is a close-range scene, when the point is cut to 2.5X, the zoom ratio used for processing is dynamically adjusted, such as expanding it to 2x, that is, the zoom ratio range for processing is (1X, 5X); for each zoom ratio in [3.33X, 5X), the original image captured by the main camera is obtained and cropped according to the size of the minimum cropping frame, and aligned with the image captured by the telephoto camera so that the buffer in the minimum cropping frame can make up for the problem of insufficient Margin and cover the Offset value between the first camera and the second camera, and then continue to execute subsequent steps.
[0236] S507: Second backend processing.
[0237] Exemplarily, the second back-end processing includes anti-shake processing; for example, anti-shake processing may be performed on image frames in the image stream according to a jitter parameter to obtain a processed image.
[0238] S508: Display the processed image.
[0239] For example, when the shooting scene is a long-distance scene, when the zoom factor increases and the zoom ratio is between 1X and 1.8X, the processed image is: the processed image corresponding to the image captured by the main camera; when the zoom is to 1.8X to 2.5X, the processed image is: the image captured by the main camera, and the image captured by the telephoto camera after correction and other processing; when the zoom is to 2.5X and above, the processed image is the processed image corresponding to the image captured by the telephoto camera.
[0240] When the shooting scene is close-up and the zoom ratio is switched to 2.5X, if the background processing is between 1X and 1.8X, the processed image is the image captured by the main camera. If the background processing is between 1.8X and 3.33X, the processed image is the image captured by the main camera, corrected with the image captured by the telephoto camera. If the background processing is at 5X, the processed image is the image captured by the telephoto camera.
[0241] S509: A zoom operation is detected.
[0242] For the zoom operation, reference may be made to the description in S330 above.
[0243] Optionally, the electronic device may display an image captured by the main camera, or an image captured by the telephoto camera, and the electronic device detects a user operation on the displayed image.
[0244] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific numerical values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or variations based on the above examples, and such modifications or variations also fall within the scope of the embodiments of the present application.
[0245] For example, Figure 17 A schematic diagram of an application scenario provided for an embodiment of the present application.
[0246] like Figure 17As shown in (a) of FIG, in response to a user's operation on a camera application, the electronic device may display a preview interface 1301, which includes a preview window and a shooting control, wherein a preview image 1302 displayed in the preview window may include a first shooting object, a second shooting object, and a third shooting object. Here, when the camera application is opened, the zoom ratio defaults to 1X. Figure 17 As shown in (b) in FIG. 1 , assuming that the user wants to zoom in on the third photographed object located at the lower left of the preview image 1302, the user can click on the screen and click on the zoom ratio control; in response to the operation, for example, Figure 17 As shown in (c) in FIG. 13 , the zoom ratio can be increased to 2.5X, the imaging size corresponding to the third object changes from small to large, and the third object can be located in the middle of the preview image 1303 in response to the click operation.
[0247] In the process of changing the zoom ratio in response to a click operation, it is possible to apply Figure 11 、 Figure 15 、 Figure 16 The shooting method described.
[0248] It should be understood that the above is a preview scene in the photo mode, and the embodiment of the present application can also be applied to preview scenes in other shooting modes such as video. The preview scene can refer to the scene in which the electronic device captures an image before clicking the shooting control in a certain shooting mode.
[0249] For example, Figure 18 A schematic diagram of another application scenario provided for an embodiment of the present application.
[0250] After the camera application is opened, in response to the user's click operation on the recording control, the electronic device can start recording the video and display the video recording interface 1401, such as Figure 18 As shown in (a) of FIG. 1 , the video recording interface 1401 may include a recording window, a pause control, an end control, and a zoom control. The video image 1402 displayed in the recording window may include a first subject, a second subject, a third subject, and a fourth subject. When video recording begins, the zoom ratio defaults to 1X.
[0251] If the electronic device supports and turns on the AI detection and parallax detection functions, the electronic device can detect the image content and depth when capturing the video image 1402, and display multiple detection frames when displaying the video image 1402, each detection frame is used to indicate the position information of a photographed object in the video image 1402. Figure 18 As shown in (a) in FIG. 1 , four detection frames are displayed in the video image 1402 , and the four detection frames respectively indicate the position information of the first to fourth shooting objects.
[0252] Optionally, if the AI detection and disparity detection functions are only used for depth detection of faces, the electronic device may display only two detection frames when displaying the video image 1402, and the two detection frames respectively indicate the face of the second subject and the face of the fourth subject.
[0253] like Figure 18 As shown in (a) in FIG, during the recording process, assuming that the user wants to zoom in on the face of the fourth shooting subject located on the left side of the video image 1402, the user can click on the detection box corresponding to the fourth shooting subject on the screen. Figure 18 As shown in (b) of FIG, in response to the user's click operation, the detection frame of the fourth shooting object included in the video image 1403 may be in a selected state. For example, the selected detection frame may be in a different color and / or style than other detection frames. Then, the electronic device may receive the user's click operation on the zoom magnification control, such as Figure 18 As shown in (c) in the figure, in response to a click operation on the zoom ratio control (assuming a click on 2.5X), the electronic device can display a video image 1404, in which the face of the fourth subject included in the video image 1404 becomes larger relative to the face of the fourth subject included in the video image 1402, and the face of the fourth subject can be located in the middle position of the video image 1404 in response to the click operation.
[0254] It should be noted that if the electronic device detects the image content and only detects one subject or one face, the user does not need to click on the detection box corresponding to the subject or face, and the electronic device automatically selects it; then, in direct response to the user's click operation on the zoom ratio control, the subject or face is enlarged and displayed in the center.
[0255] In the process of changing the zoom ratio in response to a click operation, it is possible to apply Figure 11 、 Figure 15 、 Figure 16 The shooting method described.
[0256] It should be understood that the above is a video recording scenario, and the embodiments of the present application can also be applied to scenarios such as video calls.
[0257] Exemplarily, video call scenarios may include but are not limited to the following scenarios: video calls, video conferencing applications, long and short video applications, live video applications, online video courses, portrait smart mirror application scenarios, system camera recording function video recording, video surveillance, or smart cat-eye and other shooting scenarios.
[0258] Combined with the above Figures 1 to 18The shooting method provided in the embodiment of the present application is described in detail.
[0259] The present application also provides a computer program product, which, when executed by a processor, implements the method described in any method embodiment of the present application.
[0260] The computer program product may be stored in a memory, for example, a program, which is converted into an executable target file that can be executed by a processor after undergoing processes such as preprocessing, compilation, assembly, and linking.
[0261] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the method described in any method embodiment of the present application. The computer program can be a high-level language program or an executable target program.
[0262] The computer-readable storage medium is, for example, a memory. The memory may be a volatile memory or a non-volatile memory, or the memory may include both volatile memory and non-volatile memory. 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), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0263] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.
[0264] In the several embodiments provided in this application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not executed. The device embodiments described above are merely schematic, and the division of units is only a logical function division. There may be other division methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.
[0265] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0266] Additionally, the terms "system" and "network" are often used interchangeably. The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the related objects.
[0267] In short, the above description is only a preferred embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included in the scope of protection of this application.
Claims
1. A shooting method, characterized in that: Applied to an electronic device, the electronic device includes a first camera and a second camera, and the method includes: Open the Camera app; Displaying a first image and a zoom ratio control, wherein the zoom ratio control displays a first zoom ratio, and the first image is an image captured by the first camera and cropped to a size corresponding to the first zoom ratio; Upon receiving a first zoom operation, the current zoom ratio displayed by the zoom ratio control is switched from the first zoom ratio to a second zoom ratio; Displaying the second image, when the zoom ratio range used for background processing is [C, N×B), the second image is obtained by cropping the image captured by the first camera according to the size of the minimum cropping frame; Among them, N×B>C>B>A, A is the first zoom ratio, B is the second zoom ratio, C is the upper limit of the zoom ratio preset for the first camera, and N is an integer greater than or equal to 2.
2. The shooting method according to claim 1, wherein: When the current zoom ratio displayed by the zoom ratio control is switched from the first zoom ratio to the second zoom ratio, the zoom ratio range used for background processing is (A, N×B].
3. The shooting method according to claim 2, characterized in that: The method further comprises: Determining a preset upper limit C of the zoom magnification of the first camera based on the size of the original image captured by the first camera and the size of the displayed image at the first zoom magnification; According to the second zoom magnification and the zoom magnification upper limit C preset by the first camera, the maximum value of the zoom magnification range used for background processing is set to N×B.
4. The shooting method according to claim 2 or 3, characterized in that: The method further comprises: When the zoom magnification range used for background processing is (A, C), for each zoom magnification, the original image captured by the first camera is obtained; For the original image, cropping is performed according to the size of the cropping frame with margin corresponding to each zoom magnification to obtain the actual image; At least aligning the actual image with the image captured by the second camera; The display image is cropped according to the size corresponding to each zoom ratio to obtain the second image and display it.
5. The shooting method according to any one of claims 2 to 4, characterized in that: The method further comprises: When the zoom ratio range used for background processing is [C, N×B), for each zoom ratio, the original image captured by the first camera is obtained; Cropping the original image according to the minimum cropping frame size to obtain an actual image; At least aligning the actual image with the image captured by the second camera; The display image is cropped according to the size corresponding to each zoom ratio to obtain the second image and display it.
6. The shooting method according to any one of claims 2 to 5, characterized in that: The method further comprises: When the zoom ratio used for background processing is N×B, the image captured by the second image is acquired and processed to obtain the second image, which is then sent for display.
7. The shooting method according to any one of claims 1 to 6, characterized in that: The method further comprises: Obtaining an original image captured by the first camera; Cropping the original image according to the size of the cropping frame with margin corresponding to the first zoom ratio to obtain an actual image; The actual image is cropped according to the size of the display image corresponding to the first zoom ratio and then displayed.
8. The shooting method according to any one of claims 1 to 7, characterized in that: After starting the camera application, the method further includes: Obtain depth information of the object; When the depth information is greater than the distance threshold, it is determined to be a close-range scene.
9. The shooting method according to claim 1, wherein: The second zoom ratio is a preset switching point for switching from the first camera display to the second camera display.
10. The shooting method according to claim 1, wherein: The second zoom ratio is any zoom ratio in the target zoom ratio range, the minimum value of the target zoom ratio range is the minimum value of the zoom ratio range corresponding to when Margin cannot cover the deviation value between the first camera and the second camera, and the maximum value of the target zoom ratio range is the preset switching point for switching from the first camera display to the second camera display.
11. The shooting method according to any one of claims 1 to 10, characterized in that: The first zoom operation includes: a click operation, a voice operation, or an air gesture operation on a displayed zoom ratio control.
12. The shooting method according to any one of claims 1 to 11, characterized in that: The first camera includes a wide-angle camera, and / or the second camera includes a telephoto camera or an ultra-wide-angle camera.
13. An electronic device, characterized in that: The electronic device includes: one or more processors, a memory, a first camera and a second camera; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the shooting method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the photographing method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Shooting method and equipment
CN112825543A
Shooting method and electronic equipment
CN114531539A
Shooting method, electronic equipment and readable storage medium
CN117560574A
Shooting mode switching method and related device
CN118075606A
Imaging apparatus and method for displaying zoom information
US20080055429A1