Infrared camera calibration template and sorting method thereof

By designing a directional infrared calibration template and a homography transformation algorithm, the problem of complex production of the infrared camera calibration plate and disordered marking points is solved, the automatic sorting of the infrared calibration template is realized, and the development efficiency of the optical positioning system is improved. accuracy.

CN118762086APending Publication Date: 2024-10-11SOUTHWEAT UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410822696.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

The existing infrared camera calibration plate is complex to produce and the calibration point coordinates are disordered, which results in low efficiency in the development and verification of the optical positioning system. The sorting algorithm lacks directivity and introduces errors that cannot be ignored.

Method used

Design a directional infrared calibration template, using an 850nm narrow-band LED array and resistors in series, through image grayscale, thresholding and connected domain analysis to fit the coordinates of disordered marker points, and sort them through homography transformation , ensure the orderliness of marked points.

Benefits of technology

The automatic sorting of infrared calibration template mark points is realized, the calibration error is reduced, and the development efficiency and accuracy of the optical positioning system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762086A_ABST
    Figure CN118762086A_ABST
Patent Text Reader

Abstract

The invention discloses an infrared camera calibration template and a sorting method thereof, which can automatically sort mark points on an infrared calibration plate and is suitable for simplifying the process of infrared camera calibration. Firstly, a calibration board suitable for an infrared camera is manufactured through circuit board proofing; graying and thresholding the image, and then acquiring a connected domain of the image; acquiring pixel coordinates of the mark points according to the connected domain information and a related algorithm; finding out a point closest to the direction mark for unordered coordinates; finding out four corner points of a coordinate array for unordered coordinates; homography transformation is carried out on the images to obtain corrected images, and sorting is completed; according to the method, the feature points on the image can be automatically sequenced, so that the calibration process of the infrared camera is simplified. The sorting method suitable for the infrared camera calibration templates has unique directivity, can reduce the influence caused by asymmetry of distance parameters of the calibration plates to a certain extent, can optimize the calibration parameters, and has a certain simplification effect on occasions needing frequent calibration of the infrared camera.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an infrared camera calibration template and a sorting method thereof, and more specifically, to a calibration template that can be used for infrared camera calibration and a marking point sorting method based on homography transformation. Background Art

[0002] With the digitization and intelligence of the medical industry, a large number of digital devices have entered the medical field, aiming to provide doctors with more accurate, fast and reliable pathological information and improve their diagnostic capabilities. For example, as an emerging medical system, the surgical navigation system usually relies on a set of precise optical positioning systems to guide doctors to plan paths based on the specific relative positions of surgical instruments and patient lesions. Therefore, the positioning accuracy of the optical positioning system for surgical instruments and patient lesions will directly affect the surgical effect and quality.

[0003] However, optical positioning systems generally use infrared cameras, which cannot capture the image of traditional checkerboard calibration plates, so a calibration plate that can radiate infrared light is needed. However, the production of such calibration plates is relatively complicated. Currently, many patents and papers have proposed various infrared calibration plates based on hardware, which cannot achieve both production difficulty and calibration simplicity. In addition, the coordinates of their calibration points are disordered and cannot be directly used for calibration, so they need to be sorted. In the development stage of the optical positioning system, it is necessary to calibrate the infrared camera frequently to obtain the best calibration accuracy. If manual sorting is relied on at this time, then each calibration shot of 20 pictures requires a total of 40 sortings of the two cameras. The process is time-consuming and labor-intensive, which greatly hinders the development and verification of the optical positioning system. At the same time, the current sorting algorithm is not directional, and the sorting order of each image is not necessarily consistent, which will introduce an error that cannot be measured. Therefore, the present invention also proposes an improved method for the calibration template of an infrared camera, which aims to unify the sorting order of all calibration image feature points and reduce the calibration error caused thereby. Summary of the invention

[0004] In order to solve the problem of complex hardware production of infrared calibration templates and the problem of sorting of marking points, and to improve the development and verification speed of optical positioning systems, an infrared camera calibration template and its sorting method are proposed, and the following technical solutions are proposed:

[0005] (S1) circuit board prototyping to produce a directional infrared calibration board with a uniform array of 3528 packaged SMD LEDs that can emit 850nm narrowband light;

[0006] (S2) graying and thresholding the image, and then obtaining its connected domain;

[0007] (S3) fitting the pixel coordinates of the disordered marker points according to the connected domain information and the related algorithm;

[0008] (S4) finding the point closest to the direction mark for the disordered coordinates;

[0009] (S5) finding four corner points of the coordinate array for the unordered coordinates;

[0010] (S6) performing homography transformation on the image to obtain a corrected image, and completing the sorting;

[0011] First, the infrared calibration board is processed by circuit board proofing. A 3528 packaged chip LED that can emit 850nm narrowband light is connected in series with a 100Ω resistor with a thousandth accuracy, and then connected in parallel to form a uniformly distributed m-row and n-column light-emitting array. There is also an LED in the upper left corner of the array, totaling m×n+1. This LED is called a direction marker.

[0012] Furthermore, the infrared calibration board for circuit board proofing is photographed with a narrow-band near-infrared camera, and then the acquired image is grayed and the maximum value of the image pixel brightness is obtained, so as to threshold the narrow-band near-infrared image. Pixels less than the threshold value become 0, and pixels greater than the threshold value remain unchanged. The formula for thresholding the narrow-band near-infrared image is as follows:

[0013]

[0014] Where I(x,y) is the input image, max(I(x,y)) is the maximum value of the narrow-band near-infrared image pixels, ρ is a constant greater than 1, τ is the threshold, and I t (x, y) is the narrow-band near-infrared image after thresholding;

[0015] Furthermore, the connected domains are searched for the thresholded narrow-band near-infrared image, and the size and position of all connected domains are obtained using the four-connected mode. The center-of-circle fitting algorithm is used to obtain the unordered set P of the center coordinates of the marked points.

[0016] Furthermore, for all coordinate points in the unordered set P of the center coordinates of the marker points obtained after the connected domain search of the thresholded narrow-band near-infrared image, a point p in the unordered set P of the center coordinates of the marker points is calculated. i =(x i ,y i ) is the sum of the distances from all marked points in P, denoted as d i , the formula is as follows:

[0017]

[0018] Element d i The maximum value d p The subscript p is the serial number of the direction mark coordinate point in the unordered set P of the center coordinates of the mark point, and the coordinate p of the direction mark is obtained.q =(x q ,y q ), so that the direction mark can be located first in each shot regardless of the position of the calibration plate;

[0019] Remove the direction mark from the unordered set P of the center coordinates of the marked points to obtain a new unordered set S of unordered coordinate points, and calculate each point s in the unordered set S of unordered coordinate points. i =(x i ,y i ) to the coordinate p of the direction marker q =(x q ,y q ) and select the point s that is closest to it. q =(x q ,y q ), recorded as the initial point, which is the upper leftmost mark point in the m×n mark point array;

[0020] Furthermore, it is characterized in that: traversing each point s in the unordered coordinate point set S i =(x i ,y i ), calculate its distance to the initial point s q =(x q ,y q ), the points with a distance of 0 are not considered, and the three closest points are selected: s1=(x1,y1), s2=(x2,y2), s3=(x3,y3). q =(x q ,y q ) is the starting point of the vector, points s1=(x1,y1), s2=(x2,y2), s3=(x3,y3) are the end points of the vector, and three direction vectors a1, a2, a3 are constructed respectively;

[0021] Traverse the three vectors a1, a2, and a3, starting from a1, construct a rectangular coordinate system for the plane image with the horizontal rightward direction as the x-axis and the vertical downward direction as the y-axis, stipulate that clockwise rotation is the positive direction, and calculate the cosine and sine values ​​of the angle θ between the vector a1 and the x-axis. At this time, after a1 is rotated, its direction coincides with the x-axis. The calculation formulas for the cosine and sine values ​​are as follows:

[0022]

[0023] In the rectangular coordinate system of the plane image, the other two vectors a2 and a3 are rotated by an angle of θ. The calculation formula is as follows:

[0024]

[0025] Where i = 2, 3, that is and These are the two rotated vectors. Now we need to determine the directionality of the two vectors. If and If one of the ordinates of the two rotated vectors is positive and the other is negative, then the direction of the negative vector is the horizontal direction of the m×n marker array, and the direction of the positive vector is the vertical direction of the m×n marker array; if the ordinates of the two rotated vectors are both positive or both negative, then the above operation is repeated starting from a2 until the condition that one of the ordinates of the two rotated vectors is positive and the other is negative is met;

[0026] Assume a h and a v To satisfy the two vectors in the previous step, namely a h The ordinate of the new vector after rotation is a negative number, a v The ordinate of the new vector after rotation is a positive number, with a h is the direction vector, passing through the initial point s q =(x q ,y q ) Construct the straight line L h , traverse the point s in the unordered coordinate point set S i =(x i ,y i ), calculate its intersection with the straight line L h distance, select n points with the smallest distance, and then select the distance point s from these points q =(x q ,y q ) is the farthest point, denoted by s h , with point s q =(x q ,y q ) is the starting point, point s h Construct a new direction vector for the end point Similarly, with a v is the direction vector, passing through point s q =(x q ,y q ) Construct the straight line L v , traverse the point s in the unordered coordinate point set S i =(x i ,y i ), calculate its intersection with the straight line L v distance, select m points with the smallest distance, and then select the distance point s from these points q =(x q ,y q ) is the farthest point, denoted by s v , with point s q =(xq ,y q ) is the starting point, point s v Construct a new direction vector for the end point

[0027] Traverse the point s in the unordered coordinate point set S i =(x i ,y i ), select the distance point s q =(x q ,y q ) is the farthest point, denoted by s p ;

[0028] Furthermore, the matrix B is constructed based on the physical size of the calibration plate, and the calculation formula is as follows:

[0029]

[0030] Take four points b 11 、b 1n 、b m1 、b mn , located at the upper left corner, upper right corner, lower left corner, and lower right corner of the m×n array of the calibration plate, respectively. These four points are used as the target points of the homography transformation; point s q 、s h 、s v 、s p As the source point of the homography transformation, calculate the homography matrix K between the target point pair and the source point pair;

[0031] The point s in the unordered coordinate point set S i =(x i ,y i ) Perform homography transformation to get point h i =(x i ,y i ), all h i The target point set H is constructed and the calculation formula is as follows:

[0032]

[0033] in Represented as point s i =(x i ,y i ), Represented as point h i =(x i ,y i ), Indicates a proportional relationship; starting from i=j=1, traverse each point b in the physical size matrix B ij , calculate the distance point b in the target point set Hij The nearest point h k , replace s in the unordered coordinate point set S corresponding to the k subscript k =(x k ,y k ) Fill in the ordered set As the first point, traverse all b in the physical size matrix B ij , thus obtaining an ordered set This completes the sorting

[0034] In general, by implementing the above steps of the present invention, the following effects can be obtained:

[0035] The present invention is applicable to the development field of optical positioning systems. First, a circuit board is proofed to produce a directional infrared calibration board; then the image is thresholded, and then its connected domain is obtained; the pixel coordinates of the disordered marking points are fitted according to the connected domain information and related algorithms; the point closest to the direction mark is found for the disordered coordinates; the four corner points of the coordinate array are found for the disordered coordinates; the image is homographically transformed to obtain a corrected image, and the sorting is completed. According to the above method, the marking points on the infrared calibration template can be quickly sorted, thereby improving the development efficiency of the optical positioning system. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The basic flow of the algorithm of the present invention is demonstrated.

[0037] Figure 2 The basic model of the infrared calibration template proposed in this invention is demonstrated.

[0038] Figure 3 The thresholding process of the original infrared calibration template image is shown.

[0039] Figure 4 Shows the direction mark p q and the initial point s q Schematic diagram of .

[0040] Figure 5 Shows three other corner points s besides the initial point h 、s v 、s p Schematic diagram of .

[0041] Figure 6 A schematic diagram of the homography transformation of the infrared calibration template image is shown.

[0042] Figure 7 A schematic diagram showing the sorting of 8 infrared calibration template images of arbitrary postures is shown.

[0043] Reference Figure 2, the infrared calibration board is processed by circuit board proofing, and a 3528 packaged chip LED that can emit 850nm narrow-band light and a 100Ω resistor with a thousandth accuracy are connected in series and then connected in parallel to form a uniformly distributed m-row and n-column light-emitting array. There is also an LED in the upper left corner of the array, totaling m×n+1. This LED is called a direction marker.

[0044] Reference Figure 3 In this embodiment, a real image of an infrared calibration template with 5 rows and 4 columns and a spacing of 15 mm is photographed at an angle, and an image is taken for illustration. The acquired image is grayed and the maximum value of the image pixel brightness is obtained, so that the narrow-band near-infrared image is thresholded. Pixels less than the threshold value become 0, and pixels greater than the threshold value remain unchanged. The formula for thresholding the narrow-band near-infrared image is as follows:

[0045]

[0046] Where I(x,y) is the input image, max(I(x,y)) is the maximum value of the narrow-band near-infrared image pixels, ρ is a constant greater than 1, τ is the threshold, and I t (x, y) is the narrow-band near-infrared image after thresholding.

[0047] The connected domains are searched for the thresholded image to obtain the sizes and positions of all connected domains, and the unordered set P of the center coordinates of the marked points is obtained according to the circle center fitting algorithm.

[0048] Reference Figure 4 , for all the coordinate points in the unordered set P of the center coordinates of the marker points obtained after searching the connected domain of the thresholded narrow-band near-infrared image, calculate a point p in the unordered set P of the center coordinates of the marker points i =(x i ,y i ) is the sum of the distances from all marked points in P, denoted as d i , the formula is as follows:

[0049]

[0050] Element d i The maximum value d p The subscript p of the direction mark coordinate point is the serial number of the unordered coordinate point set S, and the coordinate p of the direction mark is obtained. q =(x q ,y q ), so that the direction mark can be located first in each shot regardless of the position of the calibration plate.

[0051] Remove the direction mark from the unordered coordinate point set P to obtain a new unordered coordinate point set S, and calculate each point s in the unordered coordinate point set S i =(x i ,y i ) to the coordinate p of the direction marker q =(x q ,y q ) and select the point s that is closest to it. q =(x q ,y q ), recorded as the initial point, which is the upper leftmost mark point in the m×n mark point array.

[0052] Reference Figure 5 , traverse each point s in the unordered coordinate point set S i =(x i ,y i ), calculate its distance to the initial point s q =(x q ,y q ), the points with a distance of 0 are not considered, and the three closest points are selected: s1=(x1,y1), s2=(x2,y2), s3=(x3,y3). q =(x q ,y q ) is the starting point of the vector, points s1=(x1,y1), s2=(x2,y2), s3=(x3,y3) are the end points of the vector, and three direction vectors a1, a2, and a3 are constructed respectively.

[0053] Traverse the three vectors a1, a2, and a3, starting from a1, construct a rectangular coordinate system for the plane image with the horizontal rightward direction as the x-axis and the vertical downward direction as the y-axis, stipulate that clockwise rotation is the positive direction, and calculate the cosine and sine values ​​of the angle θ between the vector a1 and the x-axis. At this time, after a1 is rotated, its direction coincides with the x-axis. The calculation formulas for the cosine and sine values ​​are as follows:

[0054]

[0055] In the rectangular coordinate system of the plane image, the other two vectors a2 and a3 are rotated by an angle of θ. The calculation formula is as follows:

[0056]

[0057] Where i = 2, 3, that is and These are the two rotated vectors. Now we need to determine the directionality of the two vectors. If and If one of the ordinates of the rotated vectors is positive and the other is negative, then the direction of the negative vector is the horizontal direction of the m×n marker array, and the direction of the positive vector is the vertical direction of the m×n marker array. If the ordinates of the two rotated vectors are both positive or both negative, then repeat the above operation starting from a2 until the condition that one of the ordinates of the rotated vectors is positive and the other is negative is met.

[0058] Assume a h and a v To satisfy the two vectors in the previous step, namely a h The ordinate of the new vector after rotation is a negative number, a v The ordinate of the new vector after rotation is a positive number, with a h is the direction vector, passing through the initial point s q =(x q ,y q ) Construct the straight line L h , traverse the point s in the unordered coordinate point set S i =(x i ,y i ), calculate its intersection with the straight line L h distance, select n points with the smallest distance, and then select the distance point s from these points q =(x q ,y q ) is the farthest point, denoted by s h , with point s q =(x q ,y q ) is the starting point, point s h Construct a new direction vector for the end point Similarly, with a v is the direction vector, passing through point s q =(x q ,y q ) Construct the straight line L v , traverse the point s in the unordered coordinate point set S i =(x i ,y i ), calculate its intersection with the straight line L v distance, select m points with the smallest distance, and then select the distance point s from these points q =(x q ,y q ) is the farthest point, denoted by s v , with point s q =(x q ,y q ) is the starting point, point s v Construct a new direction vector for the end point

[0059] Traverse the point s in the unordered coordinate point set S i =(x i ,y i ), select the distance point s q =(x q ,y q ) is the farthest point, denoted by s p ;

[0060] Reference Figure 6 , construct the matrix B based on the physical size of the calibration plate, and the calculation formula is as follows:

[0061]

[0062] Take four points b 11 、b 1n 、b m1 、b mn , located at the upper left corner, upper right corner, lower left corner, and lower right corner of the m×n array of the calibration plate, respectively. These four points are used as the target points of the homography transformation; point s q 、s h 、s v 、s p As the source point of the homography transformation, calculate the homography matrix K between the target point pair and the source point pair;

[0063] The point s in the unordered coordinate point set S i =(x i ,y i ) Perform homography transformation to get point h i =(x i ,y i ), all h i The target point set H is constructed and the calculation formula is as follows:

[0064]

[0065] in Represented as point s i =(x i ,y i ), Represented as point h i =(x i ,y i ), Indicates a proportional relationship; starting from i=j=1, traverse each point b in the physical size matrix B ij , calculate the distance point b in the target point set H ij The nearest point h k , replace s in the unordered coordinate point set S corresponding to the k subscript k =(xk ,y k ) Fill in the ordered set As the first point, traverse all b in the physical size matrix B ij , thus obtaining an ordered set This completes the sorting

[0066] Reference Figure 7 The hardware platform relied on in this experiment is Jingyue B550 I-PLUS, Ryzen55500, RX5600XT, the operating system is Window11, and the software used is Pycharm. The method proposed in the present invention is adopted. Under the premise that the infrared camera can clearly and smoothly capture the infrared calibration plate, the posture of the calibration plate is changed to obtain eight pictures with different rotation angles. Using the method proposed in the present invention, the 20 marking points of each picture in the 8 pictures are successfully and correctly sorted, and the order is arranged in a "Z" shape according to the color progressive relationship of "red-orange-yellow-green-blue" in the figure. And no matter what the posture of the calibration plate is, the sorting order always starts from the point closest to the direction mark (initial point). This reduces the inestimable calibration error caused by the inconsistent sorting order of each calibration plate image.

[0067] In summary, the present invention is an infrared camera calibration template and a sorting method thereof, which aims to automatically sort the marking points when the infrared camera needs to be calibrated frequently, thereby greatly improving the development efficiency of the optical positioning system.

[0068] The following content is used to explain the method and core idea of ​​the present invention, and is for understanding only. For professionals in the technical field, based on the idea of ​​the present invention, improvements can be made in specific implementation methods and application scopes. Therefore, the content of this specification should not be regarded as limiting the present invention.

[0069] The specific embodiments of the present invention are intended to illustrate the methods and core concepts of the present invention, and are not limited to the above examples. Any formal changes or modifications within the scope of the claims should be included in the protection scope of the present invention.

Claims

1. The present invention proposes an infrared camera calibration template and a sorting method thereof, the main process of which is as follows: Step S1: a circuit board is sampled to produce a directional infrared calibration board, on which there are m rows and n columns of evenly distributed 3528 packaged chip LEDs capable of emitting 850nm narrowband light; Step S2: photographing the infrared calibration board for circuit board proofing with a narrow-band near-infrared camera, performing specific thresholding through the maximum weight, and then obtaining its four-connected connected domain, and fitting the sub-pixel coordinates of the marking points using a circle center fitting algorithm to obtain an unordered set of the center coordinates of the marking points; Step S3: Find the direction marking point in the unordered set of center coordinates of the marking points, and then find the point closest to the direction marking as the initial point; Step S4: construct a direction vector with the initial point as the starting point, determine the horizontal and vertical directions of the feature point array on the near-infrared calibration plate image by rotation traversal, and then determine the four corner points of the array; Step S5: construct a transformation matrix according to the four corner points and the physical size of the near-infrared calibration plate to obtain the corrected image of the near-infrared calibration plate, and then complete the sorting according to the correspondence between the physical size of the near-infrared calibration plate and the four corner points.

2. The method according to claim 1, Features: The infrared calibration board is processed by circuit board proofing. A 3528 packaged chip LED that can emit 850nm narrow-band light is connected in series with a 100Ω resistor with a thousandth accuracy, and then connected in parallel to form an evenly distributed m-row and n-column light-emitting array. There is also an LED in the upper left corner of the array, totaling m×n+1. This LED is called a direction marker.

3. The method according to claim 2, Features: The infrared calibration board for circuit board proofing is photographed with a narrow-band near-infrared camera, and then the acquired image is grayed out and the maximum value of the image pixel brightness is obtained. The narrow-band near-infrared image is thresholded, and pixels less than the threshold are changed to 0, and pixels greater than the threshold remain unchanged. The formula for thresholding the narrow-band near-infrared image is as follows: Where I(x,y) is the input image, max(I(x,y)) is the maximum value of the narrow-band near-infrared image pixels, ρ is a constant greater than 1, τ is the threshold, and I t (x, y) is the narrow-band near-infrared image after thresholding. The connected domains are searched for the thresholded narrow-band near-infrared image, and the size and position of all connected domains are obtained using the four-connected mode. The center fitting algorithm is used to obtain the unordered set P of the center coordinates of the marked points.

4. The method according to claim 3, Features: For all coordinate points in the unordered set P of the center coordinates of the marker points obtained after searching the connected domain of the thresholded narrow-band near-infrared image, calculate a point p in the unordered set P of the center coordinates of the marker points. i =(x i ,y i ) is the sum of the distances from all marked points in P, denoted as d i , the formula is as follows: Element d i The maximum value d p The subscript p is the serial number of the direction mark coordinate point in the unordered set P of the center coordinates of the mark point, and the coordinate p of the direction mark is obtained. q =(x q ,y q ), so that the direction mark can be located first in each shot regardless of the position of the calibration plate; Remove the direction mark from the unordered set P of the center coordinates of the marked points to obtain a new unordered set S of coordinate points. Calculate each point s in the unordered set S of coordinate points. i =(x i ,y i ) to the coordinate p of the direction marker q =(x q ,y q ) and select the point s that is closest to it. q =(x q ,y q ), recorded as the initial point, which is the upper leftmost mark point in the m×n mark point array.

5. The method according to claim 4, Features: Traverse each point s in the unordered coordinate point set S i =(x i ,y i ), calculate its distance to the initial point s q =(x q ,y q ), the point with distance 0 is not considered, and the three points with the closest distance are selected. 1 =(x 1 ,y 1 ),s 2 =(x 2 ,y 2 ),s 3 =(x 3 ,y 3 ); Points q =(x q ,y q ) is the starting point of the vector, point s 1 =(x 1 ,y 1 ),s 2 =(x 2 ,y 2 ),s 3 =(x 3 ,y 3 ) is the end point of the vector, and three direction vectors a are constructed respectively 1 、a 2 、a 3 ; Traverse these three vectors a 1 、a 2 、a 3 , from a 1 First, construct a rectangular coordinate system for the plane image with the horizontal rightward as the x-axis and the vertical downward as the y-axis, stipulating that the clockwise rotation is the positive direction, and calculate the vector a 1 The cosine and sine of the angle θ with the x-axis, at this time for a 1 After rotation, its direction coincides with the x-axis, and the calculation formulas for cosine and sine values ​​are as follows: In the rectangular coordinate system of the plane image, for the other two vectors a 2 and a 3 Rotate, the rotation angle is θ, the calculation formula is as follows: Where i = 2, 3, that is and These are the two rotated vectors. Now we need to determine the directionality of the two vectors. If and The ordinates of the two vectors are positive and negative, respectively. Then the direction of the negative vector is the horizontal direction of the m×n marker array, and the direction of the positive vector is the vertical direction of the m×n marker array. If the ordinates of the two rotated vectors are both positive or both negative, then from a 2 The above operation is repeated again until the condition that the ordinates of the two rotated vectors are one positive and one negative is met; Assume a h and a v To satisfy the two vectors in the previous step, namely a h The ordinate of the new vector after rotation is a negative number, a v The ordinate of the new vector after rotation is a positive number, with a h is the direction vector, passing through the initial point s q =(x q ,y q ) Construct the straight line L h , traverse the point s in the unordered coordinate point set S i =(x i ,y i ), calculate its intersection with the straight line L h distance, select n points with the smallest distance, and then select the distance point s from these points q =(x q ,y q ) is the farthest point, denoted by s h , with point s q =(x q ,y q ) is the starting point, point s h Construct a new direction vector for the end point Similarly, with a v is the direction vector, passing through point s q =(x q ,y q ) Construct the straight line L v , traverse the point s in the unordered coordinate point set S i =(x i ,y i ), calculate its intersection with the straight line L v distance, select m points with the smallest distance, and then select the distance point s from these points q =(x q ,y q ) is the farthest point, denoted by s v , with point s q =(x q ,y q ) is the starting point, point s v Construct a new direction vector for the end point Traverse the point s in the unordered coordinate point set S i =(x i ,y i ), select the distance point s q =(x q ,y q ) is the farthest point, denoted by s p .

6. The method according to claim 5, Features: The matrix B is constructed based on the physical size of the calibration plate. The calculation formula is as follows: Take four points b 11 、b 1n 、b m1 、b mn , which are located at the upper left corner, upper right corner, lower left corner and lower right corner of the m×n array of the near-infrared calibration plate. The values ​​of these four points are the physical sizes of the near-infrared calibration plate. They are used as the target points of the homography transformation; Points q 、s h 、s v 、s p As the source point of the homography transformation, calculate the homography matrix K between the target point pair and the source point pair; The point s in the unordered coordinate point set S i =(x i ,y i ) Perform homography transformation to get point h i =(x i ,y i ), all h i The target point set H is constructed and the calculation formula is as follows: in Represented as point s i =(x i ,y i ), Represented as point h i =(x i ,y i ), Indicates a proportional relationship; starting from i=j=1, traverse each point b in the physical size matrix B ij , calculate the point h in the target point set H i =(x i ,y i ) Distance from point b ij The nearest point h k , replace s in the unordered coordinate point set S corresponding to the k subscript k =(x k ,y k ) Fill in the ordered set As the first point, continue to traverse all b in the physical size matrix B ij , thus obtaining m×n points, which are ordered sets This completes the sorting.