Calibration method and device, equipment and storage medium
By optimizing calibration results in extended real-life equipment, the problem of inaccurate calibration results is solved, the accuracy and efficiency of calibration results are improved, and the user experience is improved.
Patent Information
- Application Number
- CN202311797405.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
The calibration methods of existing extended reality devices have the problem of inaccurate calibration results, which leads to incomplete fit between the virtual lines and the real objects, affecting the user experience.
By determining any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated, and extracting the target lines corresponding to these three-dimensional points from the target two-dimensional image, optimizing the coordinates of the three-dimensional points based on the error equation, and correcting the initial calibration result.
It improves the accuracy and efficiency of calibration results, enables the virtual line to better fit the real object, and improves the user's user experience in extended real-life devices.
Smart Images

Figure CN120219667A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a calibration method, apparatus, device, and storage medium. Background Art
[0002] With the development of the metaverse technology, extended reality (XR) technologies including virtual reality (VR), augmented reality (AR), and mediated reality (MR) have attracted much attention. No matter which extended reality technology is adopted, when a user uses a corresponding device in a certain usage environment (such as an outdoor environment or an indoor environment), the usage environment can be calibrated to determine the structure, texture, etc. of the objects (such as buildings, placed objects, etc.) contained therein, so as to ensure that the extended reality device can be used correctly and safely subsequently.
[0003] The current calibration method is mainly for users to perform manual calibration using extended reality devices. However, due to problems such as the display of extended reality devices and user operations, the calibration results are often inaccurate. For example, the virtual lines displayed on the display screen of the extended reality device do not fit the real objects, resulting in a poor user experience. Summary of the Invention
[0004] To solve the above technical problems, embodiments of the present disclosure provide a calibration method, apparatus, device, and storage medium.
[0005] In a first aspect, embodiments of the present disclosure provide a calibration method, the method including:
[0006] Determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated; wherein, the two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated;
[0007] Extract the target straight line corresponding to the two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated;
[0008] Construct an error equation based on the difference between the two adjacent three-dimensional points and the target straight line;
[0009] Determine the optimized result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimized result.
[0010] In a second aspect, embodiments of the present disclosure further provide a calibration apparatus, the apparatus including:
[0011] A three-dimensional point determination module, configured to determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated; wherein, the two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated;
[0012] A target line extraction module, configured to extract a target line corresponding to the two adjacent three-dimensional points from a target two-dimensional image including the object to be calibrated;
[0013] An error equation construction module, configured to construct an error equation based on the difference between the two adjacent three-dimensional points and the target line;
[0014] A calibration result correction module, configured to determine an optimized result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimized result.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, which includes:
[0016] A processor;
[0017] A memory, configured to store executable instructions;
[0018] Wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the calibration method described in any embodiment of the present disclosure.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement the calibration method described in any embodiment of the present disclosure.
[0020] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, and the computer program product is used to execute the calibration method described in any embodiment of the present disclosure.
[0021] The calibration method, device, equipment, and storage medium according to the embodiments of the present disclosure can determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated, and these two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated; then extract the target straight line corresponding to the two adjacent three-dimensional points from the target two-dimensional image containing the object to be calibrated. Due to the inaccuracy of the initial calibration result, there is a certain deviation between the projection of these two adjacent three-dimensional points onto the target two-dimensional image and the target straight line. Therefore, an error equation can be constructed based on the difference between the projected two-dimensional points corresponding to the two adjacent three-dimensional points and the target straight line, and the error equation can be optimized and solved to obtain the optimized result of the two adjacent three-dimensional points. This optimized result can be used to correct the initial calibration result; it realizes the optimization of the initial calibration result using the linear features in the initial calibration result, improves the optimization efficiency and accuracy of the calibration result, enables the virtual line displayed on the display screen of the extended reality device to better fit the real object in the real environment, and thus enhances the user experience of the extended reality device. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. Throughout the accompanying drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the elements and elements are not necessarily drawn to scale.
[0023] Figure 1 It is a schematic flowchart of a calibration method provided by an embodiment of the present disclosure;
[0024] Figure 2 It is a schematic display diagram of the relationship between two adjacent three-dimensional points and the target straight line in the target two-dimensional image provided by an embodiment of the present disclosure;
[0025] Figure 3 It is a schematic flowchart of another calibration method provided by an embodiment of the present disclosure;
[0026] Figure 4 It is a schematic flowchart of yet another calibration method provided by an embodiment of the present disclosure;
[0027] Figure 5 It is a schematic display diagram of the gradient jump point set and the straight line provided by an embodiment of the present disclosure;
[0028] Figure 6 It is a schematic structural diagram of a calibration device provided by an embodiment of the present disclosure;
[0029] Figure 7 It is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of protection of the present disclosure.
[0031] It should be understood that the various steps recited in the method embodiments of the present disclosure can be executed in a different order and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0032] The term "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0033] It should be noted that the concepts such as "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or mutual dependence relationship of the functions executed by these devices, modules or units.
[0034] It should be noted that the modifications of "one" and "plural" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless clearly specified otherwise in the context, it should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0036] When a user first uses an extended reality device (which can be a virtual reality device, an augmented reality device, a mixed reality device, etc.) in a usage environment (such as an outdoor environment or an indoor environment), the usage environment will be calibrated. One calibration method is manual calibration by the user, that is, the user can manually circle the real objects (such as buildings, placed objects, etc.) in the usage environment displayed on the display screen according to the relevant guidance in the device, and set the three-dimensional point coordinates, textures, etc. of their stereo bounding boxes. Another calibration method is automatic calibration, that is, the extended reality device automatically scans the usage environment and sets the three-dimensional stereo bounding boxes, surface textures, etc. of the objects contained therein. The result of calibration is to determine the position of the real object in the coordinate system used by the extended reality device (such as the position coordinates of some key points or edges corresponding to the real object, etc.). Regardless of which calibration method is used, there is a situation where the calibration is inaccurate, that is, the virtual object displayed on the display screen of the extended reality device after calibration does not completely fit the real object. This can easily lead to the virtual object and the real object not being well integrated, resulting in a ghosting problem, and also lead to safety problems when the user moves in the usage environment, etc., reducing the user's usage experience.
[0037] Based on the above situation, the embodiments of the present disclosure provide a calibration scheme to correct the three-dimensional points in the initial calibration result by using the difference between the linear features of the object to be calibrated contained in the initial calibration result of the object to be calibrated and the straight lines in the corresponding two-dimensional images, achieving the technical effect of quickly and efficiently correcting the initial calibration result.
[0038] The calibration method provided by the embodiments of the present disclosure is applicable to the situation of spatial calibration of the usage environment in the extended reality scenario. This method can be executed by a calibration device, which can be implemented in software and / or hardware, and this device can be integrated in an electronic device implementing the extended reality technology. The electronic device may include, but is not limited to, a head-mounted display or glasses integrating the extended reality technology, a smart phone, a laptop computer, or a desktop computer integrating the extended reality function, etc.
[0039] Figure 1 The flowchart of a calibration method provided by the embodiments of the present disclosure is shown. As Figure 1 shown, the calibration method may include the following steps:
[0040] S110. Determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated.
[0041] Among them, the object to be calibrated is any object in the usage environment of the extended reality device. For example, the object to be calibrated can be the overall scope of a building (such as a room) or a partial scope (such as a wall); again, the object to be calibrated can also be an object placed in the usage environment, such as a sculpture or a sign in the outdoor environment, or furniture in the indoor environment. The initial calibration result is the result obtained after initially calibrating the usage environment, which at least includes the three-dimensional information of the object to be calibrated in the usage environment. Exemplarily, for an indoor environment, the initial calibration result can at least include the three-dimensional information of indoor objects. For example, it can include the room structure, room texture, three-dimensional bounding boxes of indoor objects (such as furniture), and the texture of indoor objects. A three-dimensional point is a point in three-dimensional space, which has three-dimensional coordinates in the world coordinate system. Two adjacent three-dimensional points can be two three-dimensional points that are successively selected by the calibrator during the initial calibration process and are on a straight line, or any two three-dimensional points on a straight line in the initial calibration result.
[0042] Specifically, the electronic device can obtain the initial calibration result obtained after initially calibrating the object to be calibrated in the usage environment. The initial calibration result at least includes the three-dimensional information of the object to be calibrated with linear features. If the initial calibration result is accurate, then through the display screen of the extended reality device, it can be seen that the edge of the projected virtual object fits the edge of the real object in the usage environment. If the initial calibration result is inaccurate, then the edge of the virtual object seen through the above display screen and the edge of the real object are not completely fitted. In this case, the linear features of the object to be calibrated can be used for optimizing / correcting the initial calibration result.
[0043] In view of the fact that the initial calibration result includes the three-dimensional information of the object to be calibrated with linear features, such as the three-dimensional coordinates of each vertex of indoor objects. Therefore, the electronic device can arbitrarily extract two adjacent three-dimensional points on a straight line from the initial calibration result. In this way, the two adjacent three-dimensional points correspond to a certain linear edge of the object to be calibrated.
[0044] As Figure 2 shown, if there are office desks and chairs placed in the indoor environment, then the initial calibration result at least includes the three-dimensional coordinates of each vertex of the office desk and the vertex coordinates of the three-dimensional bounding box of the office chair. The electronic device can arbitrarily take two adjacent three-dimensional points from the initial calibration result, and the two adjacent three-dimensional points can correspond to the outer edge 201 of the office desk.
[0045] S120. Extract the target straight line corresponding to two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated.
[0046] Among them, the target two-dimensional image is a two-dimensional image of the usage environment obtained from the perspective where two adjacent three-dimensional points are selected. The target line is the line in the target two-dimensional image corresponding to the two adjacent three-dimensional points.
[0047] Specifically, when the initial calibration result is inaccurate, there will be a deviation between the two two-dimensional points (i.e., the projected two-dimensional points) obtained after projecting the two selected adjacent three-dimensional points onto their corresponding target two-dimensional images and the target line corresponding to the two adjacent three-dimensional points in the target two-dimensional image. As Figure 2 shown, after projecting two adjacent three-dimensional points onto the target two-dimensional image, the first projected two-dimensional point 202 and the second projected two-dimensional point 203 can be obtained. These two projected two-dimensional points do not completely fall on the outer edge 201 of the desk, but there is a deviation from it. Therefore, the electronic device can obtain the target two-dimensional image and extract the target line corresponding to the two adjacent three-dimensional points from it, so as to optimize the above three-dimensional points through the target line subsequently.
[0048] The above target two-dimensional image can be a two-dimensional image captured by the extended reality device during the initial calibration process, or a two-dimensional image captured by the extended reality device after the initial calibration, or a two-dimensional image of the perspective where two adjacent three-dimensional points are located, extracted by the electronic device from the real-time three-dimensional space model constructed by the extended reality device.
[0049] The extraction method of the above target line is not limited. For example, it can be any line extraction algorithm in the related art, as long as it can obtain the target line.
[0050] S130. Based on the difference between the two adjacent three-dimensional points and the target line, construct an error equation.
[0051] Among them, the error equation is an equation used to calculate a certain error, which contains variables to be optimized and solved. In the embodiments of the present disclosure, the error equation contains the coordinate variables of the three-dimensional points to be optimized.
[0052] Specifically, according to the above description, there is some deviation between the two selected adjacent three-dimensional points and the target line. If the two adjacent three-dimensional points are accurately calibrated, this deviation should be 0. Based on this, the difference (such as distance difference, angle difference, etc.) between the two projected two-dimensional points corresponding to the two adjacent three-dimensional points and the target line in their corresponding target two-dimensional images can be calculated, and the error equation can be constructed using this difference. In this way, the error equation contains the coordinates of the three-dimensional points with calibration errors, and the coordinates of the three-dimensional points can be recalculated by optimizing and solving the error equation subsequently.
[0053] S140. Determine the optimization result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimization result.
[0054] Specifically, according to the above steps, an error equation can be constructed for each frame of the target two-dimensional image corresponding to two adjacent three-dimensional points. Then, the electronic device can optimize and solve the constructed multiple error equations to obtain the three-dimensional coordinates of the optimized three-dimensional points. After that, the optimized three-dimensional points can be used to correct the initial calibration result. For example, the three-dimensional points in the initial calibration result can be optimized one by one according to the above process, and then the initial calibration result can be corrected. Another example is that at least local calibration deviations (such as distance offsets, offset angles, etc.) can be determined based on the optimized three-dimensional points, and then the initial calibration result can be corrected according to the calibration deviations.
[0055] The calibration method provided by the embodiments of the present disclosure can determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated, and these two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated; then extract the target lines corresponding to the two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated. Since the initial calibration result is inaccurate, there is a certain deviation between the two adjacent three-dimensional points projected onto the target two-dimensional image and the target line. Therefore, an error equation can be constructed based on the difference between the projected two-dimensional points corresponding to the two adjacent three-dimensional points and the target line, and after optimizing and solving the error equation, the optimized result of the two adjacent three-dimensional points can be obtained, and this optimized result can be used to correct the initial calibration result; it realizes the optimization of the initial calibration result by using the linear features in the initial calibration result, improves the optimization efficiency and accuracy of the calibration result, and enables the virtual lines displayed on the display screen of the extended reality device to better fit the real objects in the real environment, thereby enhancing the user experience of the extended reality device.
[0056] Figure 3 It is a flowchart of another calibration method provided by the embodiments of the present disclosure. It further optimizes "constructing an error equation based on the difference between two adjacent three-dimensional points and the target line". The explanations of the same or corresponding terms in the above embodiments are not repeated here. Refer to Figure 3 , this calibration method includes:
[0057] S310. Determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated.
[0058] S320. Extract the target lines corresponding to the two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated.
[0059] S330. Based on the line type formed by the two adjacent three-dimensional points and the conversion relationship between the three-dimensional points and the projected two-dimensional points, construct an error equation according to the distance between the projected two-dimensional point corresponding to at least one of the two adjacent three-dimensional points and the target line.
[0060] Among them, the line type refers to the type of the straight line formed by two adjacent three-dimensional points, which can be defined by the relationship between the straight line and the ground. For example, the line type can be the type in which the formed straight line is perpendicular to the ground, or the type in which the formed straight line is parallel to the ground.
[0061] Specifically, when the line types of the straight lines formed by two selected adjacent three-dimensional points are different, the variables of the three-dimensional coordinates to be optimized are different. For example, when the line type is perpendicular to the ground, since it can be recognized that the points belong to the same vertical line during initial calibration, the planar coordinates x and y of two adjacent three-dimensional points can be set to the same value, and the height z value can be set according to the height difference between the actual object to be calibrated and the ground. In this way, there are only two variables to be optimized, namely the planar coordinates x and y, among the two adjacent three-dimensional points of this line type. For another example, when the line type is parallel to the ground, the height z values of two adjacent three-dimensional points are the same, and it can be set according to the height difference between the actual object to be calibrated and the ground, while the planar coordinates x and y of the two points are different. In this way, there are two sets of planar coordinates x and y, a total of four variables to be optimized, among the two adjacent three-dimensional points of this line type. Thus, when the variables to be optimized are different, the ways and quantities of constructing the error equation will also be different.
[0062] In addition, through the description of the above embodiments, it can be seen that the error equation can be constructed based on the difference between two adjacent three-dimensional points and the target straight line in the corresponding target two-dimensional image. The three-dimensional points are three-dimensional information in the world coordinate system, and the target straight line is straight line information in the image coordinate system of the target two-dimensional image. The information dimensions of the two are different. Therefore, when constructing the error equation, the coordinate conversion relationship between the three-dimensional points and the projected two-dimensional points can be obtained by using the conversion relationship between the world coordinate system and the image coordinate system, so as to convert the above two pieces of information into information in the same coordinate system for calculation.
[0063] Therefore, when the electronic device constructs the error equation, it can determine the three-dimensional points participating in the construction of the error equation according to the line type formed by two adjacent three-dimensional points, and then with the help of the above conversion relationship, use the three-dimensional coordinates of the three-dimensional points to represent the projected two-dimensional points after the corresponding three-dimensional points are projected onto the target two-dimensional image. Then, according to the point-to-line distance calculation formula, an error equation containing the optimization variables of the three-dimensional points to be optimized is obtained.
[0064] During specific implementation, the above two selected adjacent three-dimensional points are projected onto the target two-dimensional image by using the camera model, and the conversion relationship between the three-dimensional points and the projected two-dimensional points as shown in the following formulas (1) and (2) is obtained:
[0065]
[0066]
[0067] where p uv1 is the first projected two-dimensional point obtained after projecting the first three-dimensional point p1, and p uv1 = (u1, v1, 1) T ; p uv2 is the second projected two-dimensional point obtained after projecting the second three-dimensional point p2, and p uv1 = (u2, v2, 1) T ; the first three-dimensional point p1 = (x1, y1, z1, 1) T ; the second three-dimensional point p2 = (x2, y2, z2, 1) T ; K is a 3*3 intrinsic matrix, which can be obtained from the parameters of the camera that captures the target two-dimensional image; T wc is a 3*4 pose matrix for capturing the target two-dimensional image, which can be obtained by configuring a Simultaneous Localization and Mapping (SLAM) system in the augmented reality device.
[0068] Assume further that the straight line equation of the target straight line extracted from the target two-dimensional image is:
[0069] Lp = [a, b, c] * [u, v, 1] T = au + bv + c (3)
[0070] where a, b, and c are the coefficients of the straight line equation, which can be determined during the straight line extraction process, and u, v are the variables of the straight line equation.
[0071] Then, through the calculation formula of the distance from a point to a straight line, the distance from the first projected two-dimensional point p uv1 to the target straight line Lp can be calculated:
[0072]
[0073] Combined with the conversion relationship formula (1) between the above three-dimensional points and projected two-dimensional points, formula (4) can be converted into the distance equation corresponding to the first three-dimensional point as shown in the following formula (5):
[0074]
[0075] where dis is the distance value; L is the straight line coefficient matrix, that is, L = [a, b, c].
[0076] Similarly, through the calculation formula of the distance from a point to a straight line, and combined with the conversion relationship formula (2) between three-dimensional points and projected two-dimensional points, the distance equation corresponding to the second three-dimensional point as shown in the following formula (6) can be obtained:
[0077]
[0078] The above distance equation (5) and distance equation (6) can be selected and combined according to the number of variables to be optimized corresponding to the line type formed by two adjacent three-dimensional points to generate an error equation.
[0079] In some embodiments, if the line type is perpendicular to the ground, S330 can be implemented as follows: based on the conversion relationship and any one of the two adjacent three-dimensional points, determine the projected two-dimensional point corresponding to the corresponding three-dimensional point, and based on the straight-line equation of the projected two-dimensional point and the target straight line, construct an error equation according to the distance from the projected two-dimensional point to the target straight line.
[0080] Specifically, according to the above description, for the type perpendicular to the ground, the variables to be optimized are only the plane coordinates x and y of one of the three-dimensional points. Therefore, the distance equation (5) or the distance equation (6) can be determined as the error equation.
[0081] That is, the error value or
[0082] In other embodiments, if the line type is parallel to the ground, S330 can be implemented as follows: based on the conversion relationship and two adjacent three-dimensional points, determine the projected two-dimensional points corresponding to each three-dimensional point, and based on the straight-line equations of the projected two-dimensional points and the target straight line, construct an error equation according to the distance from the projected two-dimensional points to the target straight line.
[0083] Specifically, according to the above description, for the type parallel to the ground, the variables to be optimized are the plane coordinates x and y of two three-dimensional points. Therefore, the distance equation (5) and the distance equation (6) can be combined and determined as the error equation.
[0084] For example, the distance equation (5) and the distance equation (6) can be simultaneously determined as the error equation, or the sum result of the distance equation (5) and the distance equation (6) (as shown in the following formula (7)) can be determined as the error equation, or the product result of the distance equation (5) and the distance equation (6) can be determined as the error equation, etc.
[0085]
[0086] S340. Determine the optimization result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimization result.
[0087] The calibration method provided by the embodiments of the present disclosure determines the variables to be optimized participating in the construction of the error equation through the line type formed by two adjacent three-dimensional points, provides a calculation bridge between the three-dimensional points and the target line through the conversion relationship between the three-dimensional points and the projected two-dimensional points, and constructs the error equation through the distance calculation between the projected two-dimensional points characterized by the three-dimensional coordinates of the three-dimensional points, which can simplify the optimization process of the three-dimensional points, further improve the optimization efficiency of the three-dimensional points, and thus further improve the calibration efficiency of the initial calibration result.
[0088] Figure 4 It is a flowchart of another calibration method provided by the embodiments of the present disclosure. It further optimizes "extracting the target line corresponding to two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated". The explanations of the same or corresponding terms as those in the above embodiments are not repeated here. Refer to Figure 4 This calibration method includes:
[0089] S410. Determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated.
[0090] S420. Obtain at least one two-dimensional image including the object to be calibrated captured by the extended reality device as the target two-dimensional image.
[0091] Specifically, after obtaining the initial calibration result, the electronic device can capture images along the shooting perspective where the two adjacent three-dimensional points are located through the extended reality device to obtain at least one two-dimensional image including the above two adjacent three-dimensional points of the object to be calibrated. Each captured two-dimensional image can be used as the target two-dimensional image.
[0092] S430. Project the two adjacent three-dimensional points onto the target two-dimensional image to generate two projected two-dimensional points.
[0093] Specifically, according to the conversion relationship shown in the above formulas (1) and (2), project the two adjacent three-dimensional points onto the target two-dimensional image to obtain two projected two-dimensional points. As Figure 2 shown, after projecting the two three-dimensional points, the first projected two-dimensional point 202 and the second projected two-dimensional point 203 are obtained.
[0094] S440. Based on the two projected two-dimensional points, perform line extraction on the target two-dimensional image to generate the target line.
[0095] Specifically, in order to improve the line extraction efficiency, the prior knowledge of line extraction (such as the direction reference and / or extraction area reference of line extraction, etc.) can be provided with the two projected two-dimensional points as a reference. Then, perform line extraction according to this prior knowledge to obtain the target line.
[0096] In some embodiments, a direction reference for line extraction can be obtained from two projected two-dimensional points to reduce the line detection process in redundant directions and improve the line detection efficiency. Thus, S440 can be implemented as the following steps A to B.
[0097] Step A: Determine the line direction based on two projected two-dimensional points.
[0098] Specifically, in the case where the initial calibration result is inaccurate, although the line obtained by connecting the two projected two-dimensional points does not overlap with the edge line of the real object, the deviation between the two is not too large. Therefore, the line direction where the two projected two-dimensional points are connected can be used as the line direction reference for line extraction. In this way, the line direction where the two projected two-dimensional points are connected can be determined as the reference direction for subsequent line extraction.
[0099] Step B: Perform line extraction on the target two-dimensional image based on the line direction to generate target lines.
[0100] Specifically, the electronic device performs line extraction from the target two-dimensional image according to the determined line direction above. For example, only the lines whose included angle with the determined line direction does not exceed a certain angle can be extracted from the target two-dimensional image. Another example is that only the line detection in the determined line direction can be performed, while the line detection in other directions is discarded, etc. The method of line extraction is not limited.
[0101] In one example, step B can be implemented as follows: Traverse the target two-dimensional image along the perpendicular line of the line direction at a preset step size to determine the gradient jump points in the target two-dimensional image; perform clustering based on the gradient jump points to generate at least one gradient jump point set; generate target lines based on the gradient jump point set.
[0102] Among them, the gradient jump point is a pixel point where the difference between the mean value of a preset number of consecutive pixel values in the forward direction and the mean value of a preset number of consecutive pixel values in the backward direction is greater than a first preset value. The preset number and the first preset value here can be determined according to the shooting quality of the two-dimensional image. The forward direction and the backward direction are opposite directions on the perpendicular line. For example, the gradient jump point can be such that the difference between the average value of the first five pixels and the average value of the last five pixels of a pixel is greater than 20.
[0103] Specifically, the traversal detection of gradient jump points is performed in the direction perpendicular to the determined line direction above. For example, for Figure 2 the first projected two-dimensional point 202 and the second projected two-dimensional point 203 shown, the line direction provided by them is a direction approximately perpendicular to the ground. Then, assuming that the vertical direction is the column direction, the target two-dimensional image can be traversed row by row to detect gradient jump points. The step size of gradient jump point detection is a preset step size, such as one row or two rows, etc., which can be determined according to the balanced requirements of line detection accuracy and speed.
[0104] After all the gradient jump points are detected, distance-based clustering can be performed according to the coordinates of these gradient jump points to obtain at least one gradient jump point set. Each gradient jump point set may form a straight line. Figure 5 As shown, for Figure 2 After performing gradient jump point detection and clustering around the two projected two-dimensional points, gradient jump point set 501, gradient jump point set 502 and gradient jump point set 503 can be obtained. There are certain differences in the number of gradient jump points included in each gradient jump point set, but each gradient jump point set may fit a straight line.
[0105] Furthermore, the above-mentioned “generating a target straight line based on a gradient jump point set” can be implemented as follows: if there are multiple gradient jump point sets, the gradient jump point sets are sorted according to the number of gradient jump points; if the number of points in the first-ranked gradient jump point set is greater than the number of points in the second-ranked gradient jump point set by more than a second preset value, a straight line is extracted based on the first-ranked gradient jump point set to generate a target straight line.
[0106] The second preset value is a preset point value or ratio, etc., which can be set according to image quality and detection accuracy of gradient jump points, etc.
[0107] Specifically, for a certain edge of the object to be calibrated (such as an indoor object), it can only correspond to a straight line, so a most likely point set can be screened out from multiple gradient jump point sets, and then the target straight line is generated by the point set. Therefore, the electronic device can sort each gradient jump point set according to the number of gradient jump points contained in the point set. Compare the number of points contained in the two gradient jump point sets with the highest order. If the difference between the two is not large (such as the difference between the two points is less than the second preset value, or the ratio of the two points is less than the second preset value), it means that there are two similar straight lines in the two-dimensional image, and the interference between the two is large, and the target straight line cannot be accurately extracted. At this time, the target two-dimensional image can be discarded to reselect a target two-dimensional image for processing the entire process. On the contrary, if the difference between the two is large, the gradient jump point set ranked first can be selected for straight line extraction or straight line fitting to obtain the target straight line.
[0108] In other embodiments, a region reference for line extraction may be obtained from two projected two-dimensional points to reduce the line detection process in redundant regions and improve line detection efficiency. Thus, S440 may be implemented as the following steps C to E.
[0109] Step C: determining the local area range based on the two projected two-dimensional points.
[0110] Specifically, it can be Figure 2The first projected two-dimensional point 202 and the second projected two-dimensional point 203 shown determine the local region range for line detection. For example, taking the first projected two-dimensional point 202 and the second projected two-dimensional point 203 as two endpoints, along the perpendicular line of the connection between the two projected two-dimensional points, expand a certain number of pixels at both ends respectively to obtain the local region range 204.
[0111] Step D: Crop the target two-dimensional image based on the local region range to generate a local two-dimensional image.
[0112] Specifically, the local region range 204 is an image region that includes the target line corresponding to the two three-dimensional points. Even if there are lines in the remaining region, they are redundant lines irrelevant to the target line. Therefore, the electronic device can crop the target two-dimensional image according to the local region range 204 to obtain the local two-dimensional image corresponding to the local region range 204.
[0113] Step E: Extract lines from the local two-dimensional image to generate the target line.
[0114] Specifically, the electronic device extracts lines in the local two-dimensional image.
[0115] It should be noted that, in order to further improve the line extraction efficiency of the target line, line extraction can be combined with the above steps A to E, which not only reduces the line extraction range but also reduces the line extraction in redundant directions.
[0116] S450: Construct an error equation based on the difference between two adjacent three-dimensional points and the target line.
[0117] S460: Determine the optimization result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimization result.
[0118] The following is an embodiment of the calibration device provided by the embodiments of the present invention. This device and the calibration methods of the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the calibration device, reference can be made to the embodiments of the above calibration methods.
[0119] Figure 6 Shows a schematic structural diagram of a calibration device provided by an embodiment of the present disclosure. As Figure 6 shown, the calibration device 600 may include:
[0120] A three-dimensional point determination module 610, configured to determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated; wherein, the two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated;
[0121] A target line extraction module 620, configured to extract the target line corresponding to two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated;
[0122] An error equation construction module 630 is configured to construct an error equation based on the difference between two adjacent three-dimensional points and a target line.
[0123] A calibration result correction module 640 is configured to determine an optimized result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimized result.
[0124] The calibration device provided by the embodiments of the present disclosure can determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated, and the two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated; then extract the target line corresponding to the two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated. Due to the inaccuracy of the initial calibration result, there is a certain deviation between the two adjacent three-dimensional points projected onto the target two-dimensional image and the target line. Therefore, an error equation can be constructed based on the difference between the projected two-dimensional points corresponding to the two adjacent three-dimensional points and the target line, and after optimizing and solving the error equation, the optimized result of the two adjacent three-dimensional points can be obtained, and this optimized result can be used to correct the initial calibration result; it realizes the optimization of the initial calibration result by using the linear features in the initial calibration result, improves the optimization efficiency and accuracy of the calibration result, makes the virtual line displayed on the display screen of the extended reality device better fit the real object in the real environment, thereby enhancing the user experience of the extended reality device.
[0125] In some embodiments, the error equation construction module 630 is specifically configured to:
[0126] Based on the line type formed by two adjacent three-dimensional points and the conversion relationship between the three-dimensional points and the projected two-dimensional points, construct an error equation according to the distance between the projected two-dimensional point corresponding to at least one of the two adjacent three-dimensional points and the target line.
[0127] In one example, the error equation construction module 630 is specifically configured to:
[0128] If the line type is perpendicular to the ground, determine the projected two-dimensional point corresponding to the corresponding three-dimensional point based on the conversion relationship and any one of the two adjacent three-dimensional points, and construct an error equation according to the distance from the three-dimensional point to the target line based on the straight-line equation of the projected two-dimensional point and the target line.
[0129] In another example, the error equation construction module 630 is specifically configured to:
[0130] If the line type is parallel to the ground, determine the projected two-dimensional points corresponding to each three-dimensional point based on the conversion relationship and the two adjacent three-dimensional points, and construct an error equation according to the distances from the two adjacent three-dimensional points to the target line based on the straight-line equations of the projected two-dimensional points and the target line.
[0131] In some embodiments, the target straight line extraction module 620 includes:
[0132] A target two-dimensional image acquisition sub-module, configured to acquire at least one two-dimensional image including the object to be calibrated captured by the extended reality device as the target two-dimensional image;
[0133] A projected two-dimensional point generation sub-module, configured to project two adjacent three-dimensional points onto the target two-dimensional image to generate two projected two-dimensional points;
[0134] A target straight line generation sub-module, configured to perform straight line extraction on the target two-dimensional image based on the two projected two-dimensional points to generate a target straight line.
[0135] Further, the target straight line generation sub-module is specifically configured to:
[0136] Determine the straight line direction based on the two projected two-dimensional points;
[0137] Perform straight line extraction on the target two-dimensional image based on the straight line direction to generate a target straight line.
[0138] Further, the target straight line generation sub-module includes:
[0139] A gradient jump point determination unit, configured to traverse the target two-dimensional image along the perpendicular line of the straight line direction at a preset step length to determine the gradient jump points in the target two-dimensional image; wherein, the gradient jump point is a pixel point whose difference between the average value of the pixel values of a preset number of consecutive pixels in the forward direction and the average value of the pixel values of a preset number of consecutive pixels in the backward direction is greater than a first preset value; the forward direction and the backward direction are opposite directions on the perpendicular line;
[0140] A gradient jump point set generation unit, configured to perform clustering based on the gradient jump points to generate at least one gradient jump point set;
[0141] A target straight line generation unit, configured to generate a target straight line based on the gradient jump point set.
[0142] Further, the target straight line generation unit is specifically configured to:
[0143] If there are multiple gradient jump point sets, sort the gradient jump point sets according to the number of gradient jump points;
[0144] If the number of points in the gradient jump point set ranked first is more than a second preset value than the number of points in the gradient jump point set ranked second, perform straight line extraction based on the gradient jump point set ranked first to generate a target straight line.
[0145] Optionally, the target straight line generation sub-module is further specifically configured to:
[0146] Determine the local area range based on the two projected two-dimensional points;
[0147] Crop the target two-dimensional image based on the local area range to generate a local two-dimensional image;
[0148] Extract straight lines from the local two-dimensional image to generate target straight lines.
[0149] The calibration device provided by the embodiments of the present invention can execute the calibration method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0150] It should be noted that in the embodiments of the above calibration device, the various modules, sub-modules, and units included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional modules / sub-modules / units are only for the convenience of mutual distinction and are not used to limit the protection scope of the present disclosure.
[0151] The embodiments of the present disclosure also provide an electronic device, which may include a processor and a memory, and the memory may be used to store executable instructions. Among them, the processor may be used to read the executable instructions from the memory and execute the executable instructions to implement the calibration method in the above embodiments.
[0152] Figure 7 The structural schematic diagram of an electronic device provided by the embodiments of the present disclosure is shown.
[0153] As Figure 7 shown, the electronic device 700 may include a processing device 701 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage device 708 into the random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. The input / output interface (I / O interface) 705 is also connected to the bus 704.
[0154] Generally, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or wiredly to exchange data.
[0155] It should be noted that Figure 7The illustrated electronic device 700 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure. That is, although Figure 7 the electronic device 700 with various devices is illustrated, it should be understood that it is not required to implement or have all the illustrated devices. Instead, more or fewer devices may be implemented or had.
[0156] Specifically, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product that includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the calibration method of any embodiment of the present disclosure are performed.
[0157] The embodiments of the present disclosure also provide a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement the calibration method in any embodiment of the present disclosure.
[0158] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0159] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP, and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0160] The above computer-readable medium can be included in the above electronic device; or it can exist separately without being assembled into the electronic device.
[0161] The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to perform the steps of the calibration method described in any embodiment of the present disclosure.
[0162] In the embodiments of the present disclosure, computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0163] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0164] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and so on.
[0165] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0166] The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in the present disclosure.
[0167] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0168] Although the subject matter has been described in language specific to structural features and / or methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms for implementing the claims.
Claims
1. A calibration method, characterized in that, Including: Determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated; wherein, the two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated; Extract the target straight line corresponding to the two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated; Construct an error equation based on the difference between the two adjacent three-dimensional points and the target straight line; Determine the optimized result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimized result.
2. The method according to claim 1, characterized in that, Constructing an error equation based on the difference between the two adjacent three-dimensional points and the target straight line includes: Based on the line type formed by the two adjacent three-dimensional points and the conversion relationship between the three-dimensional points and the projected two-dimensional points, construct the error equation according to the distance between the projected two-dimensional point corresponding to at least one of the two adjacent three-dimensional points and the target straight line.
3. The method according to claim 2, wherein The constructing the error equation based on the line type formed by the two adjacent three-dimensional points and the conversion relationship between the three-dimensional points and the projected two-dimensional points, according to the distance between the projected two-dimensional point corresponding to at least one of the two adjacent three-dimensional points and the target straight line, includes: If the line type is perpendicular to the ground, determine the projected two-dimensional point corresponding to the corresponding three-dimensional point based on the conversion relationship and any one of the two adjacent three-dimensional points, and construct the error equation according to the distance from the projected two-dimensional point to the target straight line based on the straight line equation of the projected two-dimensional point and the target straight line.
4. The method according to claim 2, wherein The constructing the error equation based on the line type formed by the two adjacent three-dimensional points and the conversion relationship between the three-dimensional points and the projected two-dimensional points, according to the distance between the projected two-dimensional point corresponding to at least one of the two adjacent three-dimensional points and the target straight line, includes: If the line type is parallel to the ground, determine the projected two-dimensional points corresponding to each of the three-dimensional points based on the conversion relationship and the two adjacent three-dimensional points, and construct the error equation according to the distance from the projected two-dimensional points to the target straight line based on the straight line equation of each of the projected two-dimensional points and the target straight line.
5. The method according to claim 1, wherein The extracting the target straight line corresponding to the two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated includes: Obtain at least one two-dimensional image including the object to be calibrated captured by the extended reality device as the target two-dimensional image; Project the two adjacent three-dimensional points into the target two-dimensional image to generate two projected two-dimensional points; Based on the two projected two-dimensional points, perform straight line extraction on the target two-dimensional image to generate the target straight line.
6. The method according to claim 5, characterized in that The performing straight line extraction on the target two-dimensional image based on the two projected two-dimensional points to generate the target straight line includes: Determine the straight line direction based on the two projected two-dimensional points; Perform straight line extraction on the target two-dimensional image based on the straight line direction to generate the target straight line.
7. The method according to claim 5 or 6, characterized in that, The performing straight line extraction on the target two-dimensional image based on the two projected two-dimensional points to generate the target straight line includes: Determine the local area range based on the two projected two-dimensional points; Crop the target two-dimensional image based on the local region range to generate a local two-dimensional image; Extract a straight line from the local two-dimensional image to generate the target straight line.
8. The method according to claim 6, characterized in that, The straight line extraction from the target two-dimensional image based on the straight line direction to generate the target straight line includes: Traverse the target two-dimensional image along the perpendicular line of the straight line direction at a preset step length to determine the gradient jump points in the target two-dimensional image; wherein, the gradient jump point is a pixel point whose difference between the mean value of a preset number of consecutive pixel values in the forward direction and the mean value of the preset number of consecutive pixel values in the backward direction is greater than a first preset value; the forward direction and the backward direction are opposite directions on the perpendicular line; Cluster based on the gradient jump points to generate at least one gradient jump point set; Generate the target straight line based on the gradient jump point set.
9. The method according to claim 8, wherein The generating the target straight line based on the gradient jump point set includes: If there are multiple gradient jump point sets, sort each gradient jump point set according to the number of gradient jump points; If the number of points in the gradient jump point set ranked first is more than a second preset value than the number of points in the gradient jump point set ranked second, perform straight line extraction based on the gradient jump point set ranked first to generate the target straight line.
10. A calibration device, characterized in that, Includes: A three-dimensional point determination module, configured to determine any two adjacent three-dimensional points from the initial calibration result of the object to be calibrated; wherein, the two adjacent three-dimensional points correspond to the linear edge of the object to be calibrated; A target straight line extraction module, configured to extract the target straight line corresponding to the two adjacent three-dimensional points from the target two-dimensional image including the object to be calibrated; An error equation construction module, configured to construct an error equation based on the difference between the two adjacent three-dimensional points and the target straight line; A calibration result correction module, configured to determine the optimized result of the three-dimensional points based on the error equation, and correct the initial calibration result based on the optimized result.
11. An electronic device, characterized in that, Includes: A processor; A memory, configured to store executable instructions; Wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the calibration method according to any one of claims 1-9 above.
12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the processor is enabled to implement the calibration method according to any one of claims 1-9 above.