Zoom control method and control system
By configuring the focal length mapping relationship and dynamic light adjustment between cameras, the shortcomings of focal length adjustment and image alignment under light conditions in traditional zoom control methods are solved, and high-precision zoom control is achieved, meeting the user's demand for flexibility and accuracy .
Patent Information
- Application Number
- CN202411066335.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional zoom control methods are difficult to flexibly adjust the focal length under different light conditions, and are difficult to achieve high-precision image alignment and transformation, which cannot meet the user's high requirements for the flexibility, accuracy and efficiency of the zoom function.
By configuring the focal length mapping relationship between the first camera and the second camera, and combining dynamic adjustment of ambient light intensity, in response to the focal length adjustment command, the transformation parameters between images are calculated, so that high-precision alignment of the image and precise control of the zoom magnification are achieved.
The image clarity and field of view adjustment under different light conditions are achieved, ensuring that users obtain zoom magnification images that match expectations, and improving the flexibility and accuracy of photography and imaging.
Smart Images

Figure CN119012013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of zoom control, and in particular to a zoom control method and a control system. Background Art
[0002] In modern photography and imaging technology, zoom control is one of the key technologies to achieve image clarity and field of view adjustment. With the popularity of smartphones, digital cameras and professional photography equipment, users have put forward higher requirements for the flexibility, accuracy and efficiency of zoom functions. Traditional zoom control methods often rely on a single camera or a fixed focal length mapping relationship, which makes it difficult to flexibly adjust the focal length under different lighting conditions, and it is difficult to achieve high-precision image alignment and transformation.
[0003] Therefore, it is necessary to provide a zoom control method and a control system to solve the above technical problems. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a zoom control method and control system, which realizes precise control of the zoom ratio and high-precision alignment of the image by configuring the focal length mapping relationship between the first camera and the second camera and combining the dynamic adjustment of the ambient light intensity, and can present the user with an image that matches the desired zoom ratio.
[0005] The present invention provides a zoom control method, comprising a first camera and a second camera, and a focal length mapping relationship configured between the first camera and the second camera, the control method comprising the following steps:
[0006] S1: responding to a focus adjustment instruction, and dynamically adjusting the focus mapping relationship based on a current light intensity level, wherein the focus mapping relationship is used to represent the adjustment of the zoom ratio of the second camera to the target zoom ratio;
[0007] S2: Controlling the first camera to switch to the second camera, and adjusting the zoom ratio of the second camera to the current target zoom ratio based on the adjusted focal length mapping relationship;
[0008] S3: Calculating transformation parameters between a first image acquired by the first camera and a second image acquired by the second camera, wherein the transformation parameters include an offset and a deflection angle;
[0009] S4: aligning the second image with the first image based on the transformation parameter, wherein the first image and the second image are images of the same distance and the same object;
[0010] S5: Cropping the second image based on the center of the aligned second image, wherein the current target zoom ratio is used to make the zoom ratio of the cropped second image consistent with the zoom ratio of the second camera required in the focal length adjustment instruction.
[0011] Preferably, step S1 comprises the following steps:
[0012] S101: upon receiving the focus adjustment instruction, obtaining a current light intensity value through a light sensor;
[0013] S102: matching the current light intensity value according to a preset light intensity mapping table to obtain a current light intensity level;
[0014] S103: Dynamically adjust the focal length mapping relationship according to the current light intensity level.
[0015] Preferably, in step S103, the mathematical formula for dynamic adjustment of the focal length mapping relationship is:
[0016] Z=Z t +α(LL ref )
[0017] Among them, Z is the current target zoom ratio, Z t is the target zoom ratio, L is the current light intensity value, L ref is the light intensity reference value, and α is the adjustment factor that changes according to the current light intensity level.
[0018] Preferably, step S2 comprises:
[0019] Stop the first camera, start the second camera and trigger the autofocus function of the second camera. After the autofocus function is triggered, adjust the zoom ratio of the second camera to the current target zoom ratio according to the mathematical formula of the dynamically adjusted focal length mapping relationship.
[0020] Preferably, step S3 comprises the following steps:
[0021] S301: performing coordinate matching based on reference points selected from the first image and the second image to obtain coordinates of the reference points;
[0022] S302: Calculating the offset of the center positions of the first image and the second image based on the reference point coordinates to obtain the offset;
[0023] S303: Calculate the angle difference between the reference point coordinates of the first image and the second image based on the reference point coordinates to obtain a deflection angle.
[0024] Preferably, step S4 comprises the following steps:
[0025] S401: adjusting the position of the second image by using the offset to obtain a position-aligned second image;
[0026] S402: Performing rotation correction on the position-aligned second image by using a deflection angle to obtain a rotationally aligned second image.
[0027] Preferably, step S5 comprises the following steps:
[0028] S501: Calculate the distance between each edge of the second image acquired by the second camera and the corresponding edge of the first image acquired by the first camera, and take the edge of the first image corresponding to the shortest distance as the target edge;
[0029] S502: Taking the center of the aligned second image as a cropping center, cropping the second image according to an original ratio of the second image to generate a third image, wherein one side of the third image coincides with the target side.
[0030] The present invention also provides a zoom control system for executing the zoom control method, comprising a first camera and a second camera, and a focal length mapping relationship configured between the first camera and the second camera, wherein the control system comprises:
[0031] a light intensity sensing module, used to respond to a focus adjustment instruction and dynamically adjust the focus mapping relationship based on a current light intensity level, wherein the focus mapping relationship is used to represent the adjustment of the zoom ratio of the second camera to the target zoom ratio;
[0032] A zoom control module, used for controlling the first camera to switch to the second camera, and adjusting the zoom ratio of the second camera to the current target zoom ratio based on the adjusted focal length mapping relationship;
[0033] a transformation parameter calculation module, used to calculate transformation parameters between a first image acquired by the first camera and a second image acquired by the second camera, wherein the transformation parameters include an offset and a deflection angle;
[0034] an image alignment module, configured to align the second image with the first image based on the transformation parameter, wherein the first image and the second image are images of the same distance and the same object;
[0035] An image cropping module is used to crop the second image based on the center of the aligned second image, wherein the current target zoom ratio is used to make the zoom ratio of the cropped second image consistent with the zoom ratio of the second camera required in the focus adjustment instruction.
[0036] Compared with the related art, the zoom control method and control system provided by the present invention have the following advantages:
[0037] Beneficial effects:
[0038] The present invention responds to a focal length adjustment instruction and dynamically adjusts a focal length mapping relationship based on a current light intensity level; controls a first camera to switch to a second camera, and adjusts the zoom ratio of the second camera to a current target zoom ratio based on the adjusted focal length mapping relationship; calculates transformation parameters between a first image acquired by the first camera and a second image acquired by the second camera; aligns the second image with the first image based on the transformation parameters; and crops the second image based on the center of the aligned second image. The present invention can present an image that matches a user's desired zoom ratio by configuring a focal length mapping relationship between the first camera and the second camera and combining it with dynamic adjustment of ambient light intensity. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flowchart of a zoom control method provided by the present invention;
[0040] Figure 2 A module structure diagram of a zoom control system provided by the present invention. DETAILED DESCRIPTION
[0041] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.
[0042] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0043] Embodiment 1
[0044] The present invention provides a zoom control method, comprising a first camera and a second camera, and a focal length mapping relationship configured between the first camera and the second camera, referring to Figure 1 As shown, the control method comprises the following steps:
[0045] S1: Responding to a focus adjustment instruction, and dynamically adjusting the focus mapping relationship based on a current light intensity level, wherein the focus mapping relationship is used to represent the adjustment of the zoom ratio of the second camera to a target zoom ratio.
[0046] In this embodiment, an instruction is received to change the zoom ratio of the second camera, and the instruction may come from user interaction (such as rotating a zoom ring) or program control (such as automatic zoom in a preset scene mode).
[0047] At the same time, the light intensity of the current environment is measured and classified into a certain "light intensity level". The focal length mapping relationship refers to the correspondence between the zoom ratio and the actual focal length. Dynamic adjustment means automatically adjusting the focal length mapping relationship according to the different light intensity to achieve the best imaging effect.
[0048] For example, in a low-light environment, the system may choose to use a longer focal length to capture more light, thereby improving image quality.
[0049] S2: Control the first camera to switch to the second camera, and adjust the zoom ratio of the second camera to the current target zoom ratio based on the adjusted focal length mapping relationship.
[0050] In this embodiment, specifically, the first camera is stopped, the second camera is started, and the autofocus function of the second camera is triggered. After the autofocus function is triggered, the zoom ratio of the second camera is adjusted to the current target zoom ratio according to the mathematical formula of the dynamically adjusted focal length mapping relationship.
[0051] More specifically:
[0052] First, close the first camera:
[0053] Close the first camera to stop its image capture function.
[0054] Make sure the first camera is no longer capturing images to allow camera switching.
[0055] Next, prepare the second camera:
[0056] Prepare the second camera, including but not limited to initialization, preheating and other steps.
[0057] Make sure the second camera is ready for image capture.
[0058] Next, enable the second camera:
[0059] Enable the second camera and start its image capture function.
[0060] Make sure the second camera is active and can capture images.
[0061] Next, auto focus:
[0062] Trigger the second camera's autofocus function to ensure fast and accurate focus at the new zoom ratio.
[0063] Autofocus ensures image clarity.
[0064] Finally, adjust the zoom ratio according to the adjusted focal length mapping relationship:
[0065] According to the focal length mapping relationship dynamically adjusted in step S1, the current target zoom ratio of the second camera is calculated, and the zoom ratio of the second camera is adjusted to the calculated current target zoom ratio to ensure that the zoom ratio of the second camera matches the target zoom ratio requested by the user.
[0066] S3: Calculate transformation parameters between a first image acquired by the first camera and a second image acquired by the second camera, wherein the transformation parameters include an offset and a deflection angle.
[0067] In this embodiment, first, the first image and the second image are acquired:
[0068] A first image is acquired from a first camera.
[0069] A second image is acquired from the second camera.
[0070] Make sure that the first and second images were taken at the same distance and of the same target.
[0071] Next, choose a reference point:
[0072] Select a fixed point in the image (such as the upper left corner) as the reference point.
[0073] Find corresponding reference points in both images and record their coordinates.
[0074] Next, calculate the center position offset:
[0075] Calculate the offset between the center positions of the first and second images.
[0076] Determine the offset to facilitate subsequent image alignment.
[0077] Next, calculate the reference point coordinates:
[0078] Find corresponding reference points in both images and record their coordinates.
[0079] Make sure the two reference points are the same point on the same target.
[0080] Finally, calculate the deflection angle:
[0081] Use trigonometric functions such as arctan2 to calculate the angular difference between the coordinates of two reference points.
[0082] This angular difference is the deflection angle between the two images.
[0083] By calculating the transformation parameters (including offset and deflection angle) between the first image and the second image, the position and rotation differences between the two images can be accurately identified, providing the necessary parameters for subsequent image alignment and ensuring the accuracy of image alignment.
[0084] S4: Aligning the second image with the first image based on the transformation parameters, wherein the first image and the second image are images of the same distance and the same target.
[0085] In this embodiment, first, the position of the second image is adjusted by the offset:
[0086] The position of the second image is adjusted according to the offset calculated in step S3.
[0087] By the translation operation, it is ensured that the center position of the second image is aligned with the center position of the first image.
[0088] A second image with aligned position is obtained.
[0089] Secondly, the aligned second image is rotated and corrected by the deflection angle:
[0090] The position-aligned second image is rotated according to the deflection angle calculated in step S3.
[0091] Through the rotation operation, the rotation deviation of the second image relative to the first image is eliminated.
[0092] A rotationally aligned second image is obtained.
[0093] By aligning the second image with the first image based on the calculated transformation parameters (including the offset and the deflection angle), visual consistency of the two images is ensured.
[0094] The aligned image is provided for the subsequent image cropping, thereby improving the accuracy of image cropping.
[0095] S5: Cropping the second image based on the center of the aligned second image, wherein the current target zoom ratio is used to make the zoom ratio of the cropped second image consistent with the zoom ratio of the second camera required in the focal length adjustment instruction.
[0096] In this embodiment, the distance between each edge of the second image acquired by the second camera and the corresponding edge of the first image acquired by the first camera is calculated respectively:
[0097] First, determine the corresponding edges in the second image and the first image. For each pair of corresponding edges, calculate the shortest distance between them, record the distance value of each pair of edges, take the edge of the first image corresponding to the shortest distance as the target edge, find the minimum value from all recorded distance values, and mark the edge of the first image corresponding to this minimum value as the target edge.
[0098] By calculating the shortest distance, the relative position of the second image with respect to the first image can be determined. Finding the target edge corresponding to the shortest distance helps ensure that the cropped image has the best match with the first image.
[0099] Specifically, step S1 includes the following steps:
[0100] S101: upon receiving the focus adjustment instruction, obtaining a current light intensity value through a light sensor.
[0101] In this embodiment, this step is specifically divided into the following steps:
[0102] First, a focus adjustment instruction is received: the user inputs a focus adjustment instruction through a user interface (UI) of a terminal device, indicating that the current zoom ratio of the first camera is adjusted to the target zoom ratio of the second camera.
[0103] Light intensity detection: Use the built-in light sensor of the terminal device to monitor the ambient light intensity in real time and obtain the current light intensity value, which reflects the light intensity of the current environment.
[0104] By monitoring the ambient light intensity in real time, it can respond to changes in ambient light in a timely manner, provide accurate data support for subsequent dynamic adjustments, and ensure the best shooting effect under different lighting conditions.
[0105] S102: Match the current light intensity value according to a preset light intensity mapping table to obtain a current light intensity level.
[0106] In this embodiment, a preset light intensity mapping table is created, which defines the corresponding relationship between different light intensity values and light intensity levels.
[0107] For example, the mapping table may be as follows:
[0108] 0~10lux: extremely dark.
[0109] 10~50lux: dark.
[0110] 50~200lux: medium.
[0111] 200~500lux: bright.
[0112] 500lux: extremely bright.
[0113] Then, according to the current light intensity value obtained in step S101, the preset light intensity mapping table is searched to determine the level to which the current light intensity belongs, that is, the current light intensity level. For example, if the current light intensity value is 120lux, the current light intensity level is "medium". Through the preset light intensity mapping table, continuous light intensity values can be converted into discrete light intensity levels, which is convenient for subsequent dynamic adjustment.
[0114] S103: Dynamically adjust the focal length mapping relationship according to the current light intensity level.
[0115] In this embodiment, the known focal length mapping relationship is dynamically adjusted according to the detected current light intensity level.
[0116] Ultra Dark: Select the lowest zoom ratio to increase the viewing angle and capture more light.
[0117] Dark: Select a lower zoom ratio to balance brightness and field of view.
[0118] Medium: The target zoom ratio is adjusted according to the user's request.
[0119] Bright: Adjusts based on the target zoom ratio requested by the user, but consider increasing the zoom ratio slightly to reduce the angle of view and improve detail clarity.
[0120] Ultra Bright: Select a higher zoom ratio to further reduce the angle of view and enhance details.
[0121] According to the above light intensity level, the focal length mapping relationship is adjusted to adapt to the zoom ratio under the current light conditions, and then the current target zoom ratio is calculated based on the adjusted focal length mapping relationship. This current target zoom ratio should be as close as possible to the target zoom ratio requested by the user, while taking into account the current light conditions.
[0122] By dynamically adjusting the focal length mapping relationship according to the current light intensity level, it can better adapt to different shooting environments and improve image quality. At the same time, it ensures that users can obtain the best shooting effect under different lighting conditions, especially in insufficient or excessive light conditions.
[0123] Specifically, in step S103, the mathematical formula for dynamic adjustment of the focal length mapping relationship is:
[0124] Z=Zt +α(LL ref )
[0125] Among them, Z is the current target zoom ratio, Z t is the target zoom ratio, L is the current light intensity value, L ref is the light intensity reference value, and α is the adjustment factor that changes according to the current light intensity level.
[0126] Specifically, step S3 includes the following steps:
[0127] S301: performing coordinate matching based on reference points selected from the first image and the second image to obtain coordinates of the reference points.
[0128] In this embodiment, the steps are specifically as follows:
[0129] First, a reference point is selected: a common fixed point in the first image and the second image is selected as a reference point. For example, the upper left corner may be selected as the reference point.
[0130] Find corresponding reference points in both images and record their coordinates.
[0131] Secondly, record the coordinates of the reference point: find the reference point in the first image and record its coordinates, find the reference point in the second image and record its coordinates.
[0132] By selecting the same fixed point in the first image and the second image as the reference point and recording its coordinates, basic data is provided for the subsequent calculation of the offset and deflection angle, ensuring the consistency of the reference point selection and facilitating the subsequent image alignment.
[0133] S302: Calculate the offset of the center positions of the first image and the second image based on the reference point coordinates to obtain the offset.
[0134] In this embodiment, the steps are specifically as follows:
[0135] First, calculate the center position: calculate the center position coordinates of the first image, and calculate the center position coordinates of the second image.
[0136] Secondly, calculate the offset: calculate the offset between the two center position coordinates and determine the offset for subsequent image alignment.
[0137] By calculating the offset between the center positions of the two images, the horizontal and vertical offsets between the images can be determined, providing basic data for position adjustment for subsequent image alignment.
[0138] S303: Calculate the angle difference between the reference point coordinates of the first image and the second image based on the reference point coordinates to obtain a deflection angle.
[0139] In this embodiment, the steps are specifically as follows:
[0140] First, calculate the coordinates of the reference point: find the reference point in the first image and record its coordinates, find the reference point in the second image and record its coordinates.
[0141] Secondly, calculate the deflection angle: use trigonometric functions (such as arctan2) to calculate the angular difference between the coordinates of the two reference points. This angular difference is the deflection angle between the two images.
[0142] Specifically, step S4 includes the following steps:
[0143] S401: adjusting the position of the second image by using the offset to obtain a position-aligned second image.
[0144] In this embodiment, specifically:
[0145] First, calculate the offset:
[0146] According to the offset calculated in step S302, the horizontal and vertical offsets of the second image relative to the first image are determined.
[0147] Second, position adjustment:
[0148] The second image is translated according to the calculated offset.
[0149] Make sure the center of the second image is aligned with the center of the first image.
[0150] A second image with aligned position is obtained.
[0151] By means of the translation operation, the horizontal and vertical offsets between the two images can be eliminated so that the two images are aligned in the horizontal and vertical directions.
[0152] S402: Performing rotation correction on the position-aligned second image by using a deflection angle to obtain a rotationally aligned second image.
[0153] In this embodiment, specifically:
[0154] First, according to the deflection angle calculated in step S303, the rotation deviation of the second image relative to the first image is determined.
[0155] Second, rotation correction:
[0156] The aligned second image is rotated according to the calculated deflection angle.
[0157] The second image is rotated using a rotation matrix or a rotation transformation function.
[0158] The direction of rotation should be opposite to the calculated angle to eliminate the deflection error.
[0159] A rotationally aligned second image is obtained.
[0160] By rotating the two images, the rotation deviation between them can be eliminated, so that the two images are aligned in the rotation direction.
[0161] Specifically, step S5 includes the following steps:
[0162] S501: Calculate the distance between each edge of the second image acquired by the second camera and the corresponding edge of the first image acquired by the first camera, and take the edge of the first image corresponding to the shortest distance as the target edge.
[0163] In this embodiment, specifically:
[0164] First, calculate the distances of the corresponding edges:
[0165] The four boundary edges of the second image and the four boundary edges of the first image are determined.
[0166] For each boundary edge of the second image, the shortest distance between the boundary edge and the corresponding boundary edge of the first image is calculated.
[0167] This can be calculated using the distance formula from a point to a line segment or by finding the shortest path between two edges.
[0168] Next, determine the target edge:
[0169] Find the minimum value among all calculated distances, and mark the edge of the first image corresponding to the minimum distance as the target edge.
[0170] By calculating the margin, the closest portion between the second image and the first image can be clearly known.
[0171] S502: Taking the center of the aligned second image as a cropping center, cropping the second image according to an original ratio of the second image to generate a third image, wherein one side of the third image coincides with the target side.
[0172] In this embodiment, the center of the second image is used as the cropping center, the original aspect ratio of the second image is kept unchanged, and the center of the cropping frame is ensured to be located at the center of the second image during cropping. One side of the cropping frame needs to coincide with the target side to ensure that the third image generated after cropping can match the corresponding part of the first image well.
[0173] By taking the center of the second image as the cropping center and maintaining the original ratio, it can be ensured that the cropped image has good visual consistency with the first image. One side of the third image coincides with the target side, which can further improve the alignment accuracy of the two images during fusion.
[0174] The working principle of a zoom control method provided by the present invention is as follows:
[0175] Dynamically adjust the focal length mapping relationship: Dynamically adjust the focal length mapping relationship between the first camera and the second camera based on the focal length adjustment command input by the user and the current light intensity level. This step ensures that the second camera can accurately adjust to the target zoom ratio under different lighting conditions, thereby improving the image quality.
[0176] Camera switching and zoom ratio adjustment: After confirming the focal length mapping relationship, the first camera is controlled to switch to the second camera, and the zoom ratio of the second camera is quickly and accurately adjusted to the current target zoom ratio according to the adjusted focal length mapping relationship. This process realizes seamless switching between cameras and precise control of zoom ratio.
[0177] Image transformation parameter calculation: By comparing the first image acquired by the first camera with the second image acquired by the second camera, the transformation parameters between the two are calculated, including the offset and the deflection angle. These parameters provide an important basis for subsequent image alignment and cropping.
[0178] Image alignment: Based on the calculated transformation parameters, the second image is transformed to make it consistent with the first image in terms of position, angle, etc. This process ensures accurate matching and fusion between images, and improves the coherence and clarity of imaging.
[0179] Image cropping: According to the aligned second image and the current target zoom ratio, the second image is cropped in the center. The cropped image not only meets the user's zoom requirements, but also ensures the consistency of image quality and imaging effect.
[0180] In summary, the zoom control method proposed in the present invention effectively solves the shortcomings and defects existing in the traditional zoom control method by introducing key technologies such as dynamic focal length mapping relationship adjustment, camera switching and zoom ratio precise control, image transformation parameter calculation and alignment, and provides a more flexible, accurate and efficient zoom control solution for the field of photography and imaging.
[0181] Embodiment 2
[0182] The present invention also provides a zoom control system for executing the zoom control method, comprising a first camera and a second camera, and a focal length mapping relationship configured between the first camera and the second camera, referring to Figure 2 As shown, the control system includes:
[0183] A light intensity sensing module 100, for responding to a focus adjustment instruction and dynamically adjusting the focus mapping relationship based on a current light intensity level, wherein the focus mapping relationship is used to represent the adjustment of the zoom ratio of the second camera to the target zoom ratio;
[0184] A zoom control module 200, configured to control the first camera to switch to the second camera, and adjust the zoom ratio of the second camera to a current target zoom ratio based on the adjusted focal length mapping relationship;
[0185] A transformation parameter calculation module 300, configured to calculate transformation parameters between a first image acquired by the first camera and a second image acquired by the second camera, wherein the transformation parameters include an offset and a deflection angle;
[0186] An image alignment module 400, configured to align the second image with the first image based on the transformation parameter, wherein the first image and the second image are images of the same distance and the same object;
[0187] The image cropping module 500 is used to crop the second image based on the center of the aligned second image, wherein the current target zoom ratio is used to make the zoom ratio of the cropped second image consistent with the zoom ratio of the second camera required in the focus adjustment instruction.
[0188] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0189] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0190] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
Claims
1. A zoom control method, comprising a first camera and a second camera, and a focal length mapping relationship configured between the first camera and the second camera, characterized in that: The control method The following steps are involved: S1: responding to a focus adjustment instruction, and dynamically adjusting the focus mapping relationship based on a current light intensity level, wherein the focus mapping relationship is used to represent the adjustment of the zoom ratio of the second camera to the target zoom ratio; S2: Controlling the first camera to switch to the second camera, and adjusting the zoom ratio of the second camera to the current target zoom ratio based on the adjusted focal length mapping relationship; S3: Calculating transformation parameters between a first image acquired by the first camera and a second image acquired by the second camera, wherein the transformation parameters include an offset and a deflection angle; S4: aligning the second image with the first image based on the transformation parameter, wherein the first image and the second image are images of the same distance and the same object; S5: Cropping the second image based on the center of the aligned second image, wherein the current target zoom ratio is used to make the zoom ratio of the cropped second image consistent with the zoom ratio of the second camera required in the focal length adjustment instruction.
2. A zoom control method according to claim 1, characterized in that: Step S1 includes the following steps: S101: upon receiving the focus adjustment instruction, obtaining a current light intensity value through a light sensor; S102: matching the current light intensity value according to a preset light intensity mapping table to obtain a current light intensity level; S103: Dynamically adjust the focal length mapping relationship according to the current light intensity level.
3. A zoom control method according to claim 2, characterized in that: In step S103, the mathematical formula for dynamic adjustment of the focal length mapping relationship is: Z=Z t +α(LL ref ) Among them, Z is the current target zoom ratio, Z t is the target zoom ratio, L is the current light intensity value, L ref is the light intensity reference value, and α is the adjustment factor that changes according to the current light intensity level.
4. A zoom control method according to claim 3, characterized in that: Step S2 includes: Stop the first camera, start the second camera and trigger the autofocus function of the second camera. After the autofocus function is triggered, adjust the zoom ratio of the second camera to the current target zoom ratio according to the mathematical formula of the dynamically adjusted focal length mapping relationship.
5. A zoom control method according to claim 4, characterized in that: Step S3 includes the following steps: S301: performing coordinate matching based on reference points selected from the first image and the second image to obtain coordinates of the reference points; S302: Calculating the offset of the center positions of the first image and the second image based on the reference point coordinates to obtain the offset; S303: Calculate the angle difference between the reference point coordinates of the first image and the second image based on the reference point coordinates to obtain a deflection angle.
6. A zoom control method according to claim 5, characterized in that: Step S4 includes the following steps: S401: adjusting the position of the second image by using the offset to obtain a position-aligned second image; S402: Performing rotation correction on the position-aligned second image by using a deflection angle to obtain a rotationally aligned second image.
7. A zoom control method according to claim 6, characterized in that: Step S5 includes the following steps: S501: Calculate the distance between each edge of the second image acquired by the second camera and the corresponding edge of the first image acquired by the first camera, and take the edge of the first image corresponding to the shortest distance as the target edge; S502: Taking the center of the aligned second image as a cropping center, cropping the second image according to an original ratio of the second image to generate a third image, wherein one side of the third image coincides with the target side.
8. A zoom control system, characterized in that: A method for executing a zoom control method as claimed in any one of claims 1 to 7, comprising a first camera and a second camera, and a focal length mapping relationship configured between the first camera and the second camera, wherein the control system comprises: a light intensity sensing module, used to respond to a focus adjustment instruction and dynamically adjust the focus mapping relationship based on a current light intensity level, wherein the focus mapping relationship is used to represent the adjustment of the zoom ratio of the second camera to the target zoom ratio; A zoom control module, used for controlling the first camera to switch to the second camera, and adjusting the zoom ratio of the second camera to the current target zoom ratio based on the adjusted focal length mapping relationship; a transformation parameter calculation module, used to calculate transformation parameters between a first image acquired by the first camera and a second image acquired by the second camera, wherein the transformation parameters include an offset and a deflection angle; an image alignment module, configured to align the second image with the first image based on the transformation parameter, wherein the first image and the second image are images of the same distance and the same object; An image cropping module is used to crop the second image based on the center of the aligned second image, wherein the current target zoom ratio is used to make the zoom ratio of the cropped second image consistent with the zoom ratio of the second camera required in the focus adjustment instruction.
Citation Information
Patent Citations
Intelligent telescope and method for automatically adjusting multiplying power thereof
CN106990524A
Camera zoom control method and device, electronic equipment and storage medium
CN111405185A
Automatic exposure method, electronic equipment and computer readable storage medium
CN112887630A
Zoom control method, system, equipment and medium
CN114285992A
Image processing method and device based on multiple cameras, and computer readable storage medium
CN114339042A
Cited By
Camera zoom control system and method based on optical zoom technology
CN119854636A
