FOV (field of view) calculation method and FOV calculation system for continuous zoom camera
By obtaining the binary data of the target image of the continuous zoom camera, screening and fitting the field of view angle, the field of view angle calculation error affected by the lens thickness is solved, and higher-precision field of view angle calculation is achieved.
Patent Information
- Application Number
- CN202511324425.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-09-17
AI Technical Summary
The existing method for calculating the field of view angle of a continuous zoom camera is affected by factors such as lens thickness, resulting in a non-linear relationship between focal length and field of view angle, and insufficient calculation accuracy.
By obtaining binary images of several frames of target images, determining the number of horizontal and vertical lines, screening and segmenting the frame target images, and using the error requirement degree as the weight for function fitting, the vertical and horizontal field of view angles are obtained.
The accuracy of field of view angle calculation is improved, the error caused by lens thickness is overcome, and a more accurate fitting of the relationship between focal length and field of view angle is achieved.
Smart Images

Figure CN120835210A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a 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] The existing problem: at present, 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, but due to the influence of 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 field of view (FOV) calculation method and system of a continuous zoom camera to solve the existing problem.
[0005] The field of view (FOV) calculation method and system of a continuous zoom camera provided by the present application adopt the following technical solutions: An embodiment of the present application provides a field of view (FOV) calculation method of a continuous zoom camera, which 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; obtain a binary image of each target image; Determine the number of horizontal lines and the number of vertical lines according to the change of pixel gray value 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; According to the change of the number of vertical lines corresponding to all frames of target images from far to near, a plurality of segmented target images are screened out; 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; Determine the error requirement degree according to the vertical height and the number of vertical lines of each segmented target image; for all segmented target images, the weight of the weighted residual sum of squares in the function fitting process is taken as a function of the error requirement degree, the focal length is taken as an independent variable, and the vertical field of view and the horizontal field of view are taken as dependent variables respectively to perform function fitting, to obtain a first fitting function and a second fitting function; 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 and the current horizontal field of view of the continuous zoom camera are output.
[0006] Further, the specific steps of determining the number of horizontal lines and the number of vertical lines include the following: 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 vertical binary sequence. The number of horizontal lines and the number of vertical lines are determined according to the difference between adjacent elements in the horizontal binary sequence and the vertical binary sequence, respectively.
[0007] Further, the specific steps of determining the number of horizontal lines and the number of vertical lines according to the difference between adjacent elements in the horizontal binary sequence and the vertical binary sequence, respectively, include the following: 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. In the vertical binary sequence, the sum of the absolute values of the difference values of all adjacent elements is denoted as the number of vertical lines.
[0008] Further, the specific steps of determining the visible width and the visible height include the following: The product of the number of horizontal lines and the preset target line width is denoted as the visible width. The product of the number of vertical lines and the preset target line width is denoted as the visible height.
[0009] Further, the specific steps of screening out a plurality of split frame target images include the following: The number of vertical lines corresponding to all target images is obtained from far to near frame by frame to form a line number sequence. According to the difference between adjacent elements in the line number sequence, a plurality of split frame target images are screened out.
[0010] Further, the specific steps of screening out a plurality of split frame target images according to the difference between adjacent elements in the line number sequence include the following: 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 of target image corresponding to the current element is denoted as a split frame target image.
[0011] Further, the specific steps of determining the vertical field of view angle and the horizontal field of view angle include the following: For any one split frame target image, the 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; the 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 an inverse tangent function to obtain a second output value, twice the second output value is denoted as a horizontal field of view angle.
[0012] Further, the specific steps of determining the error requirement degree include the following: For any one split frame target image, the ratio of the longitudinal height of the split frame target image to the number of longitudinal lines is obtained, denoted as accuracy; According to the accuracy of all split frame target images, the error requirement degree of any one split frame target image is determined.
[0013] Further, the specific steps of determining the error requirement degree according to the accuracy of all split frame target images include the following: The sum value of the accuracy of all split frame target images is obtained, denoted as a first sum value; The ratio of the accuracy of any one split frame target image to the first sum value is obtained, denoted as an error requirement degree.
[0014] The application further provides a continuous zoom camera rotation field of view FOV calculation system, including 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 rotation field of view FOV calculation method.
[0015] The technical scheme of the application has the following beneficial effects: In the embodiment of the present application, according to the change of the pixel gray value in the horizontal and vertical directions in the binary image of each frame target image, the number of horizontal lines and the number of vertical lines are determined, and then the visible width and the visible height are determined. According to the change of the number of vertical lines corresponding to all frames of target images from far to near, several segmented frame target images are screened out. Thus, the segmented frame target images with obvious change in the number of lines are screened out, which are used for subsequent function fitting, so as to ensure the accuracy of the fitting and the accuracy of the calculation of the field of view. According to the visible width and the visible 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. According to the vertical height and the number of vertical lines of each segmented frame target image, the error requirement degree is determined. For all segmented frame target images, the error requirement degree is used as the weight of the weighted residual sum of squares in the function fitting process, the focal length is used as the independent variable, and the vertical field of view and the horizontal field of view are used as the dependent variable, respectively, to perform function fitting, so as to obtain the first fitting function and the second fitting function. Thus, the error requirement degree is weighted in the function fitting process, which can more accurately reflect the fitting effect of the function, and the accuracy of the calculation of the field of view is ensured. 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 and the current horizontal field of view of the continuous zoom camera are output. Thus, the present application ensures the accuracy of the calculation of the field of view by obtaining a more accurate relationship function between the focal length and the field of view. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 A step flow chart of a continuous zoom camera field of view conversion FOV calculation method of the present application; Figure 2 A target schematic diagram; Figure 3 An imaging schematic diagram of an object from near to far. DETAILED DESCRIPTION
[0018] 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.
[0019] 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.
[0020] 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.
[0021] Please refer to Figure 1 which shows a step flowchart of a continuous zoom camera FOV conversion calculation method provided by an embodiment of the present application, which includes the following steps: 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.
[0022] 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, obtain the nonlinear relationship between focal length and field of view angle, and 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.
[0023] It should be noted that: since the lens has thickness, the field of view angle cannot be accurately obtained by calculation in a geometric way according to the ideal pinhole imaging model. 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 (pixels are discrete quantities, not analog quantities, 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 functional relationship between the data is obtained through data fitting.
[0024] 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).
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] Wherein, the image gray processing and the Otsu method are all known technologies, and the specific method is not introduced here.
[0031] Thus, the data corresponding to each frame of target image includes: object distance, focal length, binary image.
[0032] Step S002: according to the pixel gray value change in the horizontal and vertical directions of the binary image of each frame of target image, the number of horizontal lines and the number of vertical lines are determined; according to the size of the number of horizontal lines and the number of vertical lines, the visual width and the visual height are determined.
[0033] It should be noted that: the above-mentioned collected images are discrete quantities (pixels are one piece by one piece, not continuous), and the actual things are analog quantities, so the collected multiple frames of images need to be analyzed to obtain specific images that change, and then more accurate physical quantity data is obtained by analysis to calculate the field of view angle. That is, the same 2mm wide line, when the object distance changes, the pixel amount represented in the image may not change, for example: 5 in continuous multiple frames, and the pixel amount changes from 5 to 6, which is considered to be more accurate data of the corresponding image. The imaging schematic of the object from near to far is shown in Figure 3 , Figure 3 In the upper half of the figure, according to the principle that the imaging of the object is large near and small far, the imaging size of the same object gradually decreases from left to right as the object distance increases, Figure 3 In the lower half of the figure, the horizontal axis is the object distance, and the vertical axis is the pixel number. From left to right, from the minimum (min) object distance to the maximum (max) object distance, the pixel number corresponding to the 2mm target line width in the imaging gradually decreases.
[0034] It should be further noted that: the specific processing process of processing the collected images to calculate the field of view angle is: first, the vertical and horizontal pixel sequences of a single frame of image are obtained, and the visual height and visual width distance are calculated. Then the split frame in the continuous frame is obtained. Finally, the field of view angle corresponding to the split frame is calculated, and the error requirement degree required for fitting is obtained. Since the physical quantity corresponding to each white or black block in the binary image of each frame of target image is known, the corresponding physical quantity, i.e. the visual height and the visual width, can be calculated by the number of single-color regions in the binary sequence.
[0035] 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 vertical binary sequence.
[0036] Wherein, the horizontal binary sequence or the vertical binary sequence is: [0, 0, 0, 1, 1, 1, 0, …, 0, 1, 1, 1, 0, 0, 0].
[0037] 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.
[0038] 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.
[0039] The product of the transverse line number and the preset target line width is recorded as the visual width.
[0040] The product of the longitudinal line number and the preset target line width is recorded as the visual height.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] It is necessary to explain that: further, the continuous frames can be analyzed according to the acquisition sequence 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 the 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.
[0045] The number of vertical lines (or horizontal lines) corresponding to all target images is obtained frame by frame from far to near to form a line number sequence.
[0046] The preset constant is 1, and this is used as an example for description.
[0047] In the line number sequence, for any two elements, when the difference between the previous element and the next element is greater than or equal to a preset constant, a frame of target image corresponding to the previous element is recorded as a segmented frame target image.
[0048] Thus, several segmented frame target images are obtained. Furthermore, the field of view angle corresponding to the segmented frames is calculated, and the error tolerance required for fitting is obtained.
[0049] For any split-frame target image, obtain the ratio of half the visible height to the object distance, record it as the first ratio, input the first ratio into the inverse tangent function to obtain the first output value, and record twice the first output value as the vertical field of view angle. Obtain the ratio of half the visible width to the object distance, record it as the second ratio, input the second ratio into the inverse tangent function to obtain the second output value, and record twice the second output value as the horizontal field of view angle.
[0050] It should be noted that the vertical and horizontal field of view angles are thus obtained based on the object distance, visible height, and visible width corresponding to any segmented frame target image. In this embodiment, a concentric square target is used, which is bilaterally and vertically symmetrical. Therefore, the visible height and visible width are taken as half. The output value of the inverse tangent function ranges from -90 degrees to 90 degrees. This is a well-known technique, so the output value is doubled, setting the field of view angle range to -180 degrees to 180 degrees, and the range is set to 360 degrees.
[0051] Step S004: Determine the required error level based on the vertical height and number of vertical lines of each segmented frame target image; for all segmented frame target images, use the required error level as the weight of the weighted residual sum of squares during function fitting, use the focal length as the independent variable, and use the vertical field of view angle and the horizontal field of view angle as dependent variables 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, and output the current vertical field of view angle and horizontal field of view angle of the continuous zoom camera.
[0052] It's important to note that because inference is performed using images, the resulting data has varying degrees of error. Higher resolution leads to higher precision and higher data accuracy. For the same physical quantity, the more pixels are used, the more accurate the pixel inference result. This allows us to determine the error tolerance of the data.
[0053] For any segmented frame target image, obtain the ratio of the vertical height of the segmented frame target image (that is, the number of pixels in any column) to the number of vertical lines (or obtain the ratio of the horizontal width of the segmented frame target image (that is, the number of pixels in any row) to the number of horizontal lines), and record it as accuracy.
[0054] Obtain the sum of the accuracy of the target images of all segmented frames, which is recorded as the first sum.
[0055] For any segmented frame target image, the ratio of the accuracy to the first sum value is obtained and recorded as the error requirement.
[0056] It should be noted that greater 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 greater the ratio, the more important the data of that segmented frame target image is in the fitting process, or the greater the accuracy or error requirement, the more accurate the fitting requires, and the smaller the error requirement.
[0057] For all segmented frame target images, the focal length is used as the independent variable and the vertical field of view angle is used as the dependent variable. The least squares method is used to perform function fitting to obtain a first fitting function, wherein the error requirement degree of the segmented frame target image is the weight of the weighted residual sum of squares in the least squares method.
[0058] It should be noted that the least squares method is a well-known technique, and the residual sum of squares is an important indicator used in the least squares method to measure the goodness of model fit. The weighted residual sum of squares is an improved residual sum of squares calculation method, which introduces a weight factor on the basis of the traditional residual sum of squares. The least squares method is an algorithm that finds the best function match by minimizing the error sum of squares, specifically: (1) Initialization parameters: First, set initial values for the model parameters. These parameters will be used for subsequent iterative updates. (2) Calculation of residuals: Based on the current parameter values, calculate the residuals between the model prediction value and the actual observation value. The residual is an important indicator for measuring the model fitting effect. Specifically, the weighted residual sum of squares under the current parameter values in this embodiment is: ,in, is the number of target images in the segmented frame, For the The error requirement of the target image of each segmented frame, For the The vertical field of view of the target image of each segmented frame, is the first parameter in the function model under the previous parameter value The fitted vertical field of view corresponding to each segmented frame target image is calculated, i.e., a function model is constructed according to the previous parameter value, and the focal length and vertical field of view of all segmented frame target images are taken as inputs, and the fitted vertical field of view corresponding to each segmented frame target image is output.
[0059] For all segmented frame target images, the focal length is taken as the independent variable, the horizontal field of view is taken as the dependent variable, function fitting is performed using the least squares method, and a 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 squares method.
[0060] 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 and horizontal field of view of the continuous zoom camera are output.
[0061] The application further provides a continuous zoom camera rotation field of view 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 rotation field of view FOV calculation method.
[0062] Thus far, the application is completed.
[0063] In the embodiment of the application, the number of horizontal lines and the number of vertical lines are determined according to the changes of the pixel grayscale values in the horizontal and vertical directions of the binary image of each frame target image, so as to determine the visible width and the visible height, a plurality of segmented frame target images are screened out according to the changes of the number of vertical lines corresponding to all frame target images from far to near, the vertical field of view and the horizontal field of view are determined according to the visible width, the visible height and the object distance corresponding to each segmented frame target image, the error requirement degree is determined according to the vertical height and the number of vertical lines of each segmented frame target image, for all segmented frame target images, the error requirement degree is taken as the weight of the weighted residual sum of squares in the function fitting process, the focal length is taken as the independent variable, and the vertical field of view and the horizontal field of view are taken as the dependent variables to perform function fitting, and 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 and horizontal field of view of the continuous zoom camera are output. The application obtains a more accurate relationship function between the focal length and the field of view, and guarantees the accuracy of the field of view calculation.
[0064] 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
Neural network optimization automatic zoom camera internal reference calibration method based on view field constraint
CN118037863A
Apparatus for displaying lane
KR1020220119584A
Wide-view-field ultrahigh-resolution optical imaging system and method
WO2014023231A1
Cited By
A method for optimizing camera field of view and imaging pose for monitoring the surface of high-temperature melts.
CN122550696A