High-definition video monitoring picture acquisition method and terminal
By selecting the initial point in the surveillance video device, dividing the grid and calculating the rotation coordinates and magnification using the LM method, the problems of insufficient image details and cumbersome preset point settings in the prior art are solved, and high-definition video surveillance screen is realized Acquisition and quick switching reduce the setup workload of virtual preset points.
Patent Information
- Application Number
- CN202411331288.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-17
AI Technical Summary
When existing surveillance video equipment is shot in a large area, the image details are insufficient, resulting in poor AI analysis results. The setting of preset points relies on manual control, the workload is large and the quantity is limited, and it cannot meet the needs of high-magnification segmentation.
A method of obtaining high-definition video surveillance screen is adopted, by selecting initial points, dividing grids, calculating rotation coordinates and magnification, and controlling the camera rotation and amplification by using Levenberg-Marquardt method (LM method) to achieve high-definition video surveillance screen acquisition. Reduce the setup workload of virtual preset points.
It realizes the acquisition of high-definition video surveillance screens, reduces the workload of manually setting virtual preset points, and can quickly switch different high-definition pictures without manually presetting virtual preset points, effectively solving the number of camera virtual preset points settings.
Smart Images

Figure CN119155551A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video processing, and in particular to a method and a terminal for acquiring high-definition video monitoring images. Background Art
[0002] Today's surveillance video equipment can capture images from a long distance and with a wide viewing angle. However, since the area is too large, the image cannot show enough details, and the effect is not good if the image is used for AI analysis.
[0003] The current practice is usually to divide a large area into multiple small areas, set a preset point for each area, and then let the surveillance video rotate to each preset point to shoot high-definition video images. The preset point is a function of the ball camera, which allows the user to save the specific position and angle of the camera for quick call when needed. These preset points can be the horizontal and vertical angles of the pan / tilt head, as well as the focal length of the camera lens and other parameters. However, the current practice has the following defects:
[0004] Disadvantage 1: The setting of preset points depends on manual control of camera rotation and focus. If there are many preset points, the workload is very large.
[0005] Disadvantage 2: The preset points are saved on the video surveillance device, and the number that can be set is limited. For example, a 40x camera can be divided into 1600 (40*40) small areas, which is likely to exceed the upper limit of the number of video surveillance devices and make it impossible to set. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a method and a terminal for acquiring high-definition video monitoring images, which can effectively reduce the workload of setting virtual preset points of cameras.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A method for acquiring high-definition video surveillance images, comprising the steps of:
[0009] S1, selecting an initial position of a camera, and controlling the camera to shoot a first video image at a first magnification, and recording a field of view FOV1 of the camera in the first video image;
[0010] S2: Divide the first video screen into n×n grids to obtain the field of view FOV of the camera in each grid. 1 / n ;
[0011] S3, calculating the rotation coordinates of each grid, and using the LM method to calculate the magnification n of the camera after it rotates to each grid;
[0012] S4. Based on the rotation coordinates and the magnification ratio, control the camera to turn and zoom in to obtain a designated second video image.
[0013] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0014] A high-definition video surveillance image acquisition terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0015] S1, selecting an initial position of a camera, and controlling the camera to shoot a first video image at a first magnification, and recording a field of view FOV1 of the camera in the first video image;
[0016] S2: Divide the first video screen into n×n grids to obtain the field of view FOV of the camera in each grid. 1 / n ;
[0017] S3, calculating the rotation coordinates of each grid, and using the LM method to calculate the magnification n of the camera after it rotates to each grid;
[0018] S4. Based on the rotation coordinates and the magnification ratio, control the camera to turn and zoom in to obtain a designated second video image.
[0019] The beneficial effects of the present invention are: providing a method and terminal for acquiring high-definition video surveillance images, by first dividing the images captured by the camera at a preset initial point angle and magnification into n×n grids to obtain the rotation coordinates of each grid and using the LM method to calculate the magnification to be magnified after rotating to the grid, and then directly zooming in and shooting the designated grid by the rotation coordinates and the magnification, so as to obtain the desired high-definition and specific video surveillance images, and can quickly switch between different high-definition images without manually presetting virtual preset points for zooming in and shooting, effectively reducing the workload of setting virtual preset points of the camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of a method for acquiring high-definition video surveillance images according to an embodiment of the present invention;
[0021] Figure 2 A curve diagram showing the relationship between the field of view angle and the zoom value obtained by using LM fitting in a high-definition video surveillance image acquisition method according to an embodiment of the present invention;
[0022] Figure 3 The present invention is a schematic structural diagram of a high-definition video surveillance image acquisition terminal according to an embodiment of the present invention.
[0023] Description of labels:
[0024] 1. A high-definition video surveillance image acquisition terminal; 2. A memory; 3. A processor. DETAILED DESCRIPTION
[0025] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0026] Prior to this, the English terms that appear in this article are explained as follows:
[0027] LM method: full name Levenberg-Marquardt method, is a method of least squares estimation of regression parameters in nonlinear regression, proposed by DW Marquardt in 1963. LM method combines the steepest descent method and the linearization method (Taylor series), and is applicable to the situation where the parameter estimate is far from the optimal value at the beginning of the iteration, and the parameter estimate is close to the optimal value in the later stage of the iteration;
[0028] ONVIF protocol: full name Open Network Video Interface Forum, Open Network Video Interface Forum, created a standard for how IP products in video surveillance and other physical security fields can communicate with each other. It is a common protocol for video surveillance and used to control equipment.
[0029] Please refer to Figure 1 and Figure 2 , a method for obtaining a high-definition video surveillance image, comprising the steps of:
[0030] S1, selecting an initial position of a camera, and controlling the camera to shoot a first video image at a first magnification, and recording a field of view FOV1 of the camera in the first video image;
[0031] S2: Divide the first video screen into n×n grids to obtain the field of view FOV of the camera in each grid. 1 / n ;
[0032] S3, calculating the rotation coordinates of each grid, and using the LM method to calculate the magnification n of the camera after it rotates to each grid;
[0033] S4. Based on the rotation coordinates and the magnification ratio, control the camera to turn and zoom in to obtain a designated second video image.
[0034] From the above description, it can be seen that the beneficial effects of the present invention are: providing a method for acquiring high-definition video surveillance images, by first dividing the images captured by the camera at a preset initial point angle and magnification, dividing them into n×n grids to obtain the rotation coordinates of each grid and using the LM method to calculate the magnification ratio to be rotated to the grid, and then directly zooming in and shooting the specified grid by rotating the coordinates and the magnification ratio, you can get the desired high-definition, specific video surveillance images, and can quickly switch between different high-definition images, without the need to manually preset virtual preset points to zoom in and shoot, effectively reducing the workload of setting virtual preset points of the camera.
[0035] Furthermore, the calculation of the rotation coordinates of each grid in step S3 is specifically as follows:
[0036] S31. Determine the relationship between the physical parameters of the camera and the image plane coordinates, and transform the plane coordinates of the center of each grid in the first video screen under wide angle into polar coordinates with the initial point as the origin of the camera, as the rotation coordinates of each grid.
[0037] From the above description, it can be seen that by converting the plane coordinates and the polar coordinates, the rotation coordinates of the camera turning to each grid can be obtained, and then the mechanical movement of the camera gimbal can be effectively controlled to perform precise magnification.
[0038] Furthermore, in step S3, the LM method is used to calculate the magnification of the camera after it rotates to each grid, specifically:
[0039] S32, controlling the pan / tilt of the camera to rotate according to the rotation coordinates corresponding to each grid and then magnify n times, where n is the magnification of the camera corresponding to the field of view angle in each grid, and n is less than or equal to the maximum magnification of the camera;
[0040] S33, using the LM method to fit the field angle-magnification curve, as follows:
[0041] S331, uniformly collect multiple zoom values zoom, horizontal field of view angle hfov and vertical field of view angle vfov between 1 and n magnifications, and obtain the relationship between the field of view angle and the zoom value as follows:
[0042]
[0043] Where K1, K2 and K3 are the constant coefficient vector values to be determined. Simplifying formula (1) yields:
[0044] y=f(x,θ) (2);
[0045] Among them, x is the input zoom value, parameter θ is the set of constant coefficient vector values K1, K2 and K3 that need to be solved, and y is the output field of view angle. The parameter θ is initialized by the linear fitting method and converted into the objective function expression:
[0046]
[0047] Where i is the index subscript of the collected data;
[0048] S332. Calculate the Jacobian matrix J of the model prediction value for the parameter θ, and obtain:
[0049]
[0050] Where j is the column subscript of the Jacobian matrix,
[0051] S333, the LM method is used again to update the parameter θ, and the update formula is as follows:
[0052] θ k+1 =θ k -(J T J+λI) -1 J T r (5);
[0053] Where k is the number of iterations, r = yf(x,θ) represents the residual vector, and λ is the parameter that controls the step size;
[0054] S334, repeating steps S332-S333, updating the parameter θ until the convergence condition is met, and outputting the final parameter θ, respectively obtaining the constant coefficients K1, K2 and K3 for fitting under the horizontal field of view and the vertical field of view, and substituting them into formula (1) to obtain the relationship formula between the horizontal field of view angle and the zoom value FOV H The relationship between the vertical field of view angle and the zoom value is FOV V :
[0055]
[0056] The convergence condition is when the error variation is less than a first threshold or when a predetermined maximum number of iterations is reached.
[0057] From the above description, it can be seen that since the camera needs to perform magnification amplification, the nonlinear problem of the zoom lens needs to be solved. Therefore, the LM method is used to fit the field of view angle and magnification curve, that is, to fit the relationship between the field of view angle and the zoom value. The LM algorithm is a combination of the Gauss-Newton algorithm and the gradient descent method. It is insensitive to over-parameterization problems and can effectively handle redundant parameter problems, greatly reducing the chance of the cost function falling into a local minimum, and can achieve effective search for nonlinear camera intrinsic parameter vectors.
[0058] Furthermore, the step S3 also includes:
[0059] Storing the rotation coordinates and the magnification ratio in a system server;
[0060] The step S4 is specifically as follows:
[0061] The ONVIF protocol is used to control the camera to move based on the rotation coordinates and the magnification and adjust the focal length to zoom in and shoot to obtain a specified second video image.
[0062] From the above description, it can be seen that the calculated rotation coordinates and steering angles of each grid are stored in the system server, which is not subject to the storage limitation of the monitoring device itself, that is, the number of virtual preset points that can be set is not limited.
[0063] Furthermore, the initial point position is the initial shooting angle position of the camera;
[0064] The first magnification is 1 magnification.
[0065] From the above description, it can be seen that the first video frame initially shot is based on the initial shooting angle of the camera to shoot a frame at a magnification of 1, that is, the widest frame can be captured at a normal angle, which effectively facilitates the subsequent division of the grid according to the magnification n.
[0066] Please refer to Figure 3 A high-definition video surveillance image acquisition terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0067] S1, selecting an initial position of a camera, and controlling the camera to shoot a first video image at a first magnification, and recording a field of view FOV1 of the camera in the first video image;
[0068] S2: Divide the first video screen into n×n grids to obtain the field of view FOV of the camera in each grid. 1 / n ;
[0069] S3, calculating the rotation coordinates of each grid, and using the LM method to calculate the magnification n of the camera after it rotates to each grid;
[0070] S4. Based on the rotation coordinates and the magnification ratio, control the camera to turn and zoom in to obtain a designated second video image.
[0071] From the above description, it can be seen that the beneficial effects of the present invention are: based on the same technical concept, in conjunction with the above-mentioned high-definition video surveillance picture acquisition method, a high-definition video surveillance picture acquisition terminal is provided, by first dividing the picture captured by the camera with a preset initial point angle and magnification, dividing it into n×n grids to obtain the rotation coordinates of each grid and using the LM method to calculate the magnification ratio after rotating to the grid, and then directly zooming in and shooting the specified grid by rotating the coordinates and the magnification, you can get the desired high-definition, specific video surveillance picture, and can quickly switch between different high-definition pictures, without the need to manually preset virtual preset points to zoom in and shoot, effectively reducing the workload of setting virtual preset points of the camera.
[0072] Furthermore, the calculation of the rotation coordinates of each grid in step S3 is specifically as follows:
[0073] S31. Determine the relationship between the physical parameters of the camera and the image plane coordinates, and transform the plane coordinates of the center of each grid in the first video screen under wide angle into polar coordinates with the initial point as the origin of the camera, as the rotation coordinates of each grid.
[0074] From the above description, it can be seen that by converting the plane coordinates and the polar coordinates, the rotation coordinates of the camera turning to each grid can be obtained, and then the mechanical movement of the camera gimbal can be effectively controlled to perform precise magnification.
[0075] Furthermore, in step S3, the LM method is used to calculate the magnification of the camera after it rotates to each grid, specifically:
[0076] S32, controlling the pan / tilt of the camera to rotate according to the rotation coordinates corresponding to each grid and then magnify n times, where n is the magnification of the camera corresponding to the field of view angle in each grid, and n is less than or equal to the maximum magnification of the camera;
[0077] S33, using the LM method to fit the field angle-magnification curve, as follows:
[0078] S331, uniformly collect multiple zoom values zoom, horizontal field of view angle hfov and vertical field of view angle vfov between 1 and n magnifications, and obtain the relationship between the field of view angle and the zoom value as follows:
[0079]
[0080] Where K1, K2 and K3 are the constant coefficient vector values to be determined. Simplifying formula (1) yields:
[0081] y=f(x,θ) (2);
[0082] Among them, x is the input zoom value, parameter θ is the set of constant coefficient vector values K1, K2 and K3 that need to be solved, and y is the output field of view angle. The parameter θ is initialized by the linear fitting method and converted into the objective function expression:
[0083]
[0084] Where i is the index subscript of the collected data;
[0085] S332. Calculate the Jacobian matrix J of the model prediction value for the parameter θ, and obtain:
[0086]
[0087] Where j is the column subscript of the Jacobian matrix,
[0088] S333, the LM method is used again to update the parameter θ, and the update formula is as follows:
[0089] θ k+1 =θ k -(J T J+λI) -1 J T r (5);
[0090] Where k is the number of iterations, r = yf(x,θ) represents the residual vector, and λ is the parameter that controls the step size;
[0091] S334, repeating steps S332-S333, updating the parameter θ until the convergence condition is met, and outputting the final parameter θ, respectively obtaining the constant coefficients K1, K2 and K3 for fitting under the horizontal field of view and the vertical field of view, and substituting them into formula (1) to obtain the relationship formula between the horizontal field of view angle and the zoom value FOV H The relationship between the vertical field of view angle and the zoom value is FOV V :
[0092]
[0093] The convergence condition is when the error variation is less than a first threshold or when a predetermined maximum number of iterations is reached.
[0094] From the above description, it can be seen that since the camera needs to perform magnification amplification, the nonlinear problem of the zoom lens needs to be solved. Therefore, the LM method is used to fit the field of view angle and magnification curve, that is, to fit the relationship between the field of view angle and the zoom value. The LM algorithm is a combination of the Gauss-Newton algorithm and the gradient descent method. It is insensitive to over-parameterization problems and can effectively handle redundant parameter problems, greatly reducing the chance of the cost function falling into a local minimum, and can achieve effective search for nonlinear camera intrinsic parameter vectors.
[0095] Furthermore, the step S3 also includes:
[0096] Storing the rotation coordinates and the magnification ratio in a system server;
[0097] The step S4 is specifically as follows:
[0098] The ONVIF protocol is used to control the camera to move based on the rotation coordinates and the magnification and adjust the focal length to zoom in and shoot to obtain a specified second video image.
[0099] From the above description, it can be seen that the calculated rotation coordinates and steering angles of each grid are stored in the system server, which is not subject to the storage limitation of the monitoring device itself, that is, the number of virtual preset points that can be set is not limited.
[0100] Furthermore, the initial point position is the initial shooting angle position of the camera;
[0101] The first magnification is 1 magnification.
[0102] From the above description, it can be seen that the first video frame initially shot is based on the initial shooting angle of the camera to shoot a frame at a magnification of 1, that is, the widest frame can be captured at a normal angle, which effectively facilitates the subsequent division of the grid according to the magnification n.
[0103] The present invention provides a method and terminal for obtaining high-definition video surveillance images, which are mainly used in local zoom scenarios of long-distance video surveillance. The following is a detailed description of the method and terminal in conjunction with specific embodiments:
[0104] Please refer to Figure 1 , Embodiment 1 of the present invention is:
[0105] A method for acquiring high-definition video surveillance images, such as Figure 1 As shown, the steps include:
[0106] S1. Select an initial position of the camera, and control the camera to shoot at a first magnification to obtain a first video image, and record the field of view FOV1 of the camera in the first video image, wherein the initial position is an initial shooting angle of the camera, and the first magnification is 1.
[0107] That is, the first video frame initially shot is a frame at a magnification of one based on the initial shooting angle of the camera, that is, the widest frame can be captured at a normal angle, which effectively facilitates the subsequent division of the grid according to the magnification n.
[0108] S2, dividing the first video screen into n×n grids, and obtaining the field of view FOV of the camera in each grid 1 / n .
[0109] S3. Calculate the rotation coordinates of each grid, and use the LM method to calculate the magnification n after the camera rotates to each grid, and store the rotation coordinates and magnification n to the system server. This is not subject to the storage limitations of the monitoring device itself, that is, the number of virtual preset points that can be set is not limited.
[0110] S4. Use ONVIF protocol to control the camera to move based on the rotation coordinates and the magnification and adjust the focal length to zoom in and shoot to obtain a specified second video image.
[0111] That is, in this embodiment, the picture captured by the camera at a preset initial point angle and magnification is first divided into n×n grids to obtain the rotation coordinates of each grid and the LM method is used to calculate the steering angle of each grid after n-fold magnification, thereby obtaining the steering angle of each grid. Subsequently, the designated grid is directly enlarged and photographed by the rotation coordinates and the magnification, so that the desired high-definition and specific video surveillance picture can be obtained, and different high-definition pictures can be quickly switched without manually presetting virtual preset points for enlarged shooting, which effectively reduces the workload of setting virtual preset points of the camera.
[0112] Please refer to Figure 2 , Embodiment 2 of the present invention is:
[0113] A method for acquiring high-definition video surveillance images, based on the above-mentioned embodiment 1, the rotation coordinates of each grid are calculated in step S3, specifically:
[0114] S31, determining the relationship between the physical parameters of the camera and the image plane coordinates, converting the plane coordinates of the center of each grid under the wide angle in the first video screen into polar coordinates with the initial point as the origin of the camera, as the rotation coordinates of each grid.
[0115] That is, in this embodiment, the rotation coordinates of the camera turning to each grid can be obtained by converting the plane coordinates and the polar coordinates, and then the mechanical movement of the camera gimbal can be effectively controlled to perform precise magnification.
[0116] Then, in step S3, the LM method is used to calculate the magnification of the camera after it rotates to each grid, specifically:
[0117] S32, control the camera's pan / tilt to rotate according to the rotation coordinates corresponding to each grid and then zoom in n times, where n is the magnification of the camera's field of view in each grid, and n is less than or equal to the camera's maximum magnification, that is, the first video screen can be divided into multiple grids with the number of rows and columns being the magnification of the camera to n times.
[0118] For the grid photography function, the field of view of each target grid needs to be determined based on the grid segmentation number and the wide-angle field of view. However, the onvif interface of a general ip camera can only control the zoom value, but cannot directly control the field of view of the image. Therefore, the relationship between the zoom value and the field of view needs to be obtained. Specifically, LM is used for fitting, namely:
[0119] S33, using the LM method to fit the field angle-magnification curve, the fitting steps are as follows:
[0120] First, it is clear that the relationship between the gimbal zoom value and the field of view angle is not linear, and the relationship is different for different camera models. For example, for a certain camera, collect no less than 20 sets of data (zoom value, horizontal field of view angle, vertical field of view angle) with a zoom value from 0 to 1 and a step value of 0.05.
[0121] Among them Figure 2 The figure shows the relationship curve between the field of view angle and the zoom value obtained by LM fitting in this embodiment, wherein the horizontal axis zoom is the zoom value, the vertical axis fov is the field of view angle, hfov is the horizontal field of view angle, and vfov is the vertical field of view angle.
[0122] S331, uniformly collect at least 20 multiple zoom values zoom, horizontal field of view angle hfov and vertical field of view angle vfov between 1 and n magnifications, and observe Figure 2 From the curve characteristics and form in, it can be seen that it is obviously a composite form of an exponential function and an inverse proportional function. The relationship between the field of view angle and the zoom value is determined by the following formula (1):
[0123]
[0124] Among them, K1, K2 and K3 are the constant coefficient vector values to be determined. To obtain the relationship between the field of view angle and the zoom value, these three parameters must be determined. First, the objective function must be determined, which is usually the sum of the squares of the errors between the actual observations and the model predictions. The goal is to minimize this error.
[0125] In this embodiment, formula (1) is simplified to obtain:
[0126]
[0127] Among them, x is the input zoom value, parameter θ is the set of constant coefficient vector values K1, K2 and K3 that need to be solved, and y is the output field of view angle. The parameter θ is initialized by the linear fitting method and converted into the objective function expression:
[0128]
[0129] Where i is the index subscript of the collected data.
[0130] S332. Calculate the Jacobian matrix J of the model prediction value for the parameter θ, and obtain:
[0131]
[0132] The Jacobian matrix J can reflect the sensitivity of the predicted value of each data point to the parameters. In the above formula, j is the column subscript of the Jacobian matrix.
[0133] S333, the LM method is used again to update the parameter θ, and the update formula is as follows:
[0134] θ k+1 =θ k -(J T J+λI) -1 J T r (5);
[0135] Where k is the number of iterations, r = yf(x, θ) represents the residual vector, and λ is the parameter that controls the step size. This parameter is automatically adjusted in each iteration according to the fitting effect to achieve a smooth transition from gradient descent to the Gauss-Newton method.
[0136] S334, repeating steps S332-S333, updating the parameter θ until the convergence condition is met, and outputting the final parameter θ, respectively obtaining the constant coefficients K1, K2 and K3 for fitting under the horizontal field of view and the vertical field of view, and substituting them into formula (1) to obtain the relationship formula between the horizontal field of view angle and the zoom value FOV H The relationship between the vertical field of view angle and the zoom value is FOV V :
[0137]
[0138] The convergence condition is when the change in error is less than a first threshold or when a predetermined maximum number of iterations is reached.
[0139] That is, since the camera needs to magnify the magnification, the nonlinear problem of the zoom lens needs to be solved. Therefore, the LM method is used to fit the field of view angle and magnification curve, that is, to fit the relationship between the field of view angle and the zoom value. The LM algorithm is a combination of the Gauss-Newton algorithm and the gradient descent method. It is insensitive to over-parameterization problems and can effectively handle redundant parameter problems, greatly reducing the chance of the cost function falling into a local minimum, and can achieve effective search for nonlinear camera intrinsic parameter vectors.
[0140] Please refer to Figure 3 , Embodiment 3 of the present invention is:
[0141] A high-definition video surveillance image acquisition terminal 1 includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, the steps in a high-definition video surveillance image acquisition method in the above-mentioned embodiment 1 or embodiment 2 are completed.
[0142] In summary, the present invention provides a method and terminal for acquiring high-definition video surveillance images, which have the following beneficial effects:
[0143] 1. The grid only requires the user to mark the area by matrix division at the maximum magnification of n×n on the first video screen shot by the camera at the initial point and the first magnification, and the rest is automatically completed by the computer, that is, the workload of manual preset of virtual preset points is greatly reduced;
[0144] 2. The calculated rotation coordinates and steering angles of each grid are stored on the system server, which is not subject to the storage limitations of the monitoring device itself, that is, the number of virtual preset points that can be set is not limited.
[0145] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for acquiring high-definition video surveillance images, characterized in that: Includes steps: S1, selecting an initial position of a camera, and controlling the camera to shoot a first video image at a first magnification, and recording a field of view FOV1 of the camera in the first video image; S2: Divide the first video screen into n×n grids to obtain the field of view FOV of the camera in each grid. 1 / n ; S3, calculating the rotation coordinates of each grid, and using the LM method to calculate the magnification n of the camera after it rotates to each grid; S4. Based on the rotation coordinates and the magnification ratio, control the camera to turn and zoom in to obtain a designated second video image.
2. A method for acquiring high-definition video surveillance images according to claim 1, characterized in that: The rotation coordinates of each grid are calculated in step S3, specifically: S31. Determine the relationship between the physical parameters of the camera and the image plane coordinates, and transform the plane coordinates of the center of each grid in the first video screen under wide angle into polar coordinates with the initial point as the origin of the camera, as the rotation coordinates of each grid.
3. A method for acquiring high-definition video surveillance images according to claim 2, characterized in that: In step S3, the LM method is used to calculate the magnification of the camera after it rotates to each grid, specifically: S32, controlling the pan / tilt of the camera to rotate according to the rotation coordinates corresponding to each grid and then magnify n times, where n is the magnification of the camera corresponding to the field of view angle in each grid, and n is less than or equal to the maximum magnification of the camera; S33, using the LM method to fit the field angle-magnification curve, as follows: S331, uniformly collect multiple zoom values zoom, horizontal field of view angle hfov and vertical field of view angle vfov between 1 and n magnifications, and obtain the relationship between the field of view angle and the zoom value as follows: Where K1, K2 and K3 are the constant coefficient vector values to be determined. Simplifying formula (1) yields: y=f(x,θ) (2); Among them, x is the input zoom value, parameter θ is the set of constant coefficient vector values K1, K2 and K3 that need to be solved, and y is the output field of view angle. The parameter θ is initialized by the linear fitting method and converted into the objective function expression: Where i is the index subscript of the collected data; S332. Calculate the Jacobian matrix J of the model prediction value for the parameter θ, and obtain: Where j is the column subscript of the Jacobian matrix, S333, the LM method is used again to update the parameter θ, and the update formula is as follows: i k+1 =θ k -(J T J+λI) -1 J T r (5); Where k is the number of iterations, r = yf(x,θ) represents the residual vector, and λ is the parameter that controls the step size; S334, repeating steps S332-S333, updating the parameter θ until the convergence condition is met, and outputting the final parameter θ, respectively obtaining the constant coefficients K1, K2 and K3 for fitting under the horizontal field of view and the vertical field of view, and substituting them into formula (1) to obtain the relationship formula between the horizontal field of view angle and the zoom value FOV H The relationship between the vertical field of view angle and the zoom value is FOV V : The convergence condition is when the error variation is less than a first threshold or when a predetermined maximum number of iterations is reached.
4. The method for acquiring high-definition video surveillance images according to claim 1, characterized in that: The step S3 also includes: Storing the rotation coordinates and the magnification ratio in a system server; The step S4 is specifically as follows: The ONVIF protocol is used to control the camera to move based on the rotation coordinates and the magnification and adjust the focal length to zoom in and shoot to obtain a specified second video image.
5. The method for acquiring high-definition video surveillance images according to claim 1, characterized in that: The initial point position is the initial shooting angle position of the camera; The first magnification is 1 magnification.
6. A high-definition video surveillance image acquisition terminal, characterized in that: The invention comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented: S1, selecting an initial position of a camera, and controlling the camera to shoot a first video image at a first magnification, and recording a field of view FOV1 of the camera in the first video image; S2: Divide the first video screen into n×n grids to obtain the field of view FOV of the camera in each grid. 1 / n ; S3, calculating the rotation coordinates of each grid, and using the LM method to calculate the magnification n of the camera after it rotates to each grid; S4. Based on the rotation coordinates and the magnification ratio, control the camera to turn and zoom in to obtain a designated second video image.
7. A high-definition video surveillance image acquisition terminal according to claim 6, characterized in that: The rotation coordinates of each grid are calculated in step S3, specifically: S31. Determine the relationship between the physical parameters of the camera and the image plane coordinates, and transform the plane coordinates of the center of each grid in the first video screen under wide angle into polar coordinates with the initial point as the origin of the camera, as the rotation coordinates of each grid.
8. A high-definition video surveillance image acquisition terminal according to claim 7, characterized in that: In step S3, the LM method is used to calculate the magnification of the camera after it rotates to each grid, specifically: S32, controlling the pan / tilt of the camera to rotate according to the rotation coordinates corresponding to each grid and then magnify n times, where n is the magnification of the camera corresponding to the field of view angle in each grid, and n is less than or equal to the maximum magnification of the camera; S33, using the LM method to fit the field angle-magnification curve, as follows: S331, uniformly collect multiple zoom values zoom, horizontal field of view angle hfov and vertical field of view angle vfov between 1 and n magnifications, and obtain the relationship between the field of view angle and the zoom value as follows: Where K1, K2 and K3 are the constant coefficient vector values to be determined. Simplifying formula (1) yields: y=f(x,θ) (2); Among them, x is the input zoom value, parameter θ is the set of constant coefficient vector values K1, K2 and K3 that need to be solved, and y is the output field of view angle. The parameter θ is initialized by the linear fitting method and converted into the objective function expression: Where i is the index subscript of the collected data; S332. Calculate the Jacobian matrix J of the model prediction value for the parameter θ, and obtain: Where j is the column subscript of the Jacobian matrix, S333, the LM method is used again to update the parameter θ, and the update formula is as follows: i k+1 =θ k -(J T J+λI) -1 J T r (5); Where k is the number of iterations, r = yf(x,θ) represents the residual vector, and λ is the parameter that controls the step size; S334, repeating steps S332-S333, updating the parameter θ until the convergence condition is met, and outputting the final parameter θ, respectively obtaining the constant coefficients K1, K2 and K3 for fitting under the horizontal field of view and the vertical field of view, and substituting them into formula (1) to obtain the relationship formula between the horizontal field of view angle and the zoom value FOV H The relationship between the vertical field of view angle and the zoom value is FOV V : The convergence condition is when the error variation is less than a first threshold or when a predetermined maximum number of iterations is reached.
9. A high-definition video surveillance image acquisition terminal according to claim 6, characterized in that: The step S3 also includes: Storing the rotation coordinates and the magnification ratio in a system server; The step S4 is specifically as follows: The ONVIF protocol is used to control the camera to move based on the rotation coordinates and the magnification and adjust the focal length to zoom in and shoot to obtain a specified second video image.
10. A high-definition video surveillance image acquisition terminal according to claim 6, characterized in that: The initial point position is the initial shooting angle position of the camera; The first magnification is 1 magnification.
Citation Information
Patent Citations
Computer image collection method for remote display
CN108322643A
Photographing equipment photographing position adjusting method and device
CN111385476A
Method, device and system for generating inspection path
CN113365028A
Water area monitoring zoom camera video augmented reality implementation method and system
CN118400609A
