Zoom method and device, electronic equipment and storage medium
By setting the correspondence between zoom ratio and exposure area and switching between multiple lenses, the problem of fixed-focus lenses being unable to zoom was solved, enabling the zoom function of fixed-focus lenses and improving the brightness and clarity of image acquisition.
Patent Information
- Application Number
- CN202511704552.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-13
AI Technical Summary
In existing image acquisition equipment, the focal length of the fixed-focus lens is fixed, making it difficult to achieve zoom functionality, and the image acquisition effect is inaccurate.
By setting a pre-defined correspondence between zoom magnification and exposure area, an appropriate exposure area is determined, and the fixed-focus lens is controlled to expose that area. By combining the switching of multiple fixed-focus lenses and the configuration of exposure parameters, the zoom function is realized and the image brightness accuracy is improved.
It achieves zoom functionality based on a fixed-focus lens, reduces the impact outside the exposure area, and improves the brightness and clarity of the zoomed image.
Smart Images

Figure CN121531232A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a zoom method, apparatus, electronic device, and storage medium. Background Technology
[0002] To meet users' image acquisition needs, current image acquisition devices generally have zoom capabilities. By changing the focal length of the image acquisition device, the shooting angle of the image acquisition device can be changed, thereby changing the size of the object in the image acquired by the image acquisition device.
[0003] However, considering factors such as the size and cost of image acquisition devices, some image acquisition devices integrate fixed-focus lenses, and the focal length of fixed-focus lenses is fixed. Therefore, it is necessary to provide a solution for achieving zoom functionality based on fixed-focus lenses. Summary of the Invention
[0004] The purpose of this application is to provide a zoom method, apparatus, electronic device, and storage medium to achieve zoom functionality based on a fixed focal length, and to improve the accuracy of brightness in the acquired image. The specific technical solution is as follows:
[0005] According to one aspect of an embodiment of this application, a zoom method is provided, the method comprising:
[0006] If the adjusted first zoom ratio is within the range of the first zoom ratio corresponding to the first fixed-focus lens, then the first exposure area corresponding to the first zoom ratio is determined according to the pre-set correspondence between the zoom ratio and the exposure area, wherein the first fixed-focus lens is: the lens in working state among the fixed-focus lenses integrated in the image acquisition device.
[0007] The first fixed-focus lens is controlled to expose the first exposure area within its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0008] In one embodiment of this application, the image acquisition device integrates multiple fixed-focus lenses, and the method further includes:
[0009] If the adjusted first zoom ratio is not within the range of the first zoom ratio, then the second fixed-focus lens corresponding to the second zoom ratio range where the first zoom ratio is located is activated.
[0010] The second fixed-focus lens is controlled to expose for its field of view to obtain an image.
[0011] In one embodiment of this application, before controlling the second fixed-focus lens to expose for its field of view to obtain an image, the method further includes:
[0012] Based on the exposure parameters of the first fixed-focus lens, configure the exposure parameters of the second fixed-focus lens;
[0013] The control of the second fixed-focus lens to expose for its field of view to obtain an image includes:
[0014] The second fixed-focus lens is controlled to expose an image based on the configured exposure parameters for its field of view.
[0015] In one embodiment of this application, configuring the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens includes:
[0016] Based on the hardware performance differences between the first fixed-focus lens and the second fixed-focus lens and the exposure parameters of the first fixed-focus lens, the exposure parameters of the second fixed-focus lens are determined.
[0017] The exposure parameters determined for the configuration of the second fixed-focus lens.
[0018] In one embodiment of this application, controlling the second fixed-focus lens to expose for its field of view to obtain an image includes:
[0019] Based on the pre-set correspondence between zoom ratio and exposure area, the first exposure area corresponding to the first zoom ratio is determined;
[0020] The second fixed-focus lens is controlled to expose the first exposure area within its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0021] In one embodiment of this application, the method further includes:
[0022] If the adjusted first zoom ratio is not within the range of the first zoom ratio, then control the first fixed-focus lens to switch to sleep mode.
[0023] In one embodiment of this application, the first zoom ratio is obtained by changing a preset zoom ratio adjustment precision based on the zoom ratio before adjustment.
[0024] According to another aspect of the embodiments of this application, a zoom device is provided, the device comprising:
[0025] The exposure area determination module is used to determine the first exposure area corresponding to the first zoom ratio if the adjusted first zoom ratio is within the range of the first zoom ratio corresponding to the first fixed-focus lens, based on the pre-set correspondence between the zoom ratio and the exposure area, wherein the first fixed-focus lens is: the lens in the working state among the fixed-focus lenses integrated in the image acquisition device.
[0026] The first exposure module is used to control the first fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0027] In one embodiment of this application, the image acquisition device integrates multiple fixed-focus lenses, and the device further includes: a lens wake-up module, used to wake up the second fixed-focus lens corresponding to the second zoom range where the first zoom range is located if the adjusted first zoom ratio is not within the range of the first zoom ratio; and a second exposure module, used to control the second fixed-focus lens to expose for its field of view to obtain an image.
[0028] In one embodiment of this application, the apparatus further includes: an exposure parameter configuration module, configured to configure the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens; and a second exposure module, specifically configured to control the second fixed-focus lens to expose its field of view based on the configured exposure parameters to obtain an image.
[0029] In one embodiment of this application, the exposure parameter configuration module is specifically used to determine the exposure parameters of the second fixed-focus lens based on the hardware performance difference between the first fixed-focus lens and the second fixed-focus lens and the exposure parameters of the first fixed-focus lens; and to configure the determined exposure parameters for the second fixed-focus lens.
[0030] In one embodiment of this application, the second exposure module is specifically used to determine the first exposure area corresponding to the first zoom ratio according to a pre-set correspondence between zoom ratio and exposure area; and control the second fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0031] In one embodiment of this application, a lens sleep module is used to control the first fixed-focus lens to switch to sleep mode if the adjusted first zoom ratio is not within the range of the first zoom ratio.
[0032] In one embodiment of this application, the first zoom ratio is obtained by changing a preset zoom ratio adjustment precision based on the zoom ratio before adjustment.
[0033] According to another aspect of the embodiments of this application, an electronic device is provided, comprising:
[0034] Memory, used to store computer programs;
[0035] The processor, when executing a program stored in memory, implements any of the zoom methods described above.
[0036] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored therein, and the computer program, when executed by a processor, implements any of the zoom methods described above.
[0037] According to another aspect of the embodiments of this application, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to perform any of the zoom methods described above.
[0038] Beneficial effects of the embodiments in this application:
[0039] As can be seen from the above, in the zoom method provided in this application embodiment, the first exposure area under the first zoom ratio can be determined according to the pre-set correspondence between the zoom ratio and the exposure area. Then, the exposure area is exposed to obtain the zoomed image corresponding to the first zoom ratio. In this way, the zoom function can be realized based on the fixed-focus lens. Furthermore, by controlling the first fixed-focus lens to expose the first exposure area in its field of view, the influence of other areas besides the first exposure area on the exposure can be reduced, thereby improving the exposure accuracy and the brightness accuracy of the zoomed image.
[0040] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0042] Figure 1a A schematic flowchart of a zoom method provided in an embodiment of this application;
[0043] Figure 1b An image at a zoom ratio of 1× is provided as an embodiment of this application;
[0044] Figure 1c An image at a zoom ratio of 1.3× is provided for an embodiment of this application;
[0045] Figure 1d A schematic diagram illustrating the correspondence between zoom magnification and exposure area provided in an embodiment of this application;
[0046] Figure 1e An image at a zoom ratio of 2× is provided as an embodiment of this application;
[0047] Figure 2A flowchart illustrating another zoom method provided in an embodiment of this application;
[0048] Figure 3a A flowchart illustrating another zoom method provided in an embodiment of this application;
[0049] Figure 3b A flowchart illustrating another zoom method provided in this application embodiment;
[0050] Figure 4 This is a schematic diagram of the structure of a zoom device provided in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0053] The zoom method provided in the embodiments of this application will be described in detail below.
[0054] In one embodiment of this application, see [link to embodiment]. Figure 1a A flowchart of a zoom method is provided, the method including the following steps S101-S102.
[0055] Step S101: If the adjusted first zoom ratio is within the range of the first zoom ratio corresponding to the first fixed focal length lens, then the first exposure area corresponding to the first zoom ratio is determined according to the pre-set correspondence between the zoom ratio and the exposure area.
[0056] The first fixed-focus lens is the lens that is in operation among the fixed-focus lenses integrated into the image acquisition device.
[0057] Step S102: Control the first fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0058] The following section explains the fixed-focus lenses of image acquisition devices and the corresponding zoom range of fixed-focus lenses.
[0059] Image acquisition devices can integrate one or more fixed-focus lenses. For each fixed-focus lens, a zoom range can be set. For example, the zoom range for a fixed-focus lens can be set to 1×-3×. Fixed-focus lenses have a fixed focal length and can only acquire images at a fixed zoom ratio. The zoom range corresponding to a fixed-focus lens indicates that when the image acquisition device acquires an image at a specific zoom ratio within that range, it will perform image acquisition based on that fixed-focus lens.
[0060] If an image acquisition device integrates multiple fixed-focus lenses with different focal lengths, their actual zoom ratios will also differ. For example, suppose the 18mm fixed-focus lens has a zoom ratio of 1×, the 54mm fixed-focus lens has a zoom ratio of 3×, and the 90mm fixed-focus lens has a zoom ratio of 5×. If the image acquisition device's zoom adjustment precision is set to 0.1×, the zoom ratio range for the 18mm fixed-focus lens can be set to 1×-2.9×, the 54mm fixed-focus lens to 3×-4.9×, and the 90mm fixed-focus lens to 5×-7×.
[0061] The following explains the correspondence between zoom ratio and exposure area.
[0062] The correspondence between zoom ratio and exposure area can be determined based on the field of view of each fixed-focus lens and the field of view corresponding to each zoom ratio within the zoom ratio range of that fixed-focus lens.
[0063] Typically, the field of view of a fixed-focus lens is fixed. However, it's possible to pre-set the area within the fixed-focus lens's field of view corresponding to each zoom magnification. For example, assuming a 18mm lens with a 1× zoom magnification, the image captured by the image acquisition device at a 1× zoom magnification would look like this: Figure 1b The provided image shows an image at a zoom ratio of 1×. Assuming that an image is captured again at the same location with a zoom ratio of 1.3× (i.e., using a lens with a focal length of 27mm), the captured image would look like this. Figure 1c An image at a zoom ratio of 1.3× is provided. Figure 1b and Figure 1c The two images are the same size, for example, if Figure 1b The image shown has a resolution of 1920×1080, then... Figure 1c The image shown also has a resolution of 1920×1080, but... Figure 1b and Figure 1c The different field of view corresponding to the images show that the acquired images... Figure 1cThe field of view of the lens is located within the area captured by the camera. Figure 1b Within the field of view of the lens, Figure 1c The entire area of the image and Figure 1b The image area corresponds to the area within the dashed box. Assuming only an 18mm fixed-focus lens is used, and considering the zoom ratio of this fixed-focus lens as 1×, then this fixed-focus lens can also capture... Figure 1b The image shown can be magnified by interpolating the image within the dashed frame, for example, to achieve the same magnification effect as the image within the dashed frame. Figure 1b Images of the same size, and the resulting image corresponds to the same field of view as... Figure 1c The same. Thus, through the... Figure 1b The dashed box area is magnified to achieve the effect of enlarging the dashed box area, thus achieving the effect of obtaining an image with a zoom ratio of 1.3× using a fixed-focus lens with a zoom ratio of 1×.
[0064] In this way, based on the field of view corresponding to each zoom magnification within the zoom magnification range of each fixed-focus lens and the field of view of the fixed-focus lens itself, the area corresponding to each zoom magnification can be marked in the actual image captured by the fixed-focus lens as the exposure area. Here, each zoom magnification within the aforementioned zoom magnification range can be determined based on the zoom magnification range and the magnification adjustment precision. For example, if the zoom magnification range of the fixed-focus lens is 1×-2.9× and the magnification adjustment precision is 0.1×, then the zoom magnifications can include: 1×, 1.1×, 1.2×, 1.3×, 1.4×...2.9×.
[0065] The following is combined Figure 1d A schematic diagram illustrating the correspondence between zoom magnification and exposure area is provided to explain the exposure area corresponding to zoom magnification.
[0066] Figure 1d In the diagram, the area within the dashed box marked 1.1× is the exposure area corresponding to a zoom ratio of 1.1×, the area within the dashed box marked 1.3× is the exposure area corresponding to a zoom ratio of 1.3×, the area within the dashed box marked 1.5× is the exposure area corresponding to a zoom ratio of 1.5×, and the area within the dashed box marked 2× is the exposure area corresponding to a zoom ratio of 2×.
[0067] In step S101, after the image acquisition device obtains the adjusted first zoom ratio, it can determine the first zoom ratio range corresponding to the working lens among the fixed-focus lenses integrated in the image acquisition device based on the zoom ratio range corresponding to each fixed-focus lens. Then, it is determined whether the first zoom ratio is within the first zoom ratio range. If it is within the first zoom ratio range, the first exposure area corresponding to the first zoom ratio is determined according to the pre-set correspondence between zoom ratio and exposure area. The first zoom ratio may not be the zoom ratio of the first fixed-focus lens.
[0068] The situation where the first zoom ratio is not within the range of the first zoom ratio in step S101 will be described in the following embodiments, and will not be detailed here.
[0069] In step S102, the image acquisition device can obtain a zoomed image corresponding to the first zoom ratio within its field of view based on the exposure parameters configured for the first fixed-focus lens. The exposure parameters may include exposure gain, shutter speed, ISO, and aperture size.
[0070] For example, if the first zoom ratio is 1.3×, and the image acquired by the image acquisition device controlled by the first fixed-focus lens is... Figure 1b As shown, the image acquisition device can control the first fixed-focus lens to focus on the area within its field of view. Figure 1b Expose the first exposure area shown in the dashed box to obtain the following result: Figure 1c The image shown corresponds to the first zoom level.
[0071] In this way, by exposing the first exposure area within the field of view of the first fixed-focus lens, and no longer considering areas other than the first exposure area during exposure, the problem of inaccurate brightness in the acquired image can be reduced.
[0072] For example, if Figure 1b The circle in the image shown represents the sun. The image acquired at the first zoom level of 2× can be used as a reference. Figure 1e The provided image shows a zoom ratio of 2×, captured using a fixed-focus lens. Figure 1b At that time, the exposure will be based on the light signal across the entire field of view of the fixed-focus lens, thus obtaining... Figure 1b The brightness of a medium-resolution image balances the overall picture, typically avoiding overexposure or underexposure. If only for... Figure 1d The image area within the dashed box showing a zoom ratio of 2× is magnified to obtain... Figure 1e The image, then, may be because Figure 1d The brightness within the dashed box indicating a zoom ratio of 2x is excessively high, resulting in... Figure 1eThe image is overexposed. Steps S101-S102 control the first fixed-focus lens to expose the first exposure area within its field of view, that is, to expose the image as shown in the image. Figure 1d The zoom ratio of 2× corresponds to the first exposure area, which can expose the light signal within the first exposure area and reduce the influence of other areas on the exposure, resulting in a more accurate brightness of the zoomed image.
[0073] As can be seen from the above, in the zoom method provided in this application embodiment, the first exposure area under the first zoom ratio can be determined according to the pre-set correspondence between the zoom ratio and the exposure area. Then, the exposure area is exposed to obtain the zoomed image corresponding to the first zoom ratio. In this way, the zoom function can be realized based on the fixed-focus lens. Furthermore, by controlling the first fixed-focus lens to expose the first exposure area in its field of view, the influence of other areas besides the first exposure area on the exposure can be reduced, thereby improving the exposure accuracy and the brightness accuracy of the zoomed image.
[0074] In one embodiment of this application, when the image acquisition device integrates multiple fixed-focus lenses, zooming can be performed in the following manner, see [link to relevant documentation]. Figure 2 A flowchart of another zoom method is provided, which includes the following steps S201-S204.
[0075] Step S201: Determine whether the adjusted first zoom ratio is within the range of the first zoom ratio.
[0076] If the determination is yes, that is, the adjusted first zoom ratio is within the first zoom ratio range, then step S202 is executed.
[0077] If the determination is negative, meaning the adjusted first zoom ratio is not within the range of the first zoom ratio, then proceed to step S203.
[0078] The method for determining whether the first zoom magnification is within the range of the first zoom magnification can be referred to step S101, which will not be described in detail here.
[0079] Step S202: Based on the pre-set correspondence between zoom ratio and exposure area, determine the first exposure area corresponding to the first zoom ratio, and control the first fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0080] Step S202 is the same as steps S101-S102, and will not be described in detail here.
[0081] Step S203: Activate the second fixed-focus lens corresponding to the second zoom range where the first zoom ratio is located.
[0082] Step S204: Control the second fixed-focus lens to expose for its field of view to obtain an image.
[0083] In one scenario, the value within the second zoom range, where the first zoom ratio falls, is larger than the value within the first zoom ratio range, and the first zoom ratio is the zoom ratio of the second fixed-focus lens. In this case, the image acquisition device can control the second fixed-focus lens to expose for its field of view to obtain an image. For example, if the first zoom ratio range corresponding to the first fixed-focus lens is 1×-2.9×, and the second zoom ratio corresponding to the second fixed-focus lens is 3×-4.9×, then with a zoom ratio of 3×, the image acquisition device can control the second fixed-focus lens to expose for its field of view to obtain an image with a zoom ratio of 3×.
[0084] This allows for switching between multiple prime lenses, enabling the use of different prime lenses to achieve zoom functionality within different zoom magnification ranges. This reduces the problem of blurry images caused by excessive magnification of certain areas of the same prime lens due to excessive zoom magnification, further improving the clarity of the image after zooming.
[0085] In another scenario, where the first zoom ratio is not the same as the zoom ratio of the second prime lens, for example, if the first zoom ratio range of the first prime lens is 1×-2.9×, and the second zoom ratio range of the second prime lens is 3×-4.9×, and the zoom ratio of the second prime lens is 3×, while the first zoom ratio falls within the range of 3.1×-4.9×; or, for another example, if the first zoom ratio range of the first prime lens is 3×-4.9×, and the second zoom ratio range of the second prime lens is 1×-2.9×, and the zoom ratio of the second prime lens is 1×, while the first zoom ratio falls within the range of 1.1×-2.9×, then the second prime lens can be controlled to expose for its field of view according to step A:
[0086] Step A: Based on the pre-set correspondence between zoom ratio and exposure area, determine the first exposure area corresponding to the first zoom ratio. Control the second fixed-focus lens to expose the first exposure area within its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0087] Step A is similar to steps S101-S102, the difference being the difference between the second fixed-focus lens and the first fixed-focus lens, which will not be described in detail here.
[0088] This allows for improved image sharpness after zooming while reducing the impact of areas other than the first exposure zone on exposure, thus improving the accuracy of brightness in the zoomed image.
[0089] In another embodiment of this application, before step S204, the image acquisition device may further configure the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens.
[0090] In one implementation, the image acquisition device can use exposure parameters such as the exposure gain, shutter speed, ISO, and aperture of the first fixed-focus lens as exposure parameters configured for the second fixed-focus lens.
[0091] In another implementation, the exposure parameters of the second fixed-focus lens are determined based on the hardware performance differences between the first fixed-focus lens and the second fixed-focus lens and the exposure parameters of the first fixed-focus lens, and the determined exposure parameters are configured for the second fixed-focus lens.
[0092] When determining the exposure parameters of the second fixed-focus lens, the image acquisition device can quantitatively convert exposure parameters such as exposure gain, shutter speed, ISO and aperture size based on the aperture difference and sensor difference between the first and second fixed-focus lenses, so that the amount of light entering the first and second fixed-focus lenses is the same, or the difference between the amount of light entering the first and second fixed-focus lenses is within a preset light entry threshold.
[0093] For example, if the aperture of the first prime lens is larger and the aperture of the second prime lens is smaller, when performing quantitative conversion, the aperture size in the exposure parameters is adjusted to the aperture of the second prime lens, and the shutter speed in the exposure parameters is increased to make the amount of light entering the first prime lens and the amount of light entering the second prime lens the same.
[0094] This allows the second fixed-focus lens to expose with the same amount of light as the first fixed-focus lens, reducing abrupt changes in brightness between the images captured by the first and second fixed-focus lenses, and making the process of switching from the image captured by the first fixed-focus lens to the image captured by the second fixed-focus lens smoother.
[0095] During exposure in step S204, the second fixed-focus lens is controlled to expose an image based on the configured exposure parameters for its field of view.
[0096] This allows the second fixed-focus lens to capture the first image according to the configured exposure parameters when it is activated. By configuring the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens, the exposure of the second fixed-focus lens is controlled. This reduces sudden changes in brightness caused by differences in the field of view of the lenses, reduces sudden changes in brightness between captured images, and improves the smoothness of the images captured by the two fixed-focus lenses during zooming.
[0097] In another embodiment of this application, if it is determined in step S201 that the adjusted first zoom ratio is not within the range of the first zoom ratio, then the first fixed-focus lens is controlled to switch to a sleep state. This ensures that only one fixed-focus lens in the image acquisition device is active, while the other fixed-focus lenses remain in a sleep state, thus reducing the power consumption of the image acquisition device.
[0098] In one embodiment of this application, the first zoom magnification is obtained by changing a preset magnification adjustment precision based on the original zoom magnification. The magnification adjustment precision can be adjusted as needed; for example, it can be 0.01×, 0.05×, 0.1×, 0.2×, and 0.5×, etc.
[0099] Each time the image acquisition device changes the preset magnification adjustment precision, it can zoom in a manner similar to steps S201-S204. The only difference is that the zoom magnification after changing the preset magnification adjustment precision is different from the name of the first zoom magnification.
[0100] For example, if the zoom ratio after each change in the preset magnification adjustment precision is called the second zoom ratio, see [reference needed]. Figure 3a A flowchart illustrating another zoom method is provided, which includes the following steps S301-S306. Steps S301-S306 enable zooming in a manner similar to steps S201-S204.
[0101] Step S301: Adjust the value of the second zoom magnification towards the value of the first zoom magnification by a preset magnification adjustment precision to obtain the adjusted second zoom magnification.
[0102] The initial value of the second zoom ratio is: the zoom ratio before adjustment.
[0103] Step S302: Determine whether the adjusted second zoom ratio is within the range of the first zoom ratio.
[0104] If the determination is yes, that is, the adjusted second zoom ratio is within the first zoom ratio range, then step S303 is executed.
[0105] If the determination is negative, meaning the adjusted second zoom ratio is not within the range of the first zoom ratio, then proceed to step S304.
[0106] Step S303: Based on the pre-set correspondence between zoom ratio and exposure area, determine the first exposure area corresponding to the second zoom ratio, and control the first fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the second zoom ratio.
[0107] Step S306 is executed after step S303.
[0108] Step S304: Activate the second fixed-focus lens corresponding to the second zoom range where the second zoom magnification is located.
[0109] Step S305: Control the second fixed-focus lens to expose for its field of view to obtain an image.
[0110] Steps S302-S305 are similar to steps S201-S204, the difference being that the names of the first zoom ratio and the second zoom ratio are different, which will not be described in detail here.
[0111] Step S306: Determine whether the second zoom ratio is equal to the first zoom ratio.
[0112] If the determination is negative, meaning the second zoom ratio is not equal to the first zoom ratio, then the second zoom ratio needs to be adjusted again, and the process returns to step S301. If the determination is positive, meaning the second zoom ratio is equal to the first zoom ratio, then the image acquisition device completes the zoom process of adjusting the zoom ratio from the original zoom ratio to the first zoom ratio, and the zoom process ends.
[0113] The following is combined Figure 3b The flowchart of another zoom method is provided to illustrate the above steps S301-S306.
[0114] Assume the image acquisition device is set to a magnification adjustment precision of 0.1×, the first zoom magnification is 3.1×, the original zoom magnification is 2.8×, the zoom magnification range of fixed-focus lens A is 1×-2.9×, the zoom magnification range of fixed-focus lens B is 3×-4.9×, the lens currently in operation is fixed-focus lens A, the first zoom magnification range is 1×-2.9×, and the initial value of the second zoom magnification is: the original zoom magnification is 2.8×.
[0115] Step S3011: Adjust the second zoom magnification value of 2.8× towards the first zoom magnification value of 3.1× with a preset magnification adjustment precision of 0.1×, to obtain the adjusted second zoom magnification of 2.9×.
[0116] Step S3021: Determine whether the adjusted second zoom ratio of 2.9× is within the zoom ratio range of 1×-2.9× of the fixed-focus lens A.
[0117] Among them, fixed-focus lens A is the lens in working state among the fixed-focus lenses integrated in the image acquisition device. Then, the first zoom range corresponding to the first fixed-focus lens is: the zoom range of fixed-focus lens A is 1×-2.9×.
[0118] After step S3011, the obtained second zoom ratio is 2.9×, which is still within the zoom ratio range of 1×-2.9× of the fixed-focus lens A. Therefore, the judgment result of step S3021 is yes. Then, proceed to the following step S3031.
[0119] Step S3031: Based on the pre-set correspondence between zoom ratio and exposure area, determine the first exposure area corresponding to the second zoom ratio 2.9×, and control the fixed-focus lens A to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the second zoom ratio 2.9×.
[0120] After obtaining the zoomed image corresponding to the second zoom ratio of 2.9× in step S3031, the following step S3061 is executed.
[0121] Step S3061: Determine whether the second zoom ratio 2.9× is equal to the first zoom ratio 3.1×.
[0122] At this point, the second zoom ratio of 2.9× is not equal to the first zoom ratio of 3.1×. The result of step S3061 is negative, and the second zoom ratio needs to be adjusted again, which means performing the following step S3012.
[0123] Step S3012: Adjust the second zoom magnification value of 2.9× towards the first zoom magnification value of 3.1× with a preset magnification adjustment precision of 0.1× to obtain the adjusted second zoom magnification of 3.0×.
[0124] At this time, the first fixed-focus lens in the fixed-focus lens integrated into the image acquisition device that is in working condition is still fixed-focus lens A. In the following step S3022, the zoom range of fixed-focus lens A, 1×-2.9×, is still used as the first zoom range corresponding to the first fixed-focus lens.
[0125] Step S3022: Determine whether the adjusted second zoom ratio of 3.0× is within the zoom ratio range of 1×-2.9× of the fixed-focus lens A.
[0126] If the adjusted second zoom ratio of 3.0× is not within the zoom ratio range of 1×-2.9× of the fixed focal length lens A, and the result of step S3022 is negative, then the following step S3042 is executed.
[0127] Step S3042: Activate the second fixed-focus lens (fixed-focus lens B) corresponding to the second zoom magnification range where the second zoom magnification is 3.0×.
[0128] Among them, the zoom range of fixed-focus lens B in the fixed-focus lens integrated in the image acquisition device is 3×-4.9×. Therefore, the second zoom range where the second zoom ratio 3.0× is located is 3×-4.9×. The second fixed-focus lens that is activated in step S3042 is fixed-focus lens B.
[0129] Step S3052: Control the second fixed-focus lens (fixed-focus lens B) to expose for its field of view to obtain an image.
[0130] After obtaining the zoomed image corresponding to the second zoom ratio of 3.0× in step S3052, the following step S3062 is executed.
[0131] Step S3062: Determine whether the second zoom ratio 3.0× is equal to the first zoom ratio 3.1×.
[0132] At this point, the second zoom ratio of 3.0× is not equal to the first zoom ratio of 3.1×. The result of step S3062 is negative, and the second zoom ratio needs to be adjusted again, which means performing the following step S3013.
[0133] Step S3013: Adjust the second zoom magnification value 3.0× towards the first zoom magnification value 3.1× with a preset magnification adjustment precision of 0.1× to obtain the adjusted second zoom magnification 3.1×.
[0134] At this point, the first fixed-focus lens in the image acquisition device that is in working condition is no longer fixed-focus lens A, but fixed-focus lens B. In step S3023, the zoom range of fixed-focus lens B, 3×-4.9×, is taken as the first zoom range corresponding to the first fixed-focus lens.
[0135] Step S3023: Determine whether the adjusted second zoom ratio of 3.1× is within the zoom ratio range of 3×-4.9× of the fixed-focus lens B.
[0136] The adjusted second zoom ratio of 3.1× is within the zoom ratio range of 3×-4.9× of the fixed-focus lens B. The result of step S3023 is yes, and the following step S3033 is executed.
[0137] Step S3033: Based on the pre-set correspondence between zoom ratio and exposure area, determine the first exposure area corresponding to the second zoom ratio 3.1×, and control the fixed-focus lens B to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the second zoom ratio 3.1×.
[0138] After obtaining the zoomed image corresponding to the second zoom ratio of 3.1× in step S3033, the following step S3063 is executed.
[0139] Step S3063: Determine whether the second zoom ratio 3.1× is equal to the first zoom ratio 3.1×.
[0140] At this point, the second zoom ratio of 3.1× is equal to the first zoom ratio of 3.1×. The result of step S3063 is yes, and the image acquisition device completes the zoom process of adjusting the zoom ratio of 2.8× to the first zoom ratio of 3.1×, and ends the zoom process.
[0141] As can be seen from the above, by changing the image acquisition device each time, the zoomed images corresponding to each zoom level from the initial zoom level to the first zoom level can be displayed sequentially, making the zoom process smoother.
[0142] In one embodiment of this application, when the image acquisition device is started, the zoomed image can be obtained in the following manner.
[0143] In response to the start of the image acquisition device, a fourth zoom ratio is obtained; the fixed-focus lens corresponding to the fourth zoom ratio range is activated. Based on a pre-set correspondence between zoom ratios and exposure areas, the third exposure area corresponding to the fourth zoom ratio is determined. The fixed-focus lens corresponding to the fourth zoom ratio range is then controlled to expose the third exposure area within its field of view, resulting in the zoomed image corresponding to the fourth zoom ratio. The fourth zoom ratio can be a preset default ratio or the zoom ratio last used when the image acquisition device was shut down.
[0144] Corresponding to the above-described zoom method, this application also provides a zoom device.
[0145] In one embodiment of this application, see [link to embodiment]. Figure 4 A schematic diagram of a zoom device is provided, the device comprising:
[0146] The exposure area determination module 401 is used to determine the first exposure area corresponding to the first zoom ratio if the adjusted first zoom ratio is within the range of the first zoom ratio corresponding to the first fixed-focus lens, based on the pre-set correspondence between the zoom ratio and the exposure area, wherein the first fixed-focus lens is: the lens in the working state among the fixed-focus lenses integrated in the image acquisition device.
[0147] The first exposure module 402 is used to control the first fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0148] As can be seen from the above, in the zoom method provided in this application embodiment, the first exposure area under the first zoom ratio can be determined according to the pre-set correspondence between the zoom ratio and the exposure area. Then, the exposure area is exposed to obtain the zoomed image corresponding to the first zoom ratio. In this way, the zoom function can be realized based on the fixed-focus lens. Furthermore, by controlling the first fixed-focus lens to expose the first exposure area in its field of view, the influence of other areas besides the first exposure area on the exposure can be reduced, thereby improving the exposure accuracy and the brightness accuracy of the zoomed image.
[0149] In one embodiment of this application, the image acquisition device integrates multiple fixed-focus lenses, and the device further includes: a lens wake-up module, used to wake up the second fixed-focus lens corresponding to the second zoom range where the first zoom range is located if the adjusted first zoom ratio is not within the range of the first zoom ratio; and a second exposure module, used to control the second fixed-focus lens to expose for its field of view to obtain an image.
[0150] This allows for switching between multiple prime lenses, enabling the use of different prime lenses to achieve zoom functionality within different zoom magnification ranges. This reduces the problem of blurry images caused by excessive magnification of certain areas of the same prime lens due to excessive zoom magnification, further improving the clarity of the image after zooming.
[0151] In one embodiment of this application, the apparatus further includes: an exposure parameter configuration module, configured to configure the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens; and a second exposure module, specifically configured to control the second fixed-focus lens to expose its field of view based on the configured exposure parameters to obtain an image.
[0152] This allows the second fixed-focus lens to capture the first image according to the configured exposure parameters when it is activated. By configuring the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens, the exposure of the second fixed-focus lens is controlled. This reduces sudden changes in brightness caused by differences in the field of view of the lenses, reduces sudden changes in brightness between captured images, and improves the smoothness of the images captured by the two fixed-focus lenses during zooming.
[0153] In one embodiment of this application, the exposure parameter configuration module is specifically used to determine the exposure parameters of the second fixed-focus lens based on the hardware performance difference between the first fixed-focus lens and the second fixed-focus lens and the exposure parameters of the first fixed-focus lens; and to configure the determined exposure parameters for the second fixed-focus lens.
[0154] This allows the second fixed-focus lens to expose with the same amount of light as the first fixed-focus lens, reducing abrupt changes in brightness between the images captured by the first and second fixed-focus lenses, and making the process of switching from the image captured by the first fixed-focus lens to the image captured by the second fixed-focus lens smoother.
[0155] In one embodiment of this application, the second exposure module is specifically used to determine the first exposure area corresponding to the first zoom ratio according to a pre-set correspondence between zoom ratio and exposure area; and control the second fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio.
[0156] This allows for improved image sharpness after zooming while reducing the impact of areas other than the first exposure zone on exposure, thus improving the accuracy of brightness in the zoomed image.
[0157] In one embodiment of this application, a lens sleep module is used to control the first fixed-focus lens to switch to sleep mode if the adjusted first zoom ratio is not within the range of the first zoom ratio.
[0158] This way, only one fixed-focus lens in the integrated fixed-focus lens of the image acquisition device can be in working state as much as possible, while the other fixed-focus lenses are in a dormant state, reducing the power consumption of the image acquisition device.
[0159] In one embodiment of this application, the first zoom ratio is obtained by changing a preset zoom ratio adjustment precision based on the zoom ratio before adjustment.
[0160] As can be seen from the above, by changing the image acquisition device each time, the zoomed images corresponding to each zoom level from the initial zoom level to the first zoom level can be displayed sequentially, making the zoom process smoother.
[0161] This application also provides an electronic device, such as... Figure 5 As shown, it includes:
[0162] Memory 501 is used to store computer programs;
[0163] The processor 502, when executing the program stored in the memory 501, implements the steps of any of the above zoom methods.
[0164] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0165] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0166] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0167] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0168] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described zoom methods.
[0169] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the zoom methods described above.
[0170] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.
[0171] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0172] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, storage media, and computer program products are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0173] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A zoom method, characterized in that, The method includes: If the adjusted first zoom ratio is within the range of the first zoom ratio corresponding to the first fixed-focus lens, then the first exposure area corresponding to the first zoom ratio is determined according to the pre-set correspondence between the zoom ratio and the exposure area, wherein the first fixed-focus lens is: the lens in working state among the fixed-focus lenses integrated in the image acquisition device. The first fixed-focus lens is controlled to expose the first exposure area within its field of view to obtain the zoomed image corresponding to the first zoom ratio.
2. The method according to claim 1, characterized in that, The image acquisition device integrates multiple fixed-focus lenses, and the method further includes: If the adjusted first zoom ratio is not within the range of the first zoom ratio, then the second fixed-focus lens corresponding to the second zoom ratio range where the first zoom ratio is located is activated. The second fixed-focus lens is controlled to expose for its field of view to obtain an image.
3. The method according to claim 2, characterized in that, Before controlling the second fixed-focus lens to expose for its field of view to obtain an image, the method further includes: Based on the exposure parameters of the first fixed-focus lens, configure the exposure parameters of the second fixed-focus lens; The control of the second fixed-focus lens to expose for its field of view to obtain an image includes: The second fixed-focus lens is controlled to expose an image based on the configured exposure parameters for its field of view.
4. The method according to claim 3, characterized in that, The step of configuring the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens includes: Based on the hardware performance differences between the first fixed-focus lens and the second fixed-focus lens and the exposure parameters of the first fixed-focus lens, the exposure parameters of the second fixed-focus lens are determined. The exposure parameters determined for the configuration of the second fixed-focus lens.
5. The method according to claim 2, characterized in that, The control of the second fixed-focus lens to expose for its field of view to obtain an image includes: Based on the pre-set correspondence between zoom ratio and exposure area, the first exposure area corresponding to the first zoom ratio is determined; The second fixed-focus lens is controlled to expose the first exposure area within its field of view to obtain the zoomed image corresponding to the first zoom ratio.
6. The method according to any one of claims 2-5, characterized in that, The method further includes: If the adjusted first zoom ratio is not within the range of the first zoom ratio, then control the first fixed-focus lens to switch to sleep mode.
7. The method according to any one of claims 1-5, characterized in that, The first zoom ratio is obtained by changing the preset zoom ratio adjustment precision based on the original zoom ratio.
8. A zoom device, characterized in that, The device includes: The exposure area determination module is used to determine the first exposure area corresponding to the first zoom ratio if the adjusted first zoom ratio is within the range of the first zoom ratio corresponding to the first fixed-focus lens, based on the pre-set correspondence between the zoom ratio and the exposure area, wherein the first fixed-focus lens is: the lens in the working state among the fixed-focus lenses integrated in the image acquisition device. The first exposure module is used to control the first fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio.
9. The apparatus according to claim 8, characterized in that, The image acquisition device integrates multiple fixed-focus lenses, and the device further includes: a lens wake-up module, used to wake up the second fixed-focus lens corresponding to the second zoom range where the first zoom ratio is located if the adjusted first zoom ratio is not within the range of the first zoom ratio; and a second exposure module, used to control the second fixed-focus lens to expose for its field of view to obtain an image. and / or The device further includes: an exposure parameter configuration module, used to configure the exposure parameters of the second fixed-focus lens based on the exposure parameters of the first fixed-focus lens; and a second exposure module, specifically used to control the second fixed-focus lens to expose its field of view based on the configured exposure parameters to obtain an image. and / or The exposure parameter configuration module is specifically used to determine the exposure parameters of the second fixed-focus lens based on the hardware performance differences between the first fixed-focus lens and the second fixed-focus lens and the exposure parameters of the first fixed-focus lens; and to configure the determined exposure parameters for the second fixed-focus lens. and / or The second exposure module is specifically used to determine the first exposure area corresponding to the first zoom ratio based on the pre-set correspondence between the zoom ratio and the exposure area; and to control the second fixed-focus lens to expose the first exposure area in its field of view to obtain the zoomed image corresponding to the first zoom ratio. and / or The lens sleep module is used to control the first fixed-focus lens to switch to sleep mode if the adjusted first zoom ratio is not within the range of the first zoom ratio. and / or The first zoom ratio is obtained by changing the preset zoom ratio adjustment precision based on the original zoom ratio.
10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.