Measuring method, scanning device and storage medium
By using multiple preset scales in the scanning device to determine the environmental correction coefficient and perform temperature compensation on the scanning device, the problem of measurement deviation caused by temperature changes in the existing technology is solved and the measurement accuracy is improved.
Patent Information
- Application Number
- CN202410901845.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-05
AI Technical Summary
Existing scanners have poor temperature compensation effect when temperature changes, resulting in large deviations in measurement results, especially in extreme temperature environments where measurement accuracy is reduced.
By using multiple preset rulers in the scanning device as a temperature compensation benchmark, the environmental correction coefficient is determined based on the measured length and the real length of the preset rulers, and the measurement results of the scanning device are corrected to achieve compensation for temperature changes.
It improves the accuracy of temperature compensation and measurement results, reduces the impact of temperature changes on the measurement results of scanning equipment, and is suitable for various environmental temperatures.
Smart Images

Figure CN118424150B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of scanning technology, and in particular, relates to a measurement method, a scanning device and a storage medium. Background Art
[0002] Scanning technology is an important research direction in the field of computer vision technology and image processing. It has broad application prospects in autonomous driving, robot autonomous navigation, cultural relics protection, architectural design, clinical medicine, etc. However, affected by the ambient temperature, the length of the beam in the scanner will change, resulting in deviations between the previously calibrated external parameters and the external parameters in real-time measurement, affecting the measurement results of the scanner. Therefore, it is necessary to perform temperature compensation on the scanner.
[0003] In the related art, the scanner can be temperature compensated according to the ambient temperature to reduce the measurement error. However, the above method is limited by the accuracy of the theoretical model construction, resulting in poor temperature compensation effect and large deviation in the measurement results. Summary of the invention
[0004] The embodiments of the present application provide a measurement method, a scanning device, and a storage medium to solve the problem of large deviations in measurement results due to poor temperature compensation effect.
[0005] In a first aspect, an embodiment of the present application provides a measurement method, which is applied to a scanning device, wherein the scanning device includes at least two shooting devices, and the measurement method includes: obtaining multiple groups of synchronous images of an object to be measured collected by the at least two shooting devices, the surface of the object to be measured is provided with mark points, the object to be measured includes the object to be measured and a preset scale, and the mark points include a first mark point on the surface of the object to be measured and a second mark point on the surface of the preset scale; determining the image point coordinates of the image point corresponding to the mark point in each group of synchronous images, and determining the first three-dimensional coordinates of the mark point based on preset calibration data and the image point coordinates; determining the second three-dimensional coordinates corresponding to the mark point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data; selecting the second three-dimensional coordinates corresponding to the second mark point from the second three-dimensional coordinates, and determining the measured length of the preset scale according to the second three-dimensional coordinates corresponding to the second mark point; determining the environmental correction coefficient of the scanning device based on the measured length and the actual length of the preset scale; correcting the second three-dimensional coordinate corresponding to the first mark point in the second three-dimensional coordinates according to the environmental correction coefficient to obtain the corrected three-dimensional coordinates.
[0006] Furthermore, in the above-mentioned measurement method provided in the embodiment of the present application, the determination of the image point coordinates of the image point corresponding to the mark point in each group of synchronized images includes: performing boundary extraction on each group of synchronized images to obtain the image point of the mark point in each group of synchronized images; and determining the image point coordinates corresponding to the image point based on the position of the image point in each group of synchronized images.
[0007] Furthermore, in the above-mentioned measurement method provided in an embodiment of the present application, determining the first three-dimensional coordinates of the mark point based on the preset calibration data and the image point coordinates includes: determining the intrinsic parameter matrix and the extrinsic parameter matrix of the at least two shooting devices according to the preset calibration data; determining the first three-dimensional coordinates of the mark point according to the intrinsic parameter matrix, the extrinsic parameter matrix and the image point coordinates.
[0008] Furthermore, in the above-mentioned measurement method provided in the embodiment of the present application, before determining the second three-dimensional coordinates corresponding to the marker point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data, the method also includes: tracking and splicing the marker points in each group of synchronized images according to the first three-dimensional coordinates to obtain the initial marker point framework corresponding to the object to be measured and the first number of the marker point in the initial marker point framework; performing inter-group deduplication processing on the first number to obtain the updated marker point and the second number of the updated marker point in the initial marker point framework; adjusting the initial marker point framework based on the updated marker point to obtain the adjusted marker point framework.
[0009] Furthermore, in the above-mentioned measurement method provided in the embodiment of the present application, the second three-dimensional coordinates corresponding to the mark point are determined based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data, including: determining the first parameter and the second parameter corresponding to each group of synchronous images according to the preset calibration data, and determining the collinearity equations to be solved corresponding to each group of synchronous images according to the first parameter and the second parameter; based on the bundle adjustment algorithm, taking the image point coordinates and the first three-dimensional coordinates of the updated mark point as initial values, iteratively processing all collinearity methods to be solved to obtain the second three-dimensional coordinates corresponding to the updated mark point.
[0010] Furthermore, in the above-mentioned measurement method provided in the embodiment of the present application, the selecting the second three-dimensional coordinates corresponding to the second marker point from the second three-dimensional coordinates includes: selecting the marker point with coded information from the updated marker points as the updated second marker point; and determining the second three-dimensional coordinates corresponding to the updated second marker point according to the correspondence between the updated marker point and the second three-dimensional coordinates.
[0011] Further, in the above-mentioned measurement method provided in the embodiment of the present application, the preset ruler includes a first end and a second end, and determining the measurement length of the preset ruler according to the second three-dimensional coordinates corresponding to the second marker point includes: determining the second three-dimensional coordinates corresponding to the updated second marker point in the first end and the second three-dimensional coordinates corresponding to the updated second marker point in the second end based on the coding information corresponding to the preset ruler; determining the measurement length of the preset ruler according to the second three-dimensional coordinates of the updated second marker point in the first end and the second three-dimensional coordinates of the updated second marker point in the second end.
[0012] Further, in the above-mentioned measurement method provided in the embodiment of the present application, the second three-dimensional coordinate corresponding to the first mark point in the second three-dimensional coordinate is corrected according to the environmental correction coefficient to obtain the corrected three-dimensional coordinate, including: selecting a mark point without coding information from the updated mark points as the updated first mark point; correcting the second three-dimensional coordinate corresponding to the updated first mark point according to the environmental correction coefficient to obtain the corrected three-dimensional coordinate.
[0013] In a second aspect, an embodiment of the present application further provides a measuring device, which is applied to a scanning device, wherein the scanning device includes at least two shooting devices, and the measuring device includes: an image acquisition module, which is used to acquire multiple groups of synchronous images of an object to be measured acquired by the at least two shooting devices, wherein the surface of the object to be measured is provided with marking points, and the object to be measured includes the object to be measured and a preset scale, and the marking points include a first marking point on the surface of the object to be measured and a second marking point on the surface of the preset scale; an image point determination module, which determines the image point coordinates of an image point corresponding to the marking point in each group of synchronous images, and determines the first three-dimensional coordinates of the marking point based on preset calibration data and the image point coordinates; A coordinate determination module, used to determine the second three-dimensional coordinates corresponding to the mark point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data; a length determination module, used to select the second three-dimensional coordinates corresponding to the second mark point from the second three-dimensional coordinates, and determine the measurement length of the preset scale according to the second three-dimensional coordinates corresponding to the second mark point; a coefficient determination module, used to determine the environmental correction coefficient of the scanning device based on the measured length and the actual length of the preset scale; a measurement correction module, used to correct the second three-dimensional coordinate corresponding to the first mark point in the second three-dimensional coordinate according to the environmental correction coefficient to obtain the corrected three-dimensional coordinate.
[0014] In a third aspect, an embodiment of the present application further provides a scanning device, comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes any one of the measurement methods described above.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the measurement method as described in any one of the above items is implemented.
[0016] The measurement method provided by the embodiment of the present application is to obtain multiple groups of synchronous images of the object to be measured collected by the at least two shooting devices, the surface of the object to be measured is provided with a mark point, the object to be measured includes the object to be measured and a preset scale, and the mark point includes a first mark point on the surface of the object to be measured and a second mark point on the surface of the preset scale; determine the image point coordinates of the image point corresponding to the mark point in each group of synchronous images, and determine the first three-dimensional coordinates of the mark point based on the preset calibration data and the image point coordinates; determine the second three-dimensional coordinates corresponding to the mark point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data; select the second three-dimensional coordinates corresponding to the second mark point from the second three-dimensional coordinates, and determine the measured length of the preset scale according to the second three-dimensional coordinates corresponding to the second mark point; determine the environmental correction coefficient of the scanning device based on the measured length and the actual length of the preset scale; correct the second three-dimensional coordinate corresponding to the first mark point in the second three-dimensional coordinate according to the environmental correction coefficient to obtain the corrected three-dimensional coordinate. The above method determines the environmental correction coefficient according to the measured length and the actual length of the preset scale, and uses the environmental correction coefficient to correct the measurement result (second three-dimensional coordinate). By using a preset scale in the same environment as the object to be measured as a reference for temperature compensation, the influence of temperature changes on the measurement results of the scanning device can be compensated without relying on temperature and theoretical models, thereby improving the accuracy of temperature compensation and thus improving the accuracy of the measurement results. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 It is a schematic diagram of an application scenario of the measurement method provided in an embodiment of the present application.
[0019] Figure 2 It is a schematic flow chart of the measurement method provided in the embodiment of the present application.
[0020] Figure 3 It is a flow chart of a method for determining image point coordinates provided in an embodiment of the present application.
[0021] Figure 4 It is a flow chart of a method for determining a first three-dimensional coordinate provided in an embodiment of the present application.
[0022] Figure 5 It is a flow chart of a method for determining the number of landmark points provided in an embodiment of the present application.
[0023] Figure 6 It is a flow chart of a method for determining a second three-dimensional coordinate provided in an embodiment of the present application.
[0024] Figure 7 It is a flow chart of a method for determining the three-dimensional coordinates of a second marker point provided in an embodiment of the present application.
[0025] Figure 8 It is a flow chart of the method for determining the measured length provided in an embodiment of the present application.
[0026] Fig. 9 It is a flow chart of the first landmark point correction method provided in an embodiment of the present application.
[0027] Fig.10 It is a schematic diagram of the structure of the measuring device provided in the embodiment of the present application.
[0028] Fig.11 This is a diagram of the application equipment of the measurement method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, "at least one" refers to one or more. "Multiple" refers to two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.
[0032] Some of the terms that appear in the embodiments of the present application are explained below.
[0033] External parameters, including rotation matrices and translation vectors, are used to define the transformation relationship between the camera coordinate system and the world coordinate system. The accuracy of the external parameters directly determines the mapping accuracy from image data to the actual physical world.
[0034] Intrinsic parameters are a set of parameters that describe the internal properties of the scanning device, which are crucial for accurately interpreting the scanned data. Parameters usually include internal orientation elements, distortion coefficients, horizontal and vertical pixel sizes, and horizontal and vertical pixel size ratios.
[0035] Binocular scanner,Binocular scanner uses two cameras to capture images of objects.,The two cameras capture images of the same object from slightly different,angles. By comparing the difference between the two images (i.e.,,parallax), the depth information of the object can be calculated,,thus obtaining the three-dimensional data of the object.
[0036] Multi-camera scanners can process more complex visual scenes by synchronizing data from multiple cameras and combining advanced algorithms. It can acquire data from multiple angles at the same time, greatly improving the integrity of the scan and the richness of details.
[0037] Tracker, also known as tracking 3D scanning equipment, is a high-precision 3D data acquisition tool that uses optical tracking technology to locate the spatial position of the scanning head in real time. The tracker uses blue laser and can handle the scanning of black and shiny surface materials, and can quickly complete the scanning task without powder spraying.
[0038] A ruler, also known as a spatial ruler, is used to calibrate and verify the measurement accuracy of a scanner. By using a ruler, the positioning and orientation of the scanner in space can be accurately determined, thereby ensuring the accuracy and reliability of its measurement results.
[0039] Scanning technology is an important research direction in the field of computer vision technology and graphics and image processing. It has broad application prospects in autonomous driving, robot autonomous navigation, cultural relics protection, architectural design, clinical medicine, etc. In scanning equipment, the beam is a key component of the scanning equipment, which is used to support and fix the shooting device and other important components. However, affected by the ambient temperature, the length of the beam in the scanning equipment will change, and the external parameters of the shooting device will also change accordingly, resulting in the previously calibrated external parameters not being applicable to the current shooting device, which reduces the measurement accuracy of the scanning equipment. Therefore, it is necessary to perform real-time temperature compensation on the external parameters of the scanning equipment when the temperature changes, so as to reduce the impact of temperature changes on the measurement accuracy.
[0040] In the related art, temperature compensation is performed on the scanning device according to the ambient temperature to reduce the measurement error. For example, a preset ruler is placed in the field of view of the scanning device, and the preset ruler is used to calibrate the external parameters of the shooting device in the scanning device. The length of the ruler reconstructed in real time by the scanning device is compared with the reference length of the ruler to obtain the external parameter compensation amount of the shooting device in the scanning device, and the external parameter of the shooting device is compensated according to the external parameter compensation amount. However, the above compensation method is limited by the accuracy of the theoretical model, and the temperature compensation effect is poor. In addition, the above compensation method is not suitable for scenes with large or extreme temperature fluctuations (for example, extremely high and extremely low temperatures), resulting in large deviations in the measurement results of the scanning device.
[0041] In view of the above problems, it is necessary to provide a measurement method that can use a preset scale in the same environment as the object to be measured as a reference for temperature compensation, determine the environmental correction coefficient based on the measured length and the actual length of the preset scale, and use the environmental correction coefficient to correct the measurement result. It can compensate for the influence of temperature changes on the measurement result without relying on temperature and theoretical models, and can improve the accuracy of temperature compensation, thereby improving the accuracy of the measurement result.
[0042] Figure 1 Schematic diagram of the application scenario of the measurement method provided in the embodiment of the present application. Figure 1As shown, the application scenario of the measurement method includes at least one preset ruler 10, a scanning device 20 and an object to be measured 30. The number of preset rulers 10 can be set according to actual needs. For example, the number of preset rulers 10 can be 1, 2, 3, 4, etc. The embodiment of the present application takes the number of preset rulers 10 as 4 as an example to illustrate, and uses multiple preset rulers 10 to calibrate the internal and external parameters of the scanning device 20 to ensure that the scanning device 20 can obtain a high-quality model corresponding to the object to be measured 30. In some embodiments, the preset ruler 10 may include at least a core layer, a protective layer and a coding layer, wherein the protective layer is coated on the surface of the core layer, and the coding layer is embedded in the two ends of the protective layer. In some embodiments, the core layer is made of a material with a small thermal expansion coefficient. For example, the core layer can be made of carbon fiber material, other nanotechnology-modified polymers or special metal alloys, which are not limited here. The protective layer is used to enhance the moisture resistance and wear resistance of the preset ruler 10. The coding layer uses laser engraving technology to engrave high temperature resistant and corrosion resistant ceramic dot matrix, and records the coding information of the preset scale 10 through the ceramic dot matrix to ensure the readability of the coding information in extreme environments. In some embodiments, the scanning device 20 can refer to any photogrammetric device with image processing and computing capabilities. For example, the scanning device 20 can be a binocular scanner, a multi-eye scanner, and a tracker, etc., which is not limited here. This application takes the scanning device 20 as a binocular scanner as an example for explanation. The binocular scanner includes two shooting devices, which are used to collect images. The positional relationship between the two shooting devices can be set according to actual needs, which is not limited here. In some embodiments, the object to be measured 30 can be a physical entity such as a car or a mechanical part. In other embodiments, it can also be a person, an animal, a plant, a building, etc., and the form of expression of the object to be measured 30 is not limited. In some embodiments, a heating system and / or a cooling system can also be integrated in the preset scale 10 and the scanning device 20 to actively adjust the device temperature of the preset scale 10 and the scanning device 20 to maintain it at a stable level and reduce the influence of the ambient temperature on the preset scale 10 and the scanning device 20. For example, taking the cooling system integrated inside the scanning device 20 as an example, a temperature sensor is added to the internal crossbeam position of the scanning device 20, and the internal temperature of the scanning device 20 is collected by the temperature sensor. When the internal temperature exceeds the preset temperature, the built-in fan and the air outlet can be used to adjust the fan speed so that the temperature of the scanning device 20 is maintained at the preset temperature. The preset temperature can be set according to actual needs and is not limited here.
[0043] In some embodiments, in the application scenario of the measurement method, four preset rulers 10 are placed at preset positions of the object to be measured 30. The preset positions can be set according to actual needs. For example, the four preset rulers 10 are placed on the sides of the object to be measured 30. The scanning device 20 can be handheld and moved by a user, or it can be self-moving, which is not limited here. The embodiment of the present application takes the scanning device 20 as an example in which the user handholds and moves the scanning device 20. The user holds the scanning device 20 and moves the scanning device 20 according to a preset scanning direction, so that the scanning device 20 can continuously capture multiple sets of synchronous images of the preset ruler 10 and the object to be measured 30. Figure 1 As shown, the user holds the scanning device 20 to continuously collect the preset scale 10 and the object to be measured 30 at the collection position 1, the collection position 2, ..., the collection position p, ..., the collection position n-1 and the collection position n, wherein p and n are both natural numbers greater than 1. The multiple images collected by the scanning device 20 at the collection position 1 are taken as a group of synchronous images, and the multiple images containing at least one preset scale 10 and part of the object to be measured 30 collected by the scanning device 20 at the collection position 2 are taken as another group of synchronous images, so that multiple groups of synchronous images can be obtained. In each image, the preset scale 10 and the object to be measured 30 can be included at the same time, or only the preset scale 10 can be included, or only the object to be measured 30 can be included, which is not limited here. The measured length of the preset scale 10 is determined according to the multiple groups of synchronous images; then the environmental correction coefficient is determined according to the measured length of the preset scale 10 and the actual length, and the measurement result of the scanning device 20 is corrected according to the environmental correction coefficient to achieve environmental compensation for the measurement result of the scanning device 20. Figure 1 The positional relationship between the preset scale 10, the scanning device 20 and the object to be measured 30 shown is only an example. In practical applications, differentiated settings can be made according to different measurement requirements or measurement scenarios, and are not limited to the above examples.
[0044] In the above application scenario, using a preset scale in the same environment as the object to be measured as a reference for temperature compensation can compensate for the impact of temperature changes on the measurement results of the scanning device without relying on temperature and theoretical models, thereby improving the accuracy of temperature compensation and thus improving the accuracy of the measurement results.
[0045] The present application will describe the technical solution of the present application in detail through specific embodiments below. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0046] Figure 2 is a schematic flow chart of the measurement method provided in the embodiment of the present application. Figure 2 As shown, the measurement method is applied to scanning devices (such as Figure 1The scanning device 20 shown in the figure comprises the following steps:
[0047] S11, obtaining a plurality of groups of synchronous images of the object to be measured collected by the at least two shooting devices, wherein the surface of the object to be measured is provided with marking points, the object to be measured includes the object to be measured and a preset scale, and the marking points include a first marking point on the surface of the object to be measured and a second marking point on the surface of the preset scale.
[0048] In at least one embodiment of the present application, the number of photographing devices in the scanning device may be two or more than two. The embodiment of the present application takes the number of photographing devices as two as an example. For example, the scanning device includes a first photographing device and a second photographing device. The first photographing device and the second photographing device are used to capture a multi-frame image sequence of the object to be measured to obtain multiple sets of synchronous images. In some embodiments, a plurality of marking points are provided on the surface of the object to be measured. The marking points may refer to graphics with marking functions made by active luminescence or by using back-light reflective materials. For example, the marking points may be dots of a specific size, but are not limited to dots. Different marking points may have different characteristics, such as diameter, color, etc., but are not limited to diameter and color.
[0049] In some embodiments, the object to be measured includes an object to be measured and a preset ruler. The object to be measured can be a physical entity such as a car, a mechanical part, or a person, an animal, a plant, a building, etc. The embodiment of the present application does not limit the form of expression of the object to be measured. The surface of the object to be measured is provided with a first marking point, and the surface of the preset ruler is provided with a second marking point. The number of the first marking points and the number of the second marking points can be set according to actual needs and are not limited here. In some embodiments, multiple first marking points can construct a marking point framework of the object to be measured. The second marking points are respectively arranged at the two ends of the preset ruler. By performing correlation analysis on the second marking points, the length information of the preset ruler can be obtained.
[0050] In some embodiments, the number of preset rulers can be set according to actual needs, for example, the number of preset rulers can be 1, 2, 3, 4, etc. The embodiment of the present application is described by taking the number of preset rulers as 4 as an example. In some embodiments, by adjusting the placement positions of the 4 preset rulers and the object to be measured, the 4 preset rulers can be collected by the scanning device during the entire acquisition process. The first shooting device and the second shooting device are used to continuously collect multiple frames of images of the object to be measured at different acquisition positions to obtain a first image sequence and a second image sequence. The first image sequence is obtained by the first shooting device. The first image sequence contains multiple frames of first images. The first image can contain the object to be measured and the preset ruler at the same time, or only the object to be measured, or only the preset ruler, which is not limited here. Each frame of the first image corresponds to a collection position and a trigger time. The second image sequence is obtained by the second shooting device. The second image sequence contains multiple frames of second images. The second image can contain the object to be measured and the preset ruler at the same time, or only the object to be measured, or only the preset ruler, which is not limited here. Each frame of the second image corresponds to a collection position and a trigger time. The first image and the second image at the same triggering moment are taken as a group of synchronous images, thus, multiple groups of synchronous images can be obtained.
[0051] In some embodiments, after acquiring multiple groups of synchronous images of the object to be measured captured by at least two shooting devices, the method further includes: determining a first observation number corresponding to a first mark point in the object to be measured and a second observation number corresponding to a second mark point in a preset scale; if the difference between the first observation number and the first observation number is less than or equal to a preset difference threshold, determining that the acquisition is completed; if the difference between the first observation number and the first observation number is greater than the preset difference threshold, continuing to acquire until the difference between the first observation number and the first observation number is less than or equal to the preset difference threshold. Wherein, the first observation number refers to the sum of the number of times multiple first mark points appear in multiple groups of synchronous images, and the second observation number refers to the sum of the number of times multiple second mark points appear in multiple groups of synchronous images. The preset difference threshold can be set according to actual needs and is not limited here. The above method determines whether the acquisition is completed by the difference between the first observation number corresponding to the first mark point in the object to be measured and the second observation number corresponding to the second mark point in the preset scale, and determines that the acquisition is completed when the difference between the first observation number and the second observation number is less than or equal to the preset difference threshold, so that the observation number of the first mark point in the object to be measured and the second mark point in the preset scale are basically consistent, avoiding the abnormal result of the subsequent bundle adjustment optimization caused by the imbalance of the observation number ratio of the first mark point and the second mark point, improving the accuracy of the bundle adjustment optimization, and thus improving the accuracy of the corresponding measurement results of the scanning equipment.
[0052] S12, determining the image point coordinates of the image point corresponding to the marker point in each group of synchronous images, and determining the first three-dimensional coordinates of the marker point based on preset calibration data and the image point coordinates.
[0053] In at least one embodiment of the present application, in each set of synchronized images, each marker point appears in both the image captured by the first camera (referred to as the "first image" in the embodiment of the present application) and the image captured by the second camera (referred to as the "second image" in the embodiment of the present application). The point where the marker point is projected in the first image is referred to as the first image point, and the point where the marker point is projected in the second image is referred to as the second image point. The image point coordinates of the first image point and the second image point are respectively determined as the image point coordinates corresponding to the marker point.
[0054] In at least one embodiment of the present application, the preset calibration data may include the internal parameters of each camera and the external parameters between the camera devices, wherein the internal parameters may include the internal orientation elements, the distortion coefficients, the pixel sizes in the horizontal and vertical directions, and the ratios of the pixel sizes in the horizontal and vertical directions, and the external parameters may include the rotation matrix and the translation vector. In some embodiments, based on the preset calibration data and the image point coordinates, the three-dimensional coordinates of the marker points corresponding to the image point coordinates can be reconstructed using the epipolar matching method. In some embodiments, the three-dimensional coordinates may refer to the coordinates of the marker points in the world coordinate system, wherein the world coordinate system may be understood as a coordinate system established in the three-dimensional space in order to describe the positional relationship between the camera and the object to be measured in the three-dimensional space, and the coordinate system may be expressed in terms of the coordinate system. w X w Y w Z w To mark, O w is the origin of the coordinate system, X w is the x-axis component of the coordinate system, Y w is the y-axis component of the coordinate system, Z w is the z-axis component of the coordinate system. The origin of the world coordinate system can be set according to actual needs. w , Y w , Z w ) to mark the coordinates of the marker point in the three-dimensional space (referred to as the “first three-dimensional coordinates” in this embodiment of the application).
[0055] S13: Determine the second three-dimensional coordinates corresponding to the marker point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data.
[0056] In at least one embodiment of the present application, the second three-dimensional coordinate refers to the three-dimensional coordinate after the first three-dimensional coordinate is optimized by bundle adjustment, and the second three-dimensional coordinate corresponding to the marker point is determined by a bundle adjustment algorithm based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data. The bundle adjustment algorithm minimizes the back-projection error of the scanning device by adjusting the calibration data of the scanning device.
[0057] In some embodiments, the collinear equations to be solved corresponding to each group of synchronous images are constructed according to the preset calibration data; then, all the collinear equations to be solved are iteratively processed according to the image point coordinates and the first three-dimensional coordinates to obtain the second three-dimensional coordinates corresponding to the marker point. The collinear equation to be solved refers to the mathematical relationship that the marker point, the image point and the projection center (for example, the lens center of the camera device) are located in a straight line. All the collinear equations to be solved are iteratively processed by the image point coordinates and the first three-dimensional coordinates, and the calibration data of the marker point and the scanning device are jointly optimized at the same time, and the optimal coordinates of the marker point, that is, the second three-dimensional coordinates, are obtained by minimizing the residual.
[0058] S14, selecting the second three-dimensional coordinates corresponding to the second marking point from the second three-dimensional coordinates, and determining the measurement length of the preset ruler according to the second three-dimensional coordinates corresponding to the second marking point.
[0059] In at least one embodiment of the present application, when setting a second mark point for a preset ruler, coding information is added to the second mark point, and the coding information is used to uniquely identify the second mark point. The coding information can be one or more of digital coding, letter coding or text coding, which is not limited here. Exemplarily, the preset ruler includes a first end and a second end, and the first end and the second end are both provided with a second mark point. Coding information BC1a is added to the second mark point on the first end, and coding information BC1b is added to the second mark point on the second end. By querying the coding information, the preset ruler corresponding to the second mark point and the end information set on the preset ruler can be determined. Continuing with the above embodiment, if the coding information is BC1a, BC1 represents the preset ruler 1, and a represents the first end of the preset ruler 1; if the coding information is BC1b, BC1 represents the preset ruler 1, and b represents the second end of the preset ruler 1. In this way, the second three-dimensional coordinates of the second mark point with coding information are selected from multiple second three-dimensional coordinates, and then the length of the preset ruler is determined according to the second three-dimensional coordinates of the two ends of the preset ruler, and the length is used as the measurement length.
[0060] S15, determining an environmental correction coefficient of the scanning device based on the measured length and the actual length of the preset ruler.
[0061] In at least one embodiment of the present application, the real length of the preset ruler may refer to the length collected by a high-resolution scanning device. The real length of the preset ruler is used as a reference to determine the scaling information of the measured length compared to the real length, and the environmental correction coefficient of the scanning device is determined based on the scaling information. In some embodiments, the ratio of the real length of the preset ruler to the measured length is calculated, and the ratio is used as the environmental correction coefficient of the scanning device. Exemplarily, when the real length of the preset ruler is 1m and the measured length is 0.99m, it indicates that the preset ruler is shortened due to temperature, and the environmental correction coefficient of the scanning device is determined to be 1 / 0.99. In other embodiments, other mathematical processing can be performed on the real length and the measured length of the preset ruler to obtain the environmental correction coefficient. The embodiment of the present application does not limit the calculation method of the environmental correction coefficient.
[0062] In some embodiments, if the number of preset scales is 1, the measurement result of the scanning device is compensated based on the environmental correction coefficient. In other embodiments, if the number of preset scales is multiple, the environmental correction coefficient corresponding to each preset scale is determined respectively to obtain multiple environmental correction coefficients; the target environmental correction coefficient is determined according to the multiple environmental correction coefficients, and the measurement result of the scanning device is compensated based on the target environmental correction coefficient. In one embodiment, the determination of the target environmental correction coefficient according to the multiple environmental correction coefficients may include: calculating the sum of the multiple environmental correction coefficients; calculating the ratio of the sum to the number of environmental correction coefficients as the target environmental correction coefficient. The above embodiment uses the environmental correction coefficients of multiple preset scales to compensate for the measurement result of the scanning device, which can reduce the influence of system errors (for example, material errors, shooting errors, second mark point recognition errors, etc.) on the environmental correction coefficients and improve the accuracy of the compensation of the measurement results; and by placing multiple preset scales at different positions of the object to be measured, the influence of local errors on the compensation effect can be avoided, further improving the accuracy of the compensation of the measurement results.
[0063] S16, correcting the second three-dimensional coordinates corresponding to the first marking point in the second three-dimensional coordinates according to the environmental correction coefficient to obtain corrected three-dimensional coordinates.
[0064] In at least one embodiment of the present application, a marker point without coded information among the marker points corresponding to the object to be measured is used as a first marker point, and a second three-dimensional coordinate corresponding to the first marker point is selected from a plurality of second three-dimensional coordinates. Considering that the scaling information of multiple objects in the same environment is the same, at least one preset ruler in the same environment as the object to be measured is used as a reference for temperature compensation, and the second three-dimensional coordinate of the first marker point is corrected according to the environmental correction coefficient obtained by the actual length of the preset ruler and the measured length to obtain the corrected three-dimensional coordinate, and then the marker point framework of the object to be measured is constructed according to the corrected three-dimensional coordinate, thereby improving the accuracy of the three-dimensional measurement result.
[0065] In the above-mentioned measurement method provided in the embodiment of the present application, the environmental correction coefficient is determined according to the measured length and the actual length of the preset scale, and the preset scale in the same environment as the object to be measured is used as the reference for temperature compensation. This can compensate for the influence of temperature changes on the measurement results of the scanning device without relying on temperature and theoretical models, and can improve the accuracy of temperature compensation, thereby improving the accuracy of the measurement results.
[0066] In at least one embodiment of the present application, in each set of synchronized images, each marker point has a corresponding image point in the image captured by the first camera (referred to as the "first image" in the present embodiment) and the image captured by the second camera (referred to as the "second image" in the present embodiment). By extracting valuable information from the image points, three-dimensional reconstruction of the marker point is achieved. Figure 3 is a flow chart of a method for determining image point coordinates provided in an embodiment of the present application, and the method for determining image point coordinates is applied to a scanning device. Figure 3 As shown, the following steps are included:
[0067] S21, performing boundary extraction on each group of synchronous images to obtain the image points of the marker points in each group of synchronous images.
[0068] In at least one embodiment of the present application, a boundary extraction method can be used to perform boundary extraction processing on each group of synchronous images to obtain image points of the marker point in each group of synchronous images. For example, each group of synchronous images includes a first image and a second image of the same frame, and the point projected by the marker point in the first image is extracted as the first image point, and the point projected by the marker point in the second image is extracted as the second image point, and the first image point and the second image point are used as the image points of the marker point in each group of synchronous images.
[0069] S22: Determine the image point coordinates corresponding to the image point based on the position of the image point in each group of synchronous images.
[0070] In at least one embodiment of the present application, the first image point coordinates corresponding to the first image point and the second image point coordinates corresponding to the second image point can be determined by image processing algorithms such as centroid positioning, edge fitting or key point detection. Taking the use of the centroid positioning algorithm to determine the first image point coordinates as an example, the centroid position of the first image point can be obtained by calculating the weighted average of the coordinates of all pixels in the area where the first image point is located, and the centroid position is used as the first image point coordinates of the first image point in the first image.
[0071] In the above method provided in the embodiment of the present application, the image points and image point coordinates of the marker points in each group of synchronized images are determined, and by extracting valuable information from the image points, subsequent three-dimensional reconstruction of the marker points can be achieved.
[0072] Figure 4is a flow chart of a method for determining a first three-dimensional coordinate provided in an embodiment of the present application, and the method for determining a first three-dimensional coordinate is applied to a scanning device. Figure 4 As shown, the following steps are included:
[0073] S31, determining an intrinsic parameter matrix and an extrinsic parameter matrix of the at least two shooting devices according to the preset calibration data.
[0074] In at least one embodiment of the present application, taking at least two shooting devices including a first shooting device and a second shooting device as an example, the intrinsic parameter matrices of the first shooting device and the second shooting device may be the same or different. The embodiment of the present application takes the same intrinsic parameter matrices of the first shooting device and the second shooting device as an example. The first shooting device corresponds to the first extrinsic parameter matrix, and the second shooting device corresponds to the second extrinsic parameter matrix. The method of constructing the intrinsic parameter matrix and the extrinsic parameter matrix according to the calibration data is a prior art and will not be described in detail here.
[0075] S32: Determine the first three-dimensional coordinates of the marker point according to the intrinsic parameter matrix, the extrinsic parameter matrix and the image point coordinates.
[0076] In at least one embodiment of the present application, following the above embodiment, the image point coordinates include first image point coordinates corresponding to the first image point of the marker point projected in the first image and second image point coordinates corresponding to the second image point of the marker point projected in the second image. In some embodiments, the first image point coordinates are normalized according to the intrinsic parameter matrix to obtain the first normalized coordinates, and the second image point coordinates are normalized according to the intrinsic parameter matrix to obtain the second normalized coordinates. Afterwards, based on the triangulation principle, the first three-dimensional coordinates corresponding to the marker point can be obtained according to the first external parameter matrix and the first normalized coordinates and the second external parameter matrix and the second normalized coordinates.
[0077] In the above method provided in the embodiment of the present application, the first three-dimensional coordinates of the marker point are determined according to the preset calibration data and the image point coordinates. Without the need for complicated equipment and calculation process, the first three-dimensional coordinates can be determined quickly and accurately, thereby improving the accuracy and rate of temperature compensation.
[0078] In at least one embodiment of the present application, before using the bundle adjustment algorithm to perform bundle adjustment optimization on the first three-dimensional coordinates of the marker points, it is necessary to track and splice the marker points in each group of synchronized images and perform inter-group deduplication processing based on the first three-dimensional coordinates of the marker points to obtain updated marker points, so that each updated marker point corresponds to a unique number, thereby satisfying the conditions required for bundle adjustment. Figure 5 1 is a flow chart of a method for determining the number of a marker point provided in an embodiment of the present application, and the method for determining the number of a marker point is applied to a scanning device. Figure 5 As shown, the following steps are included:
[0079] S41, tracking and splicing the marker points in each group of synchronous images according to the first three-dimensional coordinates to obtain an initial marker point framework corresponding to the object to be measured and a first number of the marker point in the initial marker point framework.
[0080] In at least one embodiment of the present application, when tracking the marker points according to the first three-dimensional coordinates, the features of the marker points in each group of synchronized images can be first extracted based on the different characteristics of the features of different marker points, such as the marker points can form a triangle, etc., and then based on the features of each group of marker points, the marker points with feature similarity greater than or equal to a preset threshold are determined to be the same first marker points, and the marker points with feature similarity less than the preset threshold are determined to be different marker points, so that the same marker points in each group are numbered with the same number, and the different marker points in each group are numbered with different numbers, so that the numbers of the marker points in each group in the initial marker point framework can be obtained. Among them, the preset threshold can be set according to actual needs and is not limited here. Exemplarily, the first group of synchronous images is the image taken for the first time when the shooting device shoots continuously, and the second group of synchronous images is the image taken for the second time when the shooting device shoots continuously. There are 5 marking points with different characteristics in the first group of synchronous images, which are numbered 1, 2, 3, 4, and 5 respectively; there are 6 marking points with different characteristics in the second group of synchronous images, of which 5 marking points are the same as the 5 marking points in the first group of synchronous images, then the 5 marking points in the second group of synchronous images are numbered 1, 2, 3, 4, and 5 respectively, that is, the same marking points are numbered with the same numbers, and the remaining another marking point is numbered 6, that is, different marking points are numbered with different numbers.
[0081] In at least one embodiment of the present application, while determining the number of the marker points in each group of synchronized images in the marker point framework, a spatial triangle can be established based on the marker points in each group of synchronized images, and then the triangles between the groups are matched with congruent triangles, and the marker points that constitute the two congruent triangles are determined to be the same marker points, and then the two groups of synchronized images are spliced based on the correspondence between the congruent triangles between the groups. In particular, when the correspondence between the groups fails to find the correspondence, the group is searched for the correspondence in the global framework. By analogy, the tracking and splicing of multiple groups of marker points can be achieved to obtain the initial marker point framework.
[0082] S42, performing inter-group deduplication processing on the first numbers to obtain updated marker points and second numbers of the updated marker points in the initial marker point framework.
[0083] In at least one embodiment of the present application, each group of synchronized images is in a different coordinate system before being stitched. When stitching the groups of synchronized images, it is necessary to transform the groups of synchronized images from their respective different coordinate systems to the same coordinate system for stitching. There are systematic errors when transforming different coordinate systems, and errors will accumulate during the stitching process. In this way, the embodiment of the present application performs inter-group deduplication processing based on the first number of each marker point in the initial marker point framework and the first three-dimensional coordinates of each marker point, maps the first three-dimensional coordinates corresponding to the marker points with ambiguity in the local area (the mapping relationship between the marker point and the initial marker point framework is not unique) to other groups of synchronized images in the local area for inter-group deduplication and number error correction, and re-integrates to form new marker points, thereby obtaining updated marker points and the second number of the updated marker points in the initial marker point framework. By performing inter-group deduplication processing on the first-numbered marker points, the uniqueness and consistency of the numbers of each marker point in the initial marker point framework can be ensured, thereby eliminating or reducing the cumulative errors when transforming the coordinate systems of each group of synchronized images during stitching, ensuring the accuracy of stitching multiple groups of synchronized images, and ensuring the uniqueness of the numbers of the marker points in each group in the initial marker point framework.
[0084] S43, adjusting the initial marker point framework based on the updated marker points to obtain an adjusted marker point framework.
[0085] In at least one embodiment of the present application, the initial marker point framework is adjusted based on the updated marker points, so that the adjusted marker point framework can form a complete closed framework.
[0086] The embodiment of the present application tracks and splices the marker points in each group of synchronized images and performs inter-group deduplication processing according to the first three-dimensional coordinates of the marker points to obtain updated marker points, so that each updated marker point corresponds to a unique number, providing an ideal initial value for the bundle adjustment processing, improving the accuracy of the bundle adjustment processing, and then improving the accuracy of the measurement results.
[0087] In at least one embodiment of the present application, a bundle adjustment algorithm is used to perform bundle adjustment optimization on the first three-dimensional coordinates of the marker point to obtain the second three-dimensional coordinates. Figure 6 is a flow chart of a method for determining a second three-dimensional coordinate provided in an embodiment of the present application, and the method for determining a second three-dimensional coordinate is applied to a scanning device. Figure 6 As shown, the following steps are included:
[0088] S51, determining a first parameter and a second parameter corresponding to each group of synchronous images according to the preset calibration data, and determining a collinear equation to be solved corresponding to each group of synchronous images according to the first parameter and the second parameter.
[0089] In at least one embodiment of the present application, the photographing device includes internal parameters and external parameters, wherein the internal parameters include internal orientation elements, distortion coefficients, pixel sizes in the horizontal and vertical directions, and ratios of pixel sizes in the horizontal and vertical directions, wherein the internal orientation elements are used to describe the position of the center of the image of the photographing device, that is, the coordinates of the principal point. In the absence of distortion, the principal point is usually located at the center of the image, and its coordinates are half of the image resolution. The internal parameters of the camera can be obtained by camera calibration, so that the internal orientation elements have been determined in the preset calibration data, and the internal orientation elements are used as the first parameters. In some embodiments, the preset calibration data of the scanning device can be used to determine the parameters of the spatial position and posture of the photographic beam at the moment of photography. The parameters of the spatial position and posture of the photographic beam at the moment of photography are called external orientation elements, which are used to characterize the spatial position of the photographic beam at the moment of photography. The external orientation elements include six parameters, three of which are line elements, which are used to describe the spatial coordinate value of the photographic center, and the other three are angle elements, which are used to describe the spatial posture of the image, and the external orientation elements are used as the second parameters.
[0090] In at least one embodiment of the present application, the first parameter and the second parameter of each group of synchronous images are input into a preset collinearity equation to obtain the collinearity equation to be solved for each group of synchronous images. The process of establishing the preset collinearity equation is prior art and will not be described in detail here.
[0091] S52, based on the bundle adjustment algorithm, taking the image point coordinates of the updated marker point and the first three-dimensional coordinates as initial values, iteratively processing all collinear methods to be solved to obtain the second three-dimensional coordinates corresponding to the updated marker point.
[0092] In at least one embodiment of the present application, the image point coordinates and the first three-dimensional coordinates of the updated marker point are input as initial values into the collinear equations to be solved corresponding to each group of synchronous images, and iterative calculations are performed. At the same time, the calibration data of the marker point and the scanning device are jointly optimized, and the optimal coordinates of the marker point are obtained by minimizing the residual, that is, the second three-dimensional coordinates of the marker point. The processing process of the bundle adjustment algorithm involved in the embodiment of the present application is similar to that of the related art. For details, please refer to the bundle adjustment algorithm provided by the related art, which will not be repeated here.
[0093] In the above method provided in an embodiment of the present application, a bundle adjustment algorithm is used to perform bundle adjustment optimization on the first three-dimensional coordinates of the updated marker point to obtain a second three-dimensional coordinate, and then the second three-dimensional coordinates are used to determine the measurement length of a preset scale, thereby improving the accuracy of the measurement length determination, and then improving the accuracy of temperature compensation and the accuracy of the measurement results.
[0094] In at least one embodiment of the present application, when setting a second marker point for a preset ruler, coding information is added to the second marker point, the coding information is used to uniquely identify the second marker point, and the second three-dimensional coordinates corresponding to the second marker point can be determined based on the coding information. Figure 7 1 is a flow chart of a method for determining the three-dimensional coordinates of a second marker point provided in an embodiment of the present application. The method for determining the three-dimensional coordinates of a second marker point is applied to a scanning device. Figure 7 As shown, the following steps are included:
[0095] S61, selecting a marker point with coding information from the updated marker points as an updated second marker point.
[0096] In at least one embodiment of the present application, among the multiple updated marker points, the marker point with the coding information is used as the updated second marker point, and the marker point without the coding information is used as the updated first marker point.
[0097] S62, determining the second three-dimensional coordinates corresponding to the updated second marker point according to the correspondence between the updated marker point and the second three-dimensional coordinates.
[0098] In at least one embodiment of the present application, there is a corresponding relationship between the updated marker point and the second three-dimensional coordinate, and each updated marker point has a corresponding second three-dimensional coordinate. In this way, the second three-dimensional coordinate corresponding to the updated second marker point is determined from the multiple second three-dimensional coordinates.
[0099] In the above method provided in an embodiment of the present application, by selecting the second three-dimensional coordinates of the second marker point from the second three-dimensional coordinates by querying the coded information, the accuracy and speed of selecting the second three-dimensional coordinates of the second marker point can be improved, thereby improving the accuracy and speed of determining the environmental correction coefficient.
[0100] Figure 8 1 is a flow chart of a method for determining a measured length provided in an embodiment of the present application, and the method for determining a measured length is applied to a scanning device. Figure 8 As shown, the following steps are included:
[0101] S71, based on the coding information corresponding to the preset scale, determine the second three-dimensional coordinates corresponding to the updated second marker point in the first end and the second three-dimensional coordinates corresponding to the updated second marker point in the second end.
[0102] In at least one embodiment of the present application, each preset ruler includes coding information of an updated second mark point located at the end. By querying the coding information contained in the preset ruler, the relevant information of the updated second mark point on the preset ruler can be obtained, and then the measurement length of the preset ruler is determined according to the second three-dimensional coordinates of the updated second mark point. Continuing with the above embodiment, if the coding information corresponding to the preset ruler 1 includes BC1a and BC1b, wherein BC1a indicates that the second mark point is set at the first end of the preset ruler 1, and BC1b indicates that the second mark point is set at the second end of the preset ruler 1. In this way, in order to determine the measurement length of the preset ruler 1, it is necessary to obtain the second three-dimensional coordinates corresponding to the second mark point with coding information BC1a and the second three-dimensional coordinates corresponding to the second mark point with coding information BC1b, and then determine the measurement length of the preset ruler according to the second three-dimensional coordinates of the second mark point at the first end and the second three-dimensional coordinates of the second mark point at the second end.
[0103] S72: Determine the measurement length of the preset ruler according to the second three-dimensional coordinates of the updated second marking point in the first end and the second three-dimensional coordinates of the updated second marking point in the second end.
[0104] In at least one embodiment of the present application, one or more updated second marker points may be provided on the first end, and one or more updated second marker points may be provided on the second end. Taking the example that one updated second marker point is provided on both the first end and the second end, the second three-dimensional coordinates of the updated second marker point in the first end and the second three-dimensional coordinates of the updated second marker point in the second end are determined, and the measurement length of the preset ruler is determined based on the above two second three-dimensional coordinates. Taking the example that multiple updated second marker points are provided on both the first end and the second end, the second three-dimensional coordinates corresponding to each updated second marker point of the first end are determined, and the multiple second three-dimensional coordinates are correlated to obtain the processed second three-dimensional coordinates corresponding to the first end; the second three-dimensional coordinates corresponding to each updated second marker point of the second end are determined, and the multiple second three-dimensional coordinates are correlated to obtain the processed second three-dimensional coordinates corresponding to the second end; and then the measurement length of the preset ruler is determined based on the above two processed second three-dimensional coordinates. Among them, the correlation processing of the multiple second three-dimensional coordinates may include taking the average value. The above method can improve the accuracy of the measurement length determination by setting multiple marker points on the end of the preset ruler.
[0105] In the above method provided in an embodiment of the present application, the second three-dimensional coordinates corresponding to the second mark point at the end of the preset scale are selected from the second three-dimensional coordinates by querying the coded information, and then the measurement length of the preset scale is determined according to the second three-dimensional coordinates. This can improve the accuracy and speed of determining the measurement length, and then improve the accuracy and speed of determining the environmental correction coefficient.
[0106] In at least one embodiment of the present application, a plurality of first marker points are provided on the object to be measured, and the plurality of first marker points can be tracked and spliced based on the tracking and splicing technology to obtain a marker point frame of the object to be measured. Considering the influence of the ambient temperature, there is a deviation between the marker point frame actually measured by the scanning device and the real marker point frame. The present application performs temperature compensation on the second three-dimensional coordinates of each first marker point in the marker point frame, which can improve the accuracy of determining the marker point frame. Fig. 9 is a flow chart of a first mark point correction method provided in an embodiment of the present application, and the first mark point correction method is applied to a scanning device. Fig. 9 As shown, the following steps are included:
[0107] S81, selecting a marker point without coding information from the updated marker points as the first updated marker point.
[0108] S82, correcting the second three-dimensional coordinates corresponding to the updated first marker point according to the environmental correction coefficient to obtain corrected three-dimensional coordinates.
[0109] In at least one embodiment of the present application, the second three-dimensional coordinates corresponding to the updated first marker point are corrected according to the environmental correction coefficient to obtain the corrected three-dimensional coordinates, including: using at least one preset ruler to establish a virtual coordinate system for multiple first marker points; in the virtual coordinate system, the second three-dimensional coordinates of each first marker point are corrected according to the environmental correction coefficient to obtain the corrected three-dimensional coordinates, and the marker point framework corresponding to the object to be measured is established according to the corrected three-dimensional coordinates. In some embodiments, any first marker point is selected, and the selected first marker point is used as the origin coordinate, and the virtual coordinate system is constructed using at least one selected preset ruler. For example, 3 preset rulers are selected from 4 preset rulers, and the x-axis, y-axis and z-axis are respectively constructed using the 3 preset rulers, so that multiple first marker points are placed in the virtual coordinate system. Since the scaling information of the preset ruler affected by the ambient temperature has been determined, each first marker point in the virtual coordinate system is temperature compensated according to the scaling information. Exemplarily, each second three-dimensional coordinate is corrected according to the environmental correction coefficient, for example, the second three-dimensional coordinate*environmental correction coefficient is used, and then the mark point framework of the object to be measured is established according to the corrected three-dimensional coordinates, which can improve the accuracy of the construction of the mark point framework of the object to be measured; and each preset ruler represents a different direction of the virtual coordinate system, and each first mark point in the virtual coordinate system is corrected in multiple directions, further improving the accuracy of the construction of the mark point framework of the object to be measured. The above method constructs a virtual coordinate system through a preset ruler, calibrates the internal and external parameters of the shooting device using the virtual coordinate system, and then corrects the second three-dimensional coordinate corresponding to the first mark point, which can compensate for the influence of changes in the physical properties of measuring elements such as beams caused by changes in ambient temperature on the measurement accuracy, thereby improving the measurement accuracy.
[0110] In the above method provided in the embodiment of the present application, the environmental correction coefficient is determined according to the measured length and the actual length of the preset scale, and the preset scale in the same environment as the object to be measured is used as the reference for temperature compensation. This can compensate for the influence of temperature changes on the three-dimensional measurement results without relying on temperature and theoretical models, and can improve the accuracy of temperature compensation, thereby improving the accuracy of the three-dimensional measurement results.
[0111] In at least one embodiment of the present application, after determining the environmental correction coefficient, the method further includes: monitoring environmental data, and using the environmental data and the environmental correction coefficient as training data; when the number of training data reaches a preset number, using the training data to train a preset coefficient determination model to obtain a trained coefficient determination model. The environmental data may include information such as ambient temperature and ambient humidity. The preset number can be set according to actual needs. The larger the preset number, the higher the accuracy of the model training. When training the coefficient determination model, the environmental data is used as input data and the environmental correction coefficient is used as output data. In this way, the trained coefficient determination model can predict the environmental correction coefficient corresponding to different environmental data, improve the efficiency of environmental compensation, and then improve the adjustment efficiency of the measurement results.
[0112] Fig.10 Schematic diagram of the structure of the measuring device provided in the embodiment of the present application. Fig.10 As shown, the measuring device 100 may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the measuring device 100 may be stored in the memory 21 of the scanning device 20 and executed by the processor 22 to perform the measurement function.
[0113] In some embodiments, the measuring device 100 can be divided into a plurality of functional modules according to the functions it performs, and the functional modules can include: an image acquisition module 101, an image point determination module 102, a coordinate determination module 103, a length determination module 104, a coefficient determination module 105, and a measurement correction module 106.
[0114] The module referred to in this application refers to a series of computer program segments that can be executed by the processor 22 and can complete fixed functions, which are stored in the memory 21. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0115] The image acquisition module 101 can be used to acquire multiple groups of synchronous images of the object to be measured captured by the at least two shooting devices, wherein the surface of the object to be measured is provided with marking points, the object to be measured includes the object to be measured and a preset scale, and the marking points include a first marking point on the surface of the object to be measured and a second marking point on the surface of the preset scale.
[0116] The image point determination module 102 may be used to determine the image point coordinates of the image point corresponding to the marker point in each group of synchronous images, and determine the first three-dimensional coordinates of the marker point based on preset calibration data and the image point coordinates.
[0117] The coordinate determination module 103 may be configured to determine the second three-dimensional coordinates corresponding to the marker point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data.
[0118] The length determination module 104 may be configured to select the second three-dimensional coordinates corresponding to the second marking point from the second three-dimensional coordinates, and determine the measurement length of the preset ruler according to the second three-dimensional coordinates corresponding to the second marking point.
[0119] The coefficient determination module 105 may be configured to determine an environmental correction coefficient of the scanning device based on the measured length and the actual length of the preset ruler.
[0120] The measurement correction module 106 may be configured to correct the second three-dimensional coordinates corresponding to the first marking point in the second three-dimensional coordinates according to the environmental correction coefficient to obtain corrected three-dimensional coordinates.
[0121] It can be understood that the measuring device 100 and the measuring method of the above embodiment belong to the same inventive concept, and the specific implementation method of each module of the measuring device 100 corresponds to each step of the measuring method in the above embodiment, which will not be repeated in this application.
[0122] The module division described above is a logical function division, and there may be other division methods in actual implementation. In addition, the functional modules in each embodiment of the present application may be integrated in the same processing unit, or each module may exist physically separately, or two or more modules may be integrated in the same unit. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0123] Fig.11 is an application device diagram of the measurement method provided in the embodiment of the present application. Fig.11 As shown, the scanning device 20 includes a memory 21, at least one processor 22, at least one communication bus 23 and at least two shooting devices 24. The processor 22 is used to implement the measurement method when executing the computer program stored in the memory 21. The at least one communication bus 23 is configured to achieve connection and communication between the memory 21, the processor 22 and the at least two shooting devices 24. The at least two shooting devices 24 can respond to the shooting instruction issued by the processor 22 to shoot the object to be measured.
[0124] Fig.11 The structure of the scanning device shown does not constitute a limitation on the embodiments of the present application. The scanning device 20 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components.
[0125] In some embodiments of the present application, the scanning device 20 can also be connected to a client device, which includes but is not limited to any electronic product that can interact with a user through a keyboard, mouse, remote control, touchpad or voice control device, such as a personal computer, a tablet computer, a smart phone, a digital camera, etc.
[0126] It should be noted that the scanning device 20 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0127] In some embodiments, the scanning device 20 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0128] In some embodiments, a computer program is stored in the memory 21, and when the computer program is executed by the processor 22, all or part of the steps in the measurement method are implemented. The memory 21 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0129] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the scanning device 20, etc.
[0130] In some embodiments, at least one processor 22 is the control core (Control Unit) of the scanning device 20, and uses various interfaces and lines to connect various components of the entire scanning device 20, and executes various functions of the scanning device 20 and processes data by running or executing programs or modules stored in the memory 21, and calling data stored in the memory 21. For example, when at least one processor 22 executes the computer program stored in the memory, it implements all or part of the steps of the measurement method in the embodiment of the present application; or implements all or part of the functions of the three-dimensional scanning device. At least one processor 22 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips.
[0131] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling an electronic device (which can be a personal computer, an electronic device, or a network device, etc.) or a processor to execute parts of the methods of various embodiments of the present application.
[0132] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation.
[0133] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0135] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A measurement method based on temperature compensation, applied to scanning equipment, It is characterized in that The scanning device includes at least two shooting devices, and the measuring method includes: Acquire multiple groups of synchronous images of the object to be measured collected by the at least two shooting devices, wherein the surface of the object to be measured is provided with marking points, the object to be measured includes the object to be measured and a preset ruler, the object to be measured and the preset ruler are in the same environment, and the marking points include a first marking point on the surface of the object to be measured and a second marking point on the surface of the preset ruler; Determine the image point coordinates of the image point corresponding to the marker point in each group of synchronized images, and determine the first three-dimensional coordinates of the marker point based on preset calibration data and the image point coordinates; Determine the second three-dimensional coordinates corresponding to the marker point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data; Selecting the second three-dimensional coordinates corresponding to the second marking point from the second three-dimensional coordinates, and determining the measurement length of the preset ruler according to the second three-dimensional coordinates corresponding to the second marking point; Determining an environmental correction factor of the scanning device based on the measured length and the actual length of the preset ruler; The second three-dimensional coordinates corresponding to the first marking point in the second three-dimensional coordinates are corrected according to the environmental correction coefficient to obtain corrected three-dimensional coordinates.
2. The temperature compensation measurement method according to claim 1, It is characterized in that The step of determining the coordinates of the image points corresponding to the marker points in each group of synchronous images comprises: Extracting boundaries of each group of synchronous images to obtain the image points of the marker points in each group of synchronous images; Based on the position of the image point in each group of synchronous images, the image point coordinates corresponding to the image point are determined.
3. The temperature compensation measurement method according to claim 1, It is characterized in that The step of determining the first three-dimensional coordinates of the marker point based on the preset calibration data and the image point coordinates includes: Determine the intrinsic parameter matrix and the extrinsic parameter matrix of the at least two shooting devices according to the preset calibration data; The first three-dimensional coordinates of the marker point are determined according to the intrinsic parameter matrix, the extrinsic parameter matrix and the image point coordinates.
4. The temperature compensation measurement method according to claim 1, It is characterized in that Before determining the second three-dimensional coordinates corresponding to the marker point based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data, the method further includes: Tracking and splicing the marker points in each group of synchronous images according to the first three-dimensional coordinates to obtain an initial marker point framework corresponding to the object to be measured and a first number of the marker point in the initial marker point framework; Performing inter-group deduplication processing on the first number to obtain an updated marker point and a second number of the updated marker point in the initial marker point framework; The initial marker point framework is adjusted based on the updated marker points to obtain an adjusted marker point framework.
5. The temperature compensation-based measurement method according to claim 4, It is characterized in that The determining, based on the image point coordinates, the first three-dimensional coordinates and the preset calibration data, the second three-dimensional coordinates corresponding to the marker point includes: Determine a first parameter and a second parameter corresponding to each group of synchronous images according to the preset calibration data, and determine a collinear equation to be solved corresponding to each group of synchronous images according to the first parameter and the second parameter; Based on the bundle adjustment algorithm, with the image point coordinates of the updated marker point and the first three-dimensional coordinates as initial values, all collinear equations to be solved are iteratively processed to obtain the second three-dimensional coordinates corresponding to the updated marker point.
6. The temperature compensation-based measurement method according to claim 4, It is characterized in that The selecting the second three-dimensional coordinates corresponding to the second marker point from the second three-dimensional coordinates includes: Selecting a marker point with coded information from the updated marker points as an updated second marker point; According to the correspondence between the updated marker point and the second three-dimensional coordinate, the second three-dimensional coordinate corresponding to the updated second marker point is determined.
7. The temperature compensation-based measurement method according to claim 4, It is characterized in that The preset ruler includes a first end and a second end, and determining the measurement length of the preset ruler according to the second three-dimensional coordinates corresponding to the second marking point includes: Determine, based on the coding information corresponding to the preset scale, a second three-dimensional coordinate corresponding to the updated second marker point in the first end portion and a second three-dimensional coordinate corresponding to the updated second marker point in the second end portion; The measurement length of the preset ruler is determined according to the second three-dimensional coordinates of the updated second marking point in the first end and the second three-dimensional coordinates of the updated second marking point in the second end.
8. The temperature compensation-based measurement method according to claim 4, It is characterized in that The step of correcting the second three-dimensional coordinates corresponding to the first marking point in the second three-dimensional coordinates according to the environmental correction coefficient to obtain the corrected three-dimensional coordinates includes: Selecting a marker point without coding information from the updated marker points as the first updated marker point; The second three-dimensional coordinate corresponding to the updated first marker point is corrected according to the environmental correction coefficient to obtain a corrected three-dimensional coordinate.
9. A scanning device, It is characterized in that include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the temperature compensation-based measurement method according to any one of claims 1 to 8.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the temperature compensation-based measurement method according to any one of claims 1 to 8 is implemented.
