A method and system for calculating a field of view (FOV) for a continuous zoom camera

By acquiring binary data of the target image from a continuous zoom camera, filtering and fitting the changes in the number of lines, the error in calculating the field of view due to the influence of lens thickness was resolved, and a more accurate relationship between focal length and field of view was achieved.

CN120835210BActive Publication Date: 2025-11-21BEIJING LINGQIAO TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511324425.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-11-21
Estimated Expiration
2045-09-17

AI Technical Summary

Technical Problem

Existing methods for calculating the field of view of continuous zoom cameras suffer from insufficient accuracy due to factors such as lens thickness, resulting in a non-linear relationship between focal length and field of view.

Method used

By acquiring binary images of several target images, the number of horizontal and vertical lines is determined, the target images are segmented and filtered, and a function is fitted using the error requirement as the weight to obtain the vertical and horizontal field of view.

Benefits of technology

It improves the accuracy of field of view calculation, overcomes the error caused by lens thickness, and achieves a more accurate fitting of the relationship between focal length and field of view.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835210B_ABST
    Figure CN120835210B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, in particular to a kind of continuous zoom camera's conversion field of view FOV calculation method and system, comprising: according to the pixel point gray value change in the binary image of each frame target image respectively in horizontal and vertical, determine the visible width and visible height, then filter out several split frame target images, to determine vertical field of view and horizontal field of view, obtain error requirement degree, for all split frame target images, with error requirement degree as function fitting process Weighted Residual Sum of Squares Weight, with focal length as independent variable, respectively with vertical field of view and horizontal field of view as dependent variable function fitting, obtain first fitting function and second fitting function, the current focal length is respectively input into first and second fitting function, output current vertical field of view and horizontal field of view.The present application obtains more accurate focal length and field of view angle function, guarantees the accuracy of field of view angle calculation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a conversion field of view FOV calculation method and system of a continuous zoom camera. BACKGROUND

[0002] The field of view (FOV) calculation method of a continuous zoom camera mainly depends on parameters such as focal length, sensor size, and working distance. Through trigonometric formulas and approximate formulas, the field of view can be calculated in real time. In practical applications, factors such as sensor resolution, lens distortion, and working distance need to be considered to improve the calculation accuracy and reliability.

[0003] Existing problems: Currently, the calculation of the field of view is often solved by the similar triangle principle in the imaging model, or the linear relationship is fitted by the field of view corresponding to the maximum focal length and the minimum focal length. However, due to factors such as the thickness of the actual camera lens, the relationship between the field of view and the focal length is not ideal linear relationship. SUMMARY

[0004] The present application provides a conversion field of view FOV calculation method and system of a continuous zoom camera to solve the existing problems.

[0005] The conversion field of view FOV calculation method and system of a continuous zoom camera provided by the present application adopts the following technical scheme:

[0006] An embodiment of the present application provides a conversion field of view FOV calculation method of a continuous zoom camera, which comprises the following steps:

[0007] Obtain a plurality of target images from far to near, wherein each target image corresponds to an object distance and a focal length; obtain a binary image of each target image;

[0008] Determine the number of horizontal lines and the number of vertical lines according to the changes of the pixel gray values in the horizontal and vertical directions of the binary image of each target image; determine the visible width and the visible height according to the number of horizontal lines and the number of vertical lines;

[0009] According to the changes of the number of vertical lines corresponding to all frames of target images from far to near, a plurality of segmented target images are selected; according to the visible width and the visible height corresponding to each segmented target image and the object distance, the vertical field of view and the horizontal field of view are determined;

[0010] Determine the error requirement degree according to the longitudinal height of each segmented frame target image and the number of longitudinal lines; for all segmented frame target images, fit the weight of the weighted residual sum of squares in the process as a function of the error requirement degree, take the focal length as the independent variable, and take the vertical field of view angle and the horizontal field of view angle as the dependent variable respectively to obtain the first fitting function and the second fitting function; input the current focal length of the continuous zoom camera into the first fitting function and the second fitting function respectively, and output the current vertical field of view angle and the horizontal field of view angle of the continuous zoom camera.

[0011] Further, the specific steps of determining the number of horizontal lines and the number of longitudinal lines include the following:

[0012] For the binary image of each frame of target image, the gray values of all pixel points are counted from left to right in a row passing through the center of the binary image to form a horizontal binary sequence, and the gray values of all pixel points are counted from top to bottom in a column passing through the center of the binary image to form a longitudinal binary sequence.

[0013] The number of horizontal lines and the number of longitudinal lines are determined according to the difference between adjacent elements in the horizontal binary sequence and the longitudinal binary sequence respectively.

[0014] Further, the specific steps of determining the number of horizontal lines and the number of longitudinal lines according to the difference between adjacent elements in the horizontal binary sequence and the longitudinal binary sequence respectively include the following:

[0015] In the horizontal binary sequence, the sum of the absolute values of the difference values of all adjacent elements is denoted as the number of horizontal lines.

[0016] In the longitudinal binary sequence, the sum of the absolute values of the difference values of all adjacent elements is denoted as the number of longitudinal lines.

[0017] Further, the specific steps of determining the visible width and the visible height include the following:

[0018] The product of the number of horizontal lines and the preset target line width is denoted as the visible width.

[0019] The product of the number of longitudinal lines and the preset target line width is denoted as the visible height.

[0020] Further, the specific steps of screening out a plurality of segmented frame target images include the following:

[0021] From far to near, the number of longitudinal lines corresponding to all target images is obtained frame by frame to form a line number sequence.

[0022] According to the difference between adjacent elements in the line number sequence, a plurality of segmented frame target images are screened out.

[0023] Further, the filtering of the several split frame target images according to the difference between adjacent elements in the line number sequence comprises the following specific steps:

[0024] In the line number sequence, for any two elements, when the difference between the current element and the next element is greater than or equal to a preset constant, the frame target image corresponding to the current element is recorded as a split frame target image.

[0025] Further, the determination of the vertical field of view and the horizontal field of view comprises the following specific steps:

[0026] For any split frame target image, the ratio of one-half of the visible height to the object distance is obtained and recorded as a first ratio, the first ratio is input into an arctangent function to obtain a first output value, twice the first output value is recorded as a vertical field of view; the ratio of one-half of the visible width to the object distance is obtained and recorded as a second ratio, the second ratio is input into an arctangent function to obtain a second output value, twice the second output value is recorded as a horizontal field of view.

[0027] Further, the determination of the error requirement degree comprises the following specific steps:

[0028] For any split frame target image, the ratio of the vertical height of the split frame target image to the vertical line number is obtained and recorded as an accuracy.

[0029] The error requirement degree of any split frame target image is determined according to the accuracy of all split frame target images.

[0030] Further, the determination of the error requirement degree of any split frame target image according to the accuracy of all split frame target images comprises the following specific steps:

[0031] The sum value of the accuracy of all split frame target images is obtained and recorded as a first sum value.

[0032] The ratio of the accuracy of any split frame target image to the first sum value is obtained and recorded as an error requirement degree.

[0033] The present application also provides a continuous zoom camera's rotation field of view FOV calculation system, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program stored in the memory to realize the steps of the continuous zoom camera's rotation field of view FOV calculation method.

[0034] The technical scheme of the present application has the following beneficial effects:

[0035] In this embodiment of the invention, the number of horizontal lines and the number of vertical lines are determined based on the changes in the grayscale values ​​of pixels in the binary image of each frame of the target image in the horizontal and vertical directions, respectively, thereby determining the visible width and visible height. Based on the changes in the number of vertical lines in all frames of the target image from far to near, several segmented frame target images are selected. By selecting segmented frame target images with significant changes in the number of lines, the accuracy of the subsequent function fitting is ensured, thereby ensuring the accuracy of the field of view calculation. Based on the visible width, visible height, and object distance of each segmented target image, the vertical and horizontal field of view are determined. The error requirement is determined based on the vertical height and number of vertical lines in each segmented target image. For all segmented target images, the error requirement is used as the weight of the weighted sum of squared residuals during function fitting. With focal length as the independent variable, and the vertical and horizontal field of view as dependent variables, functions are fitted to obtain a first fitting function and a second fitting function. By using the error requirement as a weight in the function fitting process, the fitting effect of the function can be more accurately reflected, ensuring the accuracy of the field of view calculation. The current focal length of the continuous zoom camera is input into the first and second fitting functions, respectively, and the current vertical and horizontal field of view of the continuous zoom camera are output. Thus, this invention ensures the accuracy of the field of view calculation by obtaining a more accurate relationship function between focal length and field of view. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart illustrating the steps of a method for calculating the field of view (FOV) of a continuous zoom camera according to the present invention.

[0038] Figure 2 This is a schematic diagram of the target.

[0039] Figure 3 This is a schematic diagram of an object's image from near to far. Detailed Implementation

[0040] In order to further clarify the technical means and effects taken by the present application to achieve the predetermined inventive purpose, the following describes in detail the specific implementation, structure, features and effects of a continuous zoom camera FOV conversion calculation method and system according to the present application, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0042] The specific scheme of the continuous zoom camera FOV conversion calculation method and system provided by the present application is described in detail below in combination with the accompanying drawings.

[0043] Please refer to Figure 1 which shows the step flowchart of a continuous zoom camera FOV conversion calculation method provided by one embodiment of the present application, which includes the following steps:

[0044] Step S001: Obtain a plurality of frames of target images from far to near, wherein each frame of target image corresponds to an object distance and a focal length; obtain a binary image of each frame of target image.

[0045] In this embodiment, a specific target is used for calibration. The target image is collected and analyzed to obtain the image parameters corresponding to the changes of the target in the continuous image. The field of view angle of the current camera state is calculated through the image parameters, and data fitting is performed through the obtained calibration data. The field of view angle relationship curve corresponding to the focal length parameter is obtained. The purpose is to solve the influence of lens thickness on the calculation of field of view angle, and to obtain the nonlinear relationship between focal length and field of view angle, so as to calculate the actual field of view angle through the physical quantity in the actual collected image, rather than through the method of similar triangles in the imaging model.

[0046] It should be noted that: since the lens has thickness, according to the ideal pinhole imaging model, the calculation through geometry cannot accurately obtain the field of view angle. Therefore, in this embodiment, the segmented frame image is obtained through calibration, and then the data is fitted to obtain the calculation function of the field of view angle. That is, through the camera shooting image, the target shot in the image is recognized, the specific frame image (segmented frame) is obtained to avoid the influence of pixel error (pixel is a discrete quantity, not an analog quantity, so the error in distance physical quantity is large), the data in the geometric model is obtained, and then the corresponding focal length, field of view angle and other data are calculated, and then the function relationship between the data is obtained through data fitting.

[0047] It needs to be further explained that: at present, the calculation of the field of view angle is mostly through the imaging model, combined with the focal length and the pixel size. The curved surface of the optical lens group itself will make this calculation inaccurate (so the focal length and the film size above are not used). Because the zooming process of the zoom camera is electronically controlled and cooperated with mechanical components and optical lenses, using the maximum and minimum focal length to do linear interpolation to calculate the field of view angle corresponding to the electronic zoom control quantity is easy to produce large error (so fitting is needed).

[0048] In this embodiment, the field of view angle of the camera needs to be calculated, and the concept of the field of view angle is the angle that can collect images during shooting. Therefore, the maximum height physical quantity of the shooting image and the object distance can be used to obtain the field of view angle, instead of using the geometric model of the focal length side in the pinhole imaging model, that is, the geometric model of the object distance side is used in this embodiment. In order to obtain the actual physical distance in the camera shooting image, calibration operation is needed, and the calibration device used in this embodiment includes a target and a calibration device.

[0049] The target is a concentric square target with black and white intervals, so as to be recognized according to the black and white difference of the pixels in the image subsequently. The preset target line width is 2 mm, which is taken as an example for description. The target schematic diagram is shown in Figure 2 The calibration device ensures that the target can move uniformly in front of the camera through the guide rail, and then laser ranging is performed, that is, the distance from the camera optical center to the target is obtained through the TOF ranging sensor. Thus, the object distance and the focal length parameter corresponding to the image are recorded while the target image is shot (the object distance refers to the distance from the object to the lens, and the focal length refers to the distance from the focal point of the lens to the center of the lens, both in millimeters). Specifically, from far to near, an image is collected to ensure that only the target is in the image during shooting. In order to obtain more accurate data, an image is shot every 1 mm on the track as much as possible.

[0050] Therefore, a plurality of target images are obtained at equal distance intervals from far to near, wherein each target image corresponds to an object distance and a focal length.

[0051] It needs to be explained that: the size of all target images is the same, that is, the length and width are consistent. According to the principle that the image of an object is large near and small far, the number of concentric squares in the target image from far to near will gradually decrease.

[0052] The binary image of each target image is obtained through the Otsu method. Specifically, the gray processing of each target image is performed, and then the best segmentation threshold of each target image is obtained through the Otsu method. In each target image, the pixel point gray value greater than the best segmentation threshold is marked as 1, and the pixel point gray value less than or equal to the best segmentation threshold is marked as 0, to obtain the binary image.

[0053] The image grayscale conversion and Otsu's method are well-known techniques, and the specific methods will not be introduced here.

[0054] Therefore, the data recorded for each frame of the target image includes: object distance, focal length, and binary image.

[0055] Step S002: Determine the number of horizontal lines and the number of vertical lines based on the changes in the grayscale values ​​of pixels in the horizontal and vertical directions in the binary image of each frame of the target image; determine the visible width and visible height based on the magnitude of the number of horizontal lines and the number of vertical lines.

[0056] It should be noted that the images acquired above are discrete (pixels are in blocks, not continuous), while the actual objects are analog quantities. Therefore, it is necessary to analyze the acquired multi-frame images to obtain specific images showing changes, and then obtain more accurate physical quantity data to calculate the field of view. That is, for the same 2mm wide line, the number of pixels represented in the image may not change as the object distance changes. For example, if the line is 5 pixels wide for several consecutive frames, but the number of pixels changes from 5 to 6, the data corresponding to that change is considered more accurate. A schematic diagram of the imaging of an object from near to far is shown below. Figure 3 As shown, Figure 3 In the upper part of the image, according to the principle that objects appear larger when closer and smaller when farther away, the image size of the same object gradually decreases from left to right as the object distance increases. Figure 3 In the lower half of the image, the horizontal axis represents the object distance and the vertical axis represents the number of pixels. From left to right, the number of pixels corresponding to the 2 mm target line width gradually decreases from the minimum (min) object distance to the maximum (max) object distance.

[0057] Further explanation is needed regarding the specific processing steps for calculating the field of view angle from the acquired images: First, obtain the vertical and horizontal pixel sequences of a single frame image and calculate the visible height and visible width. Then, obtain segmented frames from consecutive frames. Finally, calculate the field of view angle corresponding to the segmented frames and simultaneously obtain the required error level for fitting. Since the physical quantities corresponding to each white or black patch in the binary image of each target image frame are known, the corresponding physical quantities, namely the visible height and visible width, can be calculated by the number of monochrome regions in the binary sequence.

[0058] For each frame of the target image, the gray values ​​of all pixels are counted one by one from left to right in a row passing through the center of the binary image, forming a horizontal binary sequence. In a column passing through the center of the binary image, the gray values ​​of all pixels are counted one by one from top to bottom, forming a vertical binary sequence.

[0059] Among them, the horizontal binary sequence or the vertical binary sequence is, for example: [0, 0, 0, 1, 1, 1, 0, ..., 0, 1, 1, 1, 0, 0, 0].

[0060] In the transverse binary sequence, the absolute value of the difference between two adjacent elements is calculated, and the sum of the absolute values of the differences between all adjacent elements is recorded as the transverse line number.

[0061] In the longitudinal binary sequence, the absolute value of the difference between two adjacent elements is calculated, and the sum of the absolute values of the differences between all adjacent elements is recorded as the longitudinal line number.

[0062] The product of the transverse line number and the preset target line width is recorded as the visual width.

[0063] The product of the longitudinal line number and the preset target line width is recorded as the visual height.

[0064] Wherein, the transverse line number and the longitudinal line number are dimensionless data values, and the unit of the preset target line width is millimeter, that is, the units of the visual width and the visual height are millimeters.

[0065] Thus, the corresponding data of each frame target image can be obtained, including the object distance, the focal length, the binary image, the transverse line number, the longitudinal line number, the visual width, and the visual height.

[0066] Step S003: According to the changes of the longitudinal line numbers corresponding to all frames of target images from far to near, a plurality of segmented frame target images are screened out; and according to the visual width and the visual height corresponding to each segmented frame target image and the object distance, the vertical field of view and the horizontal field of view are determined.

[0067] It should be noted that: further, the continuous frames can be analyzed according to the acquisition order to obtain the segmented frames. That is, the line numbers corresponding to the continuous images are obtained and arranged to obtain a sequence. Since the target is shot from far to near, and the target imaging in the image is large near and small far, the line number is from more to less. Since the images are acquired continuously, and the image is a discrete quantity, it is an approximate quantity of an analog quantity, so sometimes the line numbers of adjacent acquired images are the same. Just like rounding to the nearest value, 0 to 0.4 is approximately 0, and 0.5 to 1 is approximately 1, so when the approximate number is from 0 to 1, the value is at its 1 / 2 precision, the calculation at this point will be more accurate, and a uniform image can also fit a more accurate relationship, rather than being randomly selected from the head, tail or middle, and the data at the point where the change just occurs is uniformly used. For example, the actual physical quantity of 1 millimeter is initially represented by 3 pixels, the object distance is smaller, and it may still be represented by 3 pixels, the object distance is smaller, and it is represented by 4 pixels. Since the concentric square target used in the embodiment is used, that is, the transverse line number and the longitudinal line number change with the object distance, one can be selected for subsequent analysis.

[0068] Obtain the number of vertical lines (or the number of horizontal lines) corresponding to all target images from far to near frame by frame to form a line number sequence.

[0069] The preset constant is 1, and the description is made by taking this as an example.

[0070] In the line number sequence, when the difference between the current element and the next element is greater than or equal to the preset constant, the one frame target image corresponding to the current element is recorded as a split frame target image.

[0071] Thus, a plurality of split frame target images are obtained. Further, the field of view corresponding to the split frame is calculated, and the error tolerance degree required for fitting is obtained.

[0072] For any split frame target image, obtain the ratio of one-half of the visible height to the object distance, denoted as a first ratio, input the first ratio into an inverse tangent function to obtain a first output value, and take twice the first output value as a vertical field of view. Obtain the ratio of one-half of the visible width to the object distance, denoted as a second ratio, input the second ratio into an inverse tangent function to obtain a second output value, and take twice the second output value as a horizontal field of view.

[0073] It should be noted that: thus, according to the object distance, the visible height, and the visible width corresponding to any split frame target image, the vertical field of view and the horizontal field of view thereof are obtained. In this embodiment, a concentric square target is used, which is symmetrical on the left and right and symmetrical on the top and bottom. Therefore, one-half of the visible height and one-half of the visible width are taken, the output value of the inverse tangent function is in the range of -90 degrees to 90 degrees, which is a known technology. Therefore, the output value is doubled to make the range of the field of view -180 degrees to 180 degrees, and the size of the range is 360 degrees.

[0074] Step S004: Determine the error requirement degree according to the longitudinal height and the number of longitudinal lines of each split frame target image; for all split frame target images, take the error requirement degree as the weight of the weighted residual sum of squares in the function fitting process, take the focal length as the independent variable, and take the vertical field of view and the horizontal field of view as the dependent variables to perform function fitting respectively, to obtain a first fitting function and a second fitting function; input the current focal length of the continuous zoom camera into the first fitting function and the second fitting function respectively to output the current vertical field of view and the current horizontal field of view of the continuous zoom camera.

[0075] It should be noted that: since the inference is performed by using images, the error degrees of the obtained data are different, and the higher the resolution, the higher the accuracy and the higher the data accuracy. For the same physical quantity, the more the split pixel quantity, the more accurate the pixel inference result. Thus, the error tolerance degree corresponding to the data can be obtained.

[0076] For any segmented target image, the ratio of the vertical height (i.e., the number of pixels in any column) to the number of vertical lines in the segmented target image (or the ratio of the horizontal width (i.e., the number of pixels in any row) to the number of horizontal lines in the segmented target image) is denoted as accuracy.

[0077] Obtain the sum of the accuracy values ​​of all segmented target images, and denote it as the first sum.

[0078] For any segmented frame of the target image, obtain the ratio of accuracy to the first sum value, which is denoted as the error requirement level.

[0079] It should be noted that higher precision means more pixels are used to represent the same line width, resulting in greater accuracy. Since all target images are of the same size, the first sum is obtained, and then the ratio of the precision of any segmented frame target image to the first sum is calculated. The larger the ratio, the more important the data of this segmented frame target image is in this fitting, or the higher the accuracy or error requirement. Therefore, a more accurate fitting and smaller error are required.

[0080] For all segmented target images, with focal length as the independent variable and vertical field of view as the dependent variable, the least squares method is used to fit a function and obtain the first fitting function. The error requirement of the segmented target images is the weight of the weighted sum of squared residuals in the least squares method.

[0081] It should be noted that: the least squares method is a well-known technique, and the sum of squared residuals is an important indicator used in the least squares method to measure the goodness of fit of the model. The weighted sum of squared residuals is an improved method for calculating the sum of squared residuals, which introduces a weighting factor on the basis of the traditional sum of squared residuals. The least squares method is an algorithm that finds the best function match by minimizing the sum of squared errors, specifically: (1) Initialize parameters: First, set initial values ​​for the model parameters. These parameters will be used for subsequent iterative updates. (2) Calculate residuals: Based on the current parameter values, calculate the residuals between the model predictions and the actual observations. The residuals are an important indicator for measuring the model fit. Specifically, in this embodiment, the weighted sum of squared residuals under the current parameter values ​​is: ,in, The number of target images in the segmented frames. For the first The error requirement for each segmented frame of the target image. For the first Vertical field of view of a segmented frame target image In the function model with the previous parameter values, the first... The fitting vertical field of view angle corresponding to each segmented frame target image is calculated, that is, a function model is constructed according to the previous parameter value, and the focal length and the vertical field of view angle of all segmented frame target images are taken as inputs, and the fitting vertical field of view angle corresponding to each segmented frame target image is output as an output.(3) Parameter updating: the parameter value is adjusted according to the residual error to reduce the residual error. This is usually achieved by solving a normal equation or using a gradient descent method.(4) Iterative convergence: the process of calculating the residual error and updating the parameter is repeated until the convergence condition is met (such as the residual error is less than a certain threshold or the maximum number of iterations is reached).(5) Output result: when the iterative convergence is met, the final parameter value and the fitting result are output.

[0082] For all segmented frame target images, the focal length is taken as the independent variable, the horizontal field of view angle is taken as the dependent variable, the function fitting is performed using the least square method, and the second fitting function is obtained, wherein the error requirement degree of the segmented frame target image is the weight of the weighted residual sum of squares in the least square method.

[0083] The current focal length of the continuous zoom camera is input into the first fitting function and the second fitting function respectively, and the current vertical field of view angle and the horizontal field of view angle of the continuous zoom camera are output.

[0084] The application also provides a continuous zoom camera field of view angle FOV calculation system, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program stored in the memory to realize the steps of the continuous zoom camera field of view angle FOV calculation method.

[0085] Thus, the application is completed.

[0086] In summary, in the embodiment of the application, the number of horizontal lines and the number of vertical lines are determined according to the change of the pixel gray value in the binary image of each frame target image in the horizontal direction and the vertical direction, so as to determine the visible width and the visible height, a plurality of segmented frame target images are screened out according to the change of the number of vertical lines corresponding to all frame target images from far to near, the vertical field of view angle and the horizontal field of view angle are determined according to the visible width and the visible height corresponding to each segmented frame target image and the object distance, the error requirement degree is determined according to the vertical height and the number of vertical lines of each segmented frame target image, the focal length is taken as the independent variable, and the vertical field of view angle and the horizontal field of view angle are taken as the dependent variable for function fitting, the first fitting function and the second fitting function are obtained, the current focal length of the continuous zoom camera is input into the first fitting function and the second fitting function respectively, and the current vertical field of view angle and the horizontal field of view angle of the continuous zoom camera are output. The application obtains a more accurate focal length and field of view angle function, and guarantees the accuracy of the field of view angle calculation.

[0087] The above merely provides the preferred embodiment of the present application, and is not used to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for calculating the field of view (FOV) of a continuous zoom camera, characterized in that, The method comprises the following steps: The method comprises the following steps: Obtain a plurality of target images from far to near, wherein each target image corresponds to an object distance and a focal length; and obtain a binary image of each target image; Determine the number of horizontal lines and the number of vertical lines according to the gray value changes of the pixel points in the binary image of each target image in the horizontal direction and the vertical direction respectively; and determine the visual width and the visual height according to the number of horizontal lines and the number of vertical lines. Screen a plurality of segmented target images according to the changes of the number of vertical lines corresponding to all target images from far to near; and determine the vertical field of view and the horizontal field of view according to the visual width, the visual height and the object distance corresponding to each segmented target image.

2. The method of claim 1, wherein, Determine the error requirement degree according to the vertical height and the number of vertical lines of each segmented target image; and perform function fitting on the vertical field of view and the horizontal field of view respectively as the dependent variables and the focal length as the independent variable, with the error requirement degree as the function of the weight of the weighted residual sum of squares in the process of function fitting, to obtain a first fitting function and a second fitting function; and input the current focal length of the continuous zoom camera into the first fitting function and the second fitting function respectively to output the current vertical field of view and the current horizontal field of view of the continuous zoom camera. The specific steps for determining the number of horizontal lines and the number of vertical lines comprise the following steps: For the binary image of each target image, the gray values of all pixel points are counted from left to right in a row passing through the center of the binary image to form a horizontal binary sequence, and the gray values of all pixel points are counted from top to bottom in a column passing through the center of the binary image to form a vertical binary sequence; 3. The method of claim 2, wherein, The number of horizontal lines and the number of vertical lines are determined according to the differences between adjacent elements in the horizontal binary sequence and the vertical binary sequence respectively. The specific steps for determining the number of horizontal lines and the number of vertical lines according to the differences between adjacent elements in the horizontal binary sequence and the vertical binary sequence respectively comprise the following steps: In the horizontal binary sequence, the sum of the absolute values of the differences between all adjacent elements is denoted as the number of horizontal lines; 4. The method of claim 1, wherein, In the vertical binary sequence, the sum of the absolute values of the differences between all adjacent elements is denoted as the number of vertical lines. The specific steps for determining the visual width and the visual height comprise the following steps: The product of the number of horizontal lines and a preset target line width is denoted as the visual width; 5. The method of claim 1, wherein, The product of the number of vertical lines and the preset target line width is denoted as the visual height. The specific steps for screening a plurality of segmented target images comprise the following steps: Obtain the number of vertical lines corresponding to all target images from far to near frame by frame to form a line number sequence; 6. The method of calculating the field of view (FOV) of a continuous zoom camera according to claim 5, wherein, Screen a plurality of segmented target images according to the differences between adjacent elements in the line number sequence. The specific steps for screening a plurality of segmented target images according to the differences between adjacent elements in the line number sequence comprise the following steps:

7. The method of calculating the field of view (FOV) of a continuous zoom camera according to claim 1, wherein, In the line number sequence, when the difference between the current element and the next element of any two elements is greater than or equal to a preset constant, the target image corresponding to the former element is denoted as a segmented target image. The specific steps for determining the vertical field of view and the horizontal field of view comprise the following steps: For any one split frame target image, a ratio of one half of the visual height to the object distance is obtained, denoted as a first ratio, the first ratio is input into an inverse tangent function to obtain a first output value, twice the first output value is denoted as a vertical field of view angle; a ratio of one half of the visual width to the object distance is obtained, denoted as a second ratio, the second ratio is input into the inverse tangent function to obtain a second output value, twice the second output value is denoted as a horizontal field of view angle.

8. The method of calculating the field of view (FOV) of a continuous zoom camera according to claim 1, wherein, The specific steps of determining the error requirement degree include the following: For any one split frame target image, a ratio of the longitudinal height of the split frame target image to the number of longitudinal lines is obtained, denoted as precision; According to the precisions of all the split frame target images, the error requirement degree of any one split frame target image is determined.

9. The method of calculating the field of view (FOV) of a continuous zoom camera according to claim 8, wherein, The specific steps of determining the error requirement degree of any one split frame target image according to the precisions of all the split frame target images include the following: The sum value of the precisions of all the split frame target images is obtained, denoted as a first sum value; The ratio of the precision of any one split frame target image to the first sum value is obtained, denoted as the error requirement degree.

10. A field of view (FOV) conversion system for a continuous zoom camera, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The computer program is executed by the processor to realize the steps of the continuous zoom camera's conversion field of view angle FOV calculation method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Method for acquiring imaging view field angle of motorized zoom lens in real time

    CN106950793A

  • High-definition analog camera control system and method of automatic focusing mechanism

    CN117835058A