A camera method and system with automatic zoom and focus adjustment

By employing an automatic zoom and focus method, and utilizing preset imaging standards and structured light technology, the problem of unstable image quality at different distances was solved, achieving consistency in clarity and range, and improving the real-time performance and effectiveness of industrial monitoring and detection.

CN116320745BActive Publication Date: 2026-06-30武汉航工智能科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
武汉航工智能科技有限公司
Filing Date
2023-04-04
Publication Date
2026-06-30

Smart Images

  • Figure CN116320745B_ABST
    Figure CN116320745B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of camera technology and is applied to scenarios such as video surveillance, video recognition, and industrial video inspection. Specifically, it provides a camera method and system with automatic zoom and focus adjustment. The method includes: the camera automatically calculates the optimal zoom ratio and focal length of the camera lens at different object distances based on preset imaging standard values, establishes a corresponding database, and stores it in the camera parameter setting module; when the object distance changes, the camera lens parameters are adjusted accordingly based on the previous data; finally, infrared or visible structured light is used as a calibration reference to calculate the three-dimensional angle between the camera's optical axis and the observation plane and correct image distortion caused by the viewing angle, calculating and presenting an image effect with an angle of 80-100 degrees between the camera and the observation plane. This solution, through real-time distance measurement and precise zoom and focus adjustment of the camera lens, as well as image distortion correction, enables the camera to observe a clear image of the same actual range on the object, regardless of object distance or angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of camera technology and is applied to scenarios such as video surveillance, video recognition, industrial safety, and industrial video inspection. More specifically, it relates to a camera method and system with automatic zoom and focus adjustment. Background Technology

[0002] Zoom imaging systems, with their variable focal length, can observe targets at different viewing distances. This advantage significantly improves the system's integration compared to traditional fixed-focus imaging systems. Zoom optical systems, through the cooperation of zoom and compensation groups, can obtain clear images of targets at different magnifications in real time. When a camera observes an object with a fixed lens focal length, the farther the object is from the camera, the larger the actual area observed by the camera, and the smaller the image of the observed object. To ensure that a clear image of the same actual area of ​​the observed object is obtained at different distances, the camera lens must be zoomed and focused to a certain value. Currently, zoom and focus are performed manually. Manual operation is subject to zoom control delays and inaccurate focusing, which seriously affects the observed image quality.

[0003] When large cranes or hoists are operating in industrial plants, the hook and the lifted object move constantly up and down, back and forth, and left and right. To ensure industrial production safety, operators or industrial safety personnel need to constantly track the hook and the lifted object, monitoring whether they are in a safe state. However, when the monitored object moves away from the camera, the image of the observed object becomes smaller and unclear, leading to misjudgments. Manual control would distract the crane operators and prevent timely and effective zoom and focus adjustments to the camera, reducing the real-time performance and effectiveness of monitoring. The camera invented in this solution can obtain a clear image of the observed object within the same actual area while constantly tracking the hoisting equipment, ensuring the effectiveness of the image.

[0004] In industrial inspection, when visually inspecting the surfaces of large plates, spheres, and cylinders, a camera is typically placed at the center of the plate. The camera scans horizontally along the X-axis and vertically along the Y-axis. However, when the camera observes the four corners of the plate, the observation distance is the furthest, resulting in the largest field of view and loss of detail, affecting the validity of the inspection data. Manual zooming and focusing control is distracting for the inspector and prevents timely and effective camera zooming and focusing, reducing the real-time nature and effectiveness of the inspection. Because the camera is not positioned for equidistant scanning, the actual observed range varies, thus failing to guarantee 100% inspection of the plate surface. When inspecting the inner surfaces of cylinders or spheres, to ensure equidistant scanning, the camera must be positioned along the axis of the cylinder or at the center of the sphere, increasing the difficulty of the inspection.

[0005] In the field of facial recognition, current cameras only have a relatively short optimal viewing distance. When a face approaches the camera, if the distance is too close, the camera cannot capture the full view of the face; if the distance is too far, the face captured by the camera is too small to obtain enough details. This leads to the need for multiple trial and error adjustments when the face approaches. Applying a fixed-view camera can improve the optimal viewing distance and make facial recognition more efficient. Summary of the Invention

[0006] This invention provides a camera method with automatic zoom and focus adjustment, comprising the following steps:

[0007] S1. To ensure that a clear image of the same actual range on the observed object can be obtained at different distances, the camera imaging standard is preset first. The camera automatically calculates the optimal zoom ratio and focal length of the camera lens at different object distances based on the preset imaging standard value, establishes the corresponding data and stores it in the memory of the camera parameter setting module.

[0008] S2, when the distance between the camera and the object being observed changes, the ranging module on the camera will measure the distance between the camera lens and the object being measured in real time, and the zoom and focus module will read the data stored in the camera parameter setting module to adjust the camera lens so that the camera can always observe the image of the preset imaging standard.

[0009] S3 uses infrared structured light or visible structured light as a calibration reference to calculate the three-dimensional angle between the camera's optical axis and the observation plane and correct the image distortion caused by the viewing angle. It calculates and presents the image effect of an angle of 80 to 100 degrees between the camera and the observation plane.

[0010] Preferably, the preset imaging standard includes images with the same actual observation range, sharpness, and observation angle of 80–100 degrees. The observation angle refers to the angle between the camera's optical axis and the observation surface.

[0011] Preferably, after step S2, the method further includes:

[0012] Infrared structured light or visible structured light is used as a calibration reference to correct image distortion caused by the viewing angle. Specifically, when the optical axis of the circular infrared structured light or visible structured light emitter is at a certain angle to the viewing plane, and this angle is a three-dimensional angle, an ellipse with a certain direction will be projected on the viewing plane. The camera can capture the outline of the ellipse and transmit the image to the camera's image processing module.

[0013] The image processing module extracts the edges of the elliptical contour and calculates the three-dimensional angle between the camera's optical axis and the observation plane based on the directionality of the ellipse. Then, based on the calculated three-dimensional angle, it transforms the camera coordinates and world coordinates of each pixel in the image captured by the camera, and calculates and presents an image effect with an angle of 80 to 100 degrees between the camera and the observation plane.

[0014] Preferably, the ranging module is one or more combinations of laser ranging, ultrasonic ranging, sonar ranging, radar ranging, or electromagnetic wave ranging.

[0015] Preferably, S1 specifically includes:

[0016] S11, In the initial state, the camera lens is at the initial focal length value F1, the viewing distance D1, and can ensure that the actual size of the observed object is L×H and that the image is clear. At this time, the zoom ratio is X1.

[0017] S12, the distance of the object being measured changes from the viewing distance D1 to D2 in the optical axis direction of the camera lens. At this time, the field of view of the camera changes, and the actual size of the observed object is L2×H2. The camera measures the object distance of the observed object in real time as D2. The focal length of the camera lens is adjusted to F2 and the zoom ratio is X2. The actual size of the observed object still meets L×H and can be clearly imaged.

[0018] S13, the distance between the object being measured and the object distance changes from D2 to D3 along the optical axis of the camera. At this time, the field of view of the camera changes, and the actual dimensions of the observed object are L3×H3. The camera measures the distance between the observed object and D3 in real time. The focal length of the camera lens is adjusted to F3 and the zoom ratio is X3. The actual dimensions of the observed object still meet L×H and can be clearly imaged.

[0019] S14. Repeat steps S12 to S13 to obtain the object distance-zoom ratio curve of the preset imaging standard.

[0020] S15, establish the corresponding data and store it in the memory of the camera parameter setting module.

[0021] Preferably, the focus adjustment process in S2 specifically includes:

[0022] After the camera lens measures the object distance and performs optical zoom, it obtains an initial focal plane position. The optimal focal plane position is calculated based on the measured object distance and zoom ratio, and becomes the target focal plane position.

[0023] Focusing ends when the difference between the initial focal plane position and the target focal plane position is less than the allowable defocus range.

[0024] When the difference between the initial focal plane position and the target focal plane position is outside the allowable defocus range, the zoom and focus control module generates a displacement signal and sends it to the camera lens; the camera lens receives the displacement signal and drives the focal plane position to the target focal plane position; wherein, the displacement signal is the difference between the initial focal plane position and the target focal plane position.

[0025] Preferably, the focus adjustment process in S2 specifically includes:

[0026] S21, the camera lens receives the displacement signal and converts the displacement signal into the focal plane position of the camera lens and drives it to the stage focal plane position 1;

[0027] S22, when the difference between the stage focal plane position 1 and the target focal plane position is within the allowable defocus range, focusing ends; when the difference between the stage focal plane position 1 and the target focal plane position is outside the allowable defocus range and continues to increase, focusing stops and moves in the opposite direction to the stage focal plane position 2.

[0028] S23, when the difference between the position of the stage focal plane 2 and the target focal plane is within the allowable defocus range, focusing ends.

[0029] Preferably, S3 specifically includes:

[0030] The application uses circular infrared or visible structured light as a calibration reference. When the optical axis of the circular infrared or visible structured light emitter forms a certain angle with the observation plane (a three-dimensional angle), an ellipse with a certain directionality will be projected onto the observation plane. The camera can capture the outline of the ellipse. The image processing module acquires the ellipse outline and calculates the three-dimensional angle between the camera's optical axis and the observation plane based on the ellipse's directionality. Through pixel coordinate transformation, it corrects the image distortion caused by the viewing angle and calculates and presents an image effect with an angle of 80 to 100 degrees between the camera and the observation plane.

[0031] The present invention also provides a camera system with automatic zoom and focus adjustment, the system being used to implement a camera method with automatic zoom and focus adjustment, comprising:

[0032] The camera module has at least the function of variable zoom and adjustable focus. Variable zoom includes two types: optical zoom and digital zoom. Adjustment includes two types: automatic focus and manual focus.

[0033] The camera parameter setting module is used to ensure that a clear image of the same actual range on the observed object can be obtained at different distances. First, the camera imaging standard is preset. The camera automatically calculates the optimal zoom ratio and focal length of the camera lens at different object distances based on the preset imaging standard value, establishes the corresponding data and stores it in the memory of the camera parameter setting module.

[0034] The ranging module is used to determine the distance between the camera lens and the object being observed;

[0035] The zoom and focus module is used to adjust the camera lens according to the optimal zoom ratio and focal length to capture an image with a preset imaging standard.

[0036] The structured light module uses infrared or visible structured light as a calibration reference to provide data support for calculating the angle between the camera's optical axis and the observation plane.

[0037] The image processing module is used to apply infrared structured light or visible structured light as a calibration reference to calculate the three-dimensional angle between the camera's optical axis and the observation plane and correct image distortion caused by the viewing angle. It calculates and presents the image effect when the angle between the camera and the observation plane is 80 to 100 degrees.

[0038] The present invention also provides an image processing module for viewpoint correction, comprising: the image processing module extracting the edges of an elliptical contour, calculating the three-dimensional angle between the camera optical axis and the observation plane based on the directionality of the ellipse, and then, based on the calculated three-dimensional angle, transforming each pixel in the image captured by the camera into camera coordinates and world coordinates, calculating and presenting an image effect where the angle between the camera and the observation plane is 80 to 100 degrees perpendicular, thereby correcting image distortion caused by the viewing angle.

[0039] Beneficial effects: The camera can obtain clear images of the observed object at the same actual range at different distances. When there is a certain three-dimensional angle between the camera's optical axis and the observation plane, the camera can correct the image distortion caused by the viewing angle and calculate and present the image effect of the camera and the observation plane at an angle of 80 to 100 degrees. Attached Figure Description

[0040] Figure 1 A flowchart of a camera method with automatic zoom and focus provided by the present invention;

[0041] Figure 2 This is a flowchart of the image focusing process provided by the present invention.

[0042] Figure 3 This is a block diagram of a camera system module with automatic zoom and focus provided by the present invention. Detailed Implementation

[0043] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0044] like Figure 1 As shown, this embodiment of the invention provides a camera method with automatic zoom and focus adjustment, including the following steps:

[0045] S1. To ensure that a clear image of the same actual area on the observed object is obtained at different distances, a preset camera imaging standard is first established. The camera automatically calculates the optimal zoom ratio and focal length of the camera lens at different object distances based on the preset imaging standard value, establishes the corresponding data, and stores it in the memory of the camera parameter setting module. Specifically, based on the actual size of the observed image, the object distance between the camera lens and the observed object is changed, and the optimal zoom ratio and focal length of the camera lens at different object distances are obtained under the premise of the preset imaging standard.

[0046] S2, when the distance between the camera and the object being observed changes, the ranging module on the camera will measure the distance between the camera lens and the object being measured in real time, and the zoom and focus module will read the data stored in the camera parameter setting module to adjust the camera lens so that the camera can always observe the image of the preset imaging standard.

[0047] Specifically, the distance between the camera lens and the object being measured is determined, and the camera lens is adjusted accordingly according to the optimal zoom ratio and focal length to capture an image of the preset imaging standard. After obtaining the distance value between the camera and the observed object, the camera changes the focal length of the zoom group according to the parameter relationship between the focal length and the angle of view of its own optical lens, thereby realizing the zoom of the zoom imaging system and adjusting the lens focal length value so that the camera can obtain a clear image of the same size on the observed object regardless of changes in the object distance.

[0048] S3 uses infrared structured light or visible structured light as a calibration reference to calculate the three-dimensional angle between the camera's optical axis and the observation plane and correct the image distortion caused by the viewing angle. It calculates and presents the image effect of an angle of 80 to 100 degrees between the camera and the observation plane.

[0049] Zoom ratio, or magnification, refers to changing the distance between the lens and the imaging plane to achieve image sharpness. Zooming, on the other hand, changes the focal length (f) of the lens, thus altering the angle of view. Zooming is achieved by using a focusing mechanism to move the camera lens. This focusing mechanism boasts high precision and can shorten focusing time, enabling high-precision and fast focusing.

[0050] When a camera observes an object with a fixed lens focal length, the farther the object is from the camera, the smaller the resulting image. To ensure a clear image of the same size object at different distances, the camera lens must be zoomed and focused. For each object distance, the zoom and focus control modules can preset multiple sets of lens focal length output values. Therefore, for each distance, there is a specific zoom ratio and focal length value. This achieves effective zoom tracking regardless of object distance.

[0051] Among them, ranging and focusing are achieved by emitting laser, ultrasonic, sonar, radar or electromagnetic waves after the ranging module is activated. When the ranging module senses the information of the subject, it sends a control signal through the zoom and focus control module to drive the camera module to autofocus, thereby completing the active autofocus work. The zoom and focus control module can also be switched according to the usage. The camera module receives the reflection from the subject itself through the photoelectric sensor in the camera module, and controls the camera module to autofocus through the zoom and focus control module. This focusing method effectively improves the speed and accuracy of autofocus.

[0052] The preferred solution, step S1 specifically includes:

[0053] In the initial state, the fixed-image camera lens, i.e. the video lens, is at the initial focal length value F1 and the viewing distance D1, and can ensure that the image size on the target surface meets L×H and can be clearly imaged. At this time, the zoom ratio is X1.

[0054] The position of the observed object remains unchanged. The viewing distance D1 is changed to D2 along the camera's optical axis. At this time, the 4-range measurement module measures the object distance of the currently observed object as D2 and transmits the object distance value D2 to the 3-zoom and focus control module. At this time, the lens focal length is F2 and the zoom ratio is X2. The image size of the image on the target surface still meets the L×H requirement and can be clearly imaged, as detailed in the flowchart in Figure 3.

[0055] Finally, keeping the position of the observed object unchanged, the viewing distance D2 is changed to D3 along the camera's optical axis. The ranging module then measures the object distance as D3 and sends this information to the lens zoom and focus control module. The lens zoom and focus control module then zooms the lens according to a pre-set zoom curve. At this point, the lens focal length is F3, and the zoom ratio is X3. The image size on the target surface still meets the L×H standard and is clear, matching the previous clear imaging standard. Repeating the above steps yields the object distance-zoom curve. Once the object distance is measured, the optimal zoom ratio and focal length can be determined based on this curve. Adjusting the camera lens according to these parameters will allow you to capture a headshot with the same image size and clarity.

[0056] like Figure 2 As shown, in the preferred embodiment, the focus adjustment, i.e., the autofocus process, specifically includes:

[0057] After the camera lens measures the object distance and completes optical zoom, the camera will have an initial focal plane position. The zoom and focus control module can calculate the optimal focal plane position based on the measured object distance and optical zoom parameters (i.e., zoom ratio) to become the target focal plane position.

[0058] When the difference between the initial focal plane position and the target focal plane position in the autofocus system is less than the allowable defocus range, focusing ends, the expected result is achieved, and no further focusing is needed.

[0059] When the difference between the initial focal position and the target focal position is outside the allowable defocus range, the zoom and focus control module generates a displacement signal and sends it to the camera lens; the displacement signal is the difference between the initial focal position and the target focal position. The camera lens receives the displacement signal and converts it into the focal position of the camera lens, driving it to stage focal position 1. When the difference between stage focal position 1 and the target focal position is within the allowable defocus range, focusing ends; when the difference between stage focal position 1 and the target focal position is outside the allowable defocus range and continues to widen, focusing stops and moves in the opposite direction to stage focal position 2; when the difference between stage focal position 2 and the target focal position is within the allowable defocus range, focusing ends.

[0060] The focusing method is not limited to laser focusing, TOF focusing, phase focusing, and contrast focusing.

[0061] In a preferred embodiment, based on the camera's optical characteristics, when the observation surface and the projector are not perpendicular, the observed image will exhibit a trapezoidal shape. Therefore, viewing angle correction is necessary to correct this trapezoidal image. This correction is achieved by using infrared or visible structured light as a calibration reference to correct image distortion caused by the viewing angle. Taking a circular infrared or visible structured light beam as an example, when the optical axis of the circular infrared or visible structured light emitter forms a certain angle with the observation plane (a three-dimensional angle), an ellipse with a certain directionality will be projected onto the observation plane. The camera can capture the outline of the ellipse. The image processing module acquires the elliptical outline and calculates the three-dimensional angle between the camera's optical axis and the observation plane based on the ellipse's directionality. Through pixel coordinate transformation, an image perpendicular to the observation plane can be calculated. The infrared or visible structured light beam includes one or more of the following: concentric circles, stripes, grids, and crosshairs.

[0062] Alternatively, a gravity sensor can be installed inside the camera to obtain the vertical angle of the camera's optical axis. However, existing sensors cannot detect changes in the horizontal angle. Rangefinding technology can be used to measure distances faster and more accurately in real time, sensing changes in the horizontal plane's angle. A dual-channel rangefinding module on the camera measures the distance between the left and right shots. Combining the vertical angle information of the camera's optical axis with the included angle information from the dual-channel rangefinding module, the trapezoidal change is calculated using geometric and mathematical relationships. This allows the determination of the parameters required for trapezoidal correction to calibrate the image.

[0063] like Figure 3 As shown, this embodiment of the invention also provides a camera system with automatic zoom and focus adjustment. The system is used to implement an automatic zoom and focus camera system, comprising:

[0064] The camera module has at least the function of variable zoom and adjustable focus. Variable zoom includes two types: optical zoom and digital zoom. Adjustment includes two types: automatic focus and manual focus.

[0065] The camera parameter setting module is used to ensure that a clear image of the same actual range on the observed object can be obtained at different distances. First, the camera imaging standard is preset. The camera automatically calculates the optimal zoom ratio and focal length of the camera lens at different object distances based on the preset imaging standard value, establishes the corresponding data and stores it in the memory of the camera parameter setting module.

[0066] The ranging module is used to determine the distance between the camera lens and the object being observed;

[0067] The zoom and focus module is used to adjust the camera lens according to the optimal zoom ratio and focal length to capture an image with a preset imaging standard.

[0068] The structured light module uses infrared or visible structured light as a calibration reference to provide data support for calculating the angle between the camera's optical axis and the observation plane.

[0069] The image processing module is used to apply infrared structured light or visible structured light as a calibration reference to calculate the three-dimensional angle between the camera's optical axis and the observation plane and correct image distortion caused by the viewing angle. It calculates and presents the image effect when the angle between the camera and the observation plane is 80 to 100 degrees.

[0070] This invention also provides a structured light for viewpoint correction and a matching image processing module, including: when the optical axis of a circular infrared structured light or visible structured light emitter forms a certain angle with the observation plane, and the angle is a three-dimensional angle, an ellipse with a certain directionality will be projected onto the observation plane, and the camera can capture the outline of the ellipse and transmit the image to the camera's image processing module.

[0071] This invention also provides an image processing module for viewpoint correction. The image processing module extracts the edges of the elliptical contour and calculates the three-dimensional angle between the camera optical axis and the observation plane based on the directionality of the ellipse. Then, based on the calculated three-dimensional angle, it transforms the camera coordinates and world coordinates of each pixel in the image captured by the camera, calculates and presents an image effect in which the camera is perpendicular to the observation plane.

[0072] Beneficial effects:

[0073] 1. Automatically measure the observation distance and automatically zoom the camera lens according to the observation distance, so that the size of the object captured by the camera does not change with the change of observation distance.

[0074] 2. Camera ranging methods include laser ranging, ultrasonic ranging, sonar ranging, radar ranging, and electromagnetic wave ranging.

[0075] 3. The camera automatically obtains the angle between the camera's optical axis and the observation surface in two dimensions, and performs trapezoidal correction on the observed image.

[0076] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0077] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A camera method with automatic zoom and focus adjustment, characterized in that, Includes the following steps: S1. To ensure that a clear image of the same range as the observed object can be obtained at different distances, an imaging standard is preset. The camera automatically calculates the optimal zoom ratio and focal length of the camera lens at different object distances based on the preset imaging standard value, establishes the corresponding data, and stores it in the memory of the camera parameter setting module. The preset imaging standard includes a uniform image with the same actual observation range, clarity, and an observation angle of 80 to 100 degrees. The observation angle refers to the angle between the camera optical axis and the observation surface. Specifically, in S11, in the initial state, the camera lens is at the initial focal length value F1, the viewing distance D1, and can ensure that the actual size of the observed object is L×H and that it is clearly imaged. At this time, the zoom ratio is X1. S12, the distance of the observed object in the optical axis direction of the camera lens changes from the viewing distance D1 to D2. At this time, the field of view of the camera changes. The actual size of the observed object is L2×H2. The camera measures the object distance of the observed object in real time as D2. The focal length of the camera lens is adjusted to F2 and the zoom ratio is X2. The actual size of the observed object still meets L×H and is clearly imaged. S13, the object distance of the observed object changes from D2 to D3 in the direction of the camera's optical axis. At this time, the field of view of the camera changes. The actual size of the observed object is L3×H3. The camera measures the object distance of the observed object in real time as D3. Adjust the focal length of the camera lens to F3 and the zoom ratio to X3. The actual size of the observed object still meets L×H and is clearly imaged. S14, repeat steps S12 to S13 to obtain the object distance-zoom ratio curve of the preset imaging standard; S15, establish the corresponding data and store it in the memory of the camera parameter setting module; S2, when the distance between the camera and the observed object changes, the ranging module on the camera will measure the distance between the camera lens and the observed object in real time, and the zoom and focus module will read the data stored in the camera parameter setting module to adjust the camera lens so that the camera can always observe the image of the preset imaging standard. The focus adjustment process specifically includes: After the camera lens measures the object distance and performs optical zoom, it obtains an initial focal plane position. The optimal focal plane position is calculated based on the measured object distance and zoom ratio, and becomes the target focal plane position. Focusing ends when the difference between the initial focal plane position and the target focal plane position is less than the allowable defocus range. When the difference between the initial focal plane position and the target focal plane position is outside the allowable defocus range, the zoom and focus control module generates a displacement signal and sends it to the camera lens; The camera lens receives the displacement signal and converts the displacement signal into the focal plane position of the camera lens, driving it to the stage focal plane position 1; When the difference between the stage focal plane position 1 and the target focal plane position is within the allowable defocus range, focusing ends; when the difference between the stage focal plane position 1 and the target focal plane position is outside the allowable defocus range and continues to widen, focusing stops and moves in the opposite direction to the stage focal plane position 2. When the difference between the initial focal plane position 2 and the target focal plane position is within the allowable defocus range, focusing ends; where the displacement signal is the difference between the initial focal plane position and the target focal plane position; S3 uses infrared structured light or visible structured light as a calibration reference to calculate the three-dimensional angle between the camera's optical axis and the observation plane and correct the image distortion caused by the viewing angle. It calculates and presents the image effect of an angle of 80 to 100 degrees between the camera and the observation plane. Specifically, it includes: Infrared structured light or visible structured light is used as a calibration reference to correct image distortion caused by the viewing angle. Specifically, when the optical axis of the circular infrared structured light or visible structured light emitter is at an angle to the viewing plane, and this angle is a three-dimensional angle, a directional ellipse will be projected onto the viewing plane. The camera captures the outline of the ellipse and transmits the image to the camera's image processing module. The image processing module extracts the edges of the elliptical contour and calculates the three-dimensional angle between the camera's optical axis and the observation plane based on the directionality of the ellipse. Then, based on the calculated three-dimensional angle, it transforms the camera coordinates and world coordinates of each pixel in the image captured by the camera, and calculates and presents an image effect with an angle of 80 to 100 degrees between the camera and the observation plane.

2. The auto- zoom and focus method of claim 1, wherein, The ranging module is one or more of the following: laser ranging, ultrasonic ranging, sonar ranging, radar ranging, or electromagnetic wave ranging.

3. An image pickup system capable of automatic zooming and focusing, characterized by comprising: The system is used to implement the automatic zoom and focus imaging method as described in any one of claims 1-2, including: The camera module has at least the function of variable zoom and adjustable focus. Variable zoom includes two types: optical zoom and digital zoom. Adjustment includes two types: automatic focus and manual focus. The camera parameter setting module is used to ensure that a clear image with the same actual range as the observed object can be obtained at different distances. First, the imaging standard is preset. The camera automatically calculates the optimal zoom ratio and focal length of the camera lens at different object distances based on the preset imaging standard value, establishes the corresponding data and stores it in the memory of the camera parameter setting module. The ranging module is used to determine the distance between the camera lens and the object being observed; The zoom and focus module is used to adjust the camera lens according to the optimal zoom ratio and focal length to capture an image with a preset imaging standard. The structured light module uses infrared or visible structured light as a calibration reference to provide data support for calculating the angle between the camera's optical axis and the observation plane. The image processing module is used to apply infrared structured light or visible structured light as a calibration reference to calculate the three-dimensional angle between the camera's optical axis and the observation plane and correct image distortion caused by the viewing angle. It calculates and presents the image effect when the angle between the camera and the observation plane is 80 to 100 degrees.