Sliding zoom control method and device, electronic equipment and storage medium
By dynamically controlling the start-stop strategy of the image sensor and optimizing the switching of the image sensor according to the type of sliding zoom operation and the difference in zoom magnification, the problem of insufficient responsiveness during sliding zoom is solved, and a smoother sliding zoom experience is achieved.
Patent Information
- Application Number
- CN202511688879.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-24
AI Technical Summary
During the sliding zoom process, there is an inherent time delay between the image sensor's activation decision triggering and the stable availability of data stream, resulting in insufficient responsiveness of the sliding zoom.
By dynamically controlling the start and stop of the image sensor based on the type of zoom operation and the zoom ratio difference, the system quickly switches to the image sensor corresponding to the target zoom ratio, optimizes the start and stop strategy of the image sensor, ensures timely power outage during fast zooming, and reduces power consumption during slow zooming.
It improves the responsiveness and user experience of sliding zoom, ensures timely changes in the field of view, and takes into account power consumption to provide a smooth sliding zoom experience.
Smart Images

Figure CN121567955A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of camera technology, and in particular to a sliding zoom control method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of optical technology and image signal processing technology, more and more cameras are being installed on electronic devices. These cameras not only have their own functional characteristics (such as ultra-wide-angle wide field of view and telephoto long-distance shooting capability), but also correspond to different optical focal lengths, thus covering a wider range of shooting.
[0003] Slide zoom is a common zoom method. Users can continuously change the magnification of the image by sliding. When the zoom magnification is close to the optical focal length of different cameras (such as sliding from 1x main camera to 5x telephoto), the corresponding camera will be automatically switched.
[0004] However, there is an inherent time delay between the triggering decision of an image sensor and the stable availability of data. Therefore, ensuring the responsiveness of zooming becomes a pressing issue. Summary of the Invention
[0005] Therefore, it is necessary to provide a sliding zoom control method, device, electronic device, and storage medium that can ensure the responsiveness of sliding zoom in response to the above-mentioned technical problems.
[0006] In a first aspect, this application provides a sliding zoom control method, including:
[0007] In response to a zoom operation, obtain the initial zoom level and the first target zoom level;
[0008] If the type of the sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio, the image sensor corresponding to the first target zoom ratio is switched to the working state.
[0009] If the type of the sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold, the image sensor corresponding to the first target zoom ratio is switched to working state.
[0010] Secondly, this application also provides a sliding zoom control device, comprising:
[0011] The acquisition module is used to acquire the initial zoom magnification and the first target zoom magnification in response to the sliding zoom operation;
[0012] The first switching module is used to switch the image sensor corresponding to the first target zoom ratio to the working state when the type of the sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio.
[0013] The second switching module is used to switch the image sensor corresponding to the first target zoom ratio into working state when the type of the sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and when the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold.
[0014] Thirdly, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0015] In response to a zoom operation, obtain the initial zoom level and the first target zoom level;
[0016] If the type of the sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio, the image sensor corresponding to the first target zoom ratio is switched to the working state.
[0017] If the type of the sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold, the image sensor corresponding to the first target zoom ratio is switched to working state.
[0018] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0019] In response to a zoom operation, obtain the initial zoom level and the first target zoom level;
[0020] If the type of the sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio, the image sensor corresponding to the first target zoom ratio is switched to the working state.
[0021] If the type of the sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold, the image sensor corresponding to the first target zoom ratio is switched to working state.
[0022] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0023] In response to a zoom operation, obtain the initial zoom level and the first target zoom level;
[0024] If the type of the sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio, the image sensor corresponding to the first target zoom ratio is switched to the working state.
[0025] If the type of the sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold, the image sensor corresponding to the first target zoom ratio is switched to working state.
[0026] The aforementioned sliding zoom control method, device, electronic device, and storage medium, in response to a sliding zoom operation, can acquire an initial zoom ratio and a first target zoom ratio. Based on these two ratios, the type of sliding zoom operation can be determined. Consequently, if the sliding zoom operation is of the first type, the image sensor corresponding to the first target zoom ratio can be switched to a working state. If the sliding zoom operation is of the second type, and the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold, the image sensor corresponding to the first target zoom ratio can be switched to a working state. Switching to the working state, the sliding speed corresponding to the first type is greater than that corresponding to the second type. This does not affect the image sensor's activation range under slow and normal sliding speeds. During fast or medium-speed sliding, the image sensor corresponding to the first target zoom magnification is pulled up in advance. This not only meets the requirement of timely output of the image sensor with a larger field of view during fast sliding, but also takes into account the impact on power consumption. By dynamically controlling the timing of the image sensor's pull-up based on the user's sliding behavior while taking power consumption into account, the responsiveness of sliding zoom can be ensured, and the user experience of sliding zoom scenarios can be improved. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a flowchart illustrating a sliding zoom control method in one embodiment;
[0029] Figure 2 This is a flowchart illustrating the sliding zoom control method in another embodiment;
[0030] Figure 3 This is a flowchart illustrating the sliding zoom control method in another embodiment;
[0031] Figure 4 This is a flowchart illustrating the sliding zoom control method in another embodiment;
[0032] Figure 5 This is a schematic diagram of the working range of different sensors in different scenarios in one embodiment;
[0033] Figure 6 This is a structural block diagram of a sliding zoom control device in one embodiment;
[0034] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0036] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0037] Currently, electronic devices are increasingly equipped with multiple cameras, typically supporting 3-5 different types. The camera operation interface of multi-camera electronic devices offers focal length switching options of 0.6x, 1x, 2x, 5x, and 10x. Lower numbers indicate a wider field of view, while higher numbers indicate a farther field of view, roughly corresponding to the focal lengths of ultra-wide-angle, main, and telephoto cameras. Each camera has different characteristics; therefore, multi-camera electronic devices employ SAT (Spatial Alignment Transform) to enable real-time camera lens switching based on user needs in different shooting scenarios. For sliding zoom scenes, due to their random direction and speed, high responsiveness (both start and end responsiveness) is required. However, image sensors inherently have a time delay from triggering the decision to ensuring stable data flow. Therefore, ensuring the responsiveness of sliding zoom becomes a critical issue that needs to be addressed.
[0038] This application proposes an optimized scheme for differentiated control of the image sensor in sliding zoom scenarios based on different sliding speeds. Specifically, it differentiates the start and stop of the image sensor based on the user's sliding speed and the start and stop points in sliding zoom scenarios. In medium-to-high speed sliding scenarios, the image sensor that might be switched to is immediately activated to ensure sufficient field of view for zooming. For normal sliding speeds and slow-speed scenarios, control is still based on setting the image sensor's on / off interval. Furthermore, for scenarios involving repeated back-and-forth sliding, the issues of abnormal frame intervals or longer image sensor activation times caused by the repeated activation and deactivation of the image sensor are also optimized to ensure a smooth and fluid experience regardless of the user's sliding motion.
[0039] The sliding zoom control method provided in this application can be applied to electronic devices, such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), or dedicated cameras (e.g., SLR cameras, point-and-shoot cameras), etc. This application does not limit the specific type of electronic device. The following explanation will use a mobile phone as an example.
[0040] In one exemplary embodiment, such as Figure 1 As shown, a sliding zoom control method is provided, and its application to an electronic device is illustrated. The method includes the following steps:
[0041] S201, in response to the sliding zoom operation, obtains the initial zoom magnification and the first target zoom magnification.
[0042] In this context, "slide zoom" refers to the operation in a mobile phone camera system where the user adjusts the focal length by touching and sliding to zoom in or out of the image. As an optional implementation, it is possible to identify whether it is a slide zoom based on the trigger behavior. In this embodiment, the initial zoom magnification is the zoom magnification of the electronic device at the moment the slide zoom operation is triggered, and the first target zoom magnification is the zoom magnification that needs to take effect after the slide zoom operation ends.
[0043] For example, for a two-finger swipe zoom operation, the first target zoom ratio can be calculated by the ratio of the initial finger distance to the final finger distance and the initial zoom ratio; for a zoom bar / zoom ring zoom operation, the first target zoom ratio can be determined by directly matching the position of the finger on the control after swiping.
[0044] S202, if the type of sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio, the image sensor corresponding to the first target zoom ratio is switched to the working state.
[0045] S203, if the type of sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and if the difference between the actual zoom ratio and the first target zoom ratio is less than the first preset threshold, the image sensor corresponding to the first target zoom ratio is switched to the working state.
[0046] In this context, the sliding speed of the zoom operation represented by the first type is greater than that represented by the second type. The first type can include fast zoom and medium zoom operations, while the second type can be a slow zoom operation. As an example, the electronic device can determine the type of zoom operation based on the relationship between the difference between the initial zoom magnification and the first target zoom magnification and a preset threshold. For instance, when the difference between the initial zoom magnification and the first target zoom magnification is less than the first preset threshold, the type of zoom operation can be determined to be a slow zoom operation; when the difference between the initial zoom magnification and the first target zoom magnification is greater than the first preset threshold and less than the second preset threshold, the type of zoom operation can be determined to be a medium zoom operation; and when the difference between the initial zoom magnification and the first target zoom magnification is greater than the second preset threshold, the type of zoom operation can be determined to be a fast zoom operation. For ease of description below, the medium zoom operation will be referred to as the third type of zoom operation, and the fast zoom operation will be referred to as the fourth type of zoom operation.
[0047] In this embodiment of the application, as an optional implementation, if the type of sliding zoom operation is determined to be the first type, the image sensor corresponding to the first target zoom magnification can be switched to the working state immediately in response to the sliding zoom operation, and the image sensor corresponding to the first target zoom magnification can be pulled up in advance.
[0048] It should be noted that in the embodiments of this application, the APP side no longer performs frame interpolation processing (to reduce the load on the APP side during zoom sliding). Once there is a zoom sliding, the APP side immediately sends out updates on the sliding event and position as quickly as possible. The frame interpolation logic is uniformly implemented in the Hardware Abstraction Layer (HAL). Compared with the previous method of performing partial smooth frame interpolation on the APP side, the HAL layer can obtain the zoom event update earlier and more timely, thus triggering the secondary camera to pull up in time and recognizing the sliding stop event earlier.
[0049] In this embodiment of the application, as another optional implementation, when the type of sliding zoom operation is determined to be the second type, the image sensor corresponding to the first target zoom ratio is not immediately switched to the working state. Instead, the image sensor corresponding to the first target zoom ratio is switched to the working state when the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold. For example, the image sensor corresponding to the first target zoom ratio may be activated in advance when the difference between the actual zoom ratio and the first target zoom ratio is less than 2x, or it may be activated in advance when the difference between the actual zoom ratio and the first target zoom ratio is less than 1x. That is to say, when the type of sliding zoom operation is the second type, the image sensor corresponding to the first target zoom ratio is activated in advance when the actual zoom ratio is relatively close to the first target zoom ratio, which is later than the activation timing of the first type of sliding zoom operation. In the aforementioned sliding zoom control method, in response to a sliding zoom operation, the initial zoom magnification and the first target zoom magnification can be obtained. Based on these two magnifications, the type of sliding zoom operation can be determined. Therefore, if the sliding zoom operation is of type one, the image sensor corresponding to the first target zoom magnification is switched to the working state. If the sliding zoom operation is of type two, and the difference between the actual zoom magnification and the first target zoom magnification is less than a first preset threshold, the image sensor corresponding to the first target zoom magnification is switched to the working state. The sliding speed corresponding to type one is greater than that corresponding to type two. This ensures that the image sensor's activation range is not affected during slow or normal sliding. During fast or medium-speed sliding, the image sensor corresponding to the first target zoom magnification is pulled up in advance. This not only meets the requirement for timely output of the larger field of view image sensor during fast sliding but also takes into account the impact on power consumption. By dynamically controlling the timing of image sensor activation based on the user's sliding behavior while considering power consumption, the responsiveness of sliding zoom can be ensured, improving the user experience in sliding zoom scenarios.
[0050] This embodiment will explain in detail the process of switching the image sensor corresponding to the first target zoom level to the working state. In an exemplary embodiment, such as Figure 2 As shown, "switching the image sensor corresponding to the zoom level of the first target to the working state" in S202 and S203 above includes:
[0051] S301, determine the transition image sensor and the first target image sensor corresponding to the first target zoom ratio.
[0052] Understandably, for multi-camera electronic devices (such as triple-camera or quad-camera electronic devices), the zoom process may involve switching between multiple image sensors. For example, for a triple-camera electronic device, switching from 0.5x to 5x involves switching between the ultra-wide-angle image sensor, the main image sensor, and the telephoto image sensor; for a quad-camera electronic device, switching from 0.5x to 5x involves switching between the ultra-wide-angle image sensor, the main image sensor, the mid-range image sensor, and the telephoto image sensor; and switching from 1x to 5x involves switching between the main image sensor, the mid-range image sensor, and the telephoto image sensor.
[0053] For example, in this embodiment, the transition image sensor and the first target image sensor can be determined based on the camera configuration information of the electronic device, the initial zoom ratio, and the first target zoom ratio. For instance, if the electronic device is a triple-camera device, and the zoom operation is switching from 0.5x to 5x, the main camera image sensor can be determined as the transition image sensor, and the telephoto image sensor as the first target image sensor. If the electronic device is a quad-camera device, and the zoom operation is switching from 0.5x to 5x, the main camera image sensor and the mid-range image sensor can be determined as transition image sensors, and the telephoto image sensor as the first target image sensor. When switching from 1x to 5x, the mid-range image sensor can be determined as the transition image sensor, and the telephoto image sensor as the first target image sensor.
[0054] S302, switch the transition image sensor to the working state, and after an interval of a first number of preset frames, switch the first target image sensor to the working state.
[0055] In this embodiment, during the process of switching the image sensor corresponding to the first target zoom ratio to the working state, the transition image sensor can be switched to the working state first, and after an interval of a first number of preset frames, the first target image sensor can be switched to the working state. That is, the next level image sensor (e.g., the main camera image sensor) is first activated, and after an interval of a first number of preset frames (e.g., one frame), the next lower level image sensor (e.g., the ultra-wide-angle image sensor) is activated.
[0056] Additionally, it should be noted that in this embodiment, if there are multiple transition image sensors, during the process of activating multiple transition image sensors, each transition image sensor also adopts the switching method described above, activating a lower-level transition image sensor after an interval of the first number of preset frames. As described in the above embodiment, when the transition image sensors are the main camera image sensor and the mid-range image sensor, and the first target image sensor is a telephoto image sensor, the main camera image sensor can be activated first, the mid-range image sensor can be activated after an interval of two frames, and then the telephoto image sensor can be activated after another interval of two frames.
[0057] In this embodiment, by determining the transition image sensor and the first target image sensor corresponding to the first target zoom ratio, the transition image sensor can be switched to the working state, and then the first target image sensor can be switched to the working state after a first number of preset frames. By staggering the start-up of the image sensors, hardware resource conflicts can be avoided, ensuring the stability of image sensor startup. In addition, there is a fixed delay (usually 1-2 frames) from the image sensor starting command to the available data stream. If multiple image sensors are started at the same time, the first frame output time of multiple image sensors will overlap, which will cause frame interval abnormalities. By staggering the start-up of the image sensors, frame interval abnormalities can be reduced, and the smoothness of sliding zoom can be improved.
[0058] In some scenarios, when the actual zoom ratio exceeds the zoom ratio range corresponding to the image sensor, the image sensor can switch to standby mode to reduce the power consumption of the non-working image sensor and ensure subsequent wake-up speed, adapting to the rapid switching requirements of zoom scenarios. This embodiment will explain in detail the implementation method of switching the image sensor to standby mode. In an exemplary embodiment, the method further includes: when the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, switching the second target image sensor to standby mode after a preset frame interval.
[0059] In this embodiment, if the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, the second target image sensor will be in a non-working state. In order to reduce the power consumption of the second target image sensor and ensure the wake-up speed of the second target image sensor in the future, as an example, the second image sensor can be switched to standby state after an interval of target frames.
[0060] The following section will explain in detail the switching process of the second image sensor to standby mode for two different types of sliding zoom operations: zoom down and zoom up.
[0061] In Example 1, if the zoom operation is a zoom reduction operation, it will be explained in two different scenarios: medium zoom operation and fast zoom operation. In an exemplary embodiment, if the zoom operation is of type three (i.e., medium zoom operation), and the actual zoom magnification exceeds the zoom magnification range corresponding to the second target image sensor, the second target image sensor can be switched to standby mode after a second number of preset frames. If the zoom operation is of type four (i.e., fast zoom operation), and the actual zoom magnification exceeds the zoom magnification range corresponding to the second target image sensor, the second target image sensor can be switched to standby mode after a third number of preset frames. The third number is greater than the second number; for example, the second number of preset frames can be 4 frames, and the third number of preset frames can be 6 frames; or, the second number of preset frames can be 6 frames, and the third number of preset frames can be 8 frames, etc.
[0062] In Example 2, if the zoom operation is a zoom magnification operation, in an exemplary embodiment, when the actual zoom magnification exceeds the zoom magnification range corresponding to the second target image sensor, the second target image sensor can be switched to standby mode after a fourth number of preset frames. For example, the fourth number is greater than the third number mentioned above; for instance, the fourth number of preset frames can be 10 frames, etc. That is, when the second target image sensor is switched to standby mode, the number of preset frames in the zoom magnification operation scenario is greater than the number of preset frames in the zoom reduction operation scenario.
[0063] Based on the above embodiments, as an optional implementation, if a new sliding zoom operation is received during the process of switching the second target image sensor to standby mode, and the zoom ratio of the second target corresponding to the new sliding zoom operation is the zoom ratio of the second target image sensor, then the second target image sensor can be switched to working mode after switching to standby mode. It is understandable that the transition of an image sensor from working state to standby state is not instantaneous, but involves a transition process. During this process, the image sensor gradually stops data output and releases some hardware resources (such as stopping real-time sampling of the photosensitive element and disconnecting some data channels). However, the core modules (such as the driver circuit) still maintain low-power operation to ensure rapid wake-up later. During the switch to standby state, the image sensor is in a "semi-busy" state, unable to output images in real time as in working state, nor can it be woken up immediately as in a fully standby state. If the user triggers a zoom operation at this time (which requires restarting the image sensor), the standby transition process must be interrupted first, and then the image sensor must be reinitialized, which will double the startup time and cause screen stuttering and changes in field of view (poor responsiveness). In this embodiment, if a new zoom operation is received during the process of the second target image sensor switching to standby state, and the zoom magnification of the second target corresponding to the new zoom operation is the same as the zoom magnification of the second target image sensor, then the second target image sensor can be switched to working state after it switches to standby state, avoiding screen stuttering and poor responsiveness.
[0064] In this embodiment, when the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, the second target image sensor is switched to standby mode after the interval of the target frame. By delaying the time for the image sensor to switch to standby mode, the user's zoom operation can be prevented from overlapping with the standby transition process of the image sensor, thereby avoiding problems such as image sensor startup delay, screen stuttering, or abnormal frame intervals.
[0065] Based on the above embodiments, in an exemplary embodiment, the above method further includes: when the type of sliding zoom operation is the first type, after an interval of a fifth preset number of frames, sending a field of view adjustment command to the image sensor corresponding to the first target zoom magnification.
[0066] In this embodiment, when the type of sliding zoom operation is the first type, that is, a fast or medium sliding zoom operation, a field of view adjustment command can be sent to the image sensor corresponding to the first target zoom ratio after a fifth preset number of frames from the sliding zoom operation, that is, after the zoom is in a stable state, so as to ensure that the secondary camera has enough time to pull up.
[0067] Additionally, it should be noted that a non-stop zoom operation only triggers an adjustment of the field of view once at the start of the zoom operation. This avoids the possibility of misidentifying multiple fast zooms during a single zoom operation, which could cause the logic for delaying FOV changes to be triggered multiple times.
[0068] In this embodiment, during fast or medium zoom operation, by sending a field-of-view adjustment command to the image sensor corresponding to the first target zoom magnification of the zoom operation after a preset number of frames after the zoom operation, the secondary camera can be given sufficient time to pull up, ensuring the responsiveness of the zoom operation.
[0069] In some scenarios, it can also identify small-amplitude slides in medium-speed and fast-speed slide scenarios, reducing bottom frame interpolation to reduce trailing. In an exemplary embodiment, such as Figure 3 As shown, the above method also includes:
[0070] S401, when the type of the sliding zoom operation is the first type, the sliding range of the sliding zoom operation is determined based on the initial zoom magnification and the first target zoom magnification.
[0071] In this embodiment, when the zoom operation is a fast zoom operation or a medium zoom operation, the zoom range can be determined based on the change between the initial zoom magnification and the first target zoom magnification. For example, the zoom range can be determined based on the change between the initial zoom magnification and the first target zoom magnification, a preset mapping relationship between the change and the zoom range. Exemplarily, the zoom operation can be a small-amplitude zoom operation or a large-amplitude zoom operation. For ease of description, the small-amplitude zoom operation will be referred to as the first amplitude type, and the large-amplitude zoom operation as the second amplitude type.
[0072] S402, when the sliding amplitude is of the first amplitude type, the corresponding image data is processed based on the first transition zoom ratio.
[0073] S403, when the sliding amplitude is of the second amplitude type, the corresponding image data is processed based on the second transition zoom ratio; the number of second transition zoom ratios is greater than the number of first transition zoom ratios.
[0074] In this embodiment, when the zoom operation's sliding amplitude is of the first amplitude type (i.e., a small-amplitude zoom operation), the corresponding image data can be processed based on the first transition zoom ratio. When the zoom operation's sliding amplitude is of the second amplitude type (i.e., a large-amplitude zoom operation), the corresponding image data can be processed based on the second transition zoom ratio, wherein the number of second transition zoom ratios is greater than the number of first transition zoom ratios. In other words, fast sliding doesn't always require multiple frame interpolations; multiple frame interpolations are only needed to maintain smoothness when sliding quickly and with a large amplitude. For fast sliding with a small amplitude, fewer frame interpolations are used to ensure responsiveness and avoid ghosting that could negatively impact the user experience.
[0075] In this embodiment, when the type of sliding zoom operation is the first type, the sliding amplitude of the sliding zoom operation is determined based on the initial zoom ratio and the first target zoom ratio. This allows for post-processing of the corresponding image data based on the first transition zoom ratio when the sliding amplitude is of the first amplitude type. When the sliding amplitude is of the second amplitude type, the corresponding image data is processed based on the second transition zoom ratio. The number of second transition zoom ratios is greater than the number of first transition zoom ratios. This reduces the number of interpolated frames and shortens the trailing effect (avoiding excessive interpolation for all fast sliding zoom operations) when the difference between the initial zoom ratio and the first target zoom ratio is small, thus improving the user's sliding zoom experience. For ease of understanding by those skilled in the art, please refer to [reference needed]. Figure 4 and Figure 5 The following provides a detailed description of the sliding zoom control method provided in this disclosure, which may include:
[0076] S1, in response to a trigger operation on the camera, enters camera mode that supports SAT functionality.
[0077] S2, if the zoom disk is in the unfolded state (not yet slidable), then the corresponding sensor is turned on according to the stationary sensor turn-on setting.
[0078] S3, when the user slides, if the zoom operation triggered by the trigger behavior is a slide zoom operation, the speed and direction of the slide are determined based on the sliding distance detected by the APP (two detection results at the same time interval).
[0079] S4, based on the speed and direction identified in S3 and combined with the dynamic pull-up strategy proposed in this application, dynamically adjusts the sensor's pull-up timing, specifically including:
[0080] When a medium-speed or fast zoom operation is detected, the image sensor corresponding to the first target zoom ratio is immediately switched to active mode. During slow zoom operations, the image sensor corresponding to the first target zoom ratio is switched to active mode only if the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold. Furthermore, for repeated zooming scenarios, this embodiment dynamically adjusts the delay time for sensor shutdown based on the sensor's shutdown time and the zoom speed, minimizing the impact of repeated sensor activation on frame uniformity and the user's zoom smoothness.
[0081] The following combination Figure 5 This application provides a detailed explanation of the dynamic pull-up strategy proposed. Figure 5 The line segments in the text represent the working range of different sensors, such as... Figure 5 As shown, in a stable preview state, assuming 0.6x to 1x corresponds to the ultra-wide-angle image sensor, 1x to 3x corresponds to the main image sensor, and 3x to 6x corresponds to the telephoto image sensor; then, in the scenario where the zoom dial is pulled up, according to the control method proposed in this application embodiment, the ultra-wide-angle image sensor can switch to standby mode at 4.8x zoom, the main image sensor can be pulled up in advance at 0.6x, and the telephoto image sensor can be pulled up in advance at 2x; in the scenario where zoom is enlarged, the main image sensor can be pulled up in advance at 0.6x, and the telephoto image sensor can be pulled up in advance at 2x, and the ultra-wide-angle image sensor can be controlled to switch to standby mode at 1.5x; in the scenario where zoom is reduced, the main image sensor can be pulled up in advance at 0.6x, and the telephoto image sensor can be pulled up in advance at 2x, and the ultra-wide-angle image sensor can be controlled to switch to standby mode at 4.8x. This application performs more detailed scene segmentation and then performs differentiated frame interpolation control for the detailed scenes. It differentiates the control of the image sensor's activation and deactivation. For repeated sliding scenes, it dynamically adjusts the delayed deactivation time by combining the image sensor's deactivation time and sliding speed, so as to minimize the impact of repeated image sensor activation on the uniformity of the output frames, ensure the smoothness of zooming, and optimize the user's sliding zooming experience.
[0082] S5 performs zoom processing based on a predetermined frame interpolation strategy and motion effect curve.
[0083] S6: Zooming is completed when the actual zoom level reaches the endpoint determined by the adsorption strategy (in some scenarios, the sensor is switched after passing the optical zoom point).
[0084] S7, continue previewing or shooting / processing.
[0085] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0086] Based on the same inventive concept, this application also provides a sliding zoom control device for implementing the sliding zoom control method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more sliding zoom control device embodiments provided below can be found in the limitations of the sliding zoom control method described above, and will not be repeated here.
[0087] In one exemplary embodiment, such as Figure 6 As shown, a sliding zoom control device is provided, comprising: an acquisition module, a first switching module, and a second switching module, wherein:
[0088] The acquisition module is used to acquire the initial zoom magnification and the first target zoom magnification in response to the sliding zoom operation.
[0089] The first switching module is used to switch the image sensor corresponding to the first target zoom ratio into working state when the type of sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio.
[0090] The second switching module is used to switch the image sensor corresponding to the first target zoom ratio to the working state when the type of sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and when the difference between the actual zoom ratio and the first target zoom ratio is less than the first preset threshold.
[0091] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0092] Based on the above embodiments, optionally, the first switching module or the second switching module is specifically used to determine the transition image sensor and the first target image sensor corresponding to the first target zoom ratio; switch the transition image sensor to the working state, and after an interval of a first number of preset frames, switch the first target image sensor to the working state.
[0093] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0094] Based on the above embodiments, optionally, the above device further includes: a third switching module, wherein:
[0095] The third switching module is used to switch the second target image sensor to standby mode after an interval of target frames when the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor.
[0096] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0097] Based on the above embodiments, if the sliding zoom operation is a zoom reduction operation, optionally, the third switching module includes: a first switching unit and a second switching unit, wherein:
[0098] The first switching unit is used to switch the second target image sensor to standby mode after a second number of preset frames if the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor when the type of sliding zoom operation is the third type.
[0099] The second switching unit is used to switch the second target image sensor to standby mode after a third number of preset frames when the type of sliding zoom operation is the fourth type, if the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor; wherein the third number is greater than the second number; the first type includes the third type and the fourth type.
[0100] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0101] Based on the above embodiments, if the sliding zoom operation is a zoom magnification operation, optionally, the above-mentioned third switching module includes: a third switching unit, wherein:
[0102] The third switching unit is used to switch the second target image sensor to standby mode after a fourth number of preset frames when the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor.
[0103] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0104] Optionally, based on the above embodiments, the device further includes: a fourth switching module, wherein:
[0105] The fourth switching module is used to switch the second target image sensor to the working state after it has switched to the standby state if a new sliding zoom operation is received during the process of the second target image sensor switching to the standby state; the zoom ratio of the second target corresponding to the new sliding zoom operation is the zoom ratio of the second target image sensor.
[0106] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0107] Optionally, based on the above embodiments, the apparatus further includes a transmitting module, wherein:
[0108] The sending module is used to send a field of view adjustment command to the image sensor corresponding to the first target zoom magnification after a fifth preset number of frames when the type of sliding zoom operation is the first type.
[0109] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0110] Based on the above embodiments, optionally, the above apparatus further includes: a determining module, a first processing module, and a second processing module, wherein:
[0111] The determination module is used to determine the sliding amplitude of the sliding zoom operation based on the initial zoom magnification and the first target zoom magnification when the type of sliding zoom operation is the first type.
[0112] The first processing module is used to process the corresponding image data based on the first transition zoom ratio when the sliding amplitude is of the first amplitude type.
[0113] The second processing module is used to process the corresponding image data based on the second transition zoom ratio when the sliding amplitude is of the second amplitude type; the number of second transition zoom ratios is greater than the number of first transition zoom ratios.
[0114] The sliding zoom control device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0115] Each module in the aforementioned zoom control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0116] In one exemplary embodiment, a computer device is provided, which may be an electronic device, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a sliding zoom control method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0117] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0118] In one exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0119] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0120] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described above.
[0121] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0122] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0123] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0124] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A sliding zoom control method, characterized in that, The method includes: In response to a zoom operation, obtain the initial zoom level and the first target zoom level; If the type of the sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio, the image sensor corresponding to the first target zoom ratio is switched to the working state. If the type of the sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold, the image sensor corresponding to the first target zoom ratio is switched to working state.
2. The method according to claim 1, characterized in that, Switching the image sensor corresponding to the first target zoom ratio to the working state includes: Determine the transition image sensor and the first target image sensor corresponding to the first target zoom ratio; The transition image sensor is switched to working state, and after a first number of preset frames, the first target image sensor is switched to working state.
3. The method according to claim 2, characterized in that, The method further includes: If the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, the second target image sensor is switched to standby mode after an interval of target frames.
4. The method according to claim 3, characterized in that, If the sliding zoom operation is a zoom reduction operation, the step of switching the second target image sensor to standby mode after an interval of target frames, when the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, includes: If the type of the sliding zoom operation is the third type, and the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, then after an interval of a second number of preset frames, the second target image sensor is switched to standby mode. When the type of the sliding zoom operation is the fourth type, if the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, the second target image sensor is switched to standby mode after an interval of a third number of preset frames; wherein, the third number is greater than the second number; the first type includes the third type and the fourth type.
5. The method according to claim 3, characterized in that, If the sliding zoom operation is a zoom magnification operation, the step of switching the second target image sensor to standby mode after an interval of target frames, when the actual zoom magnification exceeds the zoom magnification range corresponding to the second target image sensor, includes: If the actual zoom ratio exceeds the zoom ratio range corresponding to the second target image sensor, the second target image sensor is switched to standby mode after a fourth number of preset frames.
6. The method according to claim 4 or 5, characterized in that, The method further includes: If a new zoom operation is received during the process of the second target image sensor switching to standby mode, the second target image sensor will be switched to working mode after switching to standby mode; the zoom ratio of the second target corresponding to the new zoom operation is the zoom ratio of the second target image sensor.
7. The method according to claim 1, characterized in that, The method further includes: When the type of the sliding zoom operation is the first type, after a fifth preset number of frames, a field of view adjustment command is sent to the image sensor corresponding to the first target zoom magnification.
8. The method according to claim 1, characterized in that, The method further includes: When the type of the sliding zoom operation is the first type, the sliding amplitude of the sliding zoom operation is determined according to the initial zoom ratio and the first target zoom ratio; If the sliding amplitude is of the first amplitude type, then the corresponding image data is processed based on the first transition zoom magnification; When the sliding amplitude is of the second amplitude type, the corresponding image data is processed based on the second transition zoom ratio; the number of the second transition zoom ratios is greater than the number of the first transition zoom ratios.
9. A sliding zoom control device, characterized in that, The device includes: The acquisition module is used to acquire the initial zoom magnification and the first target zoom magnification in response to the sliding zoom operation; The first switching module is used to switch the image sensor corresponding to the first target zoom ratio to the working state when the type of the sliding zoom operation is determined to be the first type based on the initial zoom ratio and the first target zoom ratio. The second switching module is used to switch the image sensor corresponding to the first target zoom ratio into working state when the type of the sliding zoom operation is determined to be the second type based on the initial zoom ratio and the first target zoom ratio, and when the difference between the actual zoom ratio and the first target zoom ratio is less than a first preset threshold.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.