A camera calibration method, device, system, apparatus and storage medium
By working collaboratively with a central platform and mobile devices, camera calibration is completed automatically, solving the problems of high labor costs and low efficiency caused by multiple participants in existing technologies, and achieving efficient and accurate camera calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HIKVISION SYST TECH CO LTD
- Filing Date
- 2023-06-21
- Publication Date
- 2026-07-31
AI Technical Summary
Existing camera calibration methods require the participation of multiple people, resulting in high labor costs and low calibration efficiency.
The central platform acquires images captured by the camera, determines calibration points and generates calibration tasks, and sends them to mobile devices to obtain the world coordinates of the calibration points, enabling one person to complete the calibration.
It reduced labor costs, improved calibration efficiency, reduced manual operation and communication errors, and ensured calibration accuracy.
Smart Images

Figure CN116862994B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a camera calibration method, apparatus, system, device, and storage medium. Background Technology
[0002] Before a camera is put into use, it needs to be calibrated. The purpose of calibration is to construct a geometric model of the camera's imaging by using the relationship between the three-dimensional geometric position of a point on the surface of a spatial object and its corresponding point in the image, and then determine the parameters of the geometric model to determine the camera parameters.
[0003] Currently, camera calibration requires at least two personnel. One person views the camera preview on the central platform, manually captures images, and marks a certain number of calibration points on the images, recording the pixel coordinates of each calibration point in a table. Then, the other person goes to the scene where the camera is located, communicates remotely with personnel on the central platform, and moves sequentially to the physical location corresponding to each marker point, recording the latitude and longitude coordinates of each calibration point. The recorded latitude and longitude coordinates are then merged into the aforementioned table to complete the calibration of the camera.
[0004] This method requires calibrating a large number of calibration points when calibrating the camera. Therefore, it is labor-intensive and inefficient. Summary of the Invention
[0005] The purpose of this application is to provide a camera calibration method, apparatus, system, device, and storage medium to reduce labor costs and improve calibration efficiency. The specific technical solution is as follows:
[0006] In a first aspect, embodiments of this application provide a camera calibration method applied to a central platform in a calibration system, the calibration system further including a mobile device, the method comprising:
[0007] Acquire the image captured by the camera currently being calibrated;
[0008] Determine calibration points from the captured images;
[0009] A calibration task for the current camera to be calibrated is generated based on the calibration point, wherein the calibration task includes at least the location identifier of the determined calibration point, and the location identifier is used to indicate the physical location of the calibration point;
[0010] The calibration task is sent to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier.
[0011] Optionally, before the step of generating the calibration task for the current camera to be calibrated based on the calibration point, the method further includes:
[0012] Record the current pose of the camera to be calibrated as the meta-calibration;
[0013] Determine the type of the camera currently to be calibrated;
[0014] If the camera to be calibrated is a PTZ camera, determine whether a new calibration point needs to be created based on the preset number of calibration points and the number of recorded calibration points;
[0015] If a new calibration point needs to be established, adjust the pose of the current camera to be calibrated and record the adjusted pose of the current camera to be calibrated as the new calibration point.
[0016] Return to the step of determining whether a new marker needs to be created based on the preset number of markers and the number of recorded markers, until the number of recorded markers reaches the preset number of markers.
[0017] Optionally, the step of determining the calibration points from the captured image includes:
[0018] Based on the type of the camera to be calibrated, determine the number of calibration points to be selected;
[0019] Based on the image features of the captured image, calibration points are selected from the captured image, and the number of selected calibration points is recorded;
[0020] Determine whether the number of recorded calibration points reaches the number of calibration points to be selected;
[0021] If the target is not reached, return to the step of selecting calibration points from the captured image based on the image features, until the number of recorded calibration points reaches the number of calibration points to be selected.
[0022] Optionally, after the step of determining the calibration points from the captured image, the method further includes:
[0023] Based on the preset number of cameras to be calibrated, determine whether the calibration of the next camera needs to be performed;
[0024] If it is necessary to calibrate the next camera to be calibrated, then use the next camera to be calibrated as the current camera to be calibrated.
[0025] Return to the step of acquiring the captured image of the current camera to be calibrated, until the calibration of the next camera to be calibrated is no longer required, and then execute the step of generating the calibration task of the current camera to be calibrated based on the calibration point.
[0026] Optionally, the step of determining the calibration points from the captured image further includes:
[0027] The location corresponding to the calibration point is determined from the captured image, and a location marker is displayed at the location;
[0028] Record the pixel coordinates of the location marker in the captured image, and use them as the pixel coordinates of the calibration point in the captured image;
[0029] The step of generating the calibration task for the current camera to be calibrated based on the calibration points includes:
[0030] Based on the captured image displaying the location identifier, a calibration task for the current camera to be calibrated is generated, wherein the calibration task includes at least the captured image displaying the location identifier.
[0031] Optionally, the method further includes:
[0032] Obtain the pixel coordinates of the calibration point in the captured image;
[0033] For each calibration point, record the correspondence between the pixel coordinates of that calibration point and the world coordinates.
[0034] Optionally, the method further includes:
[0035] Based on the correspondence between the pixel coordinates and world coordinates of each calibration point, the camera model of the current camera to be calibrated is calculated.
[0036] Optionally, the method further includes:
[0037] If the camera model of the current camera to be calibrated includes multiple camera models corresponding to the calibration points, record the correspondence between the current camera to be calibrated and the multiple camera models corresponding to the calibration points.
[0038] Secondly, embodiments of this application provide a camera calibration method applied to a mobile device in a calibration system, wherein the calibration system further includes a central platform, and the method includes:
[0039] Obtain the calibration task issued by the central platform, wherein the calibration task is generated by the central platform based on the calibration points determined from the images captured by the camera to be calibrated, and the calibration task includes at least the location identifier of the determined calibration point, the location identifier being used to indicate the physical location of the calibration point;
[0040] The world coordinates of the calibration point are obtained based on the location identifier;
[0041] The world coordinates are sent to the central platform.
[0042] Optionally, the step of obtaining the world coordinates of the calibration point based on the location identifier includes:
[0043] Obtain the number of determined calibration points included in the calibration task, as the number to be calibrated;
[0044] The world coordinates of the calibration point are determined based on the location identifier, and the number of calibration points with determined world coordinates is recorded.
[0045] Determine whether the number of calibration points with known world coordinates recorded has reached the number to be calibrated;
[0046] If not, return to the step of determining the world coordinates of the calibration point based on the location identifier and recording the number of calibration points with determined world coordinates, until the number of calibration points with determined world coordinates recorded reaches the number to be calibrated.
[0047] Optionally, the calibration task includes at least a captured image displaying the location identifier;
[0048] The step of determining the world coordinates of the calibration point based on the location identifier includes:
[0049] The captured image displaying the location marker is shown so that the user can locate the physical location represented by the location marker based on the location marker in the captured image, thereby obtaining the world coordinates of the calibration point.
[0050] Optionally, the method further includes:
[0051] After the number of calibration points with known world coordinates recorded reaches the number to be calibrated, it is determined whether the world coordinates of the current camera installation location need to be calibrated, based on the world coordinates of the current camera installation location.
[0052] If it is necessary to calibrate the world coordinates of the installation location of the camera to be calibrated, obtain the world coordinates of the installation location of the camera to be calibrated.
[0053] Thirdly, embodiments of this application provide a camera calibration device applied to a central platform in a calibration system, the calibration system further including a mobile device, the device comprising:
[0054] The image acquisition module is used to acquire images captured by the camera currently being calibrated.
[0055] A calibration point determination module is used to determine calibration points from the captured images;
[0056] A calibration task generation module is used to generate a calibration task for the current camera to be calibrated based on the calibration point, wherein the calibration task includes at least a location identifier of the determined calibration point, and the location identifier is used to indicate the physical location of the calibration point;
[0057] The calibration task distribution module is used to distribute the calibration task to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier.
[0058] Fourthly, embodiments of this application provide a camera calibration device applied to a mobile device in a calibration system, wherein the calibration system further includes a central platform, and the device includes:
[0059] The calibration task acquisition module is used to acquire the calibration task issued by the central platform. The calibration task is generated by the central platform based on the calibration points determined from the images captured by the camera to be calibrated. The calibration task includes at least the location identifier of the determined calibration point, which is used to indicate the physical location of the calibration point.
[0060] The world coordinate acquisition module is used to acquire the world coordinates of the calibration point based on the location identifier;
[0061] The world coordinates sending module is used to send the world coordinates to the central platform.
[0062] Fifthly, embodiments of this application provide a camera calibration system, including a central platform and a mobile device, wherein:
[0063] The central platform is used to execute any of the methods described in the first aspect above;
[0064] The mobile device is used to perform any of the methods described in the second aspect above.
[0065] Sixthly, embodiments of this application provide a central platform, including:
[0066] Memory, used to store computer programs;
[0067] When a processor executes a program stored in memory, it implements any of the methods described in the first aspect above.
[0068] Seventhly, embodiments of this application provide a mobile device, including:
[0069] Memory, used to store computer programs;
[0070] When a processor executes a program stored in memory, it implements any of the methods described in the second aspect above.
[0071] Eighthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in either the first or second aspect above.
[0072] Beneficial effects of the embodiments in this application:
[0073] The solution provided in this application is applied to a central platform in a calibration system. The calibration system also includes a mobile device. The central platform can acquire images captured by the camera to be calibrated, determine calibration points from the images, and generate a calibration task for the camera based on these calibration points. The calibration task includes at least a location identifier for the determined calibration point, which indicates the physical location of the calibration point. The calibration task is then sent to the mobile device to execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier. Since the central platform can generate a calibration task including the location identifier of the calibration point based on the calibration points in the captured image and send it to the mobile device, and the mobile device can execute the calibration task based on the location identifier and return the world coordinates corresponding to the calibration point, the camera calibration can be completed by a single person based on the interaction between the central platform and the mobile device. This reduces labor costs and improves calibration efficiency. Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above simultaneously. Attached Figure Description
[0074] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0075] Figure 1 This is a schematic diagram of the structure of a camera calibration system provided in an embodiment of this application;
[0076] Figure 2 A flowchart illustrating the first camera calibration method provided in this application embodiment;
[0077] Figure 3 For based on Figure 2 A specific flowchart of acquiring captured images according to the embodiment shown;
[0078] Figure 4 For based on Figure 2The illustrated embodiment provides a specific flowchart for obtaining the target location.
[0079] Figure 5 for Figure 2 A specific flowchart of step S202 in the illustrated embodiment;
[0080] Figure 6 For based on Figure 5 A specific flowchart for obtaining calibration points in the illustrated embodiment;
[0081] Figure 7 For based on Figure 2 The illustrated embodiment provides a specific flowchart for determining the current camera to be calibrated.
[0082] Figure 8 For based on Figure 2 A specific flowchart of the calibration task distribution embodiment shown;
[0083] Figure 9 For based on Figure 2 The illustrated embodiment provides a specific flowchart for determining the current camera to be calibrated.
[0084] Figure 10 A flowchart illustrating the second camera calibration method provided in this application embodiment;
[0085] Figure 11 for Figure 10 A specific flowchart of step S1002 in the illustrated embodiment;
[0086] Figure 12 This is a schematic diagram of the structure of the first camera calibration device provided in the embodiments of this application;
[0087] Figure 13 This is a schematic diagram of the structure of the second camera calibration device provided in the embodiments of this application;
[0088] Figure 14 This is a schematic diagram of the structure of a central platform provided in an embodiment of this application;
[0089] Figure 15 This is a schematic diagram of the structure of a mobile device provided in an embodiment of this application. Detailed Implementation
[0090] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0091] To reduce labor costs and improve calibration efficiency, this application provides a camera calibration method, apparatus, system, device, computer-readable storage medium, and computer program product. The first camera calibration method provided in this application embodiment will be described below.
[0092] The first camera calibration method provided in this application embodiment, such as Figure 1 As shown, a central platform 101 can be applied to a calibration system, which also includes a mobile device 102.
[0093] like Figure 2 As shown, a camera calibration method includes:
[0094] S201, acquire the image captured by the camera currently being calibrated;
[0095] S202, Determine calibration points from the captured images;
[0096] S203, Generate the calibration task for the current camera to be calibrated based on the calibration point;
[0097] The calibration task includes at least the location identifier of the determined calibration point, which is used to indicate the physical location of the calibration point.
[0098] S204, the calibration task is sent to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier.
[0099] As can be seen, in the solution provided in this application embodiment, a central platform is applied to the calibration system, and the calibration system also includes a mobile device. The central platform can acquire images captured by the camera to be calibrated, determine calibration points from the captured images, generate a calibration task for the camera to be calibrated based on the calibration points, wherein the calibration task includes at least the location identifier of the determined calibration point, the location identifier is used to represent the physical location of the calibration point, and the calibration task is sent to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier. Since the central platform can generate a calibration task including the location identifier of the calibration point based on the calibration points in the captured images and send it to the mobile device, and the mobile device can execute the calibration task based on the location identifier of the calibration point and return the world coordinates corresponding to the calibration point, the calibration of the camera can be completed by one person based on the interaction between the central platform and the mobile device, thus reducing labor costs and improving calibration efficiency.
[0100] During camera calibration by multiple people, most processes require manual operation, such as creating tables, capturing images, using drawing tools, recording the pixel coordinates and latitude and longitude of calibration points, merging tables, and on-site communication. Furthermore, communication errors are prone to occur during multi-person involvement, leading to inaccurate camera calibration. Therefore, to reduce manual operation and involvement, most calibration operations can be integrated into a central platform and mobile devices. Through interaction between the central platform and mobile devices, real-time coordination by multiple people is unnecessary, allowing one person to complete the calibration work.
[0101] In step S201, the central platform can acquire images captured by the camera currently being calibrated. The central platform stores relevant information for each camera, such as the camera's name, installation latitude and longitude, and installation height, which are not specifically limited here.
[0102] In one implementation, the central platform can display a camera calibration interface, through which users can select cameras for calibration. Users can select one camera for calibration or select multiple cameras for batch calibration; no specific limitation is made here.
[0103] After the user selects the cameras to be calibrated, the central platform can begin the calibration process. If the user selects multiple cameras, the central platform can calibrate them sequentially according to a preset order. This preset order can be based on camera name, camera recording time, etc. After the central platform identifies the camera to be calibrated, it can obtain the camera's installation latitude, longitude, and height. If the installation latitude, longitude, and height are not available, or if the information is inaccurate, the user can manually edit it.
[0104] Given the current calibration position of the camera to be calibrated, the central platform can acquire images captured by the camera. The calibration position represents the pose of the camera. Since the camera may be in its initial installation state, or may not be able to acquire good images at this calibration position, the central platform can determine whether the acquired images meet the preset calibration requirements.
[0105] If the captured image meets the preset calibration requirements, the central platform can store the calibration position and further calibrate the calibration points on the captured image. If the captured image does not meet the preset calibration requirements, the central platform can adjust the camera's PTZ (Pan Tilt Zoom) parameters, that is, adjust the camera's pose, such as adjusting the PTZ eight-way control, zoom, focus, aperture, PTZ speed, and other parameters, until the captured image acquired by the camera to be calibrated meets the preset calibration requirements.
[0106] In one implementation, the central platform can adjust the pose of the camera to be calibrated before acquiring its captured image to determine a suitable calibration position. The central platform then acquires the captured image that meets the image requirements under this calibration position. For example, if the PTZ camera can rotate, its orientation can be adjusted before the central platform acquires the captured image to determine a suitable calibration position.
[0107] As one implementation method, such as Figure 3 As shown, the steps for the central platform to acquire the image captured by the camera currently being calibrated may include:
[0108] S301, Select Camera A;
[0109] In the camera calibration interface displayed on the central platform, the user selects camera A as the camera to be calibrated, and the central platform confirms that the current camera to be calibrated is camera A.
[0110] S302, obtain its installation latitude and longitude and installation height. If not obtained, it can be edited manually.
[0111] The central platform can obtain the installation latitude, longitude, and height of camera A. If these parameters are not obtained, the user can manually edit and input the installation latitude, longitude, and height of camera A.
[0112] S303, acquire the image captured by camera A;
[0113] The central platform can acquire images captured by camera A at the current target location, or it can adjust the pose of camera A to acquire images when camera A is at a suitable target location.
[0114] S304. Does the captured image meet the preset calibration requirements? If yes, proceed to step S307; if no, proceed to step S305.
[0115] After acquiring the captured image, the central platform can determine whether the captured image meets the preset calibration requirements. If it does, the calibration position is used as the meta-calibration position and stored. If not, the pose of camera A is adjusted, i.e., step S305 is executed.
[0116] S305, adjust the camera's PTZ parameters;
[0117] Among them, PTZ parameters can include eight-way control of the gimbal, zoom, focus, aperture, gimbal speed, etc.
[0118] S306, Obtain the appropriate target location;
[0119] The central platform can adjust the PTZ parameters of the camera until a suitable calibration position is obtained, that is, adjust the camera to a suitable pose so that the acquired images meet the calibration requirements.
[0120] S307, storage label location.
[0121] Once the central platform obtains a suitable location, it can store that location.
[0122] In step S202, the central platform can determine calibration points from the captured images. The number of calibration points determined by the central platform varies depending on the type of camera. If the camera to be calibrated is a PTZ camera, the central platform can determine at least one calibration point from the captured images; if the camera to be calibrated is a bullet camera, it can determine at least four calibration points from the captured images. Of course, the number of calibration points can be determined according to actual needs.
[0123] Since the calibration process for the camera to be calibrated involves constructing a geometric model of the camera's image to determine the camera parameters, the central platform can record the pixel coordinates of the calibration points in the captured image after determining the calibration points, so as to use them for subsequent calculation of the camera model.
[0124] For example, if the central platform acquires an image 'a', and the camera to be calibrated is a PTZ camera, then the central platform can determine one calibration point from image 'a' and record the pixel coordinates (X, Y, X) of that calibration point in the image. A-1-1 Y A-1-1 ).
[0125] After obtaining the pixel coordinates of the calibration point, in order to calculate the camera model of the camera to be calibrated, the central platform also needs to determine the world coordinates corresponding to the calibration point, that is, the latitude and longitude of the physical location corresponding to the calibration point. Then, in step S203, the central platform can generate the calibration task of the camera to be calibrated based on the calibration point.
[0126] The calibration task includes at least the location markers of the determined calibration points, which indicate the physical location of the calibration points. This allows users to locate the physical location indicated by the location markers on-site and determine the latitude and longitude of the calibration points. Specifically, users can first determine the camera's installation location on-site based on its installation latitude and longitude, locate the camera, and then find the corresponding physical location of the calibration point using its location markers.
[0127] In one implementation, the central platform can generate a calibration task for the camera to be calibrated based on calibration points and calibration locations. Specifically, the central platform can generate a calibration task based on calibration locations, calibration points, and the correspondence between calibration locations and calibration points. For example, if the camera to be calibrated is at calibration location A-1 and an image is captured, and the calibration point determined from the captured image is A-1-1, then the central platform can generate a calibration task based on calibration location A-1 and calibration point A-1-1.
[0128] In step S204, the central platform sends a calibration task to the mobile device, enabling the mobile device to execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier. In one embodiment, the central platform is directly connected to the mobile device via a network, and the central platform sends the calibration task to the mobile device through the direct network connection. In another embodiment, the central platform sends the calibration task to the mobile device via instant messaging software.
[0129] The mobile device can connect to positioning equipment, such as RTK (Real-time kinematic) carrier phase differential technology equipment, BeiDou, etc., and has an app installed that can receive satellite signals to determine latitude and longitude. Since the calibration task includes the location markers of the determined calibration points, after the mobile device receives the calibration task, the user can find the physical location corresponding to the calibration point on site according to the location markers included in the calibration task, and then place the mobile device at the physical location of the calibration point. In this way, the mobile device can obtain the world coordinates of the calibration point and return the obtained world coordinates of the calibration point to the central platform.
[0130] After obtaining the pixel coordinates and world coordinates from the central platform, the camera model of the camera to be calibrated can be calculated based on these coordinates. For example, if the central platform obtains pixel coordinates (X... A-1-1 Y A-1-1 ), (X A-1-2 Y A-1-2 ), world coordinates are (LO A-1-1 LA A-1-1 ), (LO A-1-2 LAA-1-2 Then, the central platform can calculate the intrinsic and extrinsic parameters of the camera to be calibrated based on pixel coordinates and world coordinates.
[0131] In this embodiment, the central platform can generate a calibration task with location identifiers of the calibration points based on the calibration points of the captured image and send it to the mobile device. The mobile device can execute the calibration task based on the location identifiers of the calibration points and return the world coordinates corresponding to the calibration points. Therefore, based on the interaction between the central platform and the mobile device, one person can complete the calibration of the camera, which can reduce labor costs and improve the efficiency of calibration work.
[0132] As one implementation method of this application, such as Figure 4 As shown, before the step of generating the calibration task of the current camera to be calibrated based on the calibration point, the above method may further include:
[0133] S401, Record the current pose of the camera to be calibrated as the meta-calibration;
[0134] If the captured image of the camera to be calibrated meets the preset calibration requirements, the central platform can record the current pose of the camera to be calibrated as the meta-calibration location.
[0135] S402, determine the type of the current camera to be calibrated;
[0136] Because different types of cameras have different structural characteristics and cover different areas, the number of locators required varies depending on the type of camera. For example, a PTZ camera, whose lens can rotate, can capture images of multiple areas, thus allowing images to be acquired at multiple locators. A bullet camera, on the other hand, has a fixed lens that only captures a fixed area, allowing images to be acquired at a single locator. Of course, to accurately calculate the camera model, the number of locators can be pre-set based on practical experience to acquire images at different locators.
[0137] For the camera to be calibrated, the central platform can determine the type of the camera. In one implementation, the central platform can determine whether the camera to be calibrated is a PTZ camera.
[0138] S403, if the current camera to be calibrated is a PTZ camera, determine whether a new calibration point needs to be created based on the preset number of calibration points and the number of recorded calibration points;
[0139] If the camera to be calibrated is a PTZ camera, the central platform can determine whether a new calibration point needs to be created based on the preset number of calibration points and the number of recorded calibration points. The preset number of calibration points for a PTZ camera is generally greater than one. The central platform can create a new calibration point if the number of recorded calibration points is less than the preset number.
[0140] For example, if the camera to be calibrated is a PTZ camera, the preset number of calibration points is 3, and the central platform records 2 calibration points, then it can be determined that a new calibration point needs to be created. If the preset number of calibration points is 1, then the central platform does not need to create a new calibration point; that is, it only needs to determine the calibration point from the images captured by the camera currently being calibrated under the original calibration position.
[0141] If the camera to be calibrated is a bullet camera, and the preset number of calibration points is 1, the central platform can determine that no new calibration points need to be created. Of course, the preset number of calibration points for bullet cameras can also be set according to requirements.
[0142] S404, if it is necessary to create a new calibration location, adjust the pose of the current camera to be calibrated, and record the adjusted pose of the current camera to be calibrated as the new calibration location;
[0143] If a new calibration location needs to be established, the central platform can adjust the pose of the camera to be calibrated and record the adjusted pose as the new calibration location. For example, the central platform can adjust the PTZ parameters of the camera to be calibrated to put it in a new pose, and record this pose as the new calibration location.
[0144] S405, return to the step of determining whether a new marker needs to be created based on the preset number of markers and the number of recorded markers, until the number of recorded markers reaches the preset number of markers.
[0145] Each time the central platform records the adjusted pose of the current camera to be calibrated, it can determine whether the number of recorded calibrated positions has reached the preset number of calibrated positions based on the preset number of calibrated positions and the number of calibrated positions recorded. If the preset number of calibrated positions has been reached, the calibration point can be determined from the images captured by the current camera to be calibrated at each calibrated position.
[0146] In one implementation, the central platform can, after recording a preset number of calibration locations, determine a calibration point for each calibration location from the image captured by the camera currently being calibrated at that calibration location. In another implementation, the central platform can, after recording one calibration location, determine a calibration point from the image captured by the camera currently being calibrated at that calibration location, until a preset number of calibration locations have been recorded.
[0147] For example, if the preset number of calibration points is 3, the central platform can adjust the pose of the camera to be calibrated and record 3 calibration points, namely calibration point A, calibration point B, and calibration point C. Then, for calibration point A, the central platform can determine the calibration point from the images captured by the camera to be calibrated under calibration point A; then for calibration point B, it can determine the calibration point from the images captured by the camera to be calibrated under calibration point B; and finally, for calibration point C, it can determine the calibration point from the images captured by the camera to be calibrated under calibration point C.
[0148] Alternatively, the central platform records calibration position A and determines the calibration point from the image captured by the camera to be calibrated at calibration position A. Then, the pose of the camera to be calibrated is adjusted, calibration position B is recorded, and the calibration point is determined from the image captured by the camera to be calibrated at calibration position B. The pose of the camera to be calibrated is then adjusted again, calibration position C is recorded, and the calibration point is determined from the image captured by the camera to be calibrated at calibration position C.
[0149] As can be seen, in this embodiment, the central platform can determine the preset number of calibration points based on the type of the camera to be calibrated. If the number of recorded calibration points does not reach the preset number, the platform adjusts the pose of the camera to be calibrated until the number of recorded calibration points reaches the preset number. In this way, obtaining different numbers of calibration points for different types of cameras can reduce the calibration error rate and improve the calibration quality.
[0150] As one implementation method of this application, such as Figure 5 As shown, the steps for determining calibration points from the captured images described above may include:
[0151] S501, Based on the type of the current camera to be calibrated, determine the number of calibration points to be selected;
[0152] The number of calibration points to be selected can vary depending on the type of camera to be calibrated. For example, for a PTZ camera, which has good stability, the number of calibration points to be selected can be set to 1; for a bullet camera, the number of calibration points to be selected can be set to 4. In practical applications, increasing the number of calibration points to be selected can reduce calibration errors. Therefore, in one implementation, the central platform can determine the number of calibration points to be selected after determining the type of the camera to be calibrated.
[0153] S502, Based on the image features of the captured image, select calibration points from the captured image and record the number of selected calibration points;
[0154] After determining the number of calibration points to be selected, the central platform needs to select calibration points from the captured images. The central platform can generate a number of calibration point slots to store the pixel coordinates of each marker point in the captured images sequentially.
[0155] In one implementation, the central platform can determine an identifiable physical location from the actual scene corresponding to the captured image based on the image features of the captured image. This physical location can be accurately identified and located by the user. Then, the physical location is mapped to the corresponding location in the captured image, and the pixel coordinates of this location in the captured image are recorded as the pixel coordinates of a calibration point in the captured image. In other words, a calibration point is selected, and the number of selected calibration points is recorded.
[0156] For example, the number of calibration points to be selected is 4, and the captured image is an image of a traffic light intersection. In the actual scene, there is a zebra crossing. The central platform can map the corner points of the zebra crossing to the corresponding positions in the captured image and record the pixel coordinates (X, Y, X) of that position in the captured image. A-1-1 Y A-1-1 ), the coordinate (X A-1-1 Y A-1-1 The pixel coordinates of a calibration point in the captured image are used to select a calibration point, and the number of selected calibration points is recorded as 1. Using the same method, the central platform can select 4 calibration points from the captured image.
[0157] S503, determine whether the number of recorded calibration points has reached the number of calibration points to be selected;
[0158] S504, if not reached, return to the step of selecting calibration points from the captured image based on the image features of the captured image, until the number of recorded calibration points reaches the number of calibration points to be selected.
[0159] After the central platform records the number of calibration points to be selected, it can determine whether the recorded number of calibration points has reached the required number. If the recorded number of calibration points has not reached the required number, the central platform can continue to select calibration points from the captured images based on image features until the recorded number of calibration points reaches the required number. If the recorded number of calibration points has reached the required number, it can determine whether new calibration points need to be created based on user needs.
[0160] For example, if the number of calibration points to be selected is 4, and the central platform records that the number of calibration points to be selected is 2, and the number of recorded calibration points has not reached the number of calibration points to be selected, the central platform can continue to select calibration points from the captured images based on the image features of the captured images until the number of recorded calibration points reaches the number of calibration points to be selected, which is 4.
[0161] As can be seen, in this embodiment, the central platform can determine the number of calibration points to be selected based on the type of the camera to be calibrated, select calibration points from the captured images based on image features, and record the number of selected calibration points. If the recorded number of calibration points does not reach the number of calibration points to be selected, calibration points are continuously selected from the captured images until the recorded number of calibration points reaches the number of calibration points to be selected. In this way, obtaining multiple numbers of calibration points from the captured images for different types of cameras can reduce the calibration error rate and improve the calibration quality.
[0162] As one embodiment of this application, the above method may further include:
[0163] After the number of recorded calibration points reaches the number of calibration points to be selected, it is determined whether new calibration points need to be created based on user needs.
[0164] If new calibration points need to be created, return to the step of selecting calibration points from the captured images based on the image features, until the number of recorded calibration points meets the user's requirements.
[0165] Since more calibration points can reduce calibration errors and improve calibration quality, users can request additional calibration points. In one implementation, after the number of recorded calibration points reaches the number of calibration points to be selected, the central platform can determine whether new calibration points need to be created based on user needs. If it is determined that new calibration points need to be created, the central platform can continue to select calibration points from the captured images based on image features until the number of recorded calibration points reaches the user's needs.
[0166] As one implementation method, such as Figure 6 As shown, the process by which the central platform determines whether new calibration points need to be established may include:
[0167] S601, Determine whether the camera is a PTZ camera; if yes, proceed to step S602; if no, proceed to step S603.
[0168] The central platform can determine whether the camera is a PTZ camera. If the camera is a PTZ camera, step S602 is executed; if the camera is not a PTZ camera, for example, if the camera is a bullet camera, step S603 is executed.
[0169] S602, generate 1 calibration slot A-1-1;
[0170] If the camera is a PTZ camera and the number of calibration points to be selected is 1, then the central platform can generate 1 calibration point slot A-1-1 to store the pixel coordinates of calibration point A-1-1.
[0171] S603 generates four calibration slots: A-1-1, A-1-2, A-1-3, and A-1-4.
[0172] If the camera is a bullet camera and the number of calibration points to be selected is 4, then the central platform can generate 4 calibration point slots, namely A-1-1, A-1-2, A-1-3, and A-1-4, to store the pixel coordinates of calibration points A-1-1, A-1-2, A-1-3, and A-1-4.
[0173] S604, Select the calibration point slot A-1-1, determine an implementable feature point on the ground, and place it on the calibration point A-1 image;
[0174] Regardless of the number of calibration points to be selected, the method for selecting calibration points from the calibration location A-1 image is the same. Therefore, taking the selection of a calibration point A-1-1 from the calibration location A-1 image as an example, a physical location in the actual scene that can be accurately identified and located can be mapped to the corresponding location in the image as a calibration point.
[0175] S605 generates a crosshair or pin mark and obtains pixel coordinates (X). A-1-1 Y A-1-1 );
[0176] After determining the physical location within the image, the central platform can generate a crosshair or pin marker at that location and obtain the pixel coordinates (X) of the center position of the crosshair or pin. A-1-1 Y A-1-1 ).
[0177] S606, stores the pixel coordinates (X) of calibration point A-1-1. A-1-1 Y A-1-1 );
[0178] The central platform obtains the pixel coordinates (X... A-1-1 Y A-1-1 After that, the pixel coordinates can be stored as the pixel coordinates (X) of calibration point A-1-1. A-1-1 Y A-1-1 ).
[0179] S607, Is the number of calibration points to be selected sufficient? If yes, proceed to step S608; otherwise, proceed to step S604.
[0180] After storing the pixel coordinates of the calibration points, the central platform records the number of selected calibration points and determines whether the number of recorded calibration points reaches the number of calibration points to be selected. If the number of calibration points to be selected is reached, step S608 is executed; if the number of calibration points to be selected is not reached, step S604 is executed to continue selecting calibration points from the image.
[0181] S608, Do we need to create a new calibration point? If yes, proceed to step S609; if no, proceed to step S610.
[0182] Once the number of calibration points recorded on the central platform reaches the number of calibration points to be selected, it can be determined whether new calibration points need to be created based on user needs. If yes, proceed to step S609; otherwise, proceed to step S610.
[0183] S609, New calibration point;
[0184] The central platform can continue to select calibration points from the calibration A-1 image based on the image features of the image until the number of recorded calibration points meets the user's requirements.
[0185] S610, complete the selection of calibration points.
[0186] Once the number of selected calibration points recorded on the central platform meets the user's requirements, the selection of calibration points is completed.
[0187] In one implementation, after the central platform completes the selection of calibration points, it can store the captured images of the calibrated points under the current calibration position, that is, complete the calibration of the current camera to be calibrated under the current calibration position.
[0188] As can be seen, in this embodiment, after the number of recorded calibration points reaches the number of calibration points to be selected, the central platform can determine whether new calibration points need to be created based on user needs. If it is determined that new calibration points need to be created, calibration points are selected from the captured images based on the image features until the number of recorded calibration points reaches the user's needs. In this way, adding calibration points based on user needs can reduce the calibration error rate and improve the calibration quality.
[0189] As one implementation method of this application, such as Figure 7 As shown, after the step of determining the calibration points from the captured image, the above method may further include:
[0190] S701, based on the preset number of cameras to be calibrated, determines whether the calibration of the next camera to be calibrated is required;
[0191] Since users can select multiple cameras when choosing cameras to be calibrated, the central platform can complete the calibration of all cameras based on the number of cameras selected by the user.
[0192] In one implementation, the central platform can determine whether to calibrate the next camera based on a preset number of cameras to be calibrated. That is, after calibrating the current camera, the central platform can determine if there are any other cameras that need calibration. If so, it continues calibrating those cameras. The preset number of cameras to be calibrated can be a user-selected number or a pre-set number; no specific limitation is made here.
[0193] For example, in the camera calibration interface displayed on the central platform, a user selects camera A, camera B, and camera C as cameras to be calibrated. The number of cameras to be calibrated is then 3, which is the preset number of cameras to be calibrated. After the central platform completes the calibration of camera A, it can determine whether the calibration of the next camera to be calibrated, i.e., whether camera B and camera C need to be calibrated, based on the preset number of cameras to be calibrated.
[0194] S702, if it is necessary to calibrate the next camera to be calibrated, the next camera to be calibrated will be used as the current camera to be calibrated;
[0195] If the number of cameras to be calibrated completed by the central platform does not reach the preset number of cameras to be calibrated, it can be determined that the calibration of the next camera to be calibrated needs to be carried out, and then the next camera to be calibrated can be used as the current camera to be calibrated.
[0196] For example, following the example in S701, since only camera A has been calibrated, that is, the number of cameras to be calibrated is 1. This number does not reach the preset number of cameras to be calibrated, 3. The central platform needs to calibrate the next camera to be calibrated, that is, to calibrate camera B and use camera B as the current camera to be calibrated.
[0197] S703, return to the step of obtaining the captured image of the current camera to be calibrated until the calibration of the next camera to be calibrated is no longer required, and execute the step of generating the calibration task of the current camera to be calibrated based on the calibration point.
[0198] When the central platform selects the next camera to be calibrated as the current camera to be calibrated, it needs to reacquire the captured images of the current camera to determine the calibration points from the captured images. This process continues until the calibration of the next camera to be calibrated is no longer required, thus completing the calibration of all cameras to be calibrated. Then, the central platform can generate the calibration task for the current camera to be calibrated based on the calibration points.
[0199] In one implementation, a user can select one camera to be calibrated from the cameras whose calibration points have been selected, so that the central platform can generate a calibration task based on the calibration points of the camera to be calibrated and send it to the mobile device. Alternatively, a user can select multiple cameras to be calibrated, so that the central platform can generate a calibration task based on the calibration points of the multiple cameras to be calibrated and send it to the mobile device.
[0200] For example, after the central platform selects the calibration points for cameras A, B, and C, it can obtain the corresponding calibration points for each camera, namely calibration points A-1-1, B-1-1, and C-1-1. Then, the central platform can generate calibration tasks for each camera to be calibrated based on calibration points A-1-1, B-1-1, and C-1-1. That is, it generates a calibration task for camera A based on calibration point A-1-1, a calibration task for camera B based on calibration point B-1-1, and a calibration task for camera C based on calibration point C-1-1, and then sends the calibration tasks for each camera to the mobile device.
[0201] As can be seen, in this embodiment, the central platform can determine whether to calibrate the next camera based on a preset number of cameras to be calibrated. If calibration is required, the next camera is designated as the current camera to be calibrated, and this process continues until calibration is no longer needed. A calibration task is then generated based on the calibration points. This allows for the calibration of multiple cameras, improving calibration efficiency.
[0202] As one embodiment of this application, the step of sending the calibration task to the mobile device described above may include:
[0203] Determine whether the central platform and the mobile device are directly connected to the network;
[0204] Since the calibration system includes a central platform and mobile devices, they can interact. The central platform can send calibration tasks to the mobile devices, which can then determine the physical location of each calibration point based on its location identifier. The mobile devices can then obtain the world coordinates of these calibration points and send them back to the central platform to complete the calibration. Therefore, the central platform can determine whether it has a direct network connection with the mobile devices.
[0205] If the central platform is directly connected to the mobile device network, the calibration task will be sent to the mobile device through the direct connection network;
[0206] If the central platform is not directly connected to the mobile device network, a task package file corresponding to the calibration task is generated.
[0207] The task package file is sent to the mobile device via instant messaging software, so that the mobile device can download the task package file via the instant messaging software to obtain the calibration task.
[0208] If the central platform and the mobile device are directly connected to the network, meaning they can directly transfer files, the central platform can distribute the calibration task to the mobile device via this direct network connection. If the central platform and the mobile device are not directly connected to the network, meaning they cannot directly transfer files, the central platform can generate a task package file corresponding to the calibration task and send this file to the mobile device via instant messaging software. The mobile device can then download the task package file using the instant messaging software and thus obtain the calibration task. The instant messaging software must have file transfer capabilities.
[0209] As one implementation method, such as Figure 8 As shown, the interaction between the central platform and the mobile device may include:
[0210] S801, Is the network interconnected between the deployment environment center and the mobile terminal? If yes, proceed to step S804; if no, proceed to step S802.
[0211] The central terminal can determine whether network interoperability can be achieved between the central terminal and the mobile terminal in the deployed network environment, that is, whether files can be directly transferred between the two. Here, the central terminal is the central platform, and the mobile terminal is the mobile phone.
[0212] S802, Export the calibration task package file for the selected camera;
[0213] If the central platform and the mobile phone do not have network connectivity, meaning that files cannot be directly transferred between the central platform and the mobile phone, then the central platform can export the calibration task package file of the selected camera's calibration task. For example, the central platform can generate a compressed file package of the selected camera's calibration task based on the calibration task.
[0214] S803 sends the calibration task package file to the mobile phone, so that the mobile phone can select the calibration task package file from the directory and import it into the APP. The mobile APP obtains and stores the calibration task.
[0215] The central platform can send the calibration task package file to the mobile phone. The mobile phone can receive the calibration task package file and save it to the directory. Then, the calibration task package file can be selected from the directory and imported into the APP. In this way, the APP can obtain the calibration task package file and store the corresponding calibration task.
[0216] The S804 can directly send calibration tasks for the selected camera to the mobile app via wireless network.
[0217] If the central platform is interconnected with the mobile network, meaning that files can be directly transferred between the central platform and the mobile phone, then the central platform can directly send the calibration task of the selected camera to the mobile app via the wireless network. For example, when the user clicks the "One-Click Upload" button, the central platform sends the calibration task of the selected camera to the mobile app.
[0218] As can be seen, in this embodiment, the central platform can determine whether it is directly connected to the mobile device via the network. If the central platform and the mobile device are directly connected, the calibration task is sent to the mobile device through the direct network connection. If the central platform and the mobile device are not directly connected, a task package file corresponding to the calibration task is generated, and the task package file is sent to the mobile device via instant messaging software. The mobile device then downloads the task package file via instant messaging software to obtain the calibration task. In this way, based on the interaction between the central platform and the mobile device, the camera calibration can be completed by one person, which can reduce labor costs and improve calibration efficiency.
[0219] As one embodiment of this application, before the step of acquiring the captured image of the camera currently to be calibrated, the above method may further include:
[0220] Upon receiving a calibration start command from the user, the camera calibration interface is displayed;
[0221] If a user issues a selection command based on the camera identifier in the camera calibration interface, the camera corresponding to that camera identifier is determined to be the camera to be calibrated.
[0222] In one implementation, the central platform can display a camera calibration interface upon receiving a calibration start command from the user. In this calibration interface, camera identifiers are displayed in a tree diagram format.
[0223] Therefore, when the central platform receives the selection instruction issued by the user based on the camera identifier in the camera calibration interface, it determines that the camera corresponding to the camera identifier is the camera to be calibrated.
[0224] As one implementation method, such as Figure 9 As shown, the central platform determines the camera to be calibrated, which may include:
[0225] S901, enter the central calibration workbench;
[0226] Users can access the calibration workbench (i.e., the central platform) by selecting the central calibration workbench.
[0227] S902, Select on-site survey mode;
[0228] The calibration workbench can display a mode selection interface, allowing users to select the field survey mode. In this way, the calibration workbench can receive the selection commands issued by the user.
[0229] S903, calibration planning begins;
[0230] When the calibration workbench receives a selection command from the user, it can display the calibration planning interface, which will show the map interface when the user confirms that the calibration planning has started.
[0231] S904, select cameras individually or in batches on the map;
[0232] The map used is not limited to vector maps or satellite maps. The calibration workbench can display a map interface with icons for the installed cameras, allowing users to select cameras to be calibrated based on these icons. Users can select one camera at a time or select cameras in batches.
[0233] S905, click Start Calibration to enter the camera calibration interface;
[0234] The camera calibration interface includes a device tree, allowing users to calibrate individual cameras or calibrate in batches.
[0235] After the user selects a camera, the calibration interface can be displayed on the workbench. The calibration interface displays the selected cameras in the form of a tree diagram. The user can select a camera based on the camera identifier in the calibration interface so that the calibration workbench can start calibrating that camera. The user can also select multiple cameras so that the calibration workbench can calibrate multiple cameras in sequence.
[0236] S906, select camera A.
[0237] The workbench receives the selection command issued by the user for the identifier of camera A, and can determine that camera A is the camera to be calibrated.
[0238] As can be seen, in this embodiment, the central platform can display the camera calibration interface upon receiving a calibration start command from the user. Upon receiving a selection command from the user based on the camera identifier in the calibration interface, the platform determines that the camera corresponding to that identifier is the camera to be calibrated. In this way, the central platform can calibrate the camera selected by the user, reducing manual operation and making the calibration process more standardized.
[0239] As one embodiment of this application, the step of determining the calibration point from the captured image described above may further include:
[0240] The location corresponding to the calibration point is determined from the captured image, and a location marker is displayed at the location;
[0241] Record the pixel coordinates of the location marker in the captured image, and use them as the pixel coordinates of the calibration point in the captured image;
[0242] After selecting calibration points from the captured images, the central platform needs to mark them in the images so that users can locate the corresponding positions of the calibration points. In one implementation, the central platform can determine the position of the calibration point from the captured image and display a position marker at that location. The position marker can be a crosshair, a thumbtack, etc., and there are no specific limitations.
[0243] Furthermore, the central platform can record the pixel coordinates of the location marker in the captured image, which can then be used as the pixel coordinates of the calibration point in the captured image. Specifically, the central platform can record the pixel coordinates of any position within the location marker; for example, the position within the location marker could be the center position, the top position, etc.
[0244] For example, if the central platform determines the position corresponding to calibration point A from the captured image and displays the crosshair at that position, then the central platform can record the pixel coordinates (X, Y, X) of the center position of the crosshair in the captured image. A-1-1 Y A-1-1 ), the coordinate (XA-1-1 Y A-1-1 () is used as the pixel coordinates of calibration point A in the captured image.
[0245] The above-mentioned steps for generating the calibration task of the current camera to be calibrated based on the calibration points include:
[0246] Based on the captured image displaying the location identifier, a calibration task for the current camera to be calibrated is generated, wherein the calibration task includes at least the captured image displaying the location identifier.
[0247] After the central platform determines the location of the calibration point from the captured image, it can display a location marker at that location. The central platform can then generate a calibration task for the camera to be calibrated based on the captured image displaying the location marker. This calibration task includes at least the captured image displaying the location marker.
[0248] In this way, when a mobile device receives a calibration task, the user can locate the physical position of the calibration point based on the captured image displaying the location marker, and then place the mobile device at the physical location of the calibration point so that the mobile device can obtain the world coordinates of the calibration point. For example, a calibration task may include a captured image displaying a crosshair indicating the corner position of a zebra crossing. When the mobile device receives this calibration task, the user can locate the corresponding zebra crossing corner position based on the crosshair in the captured image, and then place the mobile device at that position.
[0249] As can be seen, in this embodiment, the central platform can display a location marker at the position corresponding to the calibration point determined in the captured image, and record the pixel coordinates of the location marker in the captured image as the pixel coordinates of the calibration point in the captured image. Based on the captured image with the location marker displayed, a calibration task for the camera to be calibrated is generated, so that when the calibration task is sent to the mobile device, the mobile device can return the world coordinates corresponding to the calibration point based on the location marker.
[0250] As one embodiment of this application, the above method may further include:
[0251] Obtain the pixel coordinates of the calibration point in the captured image;
[0252] For each calibration point, record the correspondence between the pixel coordinates of that calibration point and the world coordinates.
[0253] Since the central platform records the pixel coordinates of the location marker in the captured image, the central platform can obtain the pixel coordinates of the calibration point in the captured image. When the mobile device returns the world coordinates corresponding to the calibration point, the central platform can obtain the world coordinates corresponding to the calibration point. Then, for each calibration point, the central platform can record the correspondence between the pixel coordinates of the calibration point and the world coordinates.
[0254] For example, the central platform obtains the pixel coordinates (X, X) of calibration point A in the captured image. A-1-1 Y A-1-1 And obtain the world coordinates (LO) corresponding to the calibration point A returned by the mobile device. A-1-1 LA A-1-1 Therefore, the central platform can record the correspondence between the pixel coordinates of calibration point A and the world coordinates, that is, the pixel coordinates (X, Y, X). A-1-1 Y A-1-1 ) and world coordinates (LO) A-1-1 LA A-1-1 Corresponding to.
[0255] As can be seen, in this embodiment, the central platform can obtain the pixel coordinates of the calibration points in the captured image and record the correspondence between the pixel coordinates and world coordinates for each calibration point. This eliminates the need for the user to manually merge the table recording the pixel coordinates of the calibration points with the table recording the world coordinates, thereby improving calibration efficiency and reducing the calibration error rate.
[0256] As one embodiment of this application, the above method may further include:
[0257] Based on the relationship between the pixel coordinates and world coordinates corresponding to each calibration point, the camera model under the current calibration location corresponding to the current camera to be calibrated is calculated.
[0258] After the central platform obtains the world coordinates returned by the mobile device, it can map the pixel coordinates of each calibration point to the world coordinates, that is, record the relationship between the pixel coordinates and the world coordinates corresponding to each calibration point. Then, the central platform can calculate the camera model corresponding to the current calibration point based on the relationship between the pixel coordinates and the world coordinates corresponding to each calibration point.
[0259] In one implementation, when the camera model of the camera to be calibrated includes multiple camera models corresponding to the calibration points, the central platform records the correspondence between the camera to be calibrated and the multiple camera models corresponding to the calibration points.
[0260] Because the number of preset calibration locations acquired by the central platform varies for different types of cameras to be calibrated, and the camera model calculated by the central platform for each calibration location may differ (i.e., the camera model calculated based on different calibration locations may have deviations), the central platform can calculate the camera model corresponding to the current camera to be calibrated at that calibration location based on the pixel coordinates and world coordinates of the calibration point corresponding to each calibration location.
[0261] For example, the central platform records three calibration points for the camera to be calibrated: calibration point A, calibration point B, and calibration point C. Based on the pixel coordinates and world coordinates of the calibration point corresponding to calibration point A, the central platform calculates the camera model Ma under calibration point A; based on the pixel coordinates and world coordinates of the calibration point corresponding to calibration point B, it calculates the camera model Mb under calibration point B; and based on the pixel coordinates and world coordinates of the calibration point corresponding to calibration point C, it calculates the camera model Mc under calibration point C.
[0262] After obtaining the camera models at each calibration location corresponding to the camera to be calibrated on the central platform, the correspondence between the camera to be calibrated and the camera models corresponding to multiple calibration locations can be recorded, that is, the camera to be calibrated can be associated with multiple camera models. For example, after the central platform calculates camera model Ma, camera model Mb, and camera model Mc, it can record the correspondence between the camera to be calibrated and camera models Ma, Mb, and Mc.
[0263] In one implementation, the central platform can evaluate each camera model of the camera to be calibrated, obtain a calibration score, and compare the calibration score with a preset score. If the calibration score is lower than the preset score, the camera to be calibrated is then recalibrated, such as by recalibrating.
[0264] As can be seen, in this embodiment, the central platform can calculate the camera model of the camera to be calibrated based on the correspondence between the pixel coordinates and world coordinates of each calibration point. Furthermore, when the camera model of the camera to be calibrated includes multiple camera models corresponding to the calibration points, the platform records the correspondence between the camera to be calibrated and these multiple camera models. In this way, multiple camera models are calculated, and these models can be evaluated to accurately determine the camera parameters, thereby improving the calibration accuracy.
[0265] Corresponding to the first camera calibration method described above, this application embodiment also provides another camera calibration method. The second camera calibration method provided in this application embodiment is as follows: Figure 1As shown, the device 102 can be applied to a calibration system, which also includes a central platform 101.
[0266] like Figure 10 As shown, a camera calibration method includes:
[0267] S1001, Obtain the calibration task issued by the central platform;
[0268] The calibration task is generated by the central platform based on calibration points determined from images captured by the camera currently being calibrated. The calibration task includes at least the location identifier of the determined calibration point, which is used to indicate the physical location of the calibration point.
[0269] S1002, Obtain the world coordinates of the calibration point based on the location identifier;
[0270] S1003, the world coordinates are sent to the central platform.
[0271] As can be seen, the solution provided in this application embodiment is applied to a mobile device in a calibration system. The calibration system also includes a central platform. The mobile device can obtain calibration tasks issued by the central platform. These calibration tasks are generated by the central platform based on calibration points determined from images captured by the camera to be calibrated. Each calibration task includes at least a location identifier for the determined calibration point, which indicates the physical location of the calibration point. The world coordinates of the calibration point are obtained based on the location identifier and sent to the central platform. Since the mobile device can receive the calibration task generated by the central platform based on the calibration points in the captured images and return the obtained world coordinates of the calibration points to the central platform, the camera calibration can be completed by a single person based on the interaction between the central platform and the mobile device. This reduces labor costs and improves calibration efficiency.
[0272] When a calibration task is issued from the central platform to a mobile device, in step S1001, the mobile device can acquire the calibration task. The calibration task is generated by the central platform based on calibration points determined from images captured by the camera currently being calibrated. The calibration task includes at least the location identifiers of the determined calibration points, which represent the physical location of the calibration points. Therefore, the mobile device can determine the physical location of the calibration points based on the acquired location identifiers.
[0273] In one implementation, the calibration task includes the installation latitude and longitude of each camera to be calibrated. When the mobile device obtains the calibration task, it can display the calibration points with installation latitude and longitude included in the calibration task on the map of the mobile device.
[0274] For example, the calibration task includes the following contents as shown in the table below.
[0275]
[0276]
[0277] In this way, when a user selects a camera to be calibrated, the mobile device can navigate to the camera's installation location based on its latitude and longitude. The user can then move to the camera's installation location to find the physical location of the calibration point based on its location markers.
[0278] For example, when a mobile phone receives a calibration task from a central platform, it can mark the camera to be calibrated with its installation latitude and longitude on the map of the mobile app. When a user selects a camera to be calibrated, the mobile phone can use that camera as the current camera to be calibrated and navigate to its installation location.
[0279] In one implementation, if there are cameras to be calibrated that do not have latitude and longitude markings installed, the user can directly find the physical location corresponding to the calibration point based on the location marker of the calibration point.
[0280] For example, if the camera A to be calibrated does not have latitude and longitude coordinates installed, it cannot be displayed on the map of the mobile APP. The user can select the corresponding calibration task in the calibration task list of the APP, enter the calibration task interface and view the calibration image corresponding to the calibration task. The location markers of each calibration point are present in the calibration image, so the user can find the physical location of the calibration point.
[0281] In step S1002, the mobile device can obtain the world coordinates of the calibration point based on the location identifier. The mobile device can be connected to a positioning device, such as an RTK carrier phase differential technology device or BeiDou, and the mobile device has an app installed that can receive satellite signals to determine latitude and longitude. In one embodiment, the user finds the physical location of the calibration point based on the location identifier, places the mobile device at the physical location of the calibration point, and thus the mobile device can obtain the world coordinates of the calibration point.
[0282] For example, when a mobile phone is connected to BeiDou, the user can find the physical location of calibration point A-1-1 based on the location marker of the calibration point A-1-1 on the camera to be calibrated. By placing the phone at that location, and with the mobile app successfully connected to BeiDou, the app can receive satellite data and calculate spatial data. When the stability of the satellite signal and the calculated data reaches a preset threshold, the latitude and longitude (LO) of that physical location can be determined. A-1-1 LA A-1-1 And save the latitude and longitude (LO)A-1-1 LA A-1-1 ), to be used as the world coordinates of the calibration point A-1-1.
[0283] In step S1003, the mobile device can send the world coordinates to the central platform. After obtaining the world coordinates of the calibration point, the central platform can calculate the camera model of the camera to be calibrated based on the pixel coordinates and world coordinates corresponding to the calibration point.
[0284] In one implementation, the mobile device is directly connected to the central platform network, and the mobile device sends world coordinates to itself via this direct network connection. For example, when a user clicks the "One-Click Upload" button on their phone's interface, the phone can send the world coordinates to the central platform. In another implementation, the mobile device sends the calibration task to itself via instant messaging software. For example, the phone generates a calibration task package file based on the world coordinates and sends it to the central platform via a chat application.
[0285] In this embodiment, since the mobile device can receive the calibration task generated by the central platform based on the calibration points of the captured image and return the world coordinates of the acquired calibration points to the central platform, the calibration of the camera can be completed by one person based on the interaction between the central platform and the mobile device. This can reduce labor costs and improve the efficiency of calibration work.
[0286] As one implementation method of this application, such as Figure 11 As shown, the steps for obtaining the world coordinates of the calibration point based on the location identifier may include:
[0287] S1101, Obtain the number of determined calibration points included in the calibration task, as the number to be calibrated;
[0288] S1102, Determine the world coordinates of the calibration point based on the location identifier, and record the number of calibration points whose world coordinates have been determined;
[0289] When a mobile device receives a calibration task from a central platform, it can obtain the number of calibration points identified in the task and use this number as the number of points to be calibrated. The mobile device can then determine the world coordinates of each calibration point based on its location identifier and record the number of calibration points with determined world coordinates when determining the world coordinates of a given point.
[0290] S1103, determine whether the number of recorded calibration points with known world coordinates has reached the number to be calibrated;
[0291] S1104, if not reached, return to the step of determining the world coordinates of the calibration point based on the location identifier and recording the number of calibration points with determined world coordinates, until the number of recorded calibration points with determined world coordinates reaches the number to be calibrated.
[0292] After a mobile device records the number of calibration points with known world coordinates, it can determine whether the recorded number of calibration points with known world coordinates has reached the number to be calibrated.
[0293] If the number of calibration points with known world coordinates recorded does not reach the number of calibration points to be calibrated, the mobile device can continue to determine the world coordinates of calibration points based on the location identifier and record the number of calibration points with known world coordinates until the number of calibration points with known world coordinates recorded reaches the number of calibration points to be calibrated.
[0294] For example, if the number of calibration points to be calibrated is 4, and the number of calibration points with known world coordinates recorded by the mobile device is 2, the number of recorded calibration points with known world coordinates has not reached the number of calibration points to be calibrated. The mobile device can continue to determine the world coordinates of the uncalibrated calibration points and record the number of calibration points with known world coordinates until the number of recorded calibration points reaches the number of calibration points to be calibrated, which is 4.
[0295] As can be seen, in this embodiment, the mobile device can obtain the number of determined calibration points included in the calibration task as the number to be calibrated, determine the world coordinates of the calibration points based on the location identifier, and record the number of calibration points with determined world coordinates. It then determines whether the recorded number of calibration points with determined world coordinates has reached the number to be calibrated. If not, it returns to the steps of determining the world coordinates of the calibration points based on the location identifier and recording the number of calibration points with determined world coordinates, until the recorded number of calibration points with determined world coordinates reaches the number to be calibrated. In this way, calibrating multiple calibration points can reduce the calibration error rate and improve calibration quality.
[0296] As one embodiment of this application, the above-mentioned calibration task includes at least a captured image displaying the location identifier;
[0297] The steps described above for determining the world coordinates of the calibration point based on the location identifier may include:
[0298] The captured image displaying the location marker is shown so that the user can locate the physical location represented by the location marker based on the location marker in the captured image, thereby obtaining the world coordinates of the calibration point.
[0299] Since the calibration task includes capturing images with location markers, when the mobile device receives the calibration task, it can display the captured images with location markers. This allows the user to locate the physical location represented by the location markers in the captured images, find the physical location of the calibration point, and then place the mobile device at the physical location of the calibration point, so that the mobile device can obtain the world coordinates of the calibration point.
[0300] For example, a calibration task may involve displaying a captured image with a crosshair indicating the corner of a zebra crossing. When a mobile device receives this calibration task, it can display the captured image with the crosshair. The user can then use the crosshair in the captured image to locate the physical position indicated by the crosshair, find the corresponding zebra crossing corner, and place the mobile device at that corner to obtain the world coordinates of that corner.
[0301] As can be seen, in this embodiment, the mobile device can display a captured image with a location marker, allowing the user to locate the physical location represented by the location marker based on the location marker in the captured image, thereby obtaining the world coordinates of the calibration point. The mobile device then returns the obtained world coordinates of the calibration point to the central platform.
[0302] As one embodiment of this application, the above method may further include:
[0303] After the number of calibration points with known world coordinates recorded reaches the number to be calibrated, it is determined whether the world coordinates of the current camera installation location need to be calibrated, based on the world coordinates of the current camera installation location.
[0304] If it is necessary to calibrate the world coordinates of the installation location of the camera to be calibrated, obtain the world coordinates of the installation location of the camera to be calibrated.
[0305] Once the number of calibration points with known world coordinates reaches the required number for calibration, the mobile device can determine whether the world coordinates of the current camera's installation location need to be calibrated, based on the world coordinates of that location. In other words, the mobile device can determine whether the installation latitude and longitude of the current camera needs to be calibrated.
[0306] In one implementation, when a mobile device receives a user's trigger command to modify the installation latitude and longitude of the camera to be calibrated, the mobile device can calibrate the world coordinates of the installation location of the camera to be calibrated, obtain the world coordinates of the installation location of the camera to be calibrated, and save the world coordinates. For example, when the user clicks the "Modify Latitude and Longitude" button, the mobile phone connects to the RTK carrier phase differential technology device, receives satellite resolution data, and calculates spatial data. When the stability of the satellite signal and the calculated data reaches a preset threshold, the installation latitude and longitude of the camera to be calibrated can be determined and saved to complete the calibration of the world coordinates of the installation location of the camera to be calibrated.
[0307] After the mobile device completes the calibration of the world coordinates of the installation location of the camera to be calibrated, it can then determine whether the installation height of the camera needs to be calibrated. If calibration is required, the calibrated installation height can be obtained and saved.
[0308] In one implementation, when the mobile device receives a user's trigger command to modify the installation height of the camera to be calibrated, the mobile device can calibrate the installation height of the camera. For example, when the user clicks the "Modify Installation Height" button, the installation height of the camera to be calibrated can be measured using a height measurement tool (such as AR (Augmented Reality) ranging, visual measurement, laser ranging, etc.), thereby measuring the height H from the ground to the camera's installation position. The mobile phone can then acquire and save this height H to complete the calibration of the installation height of the camera to be calibrated.
[0309] After the mobile device acquires the world coordinates of the calibration point of the current camera to be calibrated, or after completing the calibration of the installation height of the current camera to be calibrated, the mobile device can continue to determine whether the calibration of the next camera to be calibrated is needed, that is, whether there are still cameras to be calibrated. If the calibration of the next camera to be calibrated is needed, the world coordinates of the calibration point of the next camera to be calibrated are acquired, until the calibration of all cameras to be calibrated is completed.
[0310] As can be seen, in this embodiment, after the number of recorded calibration points with known world coordinates reaches the required number for calibration, the mobile device can determine whether the world coordinates of the current camera's installation location need to be calibrated, based on the world coordinates of the current camera's installation location. If calibration is required, the world coordinates of the current camera's installation location are obtained. This allows for calibration of the camera's installation location's world coordinates, reducing the calibration error rate and improving calibration quality.
[0311] As one implementation of this application, the step of sending the world coordinates to the central platform described above may include:
[0312] Determine whether the mobile device and the central platform are directly connected to the network;
[0313] If the mobile device is directly connected to the central platform network, the world coordinates will be sent to the central platform through the direct connection network;
[0314] If the central platform is not directly connected to the mobile device network, a task package file corresponding to the world coordinates is generated.
[0315] The task package file is sent to the central platform via instant messaging software, so that the central platform can download the task package file via the instant messaging software to obtain the world coordinates, and calculate the camera model of the current camera to be calibrated based on the pixel coordinates corresponding to the calibration point and the world coordinates.
[0316] The specific implementation of the above steps is the same as the embodiment applied to the central platform to realize the interaction between the two. For details, please refer to the description of the specific implementation of the embodiment applied to the central platform to realize the interaction between the two, which will not be repeated here.
[0317] As can be seen, in this embodiment, if the mobile device is directly connected to the central platform network, the mobile device can send world coordinates to the central platform via the direct network connection. If the central platform and the mobile device are not directly connected, a task package file corresponding to the world coordinates is generated and sent to the central platform via instant messaging software. The central platform then downloads the task package file via the instant messaging software to obtain the world coordinates and calculates the camera model of the camera to be calibrated based on the pixel coordinates corresponding to the calibration point and the world coordinates. In this way, based on the interaction between the central platform and the mobile device, the camera calibration can be completed by one person, which can reduce labor costs and improve calibration efficiency.
[0318] The camera calibration method provided in this application calibrates the camera through interaction between a central platform and mobile devices. Compared with the method of camera calibration using multiple people working together, as shown in the table below, this method can greatly improve work efficiency and reduce labor costs.
[0319] Existing technology This plan Improvement effect Human resource input (persons) ≥2 1 100% Average efficiency per calibration point ≥5min 1min 500% On average, one PTZ camera calibration is completed. 625min 1min 6250% On average, one bolt calibration is completed. 125min 1min 1250%
[0320] Corresponding to the first camera calibration method described above, this application embodiment also provides a first camera calibration device, which will be described below.
[0321] like Figure 12 As shown, a camera calibration device is applied to a central platform in a calibration system, the calibration system further including a mobile device, the device comprising:
[0322] The image acquisition module 1210 is used to acquire the images captured by the camera to be calibrated.
[0323] The calibration point determination module 1220 is used to determine calibration points from the captured image;
[0324] The calibration task generation module 1230 is used to generate a calibration task for the current camera to be calibrated based on the calibration point, wherein the calibration task includes at least a location identifier of the determined calibration point, and the location identifier is used to indicate the physical location of the calibration point.
[0325] The calibration task distribution module 1240 is used to distribute the calibration task to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier.
[0326] As can be seen, in the solution provided in this application embodiment, a central platform is applied to the calibration system, and the calibration system also includes a mobile device. The central platform can acquire images captured by the camera to be calibrated, determine calibration points from the captured images, generate a calibration task for the camera to be calibrated based on the calibration points, wherein the calibration task includes at least the location identifier of the determined calibration point, the location identifier is used to represent the physical location of the calibration point, and the calibration task is sent to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier. Since the central platform can generate a calibration task including the location identifier of the calibration point based on the calibration points in the captured images and send it to the mobile device, and the mobile device can execute the calibration task based on the location identifier of the calibration point and return the world coordinates corresponding to the calibration point, the calibration of the camera can be completed by one person based on the interaction between the central platform and the mobile device, thus reducing labor costs and improving calibration efficiency.
[0327] As one embodiment of this application, the apparatus may further include:
[0328] The meta-target localization acquisition module is used to record the current pose of the current camera to be calibrated as meta-target localization before the step of generating the calibration task of the current camera to be calibrated based on the calibration point;
[0329] The type determination module is used to determine the type of the camera currently to be calibrated;
[0330] A new calibration location determination module is used to determine whether a new calibration location needs to be created if the current camera to be calibrated is a PTZ camera, based on a preset number of calibration locations and the number of recorded calibration locations.
[0331] A new target location acquisition module is used to adjust the pose of the current camera to be calibrated if a new target location needs to be created, and record the adjusted pose of the current camera to be calibrated as the new target location.
[0332] The marker acquisition module is used to return the step of determining whether a new marker needs to be created based on the preset number of markers and the number of recorded markers, until the number of recorded markers reaches the preset number of markers.
[0333] As one embodiment of this application, the calibration point determination module 1220 described above may include:
[0334] The first determining submodule is used to determine the number of calibration points to be selected based on the type of the current camera to be calibrated.
[0335] The second determining submodule is used to select calibration points from the captured image based on the image features of the captured image, and record the number of selected calibration points;
[0336] The quantity judgment submodule is used to determine whether the number of recorded calibration points reaches the number of calibration points to be selected;
[0337] The first return submodule is used to return the step of selecting calibration points from the captured image based on the image features of the captured image if the target is not reached, until the number of recorded calibration points reaches the number of calibration points to be selected.
[0338] As one embodiment of this application, the above-described apparatus may further include:
[0339] The calibration determination module is used to determine, based on a preset number of cameras to be calibrated, whether the calibration of the next camera to be calibrated needs to be performed after the step of determining calibration points from the captured image.
[0340] The current camera to be calibrated module is used to determine the next camera to be calibrated as the current camera if calibration of the next camera to be calibrated is required.
[0341] The second return module is used to return the captured image of the current camera to be calibrated until the calibration of the next camera to be calibrated is no longer required, and to execute the step of generating the calibration task of the current camera to be calibrated based on the calibration point.
[0342] As one embodiment of this application, the calibration point determination module 1220 may further include:
[0343] The location identification display submodule is used to determine the location corresponding to the calibration point from the captured image and display the location identification at the location;
[0344] A pixel coordinate recording submodule is used to record the pixel coordinates of the position marker in the captured image, which are used as the pixel coordinates of the calibration point in the captured image;
[0345] The aforementioned calibration task generation module 1230 may include:
[0346] The calibration task generation submodule is used to generate a calibration task for the current camera to be calibrated based on the captured image displaying the location identifier, wherein the calibration task includes at least the captured image displaying the location identifier.
[0347] As one embodiment of this application, the above-described apparatus may further include:
[0348] A pixel coordinate acquisition module is used to acquire the pixel coordinates of the calibration point in the captured image;
[0349] The first recording module is used to record the correspondence between the pixel coordinates and world coordinates of each calibration point.
[0350] As one embodiment of this application, the above-described apparatus may further include:
[0351] The camera model calculation module is used to calculate the camera model of the current camera to be calibrated based on the correspondence between the pixel coordinates and world coordinates of each calibration point.
[0352] As one embodiment of this application, the above-described apparatus may further include:
[0353] The second recording module is used to record the correspondence between the current camera to be calibrated and the multiple camera models corresponding to the calibration points when the camera model of the current camera to be calibrated includes multiple camera models corresponding to the calibration points.
[0354] Corresponding to the second camera calibration method described above, this application embodiment also provides a second camera calibration device, which will be described below.
[0355] like Figure 13 As shown, a camera calibration device is used in a calibration system for mobile devices. The calibration system further includes a central platform. The device includes:
[0356] The calibration task acquisition module 1310 is used to acquire the calibration task issued by the central platform, wherein the calibration task is generated by the central platform based on the calibration point determined from the image captured by the camera to be calibrated, and the calibration task includes at least the location identifier of the determined calibration point, the location identifier being used to indicate the physical location of the calibration point.
[0357] The world coordinate acquisition module 1320 is used to acquire the world coordinates of the calibration point based on the location identifier.
[0358] The world coordinates sending module 1330 is used to send the world coordinates to the central platform.
[0359] As can be seen, in the solution provided in this application embodiment, a mobile device is applied to the calibration system. The calibration system also includes a central platform. The mobile device can obtain calibration tasks issued by the central platform. These calibration tasks are generated by the central platform based on calibration points determined from images captured by the camera to be calibrated. Each calibration task includes at least a location identifier for the determined calibration point, which indicates the physical location of the calibration point. The world coordinates of the calibration point are obtained based on the location identifier and sent to the central platform. Since the mobile device can receive the calibration task generated by the central platform based on the calibration points in the captured images and return the obtained world coordinates of the calibration points to the central platform, the camera calibration can be completed by one person based on the interaction between the central platform and the mobile device. This reduces labor costs and improves calibration efficiency.
[0360] As one embodiment of this application, the world coordinate acquisition module 1320 described above may include:
[0361] The submodule for obtaining the number of calibration points to be calibrated is used to obtain the number of determined calibration points included in the calibration task, as the number of calibration points to be calibrated.
[0362] The world coordinate determination submodule is used to determine the world coordinates of the calibration point based on the location identifier, and to record the number of calibration points whose world coordinates have been determined;
[0363] The second judgment submodule is used to determine whether the number of recorded calibration points with known world coordinates has reached the number to be calibrated;
[0364] The second return submodule is used to return to the step of determining the world coordinates of the calibration point based on the location identifier and recording the number of calibration points with determined world coordinates if the target is not reached, until the number of calibration points with determined world coordinates recorded reaches the number to be calibrated.
[0365] As one embodiment of this application, the above-mentioned calibration task includes at least a captured image displaying the location identifier;
[0366] The aforementioned world coordinate acquisition module 1320 may include:
[0367] The world coordinate acquisition submodule is used to display the captured image with the location marker, so that the user can locate the physical location represented by the location marker based on the location marker in the captured image, and obtain the world coordinates of the calibration point.
[0368] As one embodiment of this application, the above-described apparatus may further include:
[0369] The world coordinate calibration module is used to determine whether the world coordinates of the current camera installation location need to be calibrated after the number of calibration points with known world coordinates reaches the number to be calibrated.
[0370] The calibration world coordinate acquisition module is used to acquire the world coordinates of the installation position of the camera to be calibrated if the world coordinates of the installation position of the camera to be calibrated need to be calibrated.
[0371] This application also provides a camera calibration system, such as... Figure 1 As shown, it includes a central platform 101 and a mobile device 102, wherein:
[0372] The central platform 101 is used to acquire images captured by the camera to be calibrated; determine calibration points from the captured images and record the pixel coordinates of the calibration points in the captured images; generate a calibration task for the camera to be calibrated based on the calibration points; send the calibration task to the mobile device so that the mobile device executes the calibration task and returns the world coordinates corresponding to the calibration points to the central platform based on the location identifier; wherein, the calibration task includes at least the location identifier of the determined calibration point, and the location identifier is used to represent the physical location of the calibration point.
[0373] As can be seen, in the solution provided in this application embodiment, a central platform is applied to the calibration system, and the calibration system also includes a mobile device. The central platform can acquire images captured by the camera to be calibrated; determine calibration points from the captured images; generate a calibration task for the camera to be calibrated based on the calibration points; wherein the calibration task includes at least the location identifier of the determined calibration point, the location identifier being used to represent the physical location of the calibration point; and send the calibration task to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier. Since the central platform can generate a calibration task including the location identifier of the calibration point based on the calibration points in the captured images and send it to the mobile device, and the mobile device can execute the calibration task based on the location identifier of the calibration point and return the world coordinates corresponding to the calibration point, the calibration of the camera can be completed by one person based on the interaction between the central platform and the mobile device, thus reducing labor costs and improving calibration efficiency.
[0374] As one embodiment of this application, the central platform 101 can also be used to: record the current pose of the current camera to be calibrated as a meta-calibration location before the step of generating the calibration task of the current camera to be calibrated based on the calibration point; determine the type of the current camera to be calibrated; if the current camera to be calibrated is a PTZ camera, determine whether a new calibration location needs to be created based on a preset number of calibration locations and the number of recorded calibration locations; if a new calibration location needs to be created, adjust the pose of the current camera to be calibrated and record the adjusted pose of the current camera to be calibrated as the new calibration location; return to the step of determining whether a new calibration location needs to be created based on a preset number of calibration locations and the number of recorded calibration locations, until the number of recorded calibration locations reaches the preset number of calibration locations.
[0375] As one embodiment of this application, the central platform 101 can be specifically used to determine the number of calibration points to be selected based on the type of the current camera to be calibrated; select calibration points from the captured image based on the image features of the captured image, and record the number of selected calibration points; determine whether the number of recorded calibration points reaches the number of calibration points to be selected; if not, return to the step of selecting calibration points from the captured image based on the image features of the captured image, until the number of recorded calibration points reaches the number of calibration points to be selected.
[0376] As one embodiment of this application, the central platform 101 can also be used to determine, based on a preset number of cameras to be calibrated, whether the calibration of the next camera to be calibrated is required after the step of determining the calibration point from the captured image; if the calibration of the next camera to be calibrated is required, the next camera to be calibrated is used as the current camera to be calibrated; the process of obtaining the captured image of the current camera to be calibrated is repeated until the calibration of the next camera to be calibrated is no longer required, and the step of generating the calibration task of the current camera to be calibrated based on the calibration point is executed.
[0377] As one embodiment of this application, the central platform 101 can be specifically used to determine the position corresponding to the calibration point from the captured image and display a position identifier at the position; record the pixel coordinates of the position identifier in the captured image as the pixel coordinates of the calibration point in the captured image; and generate a calibration task for the current camera to be calibrated based on the captured image displaying the position identifier, wherein the calibration task includes at least the captured image displaying the position identifier.
[0378] As one embodiment of this application, the central platform 101 can also be used to obtain the pixel coordinates of the calibration point in the captured image; for each calibration point, the correspondence between the pixel coordinates of the calibration point and the world coordinates is recorded.
[0379] As one embodiment of this application, the central platform 101 can also be used to calculate the camera model of the current camera to be calibrated based on the correspondence between the pixel coordinates and world coordinates corresponding to each calibration point.
[0380] As one embodiment of this application, the central platform 101 can also be used to record the correspondence between the current camera to be calibrated and the multiple camera models corresponding to the calibration points when the camera model of the current camera to be calibrated includes multiple camera models corresponding to the calibration points.
[0381] The mobile device 102 is used to obtain a calibration task issued by the central platform; obtain the world coordinates of the calibration point based on the location identifier; and send the world coordinates to the central platform; wherein the calibration task is generated by the central platform based on the calibration point determined from the image captured by the camera to be calibrated, and the calibration task includes at least the determined calibration point location identifier, which is used to indicate the physical location of the calibration point.
[0382] As can be seen, in the solution provided in this application embodiment, a mobile device is applied to the calibration system. The calibration system also includes a central platform. The mobile device can obtain calibration tasks issued by the central platform. These calibration tasks are generated by the central platform based on calibration points determined from images captured by the camera to be calibrated. Each calibration task includes at least a location identifier for the determined calibration point, which indicates the physical location of the calibration point. The world coordinates of the calibration point are obtained based on the location identifier and sent to the central platform. Since the mobile device can receive the calibration task generated by the central platform based on the calibration points in the captured images and return the obtained world coordinates of the calibration points to the central platform, the camera calibration can be completed by one person based on the interaction between the central platform and the mobile device. This reduces labor costs and improves calibration efficiency.
[0383] As one embodiment of this application, the mobile device 102 can be specifically used to obtain the number of determined calibration points included in the calibration task as the number to be calibrated; determine the world coordinates of the calibration points based on the location identifier, and record the number of calibration points with determined world coordinates; determine whether the number of recorded calibration points with determined world coordinates reaches the number to be calibrated; if not, return to the step of determining the world coordinates of the calibration points based on the location identifier and recording the number of calibration points with determined world coordinates, until the number of recorded calibration points with determined world coordinates reaches the number to be calibrated.
[0384] As one embodiment of this application, the calibration task includes at least a captured image displaying the location identifier; the mobile device 102 can be specifically used to display the captured image displaying the location identifier, so that the user can locate the physical location represented by the location identifier based on the location identifier in the captured image, and obtain the world coordinates of the calibration point.
[0385] As one embodiment of this application, the mobile device 102 can also be used to determine whether the world coordinates of the installation location of the current camera to be calibrated need to be calibrated after the number of calibration points with known world coordinates reaches the number to be calibrated, based on the world coordinates of the installation location of the current camera to be calibrated; if the world coordinates of the installation location of the current camera to be calibrated need to be calibrated, the world coordinates of the installation location of the current camera to be calibrated are obtained.
[0386] This application also provides a central platform, such as... Figure 14 As shown, it includes:
[0387] Memory 1401 is used to store computer programs;
[0388] When the processor 1402 executes the program stored in the memory 1401, it implements the steps of the first camera calibration method described in any of the above embodiments.
[0389] Furthermore, the aforementioned central platform may also include a communication bus and / or a communication interface, with the processor 1402, the communication interface, and the memory 1401 communicating with each other via the communication bus.
[0390] As can be seen, in the solution provided in this application embodiment, a central platform is applied to the calibration system, and the calibration system also includes a mobile device. The central platform can acquire images captured by the camera to be calibrated; determine calibration points from the captured images; generate a calibration task for the camera to be calibrated based on the calibration points; wherein the calibration task includes at least the location identifier of the determined calibration point, the location identifier being used to represent the physical location of the calibration point; and send the calibration task to the mobile device so that the mobile device can execute the calibration task and return the world coordinates corresponding to the calibration point to the central platform based on the location identifier. Since the central platform can generate a calibration task including the location identifier of the calibration point based on the calibration points in the captured images and send it to the mobile device, and the mobile device can execute the calibration task based on the location identifier of the calibration point and return the world coordinates corresponding to the calibration point, the calibration of the camera can be completed by one person based on the interaction between the central platform and the mobile device, thus reducing labor costs and improving calibration efficiency.
[0391] The communication bus mentioned in the central platform above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0392] The communication interface is used for communication between the aforementioned central platform and other devices.
[0393] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0394] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0395] This application also provides a mobile device, such as... Figure 15 As shown, it includes:
[0396] Memory 1501 is used to store computer programs;
[0397] When the processor 1502 executes the program stored in the memory 1501, it implements the steps of the second camera calibration method described in any of the above embodiments.
[0398] Furthermore, the aforementioned mobile device may also include a communication bus and / or a communication interface, with the processor 1502, communication interface, and memory 1501 communicating with each other via the communication bus.
[0399] As can be seen, in the solution provided in this application embodiment, a mobile device is applied to the calibration system. The calibration system also includes a central platform. The mobile device can obtain calibration tasks issued by the central platform. These calibration tasks are generated by the central platform based on calibration points determined from images captured by the camera to be calibrated. Each calibration task includes at least a location identifier for the determined calibration point, which indicates the physical location of the calibration point. The world coordinates of the calibration point are obtained based on the location identifier and sent to the central platform. Since the mobile device can receive the calibration task generated by the central platform based on the calibration points in the captured images and return the obtained world coordinates of the calibration points to the central platform, the camera calibration can be completed by one person based on the interaction between the central platform and the mobile device. This reduces labor costs and improves calibration efficiency.
[0400] The communication bus mentioned in the aforementioned mobile devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0401] The communication interface is used for communication between the aforementioned mobile devices and other devices.
[0402] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0403] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0404] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of either the first camera calibration method or the second camera calibration method described above.
[0405] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the first or second camera calibration methods described above.
[0406] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), etc.
[0407] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0408] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, systems, devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0409] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A camera calibration method characterized by, A central platform applied in a calibration system, the calibration system also including mobile devices, the method comprising: Acquire the image captured by the camera currently being calibrated; The location corresponding to the calibration point is determined from the captured image, and a location marker is displayed at the location; Based on the calibration point and the location identifier, a calibration task is generated for the current camera to be calibrated, wherein the calibration task includes at least an image captured at the determined calibration point with a location identifier, the location identifier being used to indicate the physical location of the calibration point; The calibration task is sent to the mobile device so that the mobile device can execute the calibration task under manual control, obtain the world coordinates corresponding to the physical location based on the location identifier, and return them to the central platform.
2. The method according to claim 1, characterized in that, Before the step of generating the calibration task for the current camera to be calibrated based on the calibration point and the location identifier, the method further includes: Record the current pose of the camera to be calibrated as the meta-calibration; Determine the type of the camera currently to be calibrated; If the camera to be calibrated is a PTZ camera, determine whether a new calibration point needs to be created based on the preset number of calibration points and the number of recorded calibration points; If a new calibration point needs to be established, adjust the pose of the current camera to be calibrated and record the adjusted pose of the current camera to be calibrated as the new calibration point. Return to the step of determining whether a new marker needs to be created based on the preset number of markers and the number of recorded markers, until the number of recorded markers reaches the preset number of markers.
3. The method according to claim 2, characterized in that, The step of determining the position corresponding to the calibration point from the captured image includes: Based on the type of the camera to be calibrated, determine the number of calibration points to be selected; Based on the image features of the captured image, calibration points are selected from the captured image, and the number of selected calibration points is recorded; Determine whether the number of recorded calibration points reaches the number of calibration points to be selected; If the target is not reached, return to the step of selecting calibration points from the captured image based on the image features, until the number of recorded calibration points reaches the number of calibration points to be selected.
4. The method according to claim 1, characterized in that, After the step of determining the position corresponding to the calibration point from the captured image, the method further includes: Based on the preset number of cameras to be calibrated, determine whether the calibration of the next camera needs to be performed; If it is necessary to calibrate the next camera to be calibrated, then use the next camera to be calibrated as the current camera to be calibrated. Return to the step of acquiring the captured image of the current camera to be calibrated, until the calibration of the next camera to be calibrated is no longer required, and then execute the step of generating the calibration task of the current camera to be calibrated based on the calibration point and the location identifier.
5. The method according to claim 1, characterized in that, After the step of determining the location corresponding to the calibration point from the captured image and displaying a location identifier at the location, the method further includes: Record the pixel coordinates of the location marker in the captured image, and use them as the pixel coordinates of the calibration point in the captured image; The step of generating the calibration task for the current camera to be calibrated based on the calibration point and the location identifier includes: Based on the captured image displaying the location identifier, a calibration task is generated for the camera currently to be calibrated.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Obtain the pixel coordinates of the calibration point in the captured image; For each calibration point, record the correspondence between the pixel coordinates of the calibration point and the world coordinates corresponding to the physical location of the calibration point.
7. The method according to claim 6, characterized in that, The method further includes: Based on the correspondence between the pixel coordinates corresponding to each calibration point and the world coordinates corresponding to the physical location of the calibration point, the camera model of the current camera to be calibrated is calculated.
8. The method according to claim 7, characterized in that, The method further includes: If the camera model of the current camera to be calibrated includes multiple camera models corresponding to the calibration points, record the correspondence between the current camera to be calibrated and the multiple camera models corresponding to the calibration points.
9. A camera calibration method, characterized in that, A mobile device used in a calibration system, the calibration system further including a central platform, the method comprising: Obtain the calibration task issued by the central platform, wherein the calibration task is generated by the central platform based on the location corresponding to the calibration point determined from the image captured by the camera to be calibrated, and the location identifier displayed at the location. The calibration task includes at least the captured image with the location identifier displayed at the determined calibration point, and the location identifier is used to indicate the physical location of the calibration point. Under manual control, the world coordinates corresponding to the physical location are obtained based on the location identifier; The world coordinates are sent to the central platform.
10. The method according to claim 9, characterized in that, The step of obtaining the world coordinates corresponding to the physical location based on the location identifier under manual control includes: Obtain the number of determined calibration points included in the calibration task, as the number to be calibrated; Under manual control, the world coordinates corresponding to the physical location are determined based on the location identifier, and the number of physical locations with determined world coordinates is recorded. Determine whether the number of recorded physical locations with known world coordinates has reached the number to be calibrated; If not, return to the step of determining the world coordinates corresponding to the physical location based on the location identifier under manual control and recording the number of physical locations with determined world coordinates, until the number of recorded physical locations with determined world coordinates reaches the number to be calibrated.
11. The method according to claim 9, characterized in that, The step of obtaining the world coordinates corresponding to the physical location based on the location identifier under manual control includes: The captured image displaying the location identifier is shown so that the user can locate the physical location represented by the location identifier based on the location identifier in the captured image, and obtain the world coordinates corresponding to the physical location.
12. The method according to claim 10, characterized in that, The method further includes: After the number of recorded physical locations with known world coordinates reaches the number to be calibrated, based on the world coordinates of the current camera installation location to be calibrated, it is determined whether the world coordinates of the current camera installation location to be calibrated need to be calibrated. If it is necessary to calibrate the world coordinates of the installation location of the camera to be calibrated, obtain the world coordinates of the installation location of the camera to be calibrated.
13. A camera calibration device, characterized in that, A central platform used in a calibration system, the calibration system also including a mobile device, the device comprising: The image acquisition module is used to acquire images captured by the camera currently being calibrated. The calibration point determination module is used to determine the position corresponding to the calibration point from the captured image and display the position identifier at the position; The calibration task generation module is used to generate a calibration task for the current camera to be calibrated based on the calibration point and the location identifier. The calibration task includes at least an image captured at the determined calibration point with a location identifier, and the location identifier is used to indicate the physical location of the calibration point. The calibration task distribution module is used to distribute the calibration task to the mobile device so that the mobile device can execute the calibration task under manual control, and obtain the world coordinates corresponding to the physical location based on the location identifier and return them to the central platform.
14. A camera calibration device, characterized in that, A mobile device used in a calibration system, the calibration system further including a central platform, the device comprising: The calibration task acquisition module is used to acquire the calibration task issued by the central platform. The calibration task is generated by the central platform based on the location of the calibration point determined from the image captured by the camera to be calibrated, and the location identifier displayed at the location. The calibration task includes at least the captured image with the location identifier displayed at the determined calibration point. The location identifier is used to indicate the physical location of the calibration point. The world coordinate acquisition module is used to acquire the world coordinates corresponding to the physical location based on the location identifier under manual control; The world coordinates sending module is used to send the world coordinates to the central platform.
15. A camera calibration system, characterized in that, This includes a central platform and mobile devices, among which: The central platform is used to execute the method according to any one of claims 1 to 8; The mobile device is used to perform the method according to any one of claims 9 to 12.
16. A central platform, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1 to 8.
17. A mobile device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 9 to 12.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 8 or 9 to 12.