Method and device for rapid calibration and rapid conversion of coordinate systems of surveillance cameras

By calibrating the external parameters of the surveillance camera in the BIM model and solving the direction vector of its internal coordinate system, the precise corresponding correspondence between the monitoring camera and the BIM model is solved, and the accurate display of real -time video projection and monitoring objects has been achieved. Safety management and efficiency at the scene.

CN119052448BActive Publication Date: 2025-01-28SHANGHAI CONSTRUCTION FOURTH CONSTRUCTION GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411545520.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-01-28
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

How to achieve the precise correspondence between the surveillance camera and the BIM model, so that real-time video can be projected onto the surface of the BIM model, and accurately display the position of the surveillance object in 3D space.

Method used

By introducing the BIM model of the project and a video surveillance camera installed at the construction site high, the external parameters of the camera are calibrated in the BIM model, and the three directions of the front, left and upper directions of the internal coordinate system of the camera are solved based on the BIM. The direction vector in the model.

Benefits of technology

The rapid and accurate relationship between the monitoring camera and the BIM model, real -time video projection to the BIM model surface, and the position of the monitoring object is correctly displayed in 3D space, improving the safety management and efficiency of the construction site.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052448B_ABST
    Figure CN119052448B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for rapid calibration and rapid conversion of coordinate systems of surveillance cameras. The present invention introduces a BIM model of a project and installs a video surveillance camera at a high position on a construction site; calibrates the external parameters of the camera in the BIM model; based on the parameters, solves the direction vectors of the front, left and top directions of the camera's internal coordinate system in the BIM model, and can quickly and accurately establish the relationship between the surveillance camera and the BIM model, thereby realizing real-time video projection onto the surface of the BIM model and correctly displaying the position of the monitored object in 3D space. The present invention improves the efficiency and accuracy of camera calibration; simplifies the coordinate system conversion between the surveillance camera and the BIM model; realizes real-time mapping of surveillance video and BIM model and accurate display of object position; and improves the safety management and efficiency of the construction site.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method and equipment for rapid calibration of a surveillance camera and rapid conversion of a coordinate system. Background Art

[0002] In recent years, Building Information Modeling (BIM) technology has been widely used in the construction field. BIM provides an all-round and refined digital platform by organically integrating information from various fields, making the management and monitoring of construction sites more efficient and accurate. However, the establishment and maintenance of BIM models require a lot of data input and updating work, and the problems of lagging information updates and inaccurate data often limit its application. Although BIM technology has shown its advancement in demonstration projects, its high cost and complex operating procedures make large-scale promotion challenging.

[0003] At the same time, the application of video surveillance systems in construction sites is becoming increasingly popular. Video surveillance systems have the advantages of not needing to build complex models, low cost, and easy large-scale promotion, and can provide real-time on-site image information. However, the data of video surveillance systems is usually unstructured and lacks association with other data sources, making it difficult to trace and analyze problems. Although video surveillance systems have been successfully applied in a large number of projects, their improvement in actual production benefits is limited.

[0004] Although BIM technology and video surveillance systems have their own advantages and disadvantages, the combined application of the two is still relatively rare. Combining the precise modeling capabilities of BIM models with the real-time nature of video surveillance can greatly improve the management level and safety of construction sites. However, how to achieve accurate correspondence between surveillance cameras and BIM models, so that real-time video can be projected onto the surface of the BIM model and the location of the monitored object can be accurately displayed in 3D space has become an urgent problem to be solved. Summary of the invention

[0005] The object of the present invention is to provide a method and device for rapid calibration of a surveillance camera and rapid conversion of a coordinate system.

[0006] In order to solve the above problems, the present invention provides a method for rapid calibration of a surveillance camera and rapid conversion of a coordinate system, comprising:

[0007] Step 1: Introduce the BIM model of the project and install video surveillance cameras at high altitudes on the construction site;

[0008] Step 2: Set the external parameters of the camera in the BIM model Carry out calibration;

[0009] Step 3: Based on parameters , solve the direction vectors of the front, left, and top directions of the camera's internal coordinate system in the BIM model.

[0010] Furthermore, in the above method, step 1: introducing the BIM model of the project and installing a video surveillance camera at a high position on the construction site includes:

[0011] Step 1.1: Integrate the site model and the building model, the ratio of the site model and the building model to reality is 1:1, obtain a BIM model, and present the BIM model through a graphics engine;

[0012] Step 1.2: Install a camera at a high place on the construction site. The camera is rigidly connected to a fixed location and can rotate the viewing angle in the horizontal and vertical planes.

[0013] Furthermore, in the above method, step 2: in the BIM model, the external parameters of the camera are Perform calibration, including:

[0014] Step 2.1: The external parameters of the camera are defined as: ; Among them, the parameters x, y, z are the coordinates of the camera in the BIM model coordinate system, in meters, and the X, Y, and Z axes are the coordinate axes of the camera in the BIM model coordinate system. Among them, the Z axis is the vertical axis. With the Z axis as the reference, the X and Y axes are established correspondingly using the right-hand coordinate system; the parameters are the camera The rotation angles around the X, Y, and Z axes are used to correct the torsion caused by the rigid connection between the camera lens and the crane. In addition, pan and tilt are internal parameters of the camera. Pan represents the rotation angle of the camera on the horizontal plane, and tilt represents the rotation angle of the camera on the vertical plane. These two parameters are directly obtained from the camera.

[0015] Step 2.2: External parameters of the camera in the BIM model Carry out calibration;

[0016] Furthermore, in the above method, step 2.2: in the BIM model, the external parameters of the camera are Perform calibration, including:

[0017] Step 2.2.1: Get the known x,y coordinates of the camera in the orthogonal top view of the BIM model;

[0018] Step 2.2.2: Control the camera to rotate vertically to tilt = 0° and horizontally to pan = 0° or 180°, and measure the angle between the horizon and the horizontal plane of the video screen in the camera's video screen as ;

[0019] Step 2.2.3: Control the camera to rotate vertically to tilt = 0° and horizontally to pan = 90° or 270°, and measure the angle between the horizon in the camera image and the horizontal plane of the video image as ;

[0020] Step 2.2.4: Compare the BIM model and the video screen on the left and right sides, and adjust the z coordinate and , so that the objects in the BIM models on both sides of the left and right split screens and the objects in the video screen are distributed similarly;

[0021] Step 2.2.5: Based on the x and y coordinates of the camera, set the transparency of the video image to coincide with the BIM model, and adjust the z coordinate to , so that the monitoring screen and the BIM model completely overlap.

[0022] Furthermore, in the above method, step 3: based on the parameter , solve the direction vectors of the front, left, and top directions of the camera's internal coordinate system in the BIM model, including:

[0023] Step 3.1: Calculate the direction vector of the camera in the initial state;

[0024] Step 3.2: When the camera rotates, the angle is When, based on the angle When the camera is in the initial state pan=0°, tilt=0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2. The direction vector of the camera's internal coordinate system in the BIM model is calculated.

[0025] Furthermore, in the above method, step 3.1: calculating the direction vector of the camera in the initial state includes:

[0026] Step 3.1.1: Define the initial vectors forward0=(1,0,0), left0=(0,1,0), and up0=(0,0,1);

[0027] Step 3.1.2: Wherein, vector u represents the vector to be rotated, and vector v represents the vector as the rotation axis. It means that vector u is rotated α degrees around vector v in the right-hand direction to obtain a new vector after rotation. The calculation formula is as follows:

[0028] ;

[0029] Step 3.1.3: Rotate the forward0 and left0 vectors around up0 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0030] ;

[0031] Step 3.1.4: Rotate the up0 and forward1 vectors around left1 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0032] ;

[0033] Step 3.1.5: Rotate the up1 and left1 vectors around the forward2 vector. , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0034] ;

[0035] Step 3.1.6: After the above rotation, when the camera is in the initial state, that is, pan=0°, tilt=0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2.

[0036] Furthermore, in the above method, step 3.2: when the camera rotates, the angle is When, based on the angle When the camera is in the initial state pan=0°, tilt=0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2. The direction vectors of the camera's internal coordinate system in the BIM model are calculated, including:

[0037] Step 3.2.1: Rotate the forward2 and left2 vectors around up2 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0038] ;

[0039] Step 3.2.2: Rotate the up2 and forward3 vectors around left3 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0040] ;

[0041] ;

[0042] Step 3.2.3: After the above rotation, we get the three direction vectors forward4, left3, and up3 after the camera rotates.

[0043] According to another aspect of the present invention, there is also provided a surveillance camera rapid calibration and coordinate system rapid conversion system, comprising:

[0044] A setup module for introducing the BIM model of the project and installing video surveillance cameras at high altitudes on the construction site;

[0045] A calibration module, used to calibrate the external parameters of the camera in the BIM model;

[0046] The calculation module is used to solve the direction vectors of the front, left and top directions of the internal coordinate system of the camera in the BIM model based on the parameters.

[0047] According to another aspect of the present invention, there is further provided a computer-readable storage medium having computer-executable instructions stored thereon, wherein when the computer-executable instructions are executed by a processor, the processor is caused to: adopt any of the methods described above.

[0048] According to another aspect of the present invention, there is also provided a computer device, comprising:

[0049] Processor; and

[0050] A memory arranged to store computer executable instructions which, when executed, cause the processor to: adopt any of the methods described above.

[0051] Compared with the prior art, the present invention introduces the BIM model of the project and installs a video surveillance camera at a high position on the construction site; the external parameters of the camera are Calibrate; based on parameters , solving the direction vectors of the front, left and top directions of the internal coordinate system of the camera in the BIM model, can quickly and accurately establish the relationship between the monitoring camera and the BIM model, thereby realizing the real-time video projection onto the surface of the BIM model and correctly displaying the position of the monitored object in 3D space. The present invention improves the efficiency and accuracy of camera calibration; simplifies the coordinate system conversion between the monitoring camera and the BIM model; realizes the real-time mapping of the monitoring video and the BIM model and the accurate display of the object position; and improves the safety management and efficiency of the construction site. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1It is a flow chart of a method and device for rapid calibration and rapid coordinate system conversion of a surveillance camera according to an embodiment of the present invention;

[0053] Figure 2 is a schematic diagram of a calibration method of step 2.2.2 and step 2.2.3 of an embodiment of the present invention;

[0054] Figure 3 This is the calibration method of step 2.2.4 of an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0056] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.

[0057] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0058] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0059] like Figure 1 As shown, the present invention provides a method for rapid calibration of a surveillance camera and rapid conversion of a coordinate system, comprising:

[0060] Step 1: Introduce the BIM model of the project and install video surveillance cameras at high altitudes on the construction site;

[0061] Step 1.1: Integrate the site model and the building model, the ratio of the site model and the building model to reality is 1:1, obtain a BIM model, and present the BIM model through a graphics engine;

[0062] Here, we can take a real project as an example, integrate the site model and building model of the project, upload them to the system, and display them through the image engine on the web page;

[0063] Step 1.2: Install a camera at a high place on the construction site. The camera is rigidly connected to the fixed part and can rotate the viewing angle in the horizontal and vertical planes.

[0064] Here, the ball-technique camera can be installed on the 2# tower crane at the construction site. In the initial state, the lens faces downward;

[0065] Step 2: Set the external parameters of the camera in the BIM model Carry out calibration;

[0066] Step 2.1: The external parameters of the camera are defined as: ; Among them, the parameters x, y, z are the coordinates of the camera in the BIM model coordinate system, in meters, and the X, Y, and Z axes are the coordinate axes of the camera in the BIM model coordinate system. Among them, the Z axis is the vertical axis. With the Z axis as the reference, the X and Y axes are established correspondingly using the right-hand coordinate system; parameters It is the rotation angle of the camera around the X, Y, and Z axes in sequence, which is used to correct the torsion caused by the rigid connection between the camera lens and the tower crane. In addition, pan and tilt are internal parameters of the camera. Pan represents the rotation angle of the camera on the horizontal plane, and tilt represents the rotation angle of the camera on the vertical plane. These two parameters are directly obtained from the camera.

[0067] Step 2.2: External parameters of the camera in the BIM model Carry out calibration;

[0068] Step 2.2.1: Get the known x,y coordinates of the camera in the orthogonal top view of the BIM model;

[0069] For example, in the orthogonal top view of the model, the x and y coordinates of the camera are determined to be 115.8m and 15.8m;

[0070] Step 2.2.2: Control the camera to rotate vertically to tilt = 0° and horizontally to pan = 0° or 180°, and measure the angle between the horizon and the horizontal plane of the video screen in the camera's video screen as ;

[0071] For example, control the camera to rotate vertically to tilt = 0° and horizontally to pan = 0°, and measure the angle between the horizon and the horizontal plane of the video image to determine ;

[0072] Step 2.2.3: Control the camera to rotate vertically to tilt = 0° and horizontally to pan = 90° or 270°, and measure the angle between the horizon in the camera image and the horizontal plane of the video image as ;

[0073] For example, control the camera to rotate vertically to tilt = 0° and horizontally to pan = 90° or 270°, and measure the angle of the horizon in the picture to determine ;

[0074] Here, Figure 2 is a schematic diagram of a calibration method of step 2.2.2 and step 2.2.3 of an embodiment of the present invention, wherein the angle between the ground plane and the horizontal line is an external parameter to be measured;

[0075] Step 2.2.4: Initial adjustment: Compare the BIM model and the video screen on the left and right sides, and adjust the z coordinates to make the objects in the BIM model and the video screen on both sides of the left and right sides of the split screen close to each other;

[0076] Here, Figure 3 The calibration method of step 2.2.4 of an embodiment of the present invention is to adjust the viewing angle and height of the model so that the image in the model is consistent with the monitoring image;

[0077] Step 2.2.5: Fine-tuning: Based on the x and y coordinates of the camera, set the transparency of the video image to coincide with the BIM model, and adjust the z coordinate to , so that the monitoring screen and the BIM model completely overlap;

[0078] For example, set the transparency of the video to overlap with the model, adjust the z coordinate and , so that the monitoring screen and the model completely overlap, then we get ;

[0079] Here, accurate x,y can ensure that after the model and the monitoring screen overlap, the deviation between the two sides is small, ensuring Accuracy of values;

[0080] Step 3: Based on parameters , Solve the direction vectors of the front, left and top directions of the camera's internal coordinate system in the BIM model;

[0081] Step 3.1: Calculate the direction vector of the camera in the initial state:

[0082] Step 3.1.1: Define the initial vectors forward0=(1,0,0), left0=(0,1,0), and up0=(0,0,1);

[0083] For example, define the initial vectors forward0=(1,0,0), left0=(0,1,0), up0=(0,0,1);

[0084] Step 3.1.2: Wherein, vector u represents the vector to be rotated, and vector v represents the vector as the rotation axis. It means that vector u is rotated α degrees around vector v in the right-hand direction to obtain a new vector after rotation. The calculation formula is as follows:

[0085] ;

[0086] The vector rotations in subsequent steps 3.1.3 to 3.2.2 are all substituted into the following formula for calculation;

[0087] Step 3.1.3: Rotate the forward0 and left0 vectors around up0 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0088] ;

[0089] For example, rotate the forward0 and left0 vectors by -0.2° around up0;

[0090] Step 3.1.4: Rotate the up0 and forward1 vectors around left1 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0091] ;

[0092] For example, rotate the up0 and forward1 vectors by -1.4° around left1;

[0093] Step 3.1.5: Rotate the up1 and left1 vectors around the forward2 vector. , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0094] ;

[0095] For example, rotate the up1 and left1 vectors by -2.8° around the forward2 vector.

[0096] Step 3.1.6: After the above rotation, when the camera is in the initial state, that is, pan=0°, tilt=0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2;

[0097] ;

[0098] Step 3.2: When the camera rotates, the angle is When, based on the angle When the camera is in the initial state pan=0°, tilt=0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2. The direction vector of the camera's internal coordinate system in the BIM model is calculated as follows:

[0099] For example, when the camera rotates, the angle is , calculate the direction vector of the camera;

[0100] Step 3.2.1: Rotate the forward2 and left2 vectors around up2 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0101] ;

[0102] For example, rotate the forward2 and left2 vectors by -19.2° around up2;

[0103] Step 3.2.2: Rotate the up2 and forward3 vectors around left3 , respectively, into the formula of step 3.1.2 , and get the rotated vector:

[0104] ;

[0105] ;

[0106] For example, rotate the up2 and forward3 vectors by -45.0° around the left3 vector;

[0107] Step 3.2.3: After the above rotation, we get the three direction vectors of the camera after the rotation angle: forward4, left3, and up3;

[0108] .

[0109] The present invention can quickly and accurately establish the relationship between the monitoring camera and the BIM model, thereby realizing the projection of real-time video onto the surface of the BIM model and correctly displaying the position of the monitored object in 3D space. The present invention improves the efficiency and accuracy of camera calibration; simplifies the coordinate system conversion between the monitoring camera and the BIM model; realizes the real-time mapping of the monitoring video and the BIM model and the accurate display of the object position; and improves the safety management and efficiency of the construction site.

[0110] According to another aspect of the present invention, there is also provided a surveillance camera rapid calibration and coordinate system rapid conversion system, comprising:

[0111] A setup module for introducing the BIM model of the project and installing video surveillance cameras at high altitudes on the construction site;

[0112] A calibration module is used to calibrate the external parameters of the camera in the BIM model. Carry out calibration;

[0113] Calculation module for parameter-based , solve the direction vectors of the front, left, and top directions of the camera's internal coordinate system in the BIM model.

[0114] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein when the computer-executable instructions are executed by a processor, the processor is caused to: adopt the method described in any of the above embodiments.

[0115] According to another aspect of the present invention, there is also provided a computer device, comprising:

[0116] Processor; and

[0117] A memory arranged to store computer executable instructions, which, when executed, cause the processor to: adopt the method described in any one of the above embodiments.

[0118] The detailed contents of the device embodiments of the present invention can be found in the corresponding parts of the method embodiments, which will not be described in detail here.

[0119] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0120] It should be noted that the present invention can be implemented in software and / or a combination of software and hardware, for example, it can be implemented using an application-specific integrated circuit (ASIC), a general-purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present invention (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and the like. In addition, some steps or functions of the present invention can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform various steps or functions.

[0121] In addition, a part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. The program instruction for calling the method of the present invention may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present invention, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments of the present invention.

[0122] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A method for rapid calibration of surveillance cameras and rapid conversion of coordinate systems, characterized in that: include: Step 1: Introduce the BIM model of the project and install video surveillance cameras at high altitudes on the construction site; Step 2: In the BIM model, set the external parameters x, y, z, and a of the camera. x , a y , a z Carry out calibration; Step 3: Based on parameter a x , a y , a z , solve the direction vectors of the front, left and top directions of the camera's internal coordinate system in the BIM model; Step 2: In the BIM model, set the external parameters x, y, z, and a of the camera. x , a y , a z Perform calibration, including: Step 2.1: The external parameters of the camera are defined as: x, y, z, a x , a y , a z ; Among them, the parameters x, y, z are the coordinates of the camera in the BIM model coordinate system, in meters, and the X, Y, and Z axes are the coordinate axes of the camera in the BIM model coordinate system. Among them, the Z axis is the vertical axis. With the Z axis as the reference, the X and Y axes are established correspondingly using the right-hand coordinate system; parameter a x , a y , a z It is the rotation angle of the camera around the X, Y, and Z axes in sequence, which is used to correct the torsion caused by the rigid connection between the camera lens and the tower crane. In addition, pan and tilt are internal parameters of the camera. Pan represents the rotation angle of the camera on the horizontal plane, and tilt represents the rotation angle of the camera on the vertical plane. These two parameters are directly obtained from the camera. Step 2.2: Set the external parameter a of the camera in the BIM model x , a y , a z Carry out calibration; Step 2.2: Set the external parameter a of the camera in the BIM model x , a y , a z Perform calibration, including: Step 2.2.1: Get the known x,y coordinates of the camera in the orthogonal top view of the BIM model; Step 2.2.2: Control the camera to rotate vertically to tilt = 0° and horizontally to pan = 0° or 180°, and measure the angle between the horizon and the horizontal plane of the video screen in the camera's video screen as a x ; Step 2.2.3: Control the camera to rotate vertically to tilt = 0° and horizontally to pan = 90° or 270°, and measure the angle between the horizon in the camera image and the horizontal plane of the video image as a y ; Step 2.2.4: Split the BIM model and the video screen into two parts for comparison, and adjust the z coordinate and a z , so that the objects in the BIM models on both sides of the left and right split screens and the objects in the video screen are distributed similarly; Step 2.2.5: Based on the x and y coordinates of the camera, set the transparency of the video image to coincide with the BIM model, and adjust the z coordinate and a z , so that the monitoring screen and the BIM model completely overlap; Step 3: Based on parameter a x , a y , a z , solve the direction vectors of the front, left, and top directions of the camera's internal coordinate system in the BIM model, including: Step 3.1: Calculate the direction vector of the camera in the initial state; Step 3.2: When the camera rotates, the angle is a pan 、a tilt When, based on angle a pan 、a tilt When the camera is in the initial state pan = 0°, tilt = 0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2. The direction vector of the camera's internal coordinate system in the BIM model is calculated.

2. The method for rapid calibration of surveillance cameras and rapid conversion of coordinate systems as claimed in claim 1, characterized in that: Step 1: Introduce the BIM model of the project and install video surveillance cameras at high altitudes on the construction site, including: Step 1.1: Integrate the site model and the building model, the ratio of the site model and the building model to reality is 1:1, obtain a BIM model, and present the BIM model through a graphics engine; Step 1.2: Install a camera at a high place on the construction site. The camera is rigidly connected to a fixed location and can rotate the viewing angle in the horizontal and vertical planes.

3. The method for rapid calibration of surveillance cameras and rapid conversion of coordinate systems as claimed in claim 1, characterized in that: Step 3.1: Calculate the direction vector of the camera in the initial state, including: Step 3.1.1: Define the initial vectors forward0 = (1, 0, 0), left0 = (0, 1, 0), and up0 = (0, 0, 1); Step 3.1.2: Wherein, vector u represents the vector to be rotated, vector v represents the vector as the rotation axis, and u′ represents the new vector obtained by rotating vector u around vector v by α degrees in the right-hand direction. The calculation formula is as follows: u′=v*cos α+(n×v)*sinα; Step 3.1.3: Rotate the forward0 and left0 vectors around up0 by -a z , respectively, into the formula u′=v*cosα+(n×v)*sinα in step 3.1.2 to obtain the rotated vector: front forward1 = (cos a z , -sin a z , 0), left left1 = (sin a z , cos a z , 0); Step 3.1.4: Rotate the up0 and forward1 vectors around left1 by -a y , respectively, into the formula u′=v*cosα+(n×v)*sinα in step 3.1.2 to obtain the rotated vector: up1 = (-cos a z sin a y , sin a y sin a z , cos a y ), front forward2 = (cos a y cos a z , -cos a y sin a z , sin a y ); Step 3.1.5: Rotate the up1 and left1 vectors around the forward2 vector by -a x , respectively, into the formula u′=v*cosα+(n×v)*sinα in step 3.1.2 to obtain the rotated vector: up2 = (-cos a x cos a z sin a y +sin a x sin a z ,cos a x sin a y sin a z +cos a z sina x ,cosa x cos a y ), left2=(cos a x without a z +cos a z without a x without a y ,stuff x stuff z -without a x without a y sina z ,-stuff y without a x ); Step 3.1.6: After the above rotation, when the camera is in the initial state, that is, pan = 0°, tilt = 0°, the camera's internal coordinate system has three direction vectors in the BIM model: forward2, left2, and up2.

4. The method for rapid calibration of surveillance cameras and rapid conversion of coordinate systems as claimed in claim 3, characterized in that: Step 3.2: When the camera rotates, the angle is a pan 、a tilt When, based on angle a pan 、a tilt When the camera is in the initial state pan=0°, tilt=0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2. The direction vectors of the camera's internal coordinate system in the BIM model are calculated, including: Step 3.2.1: Rotate the forward2 and left2 vectors around up2 by -a pan , respectively, into the formula u′=v*cosα+(n×v)*sinα in step 3.1.2 to obtain the rotated vector: forward3 = (-cos a x sin a z sin a pan +cos a y cos a z cosa pan -cos a z sin a x sina y sina pan , -stuff x stuff z without a pan -stuff y stuff pan without a z +without a x without a y without a z without a pan , stuff y without a x without a pan +cos a pan without a y ); Left 3 = (cos a x sin a z cos a pan +cos a y cos a z sin a pan +cos a z sin a x sin a y cos a pan , cos a x cos a z cos a pan -cos a y sin a pan sin a z -sin a x sin a y sin a z cos a pan , -cos a y sin a x cos a pan +sin a pan sin a y ); left2=(cos a x without a z +cos a z without a x without a y ,stuff x stuff z -without a x without a y sina z ,-stuff v without a x ); Step 3.2.2: Rotate the up2 and forward3 vectors around the left3 by -a tilt , respectively, into the formula u′=v*cosα+(n×v)*sinα in step 3.1.2 to obtain the rotated vector: up3 = (-cos a x cos a z sin a y cos a tilt +cos a x sin a z sin a pan sin a tilt -cos a y cosa z cos a pan sin a tilt +cos a z sin a x sin a y sin a pan sin a tilt +cos a tilt sin a x sin a z , stuff x stuff z without a pan sina tilt +cos a x stuff tilt without a y without a z +cos a y stuff pan sina z without a tilt +cos a z stuff tilt without a x -without a x without a y without a z without a pan sina tilt ,stuff z stuff y stuff tilt -stuff y without a x without a pan without a tilt -stuff pan without a y without a tilt ); forwardforward4= (-stuff x stuff z without a y without a tilt -stuff x stuff tilt without a pan sina z +cos a y stuff z stuff pan stuff tilt -stuff z cos at ilt without a y without a pan without a x +without a tilt without a x without a z , -stuff x stuff z without a pan stuff tilt +cos a x without a tilt without a y without a z -stuff y stuff pan without a z stuff tilt +cos α z without a tilt without a x +without a x without a y without a z without a pan stuff tilt ,stuff x stuff y without a tilt +cos a y without a x without a pan stuff tilt +cos a pan without a y stuff tilt ); Step 3.2.3: After the above rotation, we get the three direction vectors forward4, left3, and up3 after the camera rotates.

5. A surveillance camera rapid calibration and coordinate system rapid conversion system, characterized in that: include: A setup module for introducing the BIM model of the project and installing video surveillance cameras at high altitudes on the construction site; Calibration module, used to calibrate the external parameters x, y, z, a of the camera in the BIM model x , a y , a z Calibrate, where the parameters x, y, z are the coordinates of the camera in the BIM model coordinate system, in meters, and the X, Y, and Z axes are the coordinate axes of the camera in the BIM model coordinate system, where the Z axis is the vertical axis. Take the Z axis as the reference, and use the right-hand coordinate system to establish the X and Y axes accordingly; parameter a x , a y , a z It is the rotation angle of the camera around the X, Y, and Z axes in sequence, which is used to correct the torsion caused by the rigid connection between the camera lens and the tower crane; Calculation module for calculating the x , a y , a z , solve the direction vectors of the front, left and top directions of the camera's internal coordinate system in the BIM model; The calibration module is used to obtain the known x, y coordinates of the camera in the orthogonal top view of the BIM model; control the camera to rotate vertically to tilt = 0° and horizontally to pan = 0° or 180°, and measure the angle between the horizon and the horizontal plane of the video screen in the camera's video screen as a x ; Control the camera to rotate vertically to tilt = 0° and horizontally to pan = 90° or 270°, and measure the angle between the horizon in the camera's image and the horizontal plane of the video image as a y ; Display the BIM model and the video screen on the left and right sides, and adjust the z coordinate and a z To make the objects in the BIM models on both sides of the split screen close to the objects in the video content; based on the x, y coordinates of the camera, set the transparency of the video screen to coincide with the BIM model, and adjust the z coordinate to a z , so that the monitoring screen and the BIM model completely overlap; The calculation module is used to calculate the direction vector of the camera in the initial state; when the camera rotates, the angle is a pan 、a tilt When, based on angle a pan 、a tilt When the camera is in the initial state pan = 0°, tilt = 0°, the three direction vectors of the camera's internal coordinate system in the BIM model are forward2, left2, and up2. The direction vector of the camera's internal coordinate system in the BIM model is calculated.

6. A computer-readable storage medium having computer-executable instructions stored thereon, wherein: When the computer executable instructions are executed by a processor, the processor is caused to: adopt the method according to any one of claims 1 to 4.

7. A computer device, wherein: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to: employ a method as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Construction management system based on 5G video and BIM and management method thereof

    CN113347360A

  • BIM (Building Information Modeling)-based model labeling and real scenic spot three-dimensional positioning method and equipment

    CN118840427A