A structure center calibration method, a calibration device, an apparatus and a storage medium
By rotating and photographing the image card using an image acquisition device, the position information of the center feature point of the image card at multiple rotation angles is obtained. The installation position centerline of the structure being calibrated is calculated and adjusted, which solves the error problem in traditional positioning methods, achieves high-precision alignment between the image acquisition device and the image card, and improves the accuracy of image acquisition and processing.
Patent Information
- Application Number
- CN202411768365.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Traditional image acquisition equipment and map card positioning methods suffer from large visual observation errors and inaccurate positioning, especially when the map card plane has no mechanical features, laser level cannot guarantee precise alignment between the image acquisition equipment and the map card.
By using an image acquisition device to rotate and photograph the chart, the position information of the center feature point of the chart at multiple different rotation angles is obtained. The offset data is calculated, and the central axis of the installation position of the structure being calibrated is adjusted to align with the center feature point of the chart, thus achieving precise alignment.
It effectively offsets errors in machining and assembly processes, ensures precise alignment between image acquisition equipment and graphics cards, and improves the accuracy and consistency of image acquisition and processing.
Smart Images

Figure CN119741209B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual inspection technology, and in particular to a structural center calibration method, calibration device, equipment and storage medium. Background Technology
[0002] In recent years, with the widespread adoption of digital products such as smartphones and tablets, and the continuous increase in consumer demand for high-quality image and video content, image acquisition devices, as core components determining the imaging quality of digital products, have become increasingly important. The quality and performance of image acquisition devices not only directly affect user satisfaction but have also become one of the key indicators for measuring product competitiveness.
[0003] However, the production and testing of image acquisition equipment involves numerous use of image charts. Due to the inherent complexity and high standards of visual inspection technology, many technical challenges exist. Particularly critical is the installation and positioning process between the image chart and the image acquisition equipment (e.g., camera modules), which directly determines the accuracy and reliability of subsequent testing. Given that image charts lack obvious mechanical positioning features, traditional positioning methods, such as relying on laser levels for manual alignment, not only suffer from errors unavoidable by visual observation but may also cause potential damage to the image chart due to direct laser irradiation, thus limiting further improvements in inspection accuracy. Furthermore, laser levels cannot guarantee the precise positioning of the image acquisition equipment (e.g., camera modules) and the image chart.
[0004] Therefore, how to achieve precise positioning between the installation location of the image acquisition device and the image card has become an important problem that urgently needs to be solved. Summary of the Invention
[0005] In view of this, the embodiments of this application provide a structural center calibration method, calibration device, equipment and storage medium, which can effectively solve the problems of large visual observation error and inaccurate positioning when using a laser level to make positioning lines on the drawing card for alignment because the drawing card plane has no mechanical features.
[0006] In a first aspect, embodiments of this application provide a structural center calibration method, including:
[0007] The image acquisition device was used to rotate and photograph the image card to obtain the position information of the center feature point of the image card under multiple different rotation angles;
[0008] Calculations are performed on multiple location information to determine the offset data from the central axis of the installation position of the structure being calibrated to the central feature point of the chart; wherein, the image acquisition device is mounted on the structure being calibrated;
[0009] The position of the structure being calibrated is adjusted using the offset data so that the central axis of the installation position of the structure being calibrated is aligned with the central feature point of the chart.
[0010] In some embodiments, the step of rotating and photographing a map using an image acquisition device to obtain the position information of the center feature point of the map at different rotation angles includes:
[0011] Based on a preset rotation angle, the image acquisition device is controlled to rotate four times sequentially on the calibrated structure.
[0012] Capture and identify the coordinate position information of the center feature point of the image card under different rotation angles.
[0013] In some embodiments, the step of calculating the offset data from the centerline of the installation position of the calibrated structure to the center feature point of the chart by calculating multiple pieces of position information includes:
[0014] The coordinate values of the center feature points of the image card are obtained from multiple location information sources and averaged to determine the coordinate values of the central axis of the installation position of the calibrated structure in the image.
[0015] Based on the coordinates of the center feature point of the chart and the coordinates of the central axis of the installation position of the structure being calibrated in the image, the offset direction and offset amount of the central axis of the installation position of the structure being calibrated from the center feature point of the chart are determined.
[0016] In some embodiments, the step of calculating the offset data from the centerline of the installation position of the calibrated structure to the center feature point of the chart by calculating multiple pieces of position information includes:
[0017] Obtain the coordinate values of the center feature points of the map card from the multiple location information, and establish the corresponding initial vectors between the coordinate origin and the multiple center feature points of the map card;
[0018] According to the rotation direction and rotation angle of the image acquisition device, the captured image is rotated sequentially to determine the transformation vector after the initial vector is rotated.
[0019] An offset vector is obtained by averaging multiple transformation vectors, wherein the offset vector is the vector between the central axis of the installation position of the calibrated structure and the central feature point of the chart.
[0020] Based on the offset vector, the offset direction and offset amount from the central axis of the installation position of the calibrated structure to the central feature point of the chart are determined.
[0021] In some embodiments, the step of establishing an initial vector corresponding to a plurality of map center feature points and the origin of coordinates based on coordinate values in a plurality of location information includes:
[0022] Virtual fixed-point coordinates are introduced, and the initial vector is decomposed into the sum of a first vector and a second vector. The virtual fixed-point coordinates are the coordinates of the central axis of the installation position of the calibrated structure in the image. The first vector is the vector from the origin of the coordinate system to the coordinates of the central axis of the installation position of the calibrated structure in the image. The second vector is the vector from the coordinates of the central axis of the installation position of the calibrated structure in the image to the coordinates of the central feature point of the image card.
[0023] In some embodiments, the step of sequentially rotating the captured image according to the rotation direction and rotation angle of the image acquisition device to determine the transformed vector after the initial vector rotation includes:
[0024] Based on the rotation direction and rotation angle of the image acquisition device, the first vector and the second vector are rotated using the vector rotation formula;
[0025] The transformed vector is obtained by adding the rotated first vector and the second vector together.
[0026] In some embodiments, the step of adjusting the position of the calibrated structural image acquisition device using the offset data includes:
[0027] The moving platform is controlled to move the structure being calibrated according to the offset direction and amount from the central axis of the installation position of the structure being calibrated to the central feature point of the chart.
[0028] Secondly, embodiments of this application provide a structural center calibration device, comprising:
[0029] The image acquisition module is used to rotate and photograph the image card using an image acquisition device to obtain the position information of the center feature point of the image card under different rotation angles.
[0030] The offset data calculation module is used to calculate multiple positions to determine the offset data between the central axis of the installation position of the structure being calibrated and the central feature point of the chart; wherein, the image acquisition device is mounted on the structure being calibrated;
[0031] The calibration module is used to adjust the position of the structure being calibrated using the offset data, so that the central axis of the installation position of the structure being calibrated is aligned with the central feature point of the chart.
[0032] Thirdly, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the structural center calibration method of the first aspect described above.
[0033] Fourthly, embodiments of this application provide a computer-readable storage medium, wherein when the computer program is executed on a processor, it implements the structural center calibration method of the first aspect described above.
[0034] The embodiments of this application have the following beneficial effects:
[0035] This application's structural center calibration method utilizes an image acquisition device to rotate and photograph a chart, obtaining positional information of the chart's central feature point at multiple rotation angles. Calculations are then performed on these positional information to determine the offset data from the central axis of the installation position of the structure being calibrated to the central feature point of the chart. The image acquisition device is mounted on the structure being calibrated. The position of the structure being calibrated is adjusted using the offset data to align the central axis of the installation position of the structure with the central feature point of the chart. This method effectively compensates for errors generated during machining and assembly, achieving precise alignment between the calibrated structure and the chart. It offers advantages such as non-contact operation and high precision, providing a reliable guarantee for high-quality image acquisition and processing. Attached Figure Description
[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 A schematic diagram of a structural center calibration method according to an embodiment of this application is shown;
[0038] Figure 2 This diagram illustrates a structural center calibration method according to an embodiment of the present application, under ideal conditions where the center of the field of view captured by the image coincides with the center of the test chart.
[0039] Figure 3 This illustration shows a schematic diagram of the camera's field of view axis being translated or tilted in a structural center calibration method according to an embodiment of this application;
[0040] Figure 4 A flowchart of a structural center calibration method according to an embodiment of this application is shown;
[0041] Figure 5This illustration shows a schematic diagram of a structural center calibration method according to an embodiment of this application, in which an image acquisition device is used to capture a map.
[0042] Figure 6 This illustration shows a schematic diagram of a structural center calibration method according to an embodiment of this application, where the camera installation involves an angle or translation.
[0043] Figure 7 Another flowchart of a structural center calibration method according to an embodiment of this application is shown;
[0044] Figure 8 Another flowchart of a structural center calibration method according to an embodiment of this application is shown;
[0045] Figure 9 This illustration shows a vector diagram of a structural center calibration method according to an embodiment of this application;
[0046] Figure 10 This illustration shows a schematic diagram of image rotation performed in a structural center calibration method according to an embodiment of this application;
[0047] Figure 11 A schematic diagram of a structural center calibration device according to an embodiment of this application is shown.
[0048] Explanation of key component symbols: 10: Image acquisition device; 20: Structure to be calibrated; 30: Support; 40: Chart; 50: Center feature point of the chart. Detailed Implementation
[0049] The technical solutions in 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.
[0050] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0051] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0052] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0053] Considering that traditional positioning methods suffer from large visual errors and inaccurate positioning when using a laser level to create positioning lines on the chart 40 for alignment due to the lack of mechanical features on the plane of the chart 40, this application proposes a structural center calibration method. This method involves mounting an image acquisition device on the structure to be calibrated and rotating the chart 40 to capture the position information of the chart's center feature point 50 at multiple rotation angles. The offset data from the central axis of the installation position of the structure to the central feature point 50 of the chart is calculated based on this position information. The position of the structure is then adjusted using this offset data to align the central axis of the installation position of the structure with the central feature point 50 of the chart. This structural center calibration method effectively compensates for errors in machining and assembly processes, ensuring precise alignment between the image acquisition device (e.g., a camera module) and the chart 40 during subsequent testing, thus providing a reliable guarantee for high-quality image acquisition and processing.
[0054] Please refer to the attached document as well. Figure 1 - Appendix Figure 11 The following describes some embodiments of this application in detail. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0055] The structural center calibration method provided in this application embodiment can be applied to, for example, Figure 1 In the structure shown.
[0056] Specifically, in the structural center calibration method of this application, the image acquisition device 10 is mounted on a support 30, the support 30 is installed on the structure to be calibrated 20, and the support 30 and the structure to be calibrated 20 are rotatably connected. The structure to be calibrated 20 is used to assist in fixing the image acquisition device 10 in space.
[0057] The calibration structure 20 is a precision mechanical structure designed to securely fix the image acquisition device 10 in space, such as a camera or scanner, while allowing for flexible adjustment of its position. In this embodiment, the calibration structure 20 has a circular groove, within which the support 30 rotates. The rotational connection between the support 30 and the calibration structure 20 is not limited here. Therefore, when the support 30 rotates the image acquisition device 10, the rotation axis of the image acquisition device 10 coincides with the rotation axis of the support 30; simultaneously, the rotation axis of the image acquisition device 10 also coincides with the central axis of the circular groove on the calibration structure 20. In this embodiment, the central axis of the installation position of the calibration structure 20 is the central axis of the circular groove on the calibration structure 20.
[0058] After the spatial position of the structure 20 being calibrated is adjusted accordingly, the image acquisition device to be tested, such as a camera module, can be repeatedly replaced on the bracket 30, thereby realizing the industrial testing of the image acquisition device. In this embodiment, the bracket 30 is configured as a quick-detachable structure, retaining the rotatable connection between the bracket 30 and the structure 20 being calibrated, and the image acquisition device to be tested is installed on the rotatable connection.
[0059] Taking a camera as an example, such as Figure 2 As shown, ideally, after the camera is mounted on the calibration structure 20, the camera's field of view axis should coincide with the center of the test chart 40. However, in practice, due to factors such as machining and assembly errors of the calibration structure 20, the camera's field of view axis may shift or tilt, as shown in the following examples. Figure 3 As shown in (a) and (b) below, if the camera is replaced and tested at this time, it will cause the camera to test inaccurately.
[0060] Figure 4 A flowchart of a structural center calibration method according to an embodiment of this application is shown. The structural center calibration method includes the following steps:
[0061] Step S100: Use image acquisition device 10 to rotate and photograph image card 40 to obtain position information of center feature point 50 of image card at multiple different rotation angles.
[0062] As an example, the image acquisition device 10 is mounted on the bracket 30, which is installed on the calibration structure 20. The image acquisition device 10 is driven by rotating the bracket 30 on the calibration structure 20 to capture images of the chart 40 at different rotation angles, so as to obtain the position information of multiple chart center feature points 50.
[0063] Image 40 is a black and white image containing numerous black and white areas of various shapes, such as squares, circles, and rings. At the physical center of image 40, there is a unique black or white area that is smaller than its surrounding identical black or white areas. This unique area serves as the center of image 40, facilitating quick identification of its center.
[0064] Location information can be represented in various ways, such as using coordinate points or vectors. In both methods, a coordinate system usually needs to be pre-defined. This coordinate system can be set up in several ways, such as establishing it at the exact center of the captured image or using any corner of the image as the origin. In this embodiment, the coordinate system is established using the image center as the origin.
[0065] In one embodiment, the step of using the image acquisition device 10 to rotate and photograph the image card 40 to obtain the position information of the center feature point 50 of the image card at different rotation angles includes:
[0066] Step S110: Based on a preset rotation angle, control the image acquisition device 10 to rotate four times sequentially on the calibrated structure 20.
[0067] The preset rotation angle refers to a specific angle pre-set during the calibration process to indicate the rotation amplitude, such as 0 degrees, 90 degrees, 180 degrees, 270 degrees, etc. The image acquisition device 10 is rotated multiple times on the structure 20 being calibrated by the rotating bracket 30. These rotation angle settings allow the image acquisition device 10 to capture images of the chart 40 from different angles, capturing the positional changes of the center feature point 50 of the chart at various angles, providing comprehensive data support for subsequent calibration. The image acquisition device 10 is controlled to rotate sequentially on the structure 20 being calibrated; the rotation and shooting process can be performed clockwise or counterclockwise.
[0068] As an example, the image acquisition device 10 is driven to rotate four times clockwise on the calibration structure 20 by rotating the bracket 30. For example, the four rotations here may include 0 degrees, 90 degrees, 180 degrees and 270 degrees.
[0069] Step S120: Capture and identify the coordinate position information of the center feature point 50 of the image card under different rotation angles.
[0070] After each rotation, the image acquisition device 10 captures and identifies the coordinate position information of the center feature point 50 of the image card at the corresponding rotation angle. For specific coordinate values, after the coordinate system is established, the coordinate values of the center feature point 50 of the image card can be calculated using pixel values based on an image recognition algorithm. For example, ... Figure 5 As shown in (a), (b), (c), and (d), the position information of the central feature point 50 of the image card taken at four angles—0 degrees, 90 degrees, 180 degrees, and 270 degrees—is as follows:
[0071] At 0 degrees, the coordinate position information of the center of the map is A(X1,Y1);
[0072] At 90 degrees, the coordinate position information of the center of the chart is B(X2,Y2);
[0073] At 180 degrees, the coordinate position information of the center of the chart is C(X3,Y3);
[0074] At 270 degrees, the coordinate position information of the center of the map is D(X4,Y4);
[0075] Step S200: Calculate multiple position information to determine the offset data from the central axis of the installation position of the structure 20 to the center feature point 50 of the chart; wherein, the image acquisition device 10 is mounted on the structure 20 to be calibrated.
[0076] It is understandable that, when the camera is mounted at an angle or with translation, among multiple images taken by rotating the camera, there will be a fixed point, such as... Figure 6 As shown in (a), this fixed point is located in the same position in every image, and it lies on the rotation axis of the support 30. When the center feature point 50 of the image card is not on the rotation axis of the support 30, the camera is rotated to take a picture. In the image taken at this time, the center feature point 50 of the image card will also rotate around the point on the rotation axis of the support 30 in the image, that is, rotate around the fixed point, as shown in (a). Figure 6 As shown in (b), even if the bracket 30 is offset when mounted on the structure 20 being calibrated, the rotation axis of the bracket 30 still coincides with the axis of the mounting position provided by the structure 20 being calibrated.
[0077] By example, image processing calculations can be performed on the captured images to obtain offset data between the central axis of the installation position of the calibrated structure 20 and the central feature point 50 of the chart. The offset data includes the offset amount and offset direction.
[0078] For example, this application provides two methods to calculate the offset data between the central axis of the mounting position of the structure 20 being calibrated and the central feature point 50 of the chart. One method involves calculating the coordinates of the central axis of the mounting position of the structure 20 being calibrated and the coordinates of the central feature point 50 of the chart through image processing, and then using these coordinates to calculate the corresponding offset direction and amount. The other method involves directly calculating the offset vector between the central axis of the mounting position of the structure 20 being calibrated and the central feature point 50 of the chart using a vector method, and obtaining the corresponding offset direction and amount from the offset vector.
[0079] For the first method, image processing is used to calculate the coordinates of the central axis of the installation position of the structure 20 being calibrated and the coordinates of the central feature point 50 of the map. Then, the corresponding offset direction and offset amount are calculated using these coordinates, such as... Figure 7 As shown, it includes:
[0080] Step S210: Obtain the coordinate values of the center feature point 50 of the image card in multiple location information and perform average calculation to determine the coordinate values of the central axis of the installation position of the calibrated structure 20 in the image.
[0081] For example, such as Figure 5 As shown in (a), (b), (c), and (d), by rotating and photographing the image card 40 four times, the position information of the four central feature points 50 of the image card can be obtained, namely A(X1,Y1), B(X2,Y2), C(X3,Y3), and D(X4,Y4).
[0082] Then, as Figure 5 As shown in (e), by taking the average of the coordinate values of the center feature point 50 of the image card at each angle, the coordinate value of the central axis of the installation position of the calibrated structure 20 in the image can be determined.
[0083] The coordinates of the central axis of the installation position of the X-direction calibrated structure 20 in the image are:
[0084]
[0085] The coordinates of the centerline of the installation position of the structure 20 being calibrated in the Y direction in the image are:
[0086]
[0087] Right now
[0088] Step S220: Based on the coordinates of the center feature point 50 of the chart and the coordinates of the central axis of the installation position of the structure 20 being calibrated in the image, determine the offset direction and offset amount of the central axis of the installation position of the structure 20 being calibrated from the center feature point 50 of the chart.
[0089] For example: Suppose the coordinates of the central feature point 50 of the i-th image are (Xi, Yi), and the coordinates of the central axis in the image are (X, Yi). avg ,Y avg Then calculate the offset vectors of these two coordinate values in the X and Y directions respectively:
[0090] X-direction offset vector ΔX = Xi - X avg ;
[0091] Y-direction offset vector ΔY = Yi - Y avg ;
[0092] It can be understood that the adjustment position of the calibrated structure 20 can be determined based on the calculated offset vector. The aforementioned offset vector reflects two characteristics: the offset direction and the offset amount.
[0093] The offset direction is used to determine the direction in which the structure 20 being calibrated needs to move, and it is determined by the sign of the offset vector in the corresponding direction; while the offset amount is used to determine the distance that the structure 20 being calibrated needs to move in a specific direction, and it is determined by the specific value of the offset vector in the corresponding direction, which can usually be obtained by taking the absolute value of the offset vector.
[0094] For the X direction, if ΔX > 0, meaning the offset direction is positive, it indicates that the structure 20 to be calibrated needs to be moved a corresponding distance along the positive X-axis (to the right). If ΔX < 0, meaning the offset direction is negative, it indicates that it needs to be moved a corresponding distance along the negative X-axis (to the left). Similarly, for the Y direction, if ΔY > 0, meaning the offset direction is positive, it indicates that the structure 20 to be calibrated needs to be moved a corresponding distance along the positive Y-axis (upward). If ΔY < 0, meaning the offset direction is negative, it indicates that it needs to be moved a corresponding distance along the negative Y-axis (downward).
[0095] For example, assuming the X-direction offset vector ΔX = +1, meaning the offset direction is the positive X-axis and the offset amount is 1, it means the structure to be calibrated 20 needs to be moved 1 unit in the positive X-axis direction. Alternatively, assuming ΔX = -1, meaning the offset direction is the negative X-axis and the offset amount is 1, it means the structure to be calibrated 20 needs to be moved 1 unit in the negative X-axis direction.
[0096] For the second method, which involves directly calculating the offset vector between the central axis of the installation position of the structure 20 being calibrated and the central feature point 50 of the chart using a vector method, the corresponding offset direction and offset amount are obtained from the offset vector, such as... Figure 8 As shown, it includes:
[0097] Step S230: Obtain the coordinate values of the center feature points 50 of the map card from multiple location information, and establish the initial vectors corresponding to the coordinate origin and the center feature points 50 of the multiple map cards.
[0098] The initial vector is the vector from the origin to each center feature point 50 of the chart. For example, the four center feature points 50 obtained through four rotations are denoted as A(X1,Y1), B(X2,Y2), C(X3,Y3), and D(X4,Y4). Since the origin is (0,0), the initial vectors corresponding to the center points A, B, C, and D are as follows:
[0099] For point A: initial vector = (X1, Y1);
[0100] For point B: initial vector = (X2, Y2);
[0101] For point C: initial vector = (X3, Y3);
[0102] For point D: initial vector = (X4, Y4);
[0103] In an optional embodiment, step S230, which involves establishing an initial vector corresponding to multiple map center feature points 50 and the origin based on coordinate values from multiple location information, includes:
[0104] A virtual fixed-point coordinate system is introduced, and the initial vector is decomposed into the sum of a first vector and a second vector. The virtual fixed-point coordinate system represents the coordinates of the central axis of the installation position of the structure 20 being calibrated in the image. The first vector is the vector from the origin of the coordinate system to the coordinates of the central axis of the installation position of the structure 20 being calibrated in the image. The second vector is the vector from the coordinates of the central axis of the installation position of the structure 20 being calibrated in the image to the coordinates of the central feature point 50 of the map.
[0105] To better describe the relationship between the center feature point 50 of the map and the central axis of the mounting position of the structure being calibrated 20, this step introduces virtual fixed-point coordinates, which represent the alignment center point of the camera and the calibrated device under ideal conditions. Here, the first vector represents the vector from the origin of the coordinate system to the virtual fixed-point coordinates, such as... Figure 9 ① is shown in (a)-(d). The second vector refers to the vector from the virtual fixed-point coordinates to the central feature point 50 of the map, such as... Figure 9 ② is shown in (a)-(d).
[0106] For example, the origin of the coordinate system is (0,0), the center feature point 50 of the map is (Xi,Yi), and the virtual fixed point coordinates are (XM,YM):
[0107] The first vector refers to the vector from the origin (0,0) to the virtual fixed point coordinates (XM,YM), that is, the first vector = (XM,YM); the second vector refers to the vector from the virtual fixed point coordinates (XM,YM) to the central feature point 50 (Xi,Yi) of the map, that is, the second vector = (Xi-XM,Yi-YM).
[0108] Then for point A: the second vector = (X1-XM, Y1-YM);
[0109] For point B: the second vector = (X2-XM, Y2-YM);
[0110] For point C: the second vector = (X3-XM, Y3-YM);
[0111] For point D: the second vector = (X4-XM, Y4-YM);
[0112] This can be understood as follows: the initial vector of any feature point 50 at the center of the image card = the first vector + the second vector, which satisfies:
[0113] (Xi,Yi)=(XM,YM)+(Xi-XM,Yi-YM);
[0114] For the central feature points A, B, C, and D of the image card, we have:
[0115] A(X1,Y1)=(XM,YM)+(X1-XM,Y1-YM);
[0116] B(X2,Y2)=(XM,YM)+(X2-XM,Y2-YM);
[0117] C(X3,Y3)=(XM,YM)+(X3-XM,Y3-YM);
[0118] D(X4,Y4)=(XM,YM)+(X4-XM,Y4-YM);
[0119] Step S240: Rotate the captured image sequentially according to the rotation direction and rotation angle of the image acquisition device 10 to determine the transformation vector after the initial vector is rotated.
[0120] Exemplary, when the support 30 rotates the image acquisition device 10, all positions in the image will change with the rotation of the image acquisition device 10, such as... Figure 10 As shown in (a)-(d), each initial vector in the image needs to be rotated according to the rotation direction (e.g., counterclockwise or clockwise) and rotation angle (e.g., 90°, 180°, 270°, etc.) of the image acquisition device 10. The rotated initial vector, i.e., the transformed vector, is calculated using the rotation formula. The transformed vector describes the position of the center feature point 50 of the image card after the image acquisition device 10 has been rotated.
[0121] In an optional embodiment, step S240, which involves sequentially rotating the captured image according to the rotation direction and angle of the image acquisition device 10 to determine the transformation vector after the initial vector rotation, includes:
[0122] Based on the rotation direction and rotation angle of the image acquisition device 10, the first vector and the second vector are rotated using the vector rotation formula respectively; the rotated first vector and the second vector are added together to obtain the transformed vector.
[0123] As an example, the formula for vector rotation is:
[0124] X = Xcosθ - Ysinθ;
[0125] Y = Xsinθ + Ycosθ;
[0126] For rotations at specific angles, the following formula can be directly applied for calculation. For example:
[0127] When rotated counterclockwise by 0 degrees: X ′ =X;Y ′ =Y;
[0128] When rotated 90 degrees counterclockwise, X ′ =-Y;Y ′ =X;
[0129] When rotated 180 degrees counterclockwise, X ′ =-X;Y ′ =-Y;
[0130] When rotated 270 degrees counterclockwise, X ′ =Y;Y ′ =-X;
[0131] For example, by applying the vector rotation formula to the first vector (XM, YM) and rotating it by 0 degrees, 90 degrees, 180 degrees, and 270 degrees respectively, we obtain:
[0132] (XM,YM);
[0133] (XM,-YM);
[0134] (-XM,-YM);
[0135] (-XM,YM);
[0136] Using the vector rotation formula, the second vector (X1-XM, Y1-YM)
[0137] (X2-XM,Y2-YM), (X3-XM,Y3-YM), and (X4-XM,Y4-YM) are rotated by 0 degrees, 90 degrees, 180 degrees, and 270 degrees respectively, resulting in:
[0138] (X1-XM, Y1-YM);
[0139] (YM-Y2,X2-XM);
[0140] (XM-X3,YM-Y3);
[0141] (Y4-YM, XM-X4);
[0142] Adding the rotated first and second vectors together yields the following transformed vector:
[0143] Transformation vector A: (XM,YM)+(X1-XM,Y1-YM)=(X1,Y1);
[0144] Transformation vector B: (-YM, XM) + (YM-Y2, X2-XM) = (X2, -Y2);
[0145] Transformation vector C: (-XM,-YM)+(XM-X3,YM-Y3)=(-X3,-Y3);
[0146] Transformation vector D: (YM, -XM) + (Y4 - YM, XM - X4) = (-X4, Y4);
[0147] Step S250: The offset vector is obtained by averaging multiple transformation vectors. The offset vector is the vector between the central axis of the installation position of the calibrated structure 20 and the central feature point 50 of the drawing card. Figure 10 ③ is shown in (e).
[0148] Combination Figure 9 and Figure 10 As shown in (a), (b), (c), and (d), in the images taken at the four rotation angles, the directions of the first vector after rotation transformation are basically consistent, while the directions of the second vector after rotation transformation form a complementary pair. Therefore, averaging the four transformed vectors can largely cancel out the second vector. Furthermore, vector rotation transformation can make the vector distribution more balanced, changing it from being concentrated in one quadrant to being distributed across multiple quadrants. In actual calculation and processing, an auxiliary terminal display device can be used to display the intermediate quantities in the vector calculation process, i.e., the transformed vectors, making it convenient for operators to check for errors in the calculation and analysis process in a timely manner.
[0149] By averaging the transformation vectors of the horizontal and vertical axes, the offset vector between the central axis of the installation position of the calibrated structure 20 and the central feature point 50 of the chart can be obtained, so that the offset direction and offset amount can be determined based on the offset vector in subsequent steps.
[0150] The offset vector for averaging the transformation vector of the horizontal axis is as follows:
[0151]
[0152]
[0153] The offset vector for averaging the transformation vector of the ordinate is as follows:
[0154]
[0155] Step S260: Based on the offset vector, determine the offset direction and offset amount from the central axis of the installation position of the calibrated structure 20 to the central feature point 50 of the chart.
[0156] As an example, the direction of offset is determined by the signs of the offset vectors for the horizontal and vertical axes:
[0157] If the result of the horizontal coordinate offset vector is positive, it means that the offset direction is the positive direction of the X-axis (i.e., to the right).
[0158] If the result of the horizontal coordinate offset vector is negative, it means that the offset direction is the negative direction of the X-axis (i.e., to the left).
[0159] If the result of the ordinate offset vector is positive, it means that the offset direction is the positive direction of the Y-axis (i.e., upward).
[0160] If the result of the ordinate offset vector is negative, it means that the offset direction is the negative direction of the Y-axis (i.e., downward).
[0161] Furthermore, the absolute value of the horizontal coordinate offset vector is the offset in the X direction, that is, the actual offset distance of the center of the chart in the X direction:
[0162]
[0163] The absolute value of the ordinate offset vector is the offset in the Y direction, that is, the actual offset distance of the center of the chart in the Y direction:
[0164]
[0165] Step S300: Adjust the position of the structure 20 to be calibrated using offset data so that the central axis of the installation position of the structure 20 to be calibrated is aligned with the central feature point 50 of the chart.
[0166] As an example, the offset direction is used to determine the specific direction in which the structure 20 being calibrated needs to be moved, while the offset amount is used to determine the specific distance that the structure 20 being calibrated should move in that specific direction.
[0167] Based on the offset direction and amount, the position of the structure 20 to be calibrated is adjusted. For example, assuming the offset vector ΔY = -5 (the offset direction is the negative Y-axis) and the offset amount is 5, it means the structure 20 to be calibrated needs to be moved 5 units in the negative Y-axis direction. Alternatively, assuming ΔY = 7 (the offset direction is the positive Y-axis) and the offset amount is 7, it means the structure 20 to be calibrated needs to be moved 7 units in the positive Y-axis direction. This aligns the central axis of the installation position of the structure 20 to be calibrated with the actual position of the center feature point 50 of the drawing card, achieving precise alignment.
[0168] In an optional embodiment, the step of adjusting the position of the image acquisition device 10 of the calibrated structure 20 using offset data includes:
[0169] According to the offset direction and offset amount from the central axis of the installation position of the structure being calibrated 20 to the central feature point 50 of the chart, the moving platform is controlled to move the structure being calibrated 20.
[0170] As an example, when adjusting the spatial position of the structure being calibrated 20, the moving platform is controlled to move the structure being calibrated 20 by means of offset amount and offset direction, so that the central axis of the installation position of the structure being calibrated 20 is aligned and coincident with the central feature point 50 of the chart card, thereby realizing the calibration between the structure being calibrated 20 and the chart card 40, and improving the accuracy and consistency of image acquisition and processing.
[0171] The structural center calibration method of this application ingeniously simplifies the calculation process, eliminating the need for tedious explicit solutions to the central axis of the installation position of the structure being calibrated. It has the advantages of being non-contact and highly accurate, offsetting the errors generated during machining and assembly, and aligning the central axis of the installation position of the structure being calibrated with the central feature point 50 of the chart, thereby achieving calibration between the structure being calibrated and the chart 40, and improving the accuracy and consistency of image acquisition and processing.
[0172] This application also proposes a structural center calibration device, such as Figure 11 As shown, the device includes:
[0173] Image acquisition module 111 is used to rotate and photograph the image card using an image acquisition device to obtain the position information of the center feature point of the image card under different rotation angles.
[0174] The offset data calculation module 112 is used to calculate multiple positional information to determine the offset data between the central axis of the installation position of the structure being calibrated and the central feature point of the chart; wherein, the image acquisition device is mounted on the structure being calibrated;
[0175] The calibration module 113 is used to adjust the position of the structure being calibrated by means of offset data so that the central axis of the installation position of the structure being calibrated is aligned with the central feature point of the chart.
[0176] It is understood that the device in this embodiment corresponds to a structural center calibration method in the above embodiments, and the options in the above embodiments are also applicable to this embodiment, so they will not be described again here.
[0177] This application also provides a computer device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor, by running the computer program, causes the terminal device to perform the functions of the various modules in the above-described structural center calibration method or the above-described structural center calibration device.
[0178] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0179] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0180] This application also provides a computer-readable storage medium for storing the computer program used in the aforementioned terminal device. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0181] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0182] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0183] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0184] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for calibrating the center of a structure, characterized in that, The method includes: The image acquisition device was used to rotate and photograph the image card to obtain the position information of the center feature point of the image card under multiple different rotation angles; Calculations are performed on multiple location information to determine the offset data from the central axis of the installation position of the structure being calibrated to the central feature point of the chart; wherein, the image acquisition device is mounted on the structure being calibrated; The step of calculating multiple pieces of position information to determine the offset data from the centerline of the installation position of the calibrated structure to the center feature point of the chart includes: The coordinate values of the center feature points of the image card are obtained from multiple location information sources and averaged to determine the coordinate values of the central axis of the installation position of the calibrated structure in the image. Based on the coordinates of the central feature point of the chart and the coordinates of the central axis of the installation position of the structure being calibrated in the image, the offset direction and offset amount of the central axis of the installation position of the structure being calibrated from the central feature point of the chart are determined. Alternatively, the step of calculating multiple pieces of the position information to determine the offset data from the centerline of the installation position of the calibrated structure to the center feature point of the chart includes: Obtain the coordinate values of the center feature points of the map card from the multiple location information, and establish the corresponding initial vectors between the coordinate origin and the multiple center feature points of the map card; According to the rotation direction and rotation angle of the image acquisition device, the captured image is rotated sequentially to determine the transformation vector after the initial vector is rotated. An offset vector is obtained by averaging multiple transformation vectors, wherein the offset vector is the vector between the central axis of the installation position of the calibrated structure and the central feature point of the chart. Based on the offset vector, determine the offset direction and offset amount from the central axis of the installation position of the calibrated structure to the central feature point of the chart. The position of the structure being calibrated is adjusted using the offset data so that the central axis of the installation position of the structure being calibrated is aligned with the central feature point of the chart.
2. The structural center calibration method according to claim 1, characterized in that, The step of using an image acquisition device to rotate and photograph a map to obtain the position information of the center feature point of the map at different rotation angles includes: Based on a preset rotation angle, the image acquisition device is controlled to rotate four times sequentially on the calibrated structure. Capture and identify the coordinate position information of the center feature point of the image card under different rotation angles.
3. The structural center calibration method according to claim 1, characterized in that, The step of establishing initial vectors corresponding to the center feature points and the origin of the map based on the coordinate values in the multiple location information includes: Virtual fixed-point coordinates are introduced, and the initial vector is decomposed into the sum of a first vector and a second vector. The virtual fixed-point coordinates are the coordinates of the central axis of the installation position of the calibrated structure in the image. The first vector is the vector from the origin of the coordinate system to the coordinates of the central axis of the installation position of the calibrated structure in the image. The second vector is the vector from the coordinates of the central axis of the installation position of the calibrated structure in the image to the coordinates of the central feature point of the image card.
4. The structural center calibration method according to claim 3, characterized in that, The step of sequentially rotating the captured image according to the rotation direction and rotation angle of the image acquisition device to determine the transformed vector after the initial vector rotation includes: Based on the rotation direction and rotation angle of the image acquisition device, the first vector and the second vector are rotated using the vector rotation formula; The transformed vector is obtained by adding the rotated first vector and the second vector together.
5. The structural center calibration method according to claim 1, characterized in that, The step of adjusting the position of the calibrated structure using the offset data includes: The moving platform is controlled to move the structure being calibrated according to the offset direction and amount from the central axis of the installation position of the structure being calibrated to the central feature point of the chart.
6. A structural center calibration device, characterized in that, The structural center calibration device includes: The image acquisition module is used to rotate and photograph the image card using an image acquisition device to obtain the position information of the center feature point of the image card under different rotation angles. The offset data calculation module is used to calculate multiple positions to determine the offset data between the central axis of the installation position of the structure being calibrated and the central feature point of the chart; wherein, the image acquisition device is mounted on the structure being calibrated; The step of calculating multiple pieces of position information to determine the offset data from the centerline of the installation position of the calibrated structure to the center feature point of the chart includes: The coordinate values of the center feature points of the image card are obtained from multiple location information sources and averaged to determine the coordinate values of the central axis of the installation position of the calibrated structure in the image. Based on the coordinates of the central feature point of the chart and the coordinates of the central axis of the installation position of the structure being calibrated in the image, the offset direction and offset amount of the central axis of the installation position of the structure being calibrated from the central feature point of the chart are determined. Alternatively, the step of calculating multiple pieces of the position information to determine the offset data from the centerline of the installation position of the calibrated structure to the center feature point of the chart includes: Obtain the coordinate values of the center feature points of the map card from the multiple location information, and establish the corresponding initial vectors between the coordinate origin and the multiple center feature points of the map card; According to the rotation direction and rotation angle of the image acquisition device, the captured image is rotated sequentially to determine the transformation vector after the initial vector is rotated. An offset vector is obtained by averaging multiple transformation vectors, wherein the offset vector is the vector between the central axis of the installation position of the calibrated structure and the central feature point of the chart. Based on the offset vector, determine the offset direction and offset amount from the central axis of the installation position of the calibrated structure to the central feature point of the chart. The calibration module is used to adjust the position of the structure being calibrated using the offset data, so that the central axis of the installation position of the structure being calibrated is aligned with the central feature point of the chart.
7. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the structural center calibration method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the structural center calibration method according to any one of claims 1-5.
Citation Information
Patent Citations
Camera center shaft adjusting machine
CN105965250A
Test position calibration method and device of image sensor, equipment and storage medium
CN115396665A