Zoom method and device, equipment, storage medium and computer program product
By monitoring zoom operation information to make differentiated adsorption decisions and determine the target zoom method, the technical problems of users in the prior art are solved. In the zoom process of sliding operation, the problem of screen jump caused by sliding operation is solved, and the stability and continuity of the zoom process are ensured.
Patent Information
- Application Number
- CN202511274831.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-12-23
AI Technical Summary
During zooming with a sliding motion, the uncertainty of the user's sliding speed and landing point causes the image to jump during zooming, affecting the smoothness of the zooming process.
By monitoring zoom operations to determine zoom information, such as zoom speed, direction, and initial zoom magnification, differentiated adsorption decisions are made to determine the appropriate target zoom magnification, and zoom processing is performed based on that magnification.
It effectively avoids the problem of image jump caused by the uncertainty of zoom operation speed, direction and starting point, and ensures the stability and continuity of the zoom process.
Smart Images

Figure CN121194069A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the image processing technology field, and in particular, to a zooming method and device, equipment, storage medium and computer program product. BACKGROUND
[0002] With the development of image processing technology, in order to obtain a clear image under different shooting distances, a zooming process can be used to achieve a zoom-in effect on a shooting object. The zooming method of a camera mainly includes optical zooming and digital zooming. Optical zooming is to adjust the relative positions of the lenses in a lens group, the object being photographed and the imaging focus point, change the actual focal length of the lens, and thus achieve zooming effect. Digital zooming is to simulate the zoom-in effect on the shooting object through digital image processing technology.
[0003] In the zooming process using a sliding operation, the speed and landing point of the user when sliding are uncertain, which can easily cause picture jumping phenomenon in the zooming process, affecting the continuity of the zooming process. SUMMARY
[0004] Embodiments of the present application aim to provide a zooming method and device, equipment, storage medium and computer program product.
[0005] The technical solution of the present application is implemented as follows:
[0006] In a first aspect, a zooming method is provided, comprising:
[0007] determining zooming information in response to a zooming operation of a user on an interactive component;
[0008] making an adsorption decision based on the zooming information to determine a target zooming magnification corresponding to the zooming information;
[0009] performing zooming processing based on the target zooming magnification.
[0010] In a second aspect, a zooming device is provided, comprising:
[0011] a determination unit configured to determine zooming information in response to a zooming operation of a user on an interactive component;
[0012] a first processing unit configured to make an adsorption decision based on the zooming information to determine a target zooming magnification corresponding to the zooming information;
[0013] a second processing unit configured to perform zooming processing based on the target zooming magnification.
[0014] In a third aspect, a zooming equipment is provided, comprising a processor and a memory configured to store a computer program capable of running on the processor,
[0015] The processor is configured to execute the computer program to perform the steps of the foregoing method.
[0016] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the foregoing method are implemented.
[0017] In a fifth aspect, a computer program product is provided, and the computer program product comprises a computer program. When the computer program is executed by a processor, the steps of the foregoing method are implemented.
[0018] The method provided in the embodiments of the present application comprises: in response to a zoom operation of a user on an interactive component, determining zoom information; based on the zoom information, making an adsorption decision to determine a target zoom ratio corresponding to the zoom information; and based on the target zoom ratio, performing zoom processing. In this way, by monitoring the zoom operation to determine the zoom information (such as the zoom speed, the zoom direction, and the starting zoom ratio), different dimensions of the zoom information are subjected to differential adsorption decisions to determine an appropriate target zoom ratio, and the target zoom ratio is used for zoom processing, which can effectively avoid picture jumping problems caused by the uncertainty of the speed, direction, and starting point of the zoom operation, and ensure the stability and continuity of the picture in the zoom process. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 FIG. 1 is a first flowchart of a zoom method according to an embodiment of the present application;
[0020] Figure 2 FIG. 2 is a schematic diagram of a distribution of adsorption points according to an embodiment of the present application;
[0021] Figure 3 FIG. 3 is a schematic diagram of a first zoom ratio interval of the adsorption points according to an embodiment of the present application;
[0022] Figure 4 FIG. 4 is a first flowchart of an adsorption decision method according to an embodiment of the present application;
[0023] Figure 5 FIG. 5 is a second flowchart of the adsorption decision method according to an embodiment of the present application;
[0024] Figure 6 FIG. 6 is a schematic diagram of a second zoom ratio interval of the theoretical points according to an embodiment of the present application;
[0025] Figure 7 FIG. 7 is a third flowchart of the adsorption decision method according to an embodiment of the present application;
[0026] Figure 8 FIG. 8 is a second flowchart of the zoom method according to an embodiment of the present application;
[0027] Figure 9 A flowchart of a zoom information determination method in an embodiment of the present application is shown in FIG. 6.
[0028] Figure 10 A schematic diagram of a zoom device in an embodiment of the present application is shown in FIG. 7.
[0029] Figure 11 A schematic diagram of a zoom device in an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0030] In order to enable a person skilled in the art to more fully understand the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings, which are only used for reference and do not limit the embodiments of the present application.
[0031] Some current electronic devices are generally provided with support of 3-5 different types of lenses. For example, the camera operation page of a multi-camera mobile phone has 0.6x, 1x, 2x, 5x, 10x, 30x, etc. focal length selection, the smaller the number, the wider the shot, the larger the number, the farther the shot, which roughly corresponds to the focal length of Ultra Wide (UW), Wide (W), and Telephoto (T):
[0032] Taking a certain mobile phone as an example, the main camera of the mobile phone is generally a wide-angle lens with an equivalent focal length of about 28mm. The main camera can also be referred to as a wide-angle lens. Because this focal length is close to the viewing range of the "human eye", what is seen is what is shot, and it is also the most frequently used camera. When the camera operation page of the mobile phone is opened, the value of 1x can be seen on the display page, and 1x is the focal length of the main camera, which is the best focal length in terms of image quality.
[0033] The ultra-wide-angle lens can provide a wider field of view than the main camera. It should be noted that the numerical value of the focal length of the ultra-wide-angle lens may be different on different mobile phones, such as 0.5x on some mobile phones, 0.6x on other mobile phones, and "wide-angle" on some mobile phones. Compared with the main camera, the ultra-wide-angle lens can shoot a wider picture, which is suitable for shooting landscapes and buildings, and can obtain a powerful picture feeling.
[0034] In addition, the ultra-wide-angle lens has a very large viewing range, and you can obtain a wider picture at the same location, which greatly facilitates the subsequent re-cropping. When shooting landscapes, using an ultra-wide-angle lens can let more landscape elements into the shot, and as long as the composition is used, it can reflect the depth and space of the picture, making the entire landscape photo look powerful.
[0035] Long-focus lenses are used to capture images with a zoom ratio greater than or equal to 1x. The larger the number before x, the narrower the range of shots, but the farther away the shot is taken. For example, some phones have a 5x optical zoom, which switches from the main camera to the long-focus lens when the focal length is switched to 5x. Long-focus lenses can take higher-quality photos from a distance, capturing objects farther away or magnifying objects in the frame without the image quality degradation that occurs with digital zoom. In situations where it is not convenient to move around, such as when framing a shot in a cluttered building, it can be difficult to capture the subject with just the main camera. In such cases, using the long-focus lens on a phone can make the photo more interesting.
[0036] Long-focus lenses can "close" the distance between the background and foreground, creating a sense of compression that makes the overall image more substantial. This "compression" is one of the characteristics of long-focus lenses. Long-focus lenses have a small distortion and weak perspective, which can close the distance between the foreground and background, enhancing the relationship between the foreground and background, and thus creating some unique visual effects. Using this feature, straight and extended objects such as roads and railings can be used as guide lines to direct the viewer's attention to the subject in the depth of the image.
[0037] In summary, each lens of a multi-camera has different characteristics, so in the current camera shooting scheme, the Spatial Alignment Transform (SAT) scheme is used to switch lenses in real time according to user needs in different shooting scenarios, and digital zoom is used to achieve continuous and smooth zoom.
[0038] As a mainstream zoom interaction form in portable devices such as mobile phones and tablets, sliding zoom is triggered by the user performing a sliding operation on an interactive component such as a touch screen or a physical device. The core of sliding zoom is to convert the user's sliding action into a change in the zoom ratio of the camera, achieving zooming in or out on the subject.
[0039] However, in the actual sliding zoom process, the speed and landing point of the user's sliding action are uncertain, which can easily cause the image to jump during zooming, affecting the continuity of the zooming process.
[0040] To address this problem, the embodiments of the present application provide a zooming method and device, equipment, storage medium, and computer program product. The method determines zooming information (such as zooming speed, zooming direction, and starting zoom ratio) by monitoring the zooming operation, makes differentiated absorption decisions on zooming information in different dimensions to determine an appropriate target zoom ratio, and uses the target zoom ratio for zooming processing. This can effectively avoid the problem of image jumping caused by the uncertainty of the speed, direction, and starting point of the zooming operation, and ensure the stability and continuity of the image during zooming.
[0041] Figure 1A first flowchart of a zooming method in the embodiments of the present application is shown in FIG. 1, which can include the following steps: Figure 1
[0042] Step S101: In response to a zooming operation of a user on an interactive component, determining zooming information.
[0043] The core function of the interactive component is to detect the zooming operation of the user, which includes but is not limited to a touch screen, a physical device (such as a physical button supporting sliding zooming, a sliding lever, a zooming dial, etc.). Optionally, when the interactive component is a touch screen, the zooming operation includes a sliding operation of the user on a zooming control (such as a zooming slider or a framing edge interactive area) on the screen; when the interactive component is a physical device, the zooming operation includes a sliding operation or a rotating operation of the user on the physical device, etc.
[0044] In an example, the interactive component can be a shortcut key arranged on the side of a mobile phone, which supports a sliding zooming operation, and the user can adjust the zooming magnification through a sliding action. In another example, the shortcut key can also support a quick starting and shooting function of the camera. In addition, the shortcut key can be a camera-specific shortcut key, which only serves camera-related operations; the shortcut key can also be multiplexed with other applications, and the user can customize the shortcut key to achieve differentiated shortcut control for different applications, for example, for zooming control in the camera, and for adjusting the volume in the music application.
[0045] The zooming information refers to a parameter set for describing the characteristics of the zooming operation, which is a key basis for the system to identify the user's intention and perform zooming control.
[0046] In some embodiments, the zooming information includes a zooming speed, a zooming direction, and a starting zooming magnification.
[0047] The zooming speed is related to the amplitude of the zooming operation and the response efficiency of the device. For example, the faster the sliding or the higher the sensitivity of the device, the faster the zooming speed; the slower the sliding or the lower the sensitivity of the device, the slower the zooming speed, and the zooming speed directly affects the change amplitude of the picture magnification. In an example, the zooming speed can define a speed type, and each type corresponds to a specific speed range, for example, high speed, fast speed, medium speed, and slow speed. In another example, the zooming speed can be a specific speed value, i.e., a quantitative speed parameter, which can accurately indicate the change amplitude of the picture magnification in the zooming operation.
[0048] In some embodiments, the method further includes: in response to the zooming operation of the user on the interactive component, obtaining a current zooming magnification of a current image and a fourth zooming magnification mapped by the zooming operation; and determining the zooming speed based on the difference between the current zooming magnification and the fourth zooming magnification.
[0049] The fourth zoom ratio refers to a theoretical stop ratio recognized when real-time monitoring of the zoom operation is performed. The zoom speed is determined by comparing the difference between the current frame zoom ratio and the fourth zoom ratio recognized by real-time monitoring.
[0050] In an example, the zoom speed is determined based on the ratio of the fourth zoom ratio to the current zoom ratio. Optionally, when the ratio of the fourth zoom ratio to the current zoom ratio falls within a first ratio range, the zoom speed is determined to be slow, when the ratio of the fourth zoom ratio to the current zoom ratio falls within a second ratio range, the zoom speed is determined to be medium, and when the ratio of the fourth zoom ratio to the current zoom ratio falls within a third ratio range, the zoom speed is determined to be fast. The first ratio range, the second ratio range, and the third ratio range are non-overlapping. In an example, the first ratio range is 1-1.2, the second ratio range is 1.2 (not included)-2, and the third ratio range is 2 (not included)-X.
[0051] In some embodiments, the method further includes: in response to a zoom operation of the interactive component by the user, obtaining a plurality of sliding positions at different times; and determining the zoom speed based on the plurality of sliding positions at different times.
[0052] In response to a zoom operation of the interactive component by the user, the zoom speed is detected. In an example, the sliding position is periodically detected, the sliding length is determined according to the sliding position at the current time and the sliding position at the previous time, and the zoom speed is determined according to the sliding length. In another example, the average sliding length or the total sliding length is determined according to the sliding positions at at least three times, and the zoom speed is determined according to the average sliding length or the total sliding length.
[0053] Optionally, when the sliding length falls within a first length range, the zoom speed is determined to be slow, when the sliding length falls within a second length range, the zoom speed is determined to be medium, and when the sliding length falls within a third length range, the zoom speed is determined to be fast.
[0054] It should be noted that the classification method and threshold of the zoom speed listed in the embodiments of the present application are only exemplary and do not limit the protection scope of the present application. In addition to the speed division method given in the above embodiments, any reasonable division method that can achieve the same speed division function should be included in the protection scope of the present application.
[0055] The zoom direction refers to the trend of the zoom operation, which is divided into positive direction (zoom ratio increases, picture zooms in, such as 1x→5x) and reverse direction (zoom ratio decreases, picture zooms out, such as 5x→1x), which is determined by the user operation direction and directly related to the contraction or expansion of the picture field of view.
[0056] In some embodiments, the method further includes: in response to a zoom operation of the interactive component by the user, determining the zoom direction based on the size of the current zoom ratio and the fourth zoom ratio.
[0057] Exemplarily, when the current zoom ratio is greater than the fourth zoom ratio, it is determined that the zoom direction is reverse zooming from a large zoom ratio to a small zoom ratio; and when the current zoom ratio is less than the fourth zoom ratio, it is determined that the zoom direction is normal zooming from a small zoom ratio to a large zoom ratio.
[0058] The starting zoom ratio refers to the current zoom ratio of the camera before the zoom operation starts, and the starting zoom ratio is also referred to as a starting point or a starting ratio. For example, when zooming starts from 2x, 2x is the starting zoom ratio, and the value of the starting zoom ratio affects the target zoom ratio of the subsequent zoom operation.
[0059] In step S102, an adsorption decision is made based on the zoom information to determine a target zoom ratio corresponding to the zoom information.
[0060] In the embodiments of the present application, based on the current zoom information (such as zoom speed, direction, starting ratio, etc.), a preset zoom adsorption strategy can be called to make an adsorption decision to determine the target zoom ratio at which the camera should be stopped at each stage of the zoom process or at the end of the zoom process. The target zoom ratio is also referred to as a target point or a target ratio.
[0061] In some embodiments, the adsorption decision based on the zoom information to determine the target zoom ratio corresponding to the zoom information includes: determining the value of the adsorption parameter based on the zoom speed and the zoom direction; and determining the target zoom ratio based on the starting zoom ratio and the value of the adsorption parameter. In this way, based on the zoom speed (such as fast, medium, slow, etc.) and the zoom direction (zoom in, zoom out), the value of the adsorption parameter is flexibly adjusted to accurately adapt to the operation habits and behavior characteristics of different users; further, the target zoom ratio is calculated based on the starting zoom ratio and the dynamically determined adsorption parameter, which can make the target zoom ratio highly match the current zoom operation, avoiding the problems of incorrect adsorption and adsorption failure, and ensuring the continuity and adaptability of the zoom process.
[0062] In some embodiments, when the zoom direction is normal zooming from a small zoom ratio to a large zoom ratio, the zoom speed is positively correlated with the value of the adsorption parameter; and when the zoom direction is reverse zooming from a large zoom ratio to a small zoom ratio, the zoom speed is negatively correlated with the value of the adsorption parameter.
[0063] The adsorption parameter is the core variable for making an adsorption decision, and its essence is to dynamically adjust the value of the adsorption parameter to accurately adapt the adsorption result to the current zoom operation, avoiding the problems of incorrect adsorption and adsorption failure caused by fixed values. The adsorption parameter can specifically include one or more parameters.
[0064] Exemplarily, the value of the adsorption parameter is determined based on the zoom speed and the zoom direction, including: when the zoom speed is a first speed and the zoom direction is positive zoom, the value of the adsorption parameter is determined as a first value; when the zoom speed is a second speed and the zoom direction is positive zoom, the value of the adsorption parameter is determined as a second value; wherein the first speed is greater than the second speed, and the first value is greater than the second value.
[0065] Exemplarily, the value of the adsorption parameter is determined based on the zoom speed and the zoom direction, including: when the zoom speed is a first speed and the zoom direction is positive zoom, the value of the adsorption parameter is determined as a third value; when the zoom speed is a second speed and the zoom direction is negative zoom, the value of the adsorption parameter is determined as a fourth value; wherein the first speed is greater than the second speed, and the third value is less than the fourth value.
[0066] In some embodiments, the target zoom ratio is determined based on the starting zoom ratio and the value of the adsorption parameter, including: determining a first zoom ratio based on the starting zoom ratio and the value of the adsorption parameter; determining a target adsorption point of the first zoom ratio from a plurality of adsorption points; and taking a zoom ratio corresponding to the target adsorption point as the target zoom ratio.
[0067] Exemplarily, the first zoom ratio is determined based on the starting zoom ratio, the value of the adsorption parameter and a first mapping relationship. The first mapping relationship can be a function relationship or a lookup table. Through a preset function relationship (such as a linear function, a nonlinear function, etc.), the starting zoom ratio and the adsorption parameter are substituted as variables for accurate calculation to obtain the first zoom ratio of the zoom operation. The lookup table stores a plurality of corresponding values of "starting ratio (or starting ratio interval) + adsorption parameter" and "first zoom ratio" in advance, and quickly locates the corresponding first zoom ratio by matching the value of the adsorption parameter of the current starting ratio. The first zoom ratio can be referred to as a theoretical zoom ratio or a theoretical point.
[0068] The adsorption point is a zoom ratio point with good image quality, and by adsorbing the theoretical point to the zoom ratio point with good image quality, the zoom picture quality can be improved.
[0069] In an example, the plurality of adsorption points include a plurality of light change points of the camera, and the light change point is a zoom ratio point when the camera switches. In another example, the plurality of adsorption points further include a specific zoom ratio point of a certain camera.
[0070] As Figure 2As shown, the full focal length section is distributed with multiple adsorption points, and there is a magnification difference between different adsorption points. The magnification points with better image quality are used as adsorption points. The adsorption points include: the light variation point 0.6x of the ultra-wide-angle lens, the light variation point 1.0x of the wide-angle lens, the light variation point 3.0x of the long-focus lens, and the light variation point 6.0x of the super-long-focus lens. The adsorption points also include the magnification point 2.0x of the wide-angle lens, the magnification points 13.3x, 30x, 60x and 120x of the super-long-focus lens.
[0071] It should be noted that the adsorption points listed in the embodiments of the present application are only exemplary and do not limit the protection scope of the present application. In addition to the adsorption points of the above embodiments, other magnification points with good image quality should be included in the protection scope of the present application.
[0072] In some embodiments, from the multiple adsorption points, the target adsorption point of the first zoom magnification is determined, including: determining at least one adsorption point adjacent to the first zoom magnification from the multiple adsorption points; determining that the first zoom magnification falls in a target first magnification interval based on the first magnification interval defined by the at least one adsorption point; and taking the adsorption point corresponding to the target first magnification interval as the target adsorption point.
[0073] The first magnification interval defined by the adsorption point can be understood as the adsorption range of the adsorption point. As long as the zoom magnification falls within the interval, it can be adsorbed, thereby improving the image quality. The width of the first magnification interval is directly related to the adsorption strength: the wider the interval width, the stronger the adsorption strength, and the more zoom magnifications can be covered and adsorbed; on the contrary, the narrower the interval width, the weaker the adsorption strength, and the fewer zoom magnifications can be covered and adsorbed.
[0074] Optionally, the width of the first magnification interval defined by different adsorption points in the multiple adsorption points is a fixed value. Exemplarily, the first magnification interval can be [the sum of the magnification of the adsorption point and C1, the sum of the magnification of the adsorption point and C2], C1 is less than or equal to 0, C2 is greater than or equal to 0, and C1 and C2 corresponding to different adsorption points have the same value.
[0075] Optionally, the width of the first magnification interval defined by different adsorption points in the multiple adsorption points is positively correlated with the corresponding zoom magnification. Exemplarily, the magnification interval can be [f1(x), f2(x)], x is the zoom magnification corresponding to the current adsorption point, f1() represents the first operation on the current adsorption point to obtain the lower limit value of the magnification interval, and f2() represents the second operation on the current adsorption point to obtain the upper limit value of the magnification interval.
[0076] Exemplarily, the first magnification interval can be [a product of the magnification of the adsorption point and K1, a product of the magnification of the adsorption point and K2], K1 is less than or equal to 1, and K2 is greater than or equal to 1, that is, the first magnification interval of different adsorption points is related to the magnification corresponding to the adsorption point. For example, the greater the magnification corresponding to the adsorption point, the wider the magnification interval, and vice versa.
[0077] In another example, the first magnification interval can be [a sum of the magnification of the adsorption point and C1, a sum of the magnification of the adsorption point and C2], and C1 and C2 corresponding to different adsorption points are not completely the same.
[0078] Optionally, the width of the first magnification interval defined by different adsorption points in the plurality of adsorption points is positively correlated with the zoom speed. When the zoom speed is fast, the human eye is less sensitive to the adsorption strength, at this time, increasing the width of the magnification interval (increasing the adsorption strength) can enable more zoom magnifications to be adsorbed to the optimal focus section, thereby improving the image quality in the fast sliding scenario; when the zoom speed is slow, the human eye is more sensitive to the adsorption strength, at this time, reducing the width of the magnification interval (reducing the adsorption strength) can reduce the picture jump caused by forced adsorption, thereby ensuring the smoothness of the zoom and the operation followability.
[0079] Exemplarily, the first magnification interval can be [a sum of the magnification of the adsorption point and C1, a sum of the magnification of the adsorption point and C2], and C1 and C2 corresponding to different adsorption points are not completely the same.
[0080] Optionally, the width of the first magnification interval defined by different adsorption points in the plurality of adsorption points is positively correlated with the zoom magnification and the zoom speed corresponding to the adsorption point. Exemplarily, the first magnification interval can be [a product of the magnification of the adsorption point and K1, a product of the magnification of the adsorption point and K2], K1 is less than or equal to 1, and K2 is greater than or equal to 1, and the values of K1 and / or K2 are related to the zoom speed. For example, in a fast zoom scenario, K1 is 0.7 and K2 is 1.3; in a medium-speed zoom scenario, K1 is 0.8 and K2 is 1.2, and for the same adsorption point, the width of the magnification interval in the fast zoom scenario is greater than that in the medium-speed zoom scenario.
[0081] In some embodiments, the method further includes: based on the first magnification interval defined by the at least one adsorption point, determining the first zoom magnification as the target zoom magnification when the first zoom magnification does not fall within the first magnification interval of any adsorption point. In this way, when the theoretical point corresponding to the zoom operation (i.e., the first zoom magnification) does not fall within the adsorption range of any adsorption point, the theoretical point is taken as the target zoom magnification without adsorption, thereby avoiding meaningless forced adsorption, ensuring the followability of the operation and the change in the picture during the sliding zoom process, and enabling the user's operation intention to be accurately converted into the actual zoom effect.
[0082] Figure 3Fig. 1 is a schematic diagram of a first zoom ratio interval of an adsorption point in an embodiment of the present application, as shown, the first zoom ratio interval of each adsorption point is shown by the dashed box in the figure, when the theoretical point falls in the first zoom ratio interval of a certain adsorption point, the theoretical point is adsorbed to the point, and when the theoretical point does not fall in the first zoom ratio interval of any adsorption point, the theoretical point is not adsorbed, i.e., the theoretical point is taken as the target point. Figure 3
[0083] It should be noted that the dashed box shown in the figure is only used to schematically indicate the approximate position of the first zoom ratio interval defined based on the adsorption point, and does not constitute a restrictive limitation on the range, boundary or specific value of the first zoom ratio interval corresponding to each adsorption point. Any first zoom ratio interval determined by a person skilled in the art within a reasonable cognitive range and adapted to the function of the adsorption point based on the position of the adsorption point in the figure falls within the protection scope claimed by the present application.
[0084] Figure 4 Fig. 2 is a first flowchart of an adsorption decision method in an embodiment of the present application, as shown, the steps of the adsorption decision method can include: Figure 4
[0085] Step S401: the zoom direction is zoomin (positive zooming);
[0086] Step S402: is the zoom speed fast zooming? If yes, step S403 is performed; if no, step S404 is performed;
[0087] Step S403: the theoretical point is calculated, i.e., theoretical point = start point * 3 (adsorption parameter);
[0088] Step S404: is the zoom speed medium speed zooming? If yes, step S405 is performed; if no, step S409 is performed;
[0089] Step S405: the theoretical point is calculated, i.e., theoretical point = start point * 2 (adsorption parameter);
[0090] Step S406: is the nearest adsorption point 0.8≤theoretical point≤the nearest adsorption point * 1.2? (interval adjustable); if no, step S407 is performed; if yes, step S408 is performed;
[0091] Step S407: the target point (i.e., target zoom ratio) is the theoretical point (i.e., theoretical zoom ratio), i.e., no adsorption;
[0092] Step S408: the target point is the adsorption point, i.e., adsorption;
[0093] Step S409: the target point is the point where the finger leaves, i.e., no adsorption.
[0094] Exemplarily, according to the theoretical point, the left-side adsorption point and / or the right-side adsorption point closest to the theoretical point is determined from the plurality of adsorption points, and further, it is judged whether the theoretical adsorption point falls in the adsorption interval of the left-side adsorption point or the adsorption interval of the right-side adsorption point, if falls in the adsorption interval of the left-side adsorption point, the left-side adsorption point is taken as the adsorption point; if falls in the adsorption interval of the right-side adsorption point, the right-side adsorption point is taken as the adsorption point; if does not fall in any adsorption interval, it is determined that no adsorption is performed.
[0095] Here, for the zoomin scene, when the adsorption point is determined, the fast sliding is based on a 3-fold magnification difference for adsorption determination, and the medium-speed sliding is based on a 2-fold magnification difference for adsorption determination. As shown in Figure 3 , the zoomin scene: the fast sliding adsorption to 3x around the starting point of 1x, the fast sliding adsorption to 6x around the starting point of 2x, the fast sliding adsorption to 13.3x around the starting point of 4x-5x, etc.; the medium-speed sliding adsorption to 2x around the starting point of 1x, the medium-speed sliding takes the theoretical point 4x as the target point around the starting point of 2x, the medium-speed sliding adsorption to 6x around the starting point of 3x, the medium-speed sliding adsorption to 13.3x around the starting point of 6x, etc.
[0096] Figure 5 The second flowchart of the adsorption determination method in the embodiment of the present application is shown in Figure 5 , the steps of the adsorption determination method can include:
[0097] Step S501: the zoom direction is zoom out (reverse zooming);
[0098] Step S502: is the zoom speed fast zooming? If yes, execute step S503; if no, execute step S504;
[0099] Step S503: calculate the theoretical point, i.e. theoretical point = starting point * 1 / 3 (adsorption parameter);
[0100] Step S504: is the zoom speed medium-speed zooming? If yes, execute step S505; if no, execute step S509;
[0101] Step S505: calculate the theoretical point, i.e. theoretical point = starting point * 1 / 2 (adsorption parameter);
[0102] Step S506: the nearest adsorption point 0.8≤theoretical point≤the nearest adsorption point*1.2? (interval adjustable); if no, execute step S507; if yes, execute step S508;
[0103] Step S507: the target point (i.e. target zoom magnification) is the theoretical point (i.e. theoretical zoom magnification), i.e. no adsorption is performed;
[0104] Step S508: the target point is the adsorption point, i.e. adsorption is performed;
[0105] Step S509: The target point is the point where the finger leaves, i.e., where it no longer adheres.
[0106] Here, in the zoom-out scenario, when deciding on the snap-in point, fast sliding makes snap-in decisions based on a 1 / 3x scaling difference, while medium-speed sliding makes snap-in decisions based on a 1 / 2x scaling difference. For example... Figure 2 As shown, in the zoom out scenario: starting from around 120x, quickly slide and attach to 30x; starting from around 30x, use the theoretical point of 10x as the target point; starting from around 13.3x, quickly slide and attach to 6x; starting from 6x, slide and attach to 2x, etc.; starting from around 120x, slide and attach to 60x; starting from around 30x, slide and attach to the theoretical point of 13.3x; starting from 13.3x, slide and attach to 6x; starting from 6x, slide and attach to 3x, etc.
[0107] In other embodiments, determining a target adsorption point for a first zoom ratio from a plurality of adsorption points includes: determining a target adsorption point falling within a second zoom ratio range from a plurality of adsorption points based on a second zoom ratio range defined by the first zoom ratio.
[0108] The second zoom range defined by the first zoom level can be understood as the adsorption range of the first zoom level. The first zoom level allows adsorption to occur at any adsorption point within its zoom range. The width of the zoom range is directly related to the adsorption strength: a wider range results in stronger adsorption, covering and adsorbing more zoom levels; conversely, a narrower range results in weaker adsorption, covering and adsorbing fewer zoom levels.
[0109] Optionally, the width of the second magnification range defined by the first zoom level is a fixed value. For example, the magnification range can be [the sum of the first zoom level and C3, the sum of the first zoom level and C4], where C3 is less than or equal to 0, C4 is greater than or equal to 0, and the values of C3 and C4 are exactly the same for different adsorption points.
[0110] Optionally, the width of the second magnification interval defined by the first zoom magnification is positively correlated with the first zoom magnification. For example, the magnification interval can be [f3(y), f4(y)], where y is the first zoom magnification, f3() represents the lower limit of the magnification interval obtained by performing a third operation on the first zoom magnification, and f4() represents the upper limit of the magnification interval obtained by performing a fourth operation on the first zoom magnification.
[0111] In an example, the second zoom ratio interval can be [a product of the first zoom ratio and K3, a product of the zoom ratio of the suction point and K4], K3 is less than or equal to 1, and K4 is greater than or equal to 1, that is, the second zoom ratio interval of the first zoom ratio is related to the size of the first zoom ratio. For example, the larger the first zoom ratio, the wider the zoom ratio interval, and vice versa.
[0112] In another example, the second zoom ratio interval can be [a sum of the first zoom ratio and C3, a sum of the first zoom ratio and C4], and the values of C1 and C2 corresponding to different zoom ratio ranges are not completely the same.
[0113] Optionally, the width of the second zoom ratio interval defined by the first zoom ratio is positively correlated with the zoom speed. When the zoom speed is fast, the human eye is less sensitive to the suction strength, at this time, the width of the zoom ratio interval is increased (the suction strength is increased), so that more zoom ratios are sucked to the optimal focal length, and the image quality of the fast sliding scene is improved; when the zoom speed is slow, the human eye is more sensitive to the suction strength, at this time, the width of the zoom ratio interval is reduced (the suction strength is reduced), so that the picture jump caused by forced suction is reduced, and the zoom smoothness and operation followability are ensured.
[0114] For example, the zoom ratio interval can be [a sum of the first zoom ratio and C1, a sum of the first zoom ratio and C2], and the values of C1 and C2 corresponding to the same focal length at different zoom speeds are not the same.
[0115] Optionally, the width of the second zoom ratio interval defined by the first zoom ratio is positively correlated with the first zoom ratio and the zoom speed. For example, the zoom ratio interval can be [a product of the first zoom ratio and K3, a product of the zoom ratio of the suction point and K4], K3 is less than or equal to 1, and K4 is greater than or equal to 1, and the values of K3 and / or K4 are positively correlated with the zoom speed. For example, in a fast zooming scene, K3 is 0.7 and K4 is 1.3; in a medium-speed zooming scene, K3 is 0.8 and K4 is 1.2.
[0116] In some embodiments, the method further comprises: based on the second zoom ratio interval defined by the first zoom ratio, determining that none of the plurality of suction points falls within the second zoom ratio interval, and taking the first zoom ratio as the target zoom ratio. In this way, when the theoretical point (i.e. the first zoom ratio) corresponding to the zoom operation does not include any suction point in the zoom ratio interval, the theoretical point is taken as the final target zoom ratio without suction, avoiding meaningless forced suction, ensuring the followability of "operation and picture change synchronization" in the sliding zoom process, and accurately converting the user's operation intention into actual zoom effect.
[0117] Figure 6 A schematic diagram of the second zoom ratio interval of the theoretical point in the embodiments of the present application is shown in FIG. 1. Figure 6As shown, assuming the theoretical point is 4x, the second rate interval of the theoretical point is shown by the dashed box in the figure. When a certain adsorption point falls within the second rate interval of the theoretical point, the theoretical point is adsorbed to the point. When all adsorption points do not fall within the second rate interval of the theoretical point, no adsorption is performed, i.e., the theoretical point is taken as the target point.
[0118] Figure 7 A third flowchart of the adsorption decision method in the embodiments of the present application is shown in FIG. 7C. Figure 7 As shown, the steps of the adsorption decision method can include:
[0119] Step S701: the zoom direction is zoomin (positive zooming);
[0120] Step S702: is the zoom speed fast zooming? If yes, perform step S703; if no, perform step S705;
[0121] Step S703: calculate the theoretical point, i.e., theoretical point = starting point * 3 (adsorption parameter);
[0122] Step S704: theoretical point * 0.7 ≤ first adsorption point ≤ theoretical point * 1.3? (interval adjustable); if no, perform step S708; if yes, perform step S709;
[0123] Exemplarily, assuming the theoretical point is 4x, the adsorption interval of the theoretical point is [2.8x, 5.2x], and the first adsorption point falling within the interval is 3x, 3x is taken as the target point. Assuming the theoretical point is 5x, the adsorption interval of the theoretical point is [3.5x, 6.5x], and there is no adsorption point within the interval, 5x is taken as the adsorption point.
[0124] Step S705: is the zoom speed medium zooming? If yes, perform step S706; if no, perform step S710;
[0125] Step S706: calculate the theoretical point, i.e., theoretical point = starting point * 2 (adsorption parameter);
[0126] Step S707: theoretical point * 0.8 ≤ second adsorption point ≤ theoretical point * 1.2? (interval adjustable); if no, perform step S708; if yes, perform step S709;
[0127] Exemplarily, assuming the theoretical point is 4x, the adsorption interval of the theoretical point is [3.2x, 4.8x], and there is no adsorption point within the interval, 4x is taken as the target point. When the theoretical point is 5x, the adsorption interval of the theoretical point is [4x, 6x], and the second adsorption point falling within the interval is 6x, 6x is taken as the adsorption point.
[0128] Step S708: the target point is the theoretical point, i.e., no adsorption is performed;
[0129] Step S709: The target point is the adsorption point, i.e., adsorption;
[0130] Step S710: The target point is the point where the finger leaves, i.e., where it no longer adheres.
[0131] Here, in the zoom scene, when deciding on the adsorption point, fast zooming is based on a 3x magnification difference, while medium-speed zooming is based on a 2x magnification difference. Furthermore, the theoretical adsorption range differs for different zoom speeds. For example... Figure 2 As shown, in the Zoomin scenario: starting from a point near 1x, quickly glide to 3x; starting from a point near 2x, quickly glide to 6x; starting from a point between 3x and 6x, quickly glide to 13.3x, etc.; starting from a point near 1x, glide to 2x; starting from a point near 2x, glide to the theoretical point 4x as the target point; starting from a point near 3x, glide to 6x; starting from a point near 6x, glide to 13.3x, etc.
[0132] It should be noted that the zoom adsorption strategy used in the reverse zoom scenario in the application maintains the same core execution logic as the zoom adsorption strategy in the forward zoom scenario. For details, please refer to the aforementioned description of the forward zoom adsorption strategy. The only difference lies in the adsorption parameters and adsorption points for reverse zoom. Further detailed explanations of the reverse zoom adsorption strategy can be found in the description of the forward zoom adsorption strategy, and will not be repeated here.
[0133] In some embodiments, the method further includes: when the zoom speed is a first type of speed, performing an adsorption decision based on the zoom information to determine the target zoom magnification corresponding to the zoom information; when the zoom speed is a second type of speed, using the fourth zoom magnification mapped by the zoom operation as the target zoom magnification.
[0134] The first type of speed can be understood as the set of zoom speeds that trigger the adsorption decision, which includes one or more speeds (e.g., covering the first speed, the second speed, or expanding to more speed types according to the needs of the scenario). When the zoom speed falls into this category, the subsequent adsorption decision process will be initiated.
[0135] The second type of speed can be understood as the set of zoom speeds that do not trigger the adsorption decision. When the zoom speed falls into this category, the current zoom ratio will be used directly, and adsorption will not occur.
[0136] Step S103: Perform zoom processing based on the target zoom ratio.
[0137] After determining the target zoom ratio, the system will perform targeted zoom processing based on the target zoom ratio, specifically including at least one of the following operations:
[0138] Lens switching: combined with SAT technology, when the target zoom ratio exceeds the effective focal length range of the current lens, switch to the lens that matches the focal length in real time (such as switching from a super wide-angle lens to a main camera, a long-focus lens), ensuring that the picture angle and zoom ratio are accurately matched;
[0139] Image cropping: for digital zoom scenarios, crop the corresponding area of the image sensor according to the target zoom ratio, retain the core picture information, and avoid picture distortion caused by unintended cropping;
[0140] Image alignment: before lens switching or multi-frame image fusion, align images of different lenses or different times at the pixel level through algorithms, eliminate picture offset, and ensure the stability of picture position during zooming;
[0141] Image fusion: fuse imaging data of different lenses (such as main camera and long-focus lens images) or image information of different cropping ratios, optimize picture details and quality, and reduce sharpness loss caused by zooming;
[0142] Interpolation processing: during continuous change of zoom ratio, insert transition frame images to smooth the difference between adjacent frames, completely avoid picture jumping, and ensure the visual continuity of the zooming process.
[0143] In some embodiments, the method further comprises: determining a tail interpolation curve based on the zoom speed; and performing interpolation processing before the image corresponding to the target zoom ratio based on the tail interpolation curve.
[0144] The tail interpolation curve determines the number of tail interpolations and the trend of zoom ratio change. The tail interpolation curve can be adjusted by the zoom ratio and the number of tail interpolations, and the interpolation design follows the principle of fast and uniform change in the middle state, slow entry in the initial state, and slow exit in the tail state. The number of tail interpolations is related to factors such as zoom speed, for example; the faster the zoom speed, the greater the zoom ratio change span, and the more the number of interpolations; otherwise, the number of interpolations is less.
[0145] In some embodiments, the method further comprises: when at least one of the zoom speed, the zoom direction, and the starting zoom ratio in the zoom information is detected to be updated, performing adsorption decision based on the updated zoom information to determine a new target zoom ratio.
[0146] The zoom information is generated by monitoring the zoom operation in real time. Once at least one of the zoom speed, the zoom direction, and the starting zoom ratio is detected to be updated, the zoom suction strategy is immediately re-invoked based on the updated zoom information, a new target zoom ratio is calculated and determined, and it is ensured that the decision result is always synchronized with the user's real-time operation intention. For example, the sliding direction remains the same, but the speed is switched from fast sliding to medium or slow sliding; or the starting zoom ratio and the zoom speed are changed after the sliding direction is changed. Through this dynamic adjustment mechanism, the hand-following performance can be quickly responded to when the operation changes, and the suction effect (whether to perform suction, and to which high-quality zoom ratio point) is completely matched with the user's real-time operation expectation.
[0147] By using the above technical solution, the zoom information (such as the zoom speed, the zoom direction, and the starting zoom ratio) is determined by monitoring the zoom operation, and differentiated suction decisions are made for zoom information in different dimensions to determine the target zoom ratio. The zoom process is performed using the target zoom ratio, which can effectively avoid the picture jump problem caused by the uncertainty of the speed, direction, and starting point of the zoom operation, and ensure the stability and continuity of the picture during the zoom process.
[0148] In order to better reflect the purpose of the present application, on the basis of the above-mentioned embodiments of the present application, further example explanations are made. In an example, as shown in Figure 8 The method can specifically include:
[0149] Step S801: opening the camera and starting preview or recording;
[0150] Step S802: monitoring the sliding event of the user on the interactive device;
[0151] Step S803: triggering the zoom process in response to the sliding event;
[0152] The camera zoom process is triggered, and the real-time monitoring process of the zoom information (speed, direction, starting point) is triggered. As shown in Figure 9 The zoom information monitoring method can include: first, obtaining the zoom ratio of the current frame, and identifying the fourth zoom ratio (theoretically, the zoom ratio that should be reached when the sliding ends) corresponding to the sliding event based on the sliding distance, time, etc. The fourth zoom ratio converted by the sliding event; second, comparing the zoom ratio of the current frame and the fourth zoom ratio to determine the sliding speed (corresponding to the zoom speed) of the current sliding scene, the change amount of the zoom ratio per unit time; and finally, determining whether it is a slow sliding scene according to the sliding speed, for example, if the sliding speed is lower than a preset threshold (such as ≤0.5 zoom ratio / second), it is determined to be a slow sliding scene; if it is fast sliding (>2 zoom ratio / second) or medium sliding (0.5-2 zoom ratio / second), it is determined to be a non-slow sliding scene.
[0153] In addition, no matter which sliding speed, record the starting zoom ratio of zoom event, the picture ratio at the beginning of sliding, and the sliding direction (corresponding to the zoom direction).
[0154] Step S804: Based on the zoom speed, determine whether it is a slow sliding scene, if not, execute step S805; if yes, execute step S809;
[0155] Step S805: Call the zoom adhesion strategy to make adhesion decision and determine the target zoom ratio;
[0156] Here, based on the obtained zoom information (sliding speed, sliding direction, starting point information), call the zoom adhesion strategy decision to make adhesion decision, if the sliding direction is positive, match the starting zoom ratio to the high zoom ratio interval to determine the adhesion point; if the sliding direction is reverse, match the starting zoom ratio to the low zoom ratio interval to determine the adhesion point.
[0157] The sliding direction mainly affects the determination of the theoretical point, for example, when sliding forward, the value of the adhesion parameter is greater than 1; when sliding backward, the value of the adhesion parameter is greater than 0 and less than 1.
[0158] The influence of the sliding direction on the adhesion point is mainly the difference in adhesion point decision under different sliding speeds between reverse sliding and forward sliding. For example, when sliding forward, 1x adhesion can only be for medium-speed sliding to adhere, while when sliding backward, fast sliding can adhere to 1x; 60x can be adhered by medium-speed sliding when sliding backward, but fast sliding scene can only adhere to 60x when sliding forward.
[0159] Step S806: Issue the target zoom ratio & stop event;
[0160] Here, the camera application issues the target zoom ratio and the stop event to the hardware driver layer (HAL) at the same time to make zoom processing and enlarge or reduce the preview or recording picture to the target zoom ratio.
[0161] Step S807: Trigger the tail insertion strategy;
[0162] In order to avoid the feeling of sudden stop at the end of zoom, trigger the tail insertion strategy to perform frame insertion processing, the tail insertion strategy includes: determining the tail frame insertion curve according to the current sliding speed; based on the tail frame insertion curve, inserting transition frames before the final picture corresponding to the target zoom ratio to realize the smooth transition from the current zoom ratio to the target zoom ratio, and improve the smoothness of the end part.
[0163] Step S808: Monitor whether the zoom information changes, if not, execute step S811; if yes, return to step S804 to update the target zoom ratio;
[0164] If the change of the sliding direction or speed occurs before the target zoom ratio is reached, the APP side immediately updates the target zoom ratio and sends it to the HAL side, and the HAL side responds to the latest zoom event.
[0165] Step S809: If the slow sliding is performed, the sliding coefficient of the current focal length is determined based on the sliding coefficient curve;
[0166] According to the zoom processing based on the sliding coefficient of the current focal length, the mapping process of the sliding motion to the zoom ratio change can be synchronized with the user's expectation, such as avoiding the hysteresis of the long focal length (high zoom ratio interval) due to the large sliding of the high coefficient, or the jump of the wide-angle focal length (low zoom ratio interval) due to the large change of the small sliding of the low coefficient. This coefficient adaptation for the focal length characteristics can not only keep the uniform and smooth transition rhythm of the zoom process under different focal lengths, but also ensure that the user operation and the picture feedback form an immediate echo, which fundamentally balances the zoom fluency and the operation followability.
[0167] Step S810: The sliding cut interpolation is performed;
[0168] Step S811: The zoom processing (such as alignment and fusion) is performed;
[0169] Step S812: The camera switching is performed;
[0170] Here, if the zoom ratio from the current frame to the target zoom ratio passes through the zoom point, the camera switching needs to be performed.
[0171] Step S813: The FOV continues to change to the target zoom ratio (the zoom process is completed);
[0172] Step S814: The normal preview / recording is restored.
[0173] The embodiments of the present application dynamically decide the suction point under different sliding operations (corresponding to zoom operations) based on the sliding speed, the starting zoom ratio and the sliding direction of the user, to avoid the problem of too close suction or in-sensitive suction; and the tail insertion strategy is adjusted in time after the suction point is decided, so that the suction effect can balance the fluency and followability in the activity process. In this way, when sliding zoom is performed, not only can the user slide to any precise scale that needs to be adjusted by slow sliding, but also can efficiently slide to a zoom ratio point with better image by fast sliding, which improves the user's shooting experience.
[0174] To implement the method of the embodiments of the present application, based on the same inventive concept, the embodiments of the present application also provide a zoom device, as shown in the figure. Figure 10 The zoom device 100 includes:
[0175] A determination unit 1001 is configured to determine zoom information in response to a zoom operation of a user on an interactive component.
[0176] The first processing unit 1002 is configured to make an adsorption decision based on the zoom information, and determine a target zoom ratio corresponding to the zoom information.
[0177] The second processing unit 1003 is configured to perform zoom processing based on the target zoom ratio.
[0178] In some embodiments, the zoom information includes a zoom speed, a zoom direction, and a starting zoom ratio.
[0179] In some embodiments, the first processing unit 1002 is configured to determine a value of an adsorption parameter based on the zoom speed and the zoom direction, and determine the target zoom ratio based on the starting zoom ratio and the value of the adsorption parameter.
[0180] In some embodiments, when the zoom direction is a forward zoom from a small zoom ratio to a large zoom ratio, the zoom speed is positively correlated with the value of the adsorption parameter; and when the zoom direction is a reverse zoom from a large zoom ratio to a small zoom ratio, the zoom speed is negatively correlated with the value of the adsorption parameter.
[0181] In some embodiments, the first processing unit 1002 is configured to determine a first zoom ratio based on the starting zoom ratio and the value of the adsorption parameter, determine a target adsorption point of the first zoom ratio from a plurality of adsorption points, and determine a zoom ratio corresponding to the target adsorption point as the target zoom ratio.
[0182] In some embodiments, the first processing unit 1002 is configured to determine at least one adsorption point adjacent to the first zoom ratio from the plurality of adsorption points, determine that the first zoom ratio falls in a target first zoom interval based on a first zoom interval defined by the at least one adsorption point, and determine an adsorption point corresponding to the target first zoom interval as the target adsorption point.
[0183] In some embodiments, a width of a first zoom interval defined by different adsorption points in the plurality of adsorption points is positively correlated with a corresponding zoom ratio, or the width of the first zoom interval defined by different adsorption points in the plurality of adsorption points is positively correlated with the zoom speed, or the width of the first zoom interval defined by different adsorption points in the plurality of adsorption points is positively correlated with the corresponding zoom ratio and the zoom speed.
[0184] In some embodiments, the first processing unit 1002 is further configured to, when the first zoom ratio does not fall in a first zoom interval of any adsorption point based on the first zoom interval defined by the at least one adsorption point, determine the first zoom ratio as the target zoom ratio.
[0185] In some embodiments, the first processing unit 1002 is configured to determine a target adsorption point falling in a second zoom interval from the plurality of adsorption points based on a second zoom interval defined by the first zoom ratio.
[0186] In some embodiments, the width of the second zoom ratio interval defined by the first zoom ratio is positively correlated with the first zoom ratio; or the width of the second zoom ratio interval defined by the first zoom ratio is positively correlated with the zoom speed; or the width of the second zoom ratio interval defined by the first zoom ratio is positively correlated with the first zoom ratio and the zoom speed.
[0187] In some embodiments, the first processing unit 1002 is further configured to, based on the second zoom ratio interval defined by the first zoom ratio, determine that none of the plurality of pinning points falls within the second zoom ratio interval, and take the first zoom ratio as the target zoom ratio.
[0188] In some embodiments, the first processing unit 1002 is further configured to, when the zoom speed is of the first type, make a pinning decision based on the zoom information to determine a target zoom ratio corresponding to the zoom information; and when the zoom speed is of the second type, take the fourth zoom ratio mapped by the zoom operation as the target zoom ratio.
[0189] In some embodiments, the determining unit 1001 is configured to, in response to a zoom operation of a user on an interactive component, acquire a current zoom ratio of a current image and a fourth zoom ratio mapped by the zoom operation; and determine a zoom speed based on a difference between the current zoom ratio and the fourth zoom ratio.
[0190] In some embodiments, the second processing unit 1003 is further configured to, based on the zoom speed, determine a tail frame interpolation curve; and perform frame interpolation processing on images before the target zoom ratio based on the tail frame interpolation curve.
[0191] In practical applications, the zoom device described above can be an electronic device or a chip applied to an electronic device. In this application, the device can implement the functions of multiple units in a manner of software, hardware, or a combination of software and hardware, so that the device can perform the zoom method provided in any of the above embodiments. The technical effects of each technical solution of the device can refer to the technical effects of the corresponding technical solutions in the zoom method, which will not be described here in detail.
[0192] The terminal described in this application can include, for example, a mobile phone, a tablet computer, a notebook computer, a palm computer, a personal digital assistant (PDA), a portable media player (PMP), a wearable device, a camera, and the like.
[0193] Based on the hardware implementation of each unit in the above-described zoom device, this embodiment of the present application further provides a zoom device, such as Figure 11As shown, the zoom device 110 includes a processor 1101 and a memory 1102 configured to store a computer program capable of running on the processor; wherein the processor 1101 is configured to execute the method steps in the foregoing embodiments when running the computer program.
[0194] Of course, in actual applications, such as Figure 11 As shown, the various components in the zoom device 110 are coupled together through a bus system 1103. It can be understood that the bus system 1103 is used to realize the connection and communication between the components. The bus system 1103 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 1103 in the figure.
[0195] In actual applications, the above-mentioned processor can be at least one of an application specific integrated circuit (ASIC), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to realize the function of the above-mentioned processor can also be other, and the embodiments of the present application do not make specific limitations.
[0196] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid state disk (SSD); or a combination of the above-mentioned kinds of memories, and provides instructions and data to the processor.
[0197] In exemplary embodiments, the zoom device provided by the embodiments of the present application can be a chip. Alternatively, the chip can further include at least one input interface. Wherein the processor can control the input interface to communicate with other devices or chips, specifically, information or data sent by other devices or chips can be acquired. The image data output by the image sensor of the camera device is acquired through the input interface.
[0198] Optionally, the chip further comprises at least one output interface. The processor can control the output interface to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
[0199] In the example embodiments, the application further provides a computer readable storage medium, for example, a memory comprising a computer program, which can be executed by a processor of a zoom device to complete the steps of the foregoing method.
[0200] The application further provides a computer program product comprising computer program instructions.
[0201] Optionally, the computer program product can be applied to the zoom device in the application, and the computer program instructions enable the computer to execute the corresponding procedures realized by the zoom device in the various methods of the application. For brevity, details are not repeated here.
[0202] The application further provides a computer program.
[0203] Optionally, the computer program can be applied to the zoom device in the application, and when the computer program runs on the computer, the computer program enables the computer to execute the corresponding procedures realized by the zoom device in the various methods of the application. For brevity, details are not repeated here.
[0204] It should be understood that in the application, the data related to user information and the like need to obtain user permission or consent when the application is applied to specific products or technologies, and the collection, use and processing of the related data need to comply with relevant laws, regulations and standards in countries and regions.
[0205] It should be understood that the terms used in the application are only for the purpose of describing specific embodiments, and are not intended to limit the application. The singular forms "a", "an" and "the" used in the application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein means and includes any or all possible combinations of one or more associated listed items. In the application, the expressions "have", "may have", "include" and "contain", or "may include" and "may contain" can be used herein to indicate the presence of the corresponding features (for example, elements such as numerical values, functions, operations or components), but do not exclude the presence of additional features.
[0206] It should be understood that, although the terms first, second, third, etc. can be adopted in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not necessarily be used to describe a particular order or sequence. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information, without departing from the scope of the present application. The technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0207] In several embodiments provided in the present application, it should be understood that the disclosed methods, devices and equipment can be implemented in other ways. The above described embodiments are only illustrative, for example, the division of units is only a logical function division, and actual implementation can have another division manner, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each component part shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0208] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on multiple network units; part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0209] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0210] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application.
Claims
1. A zoom method, characterized in that, The method includes: In response to the user's zoom operation on the interactive component, determine the zoom information; Based on the zoom information, an adsorption decision is made to determine the target zoom ratio corresponding to the zoom information; Zoom processing is performed based on the target zoom ratio.
2. The method according to claim 1, characterized in that, The zoom information includes zoom speed, zoom direction, and initial zoom magnification.
3. The method according to claim 2, characterized in that, The step of making an adsorption decision based on the zoom information, and determining the target zoom ratio corresponding to the zoom information, includes: The values of the adsorption parameters are determined based on the zoom speed and the zoom direction. The target zoom ratio is determined based on the initial zoom ratio and the values of the adsorption parameters.
4. The method according to claim 3, characterized in that, When the zoom direction is a forward zoom from low magnification to high magnification, the zoom speed is positively correlated with the value of the adsorption parameter. When the zoom direction is a reverse zoom from high magnification to low magnification, the zoom speed is negatively correlated with the value of the adsorption parameter.
5. The method according to claim 3, characterized in that, Determining the target zoom ratio based on the initial zoom ratio and the values of the adsorption parameters includes: Based on the initial zoom ratio and the values of the adsorption parameters, the first zoom ratio is determined; From multiple adsorption points, determine the target adsorption point for the first zoom ratio; The zoom ratio corresponding to the target adsorption point is taken as the target zoom ratio.
6. The method according to claim 5, characterized in that, Determining the target adsorption point for the first zoom magnification from multiple adsorption points includes: From multiple adsorption points, determine at least one adsorption point adjacent to the first zoom ratio; Based on a first magnification range defined by at least one adsorption point, it is determined that the first zoom magnification falls within the target first magnification range; The adsorption point corresponding to the first magnification range of the target is taken as the target adsorption point.
7. The method according to claim 6, characterized in that, The width of the first magnification interval defined by different adsorption points among the plurality of adsorption points is positively correlated with the corresponding zoom magnification. Alternatively, the width of the first magnification range defined by different adsorption points among the plurality of adsorption points is positively correlated with the zoom speed; Alternatively, the width of the first magnification interval defined by different adsorption points among the plurality of adsorption points is positively correlated with the corresponding zoom magnification and the zoom speed.
8. The method according to claim 6, characterized in that, The method further includes: Based on a first magnification range defined by at least one adsorption point, when it is determined that the first zoom magnification does not fall within the first magnification range of any adsorption point, the first zoom magnification is taken as the target zoom magnification.
9. The method according to claim 5, characterized in that, Determining the target adsorption point for the first zoom magnification from multiple adsorption points includes: Based on the second magnification range defined by the first zoom level, a target adsorption point falling within the second magnification range is determined from multiple adsorption points.
10. The method according to claim 9, characterized in that, The width of the second magnification range defined by the first zoom magnification is positively correlated with the first zoom magnification; Alternatively, the width of the second magnification range defined by the first zoom magnification is positively correlated with the zoom speed; Alternatively, the width of the second magnification range defined by the first zoom magnification is positively correlated with the first zoom magnification and the zoom speed.
11. The method according to claim 9, characterized in that, The method further includes: Based on the second zoom range defined by the first zoom range, when it is determined that none of the plurality of adsorption points fall within the second zoom range, the first zoom range is taken as the target zoom range.
12. The method according to any one of claims 2-11, characterized in that, The method further includes: When the zoom speed is a first type of speed, an adsorption decision is made based on the zoom information to determine the target zoom ratio corresponding to the zoom information. When the zoom speed is a second type of speed, the fourth zoom magnification mapped by the zoom operation is used as the target zoom magnification.
13. The method according to any one of claims 1-11, characterized in that, The method further includes: In response to a user's zoom operation on an interactive component, the current zoom magnification of the current image and the fourth zoom magnification mapped by the zoom operation are obtained. The zoom speed is determined based on the difference between the current zoom ratio and the fourth zoom ratio.
14. The method according to any one of claims 1-11, characterized in that, The method further includes: Based on the zoom speed, determine the rear frame interpolation curve; Based on the tail interpolation curve, frame interpolation is performed before the image corresponding to the target zoom magnification.
15. A zoom device, characterized in that, The device includes: The determining unit is used to determine zoom information in response to the user's zoom operation on the interactive component; The first processing unit is used to determine the target zoom ratio corresponding to the zoom information based on the zoom information adsorption decision. The second processing unit is used to perform zoom processing based on the target zoom ratio.
16. A zoom device, characterized in that, The device includes: a processor and a memory configured to store computer programs capable of running on the processor. Wherein, when the processor is configured to run the computer program, it performs the steps of the method according to any one of claims 1 to 14.
17. 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 14.
18. 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 14.