Detection position calibration method
The calibration position is determined by calculating the area ratio of the data sequence of the optical detection signal, which solves the problem of insufficient stability and accuracy of the detection position calibration in the existing technology, realizes independent calibration of two axes, and improves detection accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the stability of position calibration is poor, the calibration accuracy is not high, and the results are easily affected by the order when calibrating in the two-axis direction of the plane, resulting in inconsistent calibration results.
By controlling the movement of the carrier to be calibrated to collect signals, the total area of the curve in the data sequence is calculated, an initial vertical bisector is set, the area of a portion of the curve is calculated, and the final vertical bisector at the middle position is determined as the calibration position based on the area ratio, thus achieving independent calibration of the two axes.
It significantly improves the accuracy and stability of detection position calibration, eliminates the influence of the two-axis calibration sequence on the results, and improves the accuracy and repeatability of calibration.
Smart Images

Figure CN121805149A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of optical detection technology, and in particular to a detection position calibration method. BACKGROUND
[0002] In the field of detection using optical reflection principle, such as detection of glycated hemoglobin by chromatography and detection of CRP by fluorescence method, a specific wavelength of light is emitted by a light-emitting component to irradiate a specified area, and the reflected signal is collected for detection. The relative position accuracy between the light-emitting component, the optical detection component and the area to be detected directly determines the accuracy of the detection result. Specifically, the optical detection component needs to be aligned with the center position of the calibration carrier to obtain accurate optical detection signal, otherwise the final detection may be erroneous. Therefore, position calibration of the optical detection component and the calibration carrier is usually required at the time of factory delivery and during use to eliminate the effects of errors such as position deviation caused by motion accumulation during assembly, manufacturing and use.
[0003] The calibration method of the prior art usually determines the center position of the calibration carrier by the peak position or the trough position of the collected reflection signal, but there are the following problems: the calibration stability of the prior art is poor, the calibration results of multiple calibrations of the same equipment fluctuate, and the calibration accuracy is not high; further, the prior art mainly calibrates in a single-axis direction, and when calibrating in a two-axis direction in a plane, the X-axis is calibrated first and then the Y-axis (or vice versa), and the two-axis calibration results are coupled, and the calibration results of the same axis are inconsistent based on different two-axis calibration sequences.
[0004] In view of this, how to provide a detection position calibration method with high calibration stability and high calibration accuracy is a technical problem to be solved by those skilled in the art. SUMMARY
[0005] To solve the above technical problems, the purpose of the present application is to provide a detection position calibration method. The present application controls the movement of the calibration carrier along the calibration direction to collect signals and obtain a data sequence, calculates the total area of the curve corresponding to the data sequence, sets an initial vertical bisector of the lateral movement and calculates the partial curve area on one side, determines the final vertical bisector of the middle position of the curve based on the relationship between the partial area and the total area, and calibrates the calibration carrier using the bisector position as the calibration position, effectively solving the problems of insufficient accuracy and poor stability in the existing detection position calibration.
[0006] The purpose of the present application is to provide a detection position calibration method; The technical solutions provided by the present application are as follows: A detection position calibration method, comprising: controlling the to-be-calibrated carrier to move from an initial position along a calibration direction according to a signal acquired by the optical detection assembly to obtain a data sequence; calculating a total area of a curve corresponding to the data sequence; setting an initial vertical bisector of the lateral movement, the initial vertical bisector intersecting the curve corresponding to the data sequence; calculating a plurality of partial curve areas of the curve corresponding to the data sequence on each side of the initial vertical bisector; determining an initial vertical bisector located at a middle position of the curve corresponding to the data sequence as a final vertical bisector according to a relationship between the plurality of partial curve areas and the total area of the curve; performing position calibration on the to-be-calibrated carrier with the final vertical bisector position as a calibration position.
[0007] Preferably, the calculating a plurality of partial curve areas of the curve corresponding to the data sequence on each side of the initial vertical bisector comprises: determining a preset starting point; laterally moving the initial vertical bisector from the preset starting point, and calculating a partial curve area of the curve corresponding to the data sequence on one side of the initial vertical bisector each time to obtain a plurality of partial curve areas.
[0008] Preferably, the calculating a total area of a curve corresponding to the data sequence comprises: differentially deriving the data sequence to obtain a derivative sequence and determine a wave peak position and a wave trough position; setting an initial horizontal intercept line according to the wave peak position and the wave trough position; adjusting the initial horizontal intercept line until the number of intersection points of the initial horizontal signal intercept line and the curve corresponding to the data sequence is a preset number of intersection points, and taking the corresponding initial horizontal signal intercept line as a final horizontal intercept line; the partial curve area and the total area of the curve both belong to an area defined above the final horizontal intercept line.
[0009] Preferably, the determining a preset starting point comprises: taking one of the intersection points of the final horizontal intercept line and the curve corresponding to the data sequence as the preset starting point.
[0010] Preferably, the determining a preset starting point comprises: taking a maximum value or a minimum value of the derivative sequence as a starting position, finding a position where the first derivative absolute value is less than or equal to a preset wave peak flat section threshold from the derivative sequence as the preset starting point.
[0011] Preferably, the determining a preset starting point comprises: deriving a derivative sequence by differentiating the data sequence; finding a position where the absolute value of the derivative is less than or equal to a preset peak flat section threshold from the derivative sequence as the preset starting point, as a starting position of the maximum value or the minimum value of the derivative sequence.
[0012] Preferably, the determining the preset starting point comprises: deriving a derivative sequence by differentiating the data sequence, and determining the peak position and the valley position; setting an initial horizontal intercept line according to the peak position and the valley position determined by the derivative sequence; adjusting the initial horizontal intercept line until the number of intersection points of the initial horizontal signal intercept line and the curve corresponding to the data sequence is a preset number of intersection points, and taking the corresponding initial horizontal signal intercept line as a final horizontal intercept line; taking one of the intersection points of the final horizontal intercept line and the curve corresponding to the data sequence as the preset starting point.
[0013] Preferably, the setting the initial horizontal intercept line according to the peak position and the valley position comprises: comparing the signal value corresponding to the peak position and the signal value corresponding to the valley position, and setting the initial horizontal intercept line based on the smaller value of the two.
[0014] Preferably, the determining the initial vertical bisector line located in the middle position of the curve corresponding to the data sequence as the final vertical bisector line according to the relationship between the partial curve area and the total curve area comprises: judging the relationship between the partial curve area and the total curve area; selecting the initial vertical bisector line corresponding to the time when the partial curve area is closest to half of the total curve area as the final vertical bisector line.
[0015] The application provides a detection position calibration method, which comprises the following steps: moving a carrier to be calibrated from an initial position along a calibration direction, and obtaining a data sequence according to a signal collected by an optical detection assembly; calculating a total area of a curve corresponding to the data sequence; setting an initial vertical bisector of lateral movement, and the initial vertical bisector intersects the curve corresponding to the data sequence; calculating a plurality of partial curve areas of the curve corresponding to the data sequence on each side of the initial vertical bisector; determining the initial vertical bisector located at a middle position of the curve corresponding to the data sequence as a final vertical bisector according to a relationship between the plurality of partial curve areas and the total area of the curve; and taking the position of the final vertical bisector as a calibration position, and performing position calibration on the carrier to be calibrated.
[0016] The application further provides another detection position calibration method. The technical scheme provided by the application is as follows: A detection position calibration method comprises the following steps: moving a carrier to be calibrated from an initial position along a calibration direction, and obtaining a data sequence according to a signal collected by an optical detection assembly; calculating a total area of a curve corresponding to the data sequence; setting an initial vertical bisector of lateral movement, and the initial vertical bisector intersects the curve corresponding to the data sequence; calculating a plurality of partial curve areas of the curve corresponding to the data sequence on each side of the initial vertical bisector; determining the initial vertical bisector located at a middle position of the curve corresponding to the data sequence as a final vertical bisector according to a relationship between the plurality of partial curve areas and the total area of the curve; and taking the position of the final vertical bisector as a calibration position, and performing position calibration on the carrier to be calibrated. According to the first orthogonal direction calibration position, moving the carrier to be calibrated from a second initial position along a second orthogonal direction, and determining a second initial vertical bisector located at a middle position of a curve corresponding to a second data sequence as a second final vertical bisector according to the above-described method; and taking the position of the second final vertical bisector as a second orthogonal direction calibration position. According to the first orthogonal direction calibration position and the second orthogonal direction calibration position, performing position calibration on the carrier to be calibrated.
[0017] The application provides another detection position calibration method, which comprises the following steps: controlling a to-be-calibrated carrier to move from a first initial position along a first orthogonal direction, and obtaining a first data sequence according to a first signal collected by an optical detection assembly; calculating a first curve total area corresponding to the first data sequence; determining a center of the to-be-calibrated carrier in the first orthogonal direction by using an integral proportional relationship between the first curve total area and a partial area; obtaining a first orthogonal direction calibration position by calibrating the first orthogonal direction; determining a second initial position according to the first orthogonal direction calibration position; controlling the to-be-calibrated carrier to move from the second initial position along a second orthogonal direction; and calibrating the second orthogonal direction by using the same steps as those for calibrating the first orthogonal direction, so as to obtain a second orthogonal direction calibration position. The method effectively solves the problems of inconsistent calibration results of the same axis, insufficient positioning accuracy and poor calibration stability caused by the sequence coupling of two-axis direction calibration in the prior art, realizes the effect that the two-axis calibration results are not affected by the sequence and the repeated calibration stability is better, and significantly improves the accuracy of detection position calibration. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0019] Figure 1 The flow chart of the detection position calibration method in an embodiment of the present application; Figure 2 The structure diagram of the detection calibration mechanism in an embodiment of the present application; Figure 3 The curve and derivative curve corresponding to the data sequence in an embodiment of the present application; Figure 4 The bisector and intercept line of the curve corresponding to the data sequence in an embodiment of the present application; Figure 5 The comparison result diagram of the calibration accuracy of the prior art and the present method. DETAILED DESCRIPTION
[0020] In order to make the technical personnel in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the scope of protection of the present application.
[0021] As Figure 1As shown, this embodiment of the invention provides a detection position calibration method, including: S1. Control the carrier to be calibrated to move from the initial position along the calibration direction, and obtain the data sequence based on the signal collected by the optical detection component; In step S1, by means of Figure 2 The detection and calibration mechanism shown is used to calibrate the detection position. The mechanism includes a fixed acquisition component 1 and a carrier 2 to be calibrated. The fixed acquisition component 1 includes a light-emitting component 11, an optical detection component 12, and a fixing block 13. The carrier 2 to be calibrated includes a tooling block 21 and a moving block 22. The moving block 22 is movable, and the tooling block 21 is placed within it. The fixing block 13 has a conical through-hole. The light-emitting components 11 are symmetrically arranged downwards along the movement direction of the moving block 22, and the optical detection component 12 is mounted above the axis of the conical hole in the fixing block. The tooling block 22 includes a target area and a background area. The reflected signals of the target area and the background area differ significantly. Preferably, the target area is located at the center of the tooling block. The target area 221 is a centrally symmetrical closed area. The target area can be a circular, rectangular, square, or other symmetrical shape. More preferably, it is a shape that is symmetrical both horizontally and vertically; most preferably, the target area is circular. The target area can be a white reflective area, and the background area can be a black area, or vice versa, as long as the two have a significant difference in their ability to reflect light of the same wavelength.
[0022] The core concept of this embodiment is that the light-emitting component 11 continuously emits light, the object-carrying moving block 22 moves from the initial position along the calibration direction, and the optical detection component 12 continuously receives the light signal reflected by the tooling block 22. During the movement of the object-carrying moving block 22, the area of the light source of the light-emitting component 11 illuminating the tooling block 22 will move from one side of the tooling block 22 to the other side. During the movement, the light source will cross the target area on the tooling block 22, so that the optical detection component 12 forms a set of data with obvious changes through the received reflected light signal. Through the data processing method, the middle position of the peak segment in the filter diagram of this set of data is determined, which corresponds to the middle position of the target area of the tooling block 21. The most crucial aspect of this method is its data processing approach, which involves: processing the signals acquired by the optical detection component to obtain a data sequence; calculating the area of the curve corresponding to the data sequence; setting a horizontally shifting vertical bisector that intersects the curve corresponding to the data sequence; calculating the area of multiple partial curves on one side of each initial vertical bisector; obtaining multiple partial curve areas; and determining the initial vertical bisector located at the middle position of the curve corresponding to the data sequence based on the relationship between the multiple partial curve areas and the total curve area, thereby determining the calibration position for calibrating the carrier to be calibrated.
[0023] In specific embodiments, the calibration carrier can be driven by a driving motor or by other reasonable means; the initial position can be the previous stop position of the optical detection assembly or a designated position preset; the signal collected by the optical detection assembly can be an AD value or other types of optical signal values; the present application does not limit the above specific settings of the optical detection assembly.
[0024] It should be noted that obtaining the data sequence according to the signal collected by the optical detection assembly includes sorting the data sequence collected by the optical detection assembly according to the collection order, Preferably, the calibration carrier is controlled to move from the initial position along the calibration direction, and the data sequence is obtained according to the signal collected by the optical detection assembly, including: The calibration carrier is controlled to move from the initial position along the calibration direction, and the signal is collected at the current collection point after each movement of a preset step distance. Until the signal collection of the preset number of collection points is completed, the signals of all collection points are sorted according to the collection order to obtain the data sequence.
[0025] The initial position in step S1 is determined based on the center position of the calibration carrier. As a specific embodiment, the preset initial position is: .
[0026] wherein, is the calibration step number, the default value of is 0; is the preset collection step distance; is the preset number of collection points. The preset values such as the preset collection step distance and the preset number in the present application can be determined according to actual application conditions. Preferably, the preset collection step distance is an odd number.
[0027] The carrier movement block 22 moves along the calibration direction by a preset step distance Each time the carrier movement block 22 moves by a step distance, the light-emitting assembly 11 is turned on, and the data of the optical detection assembly 12 is collected at the same time. Until the preset number of collection points in the calibration direction is collected, the signals of all collection points are sorted according to the collection order to obtain the data sequence.
[0028] S2, calculate the total area of the curve corresponding to the data sequence; In the present embodiment, as shown in Figure 3 the curve corresponding to the data sequence is established in a coordinate system with the horizontal axis as the signal collection point position and the vertical axis as the photosensitive signal value. Step S2 calculates the total area of the curve corresponding to the data sequence, specifically: calculating the total area of the curve corresponding to the data sequence above the horizontal axis.
[0029] S3, set the initial vertical bisector of the lateral movement, the initial vertical bisector intersects the curve corresponding to the data sequence; It should be noted that, as Figure 4 shown, in the coordinate system of the curve corresponding to the data sequence, the initial vertical bisector is set, the initial vertical bisector intersects the curve corresponding to the data sequence, and the initial vertical bisector moves laterally from one side of the curve corresponding to the data sequence. Each step of movement can be regarded as an independent vertical bisector. During the movement, the initial vertical bisector will divide the total area of the curve corresponding to the data sequence into two parts, the left and right curve areas.
[0030] S4, calculate the partial curve area of the curve corresponding to the data sequence on each initial vertical bisector; As Figure 4 shown, as an embodiment, the partial curve area on the left side of each initial vertical bisector is calculated, and a plurality of partial curve areas can be obtained. Similarly, the partial curve area on the right side of the initial vertical bisector can also be calculated.
[0031] S5, determine the initial vertical bisector located in the middle position of the curve corresponding to the data sequence as the final vertical bisector according to the relationship between the plurality of partial curve areas and the total curve area.
[0032] In a specific embodiment, step S5 comprises: S51, judge the relationship between the partial curve area and the total curve area; S52, select the initial vertical bisector corresponding to the partial curve area closest to half of the total curve area as the final vertical bisector.
[0033] In this embodiment, according to the idea of the present application, when the partial curve area is as close as possible to half of the total curve area, the vertical bisector is also as close as possible to the middle position. The most ideal case is that the partial curve area is equal to half of the total curve area, but in combination with the actual situation, this special position may not be detected.
[0034] Therefore, in one embodiment, the judgment can be made by the following way: calculating the area above the horizontal axis of the curve corresponding to the data sequence, using a moving initial vertical bisector, the initial vertical bisector divides the area above the horizontal axis of the curve corresponding to the data sequence into two parts, and the position with the smallest difference between the left and right areas is the final bisector position Or, calculate the total area S_all of the curve corresponding to the data sequence above the horizontal axis, and then scan the initial bisector from left to right along the curve corresponding to the data sequence, and calculate the left area S_left at the same time. When the left area first reaches more than half of the total area (S_all / 2), the scanning is ended, and the middle position of the curve corresponding to the data sequence at the end of the scanning is taken as the final vertical bisector.
[0035] In one embodiment, the final vertical bisector determination method specifically comprises: comparing the difference between the left area S_left1 and S_left2 before and after the jump-out scanning and half of the total area, and taking the absolute value of the smaller difference as the final bisector position. Or, the calculated multiple left areas are respectively subtracted from half of the total area, and the bisector position corresponding to the left area with the smallest difference is taken as the final vertical bisector position.
[0036] S6. Taking the final vertical bisector position as the calibration position, position calibration is performed on the to-be-calibrated carrier.
[0037] As an implementation manner, the step S6 comprises: obtaining a compensation distance according to the vertical bisector position, a preset step distance, a preset acquisition number and an initial position, and performing position calibration on the to-be-calibrated carrier based on the compensation distance. The compensation distance is calculated according to the device hardware related parameters, such as the moving step number and moving interval of the to-be-calibrated carrier under the motor driving.
[0038] The compensation distance is calculated as follows:
[0039] In the formula, the final vertical bisector position is taken as ; the default calibration step number is taken as 0; the preset acquisition step distance is taken as ; and the preset number of acquisition points is taken as .
[0040] After the compensation distance is obtained, position calibration is performed on the to-be-detected position, and the original coordinates of the to-be-detected position are taken as . For example, the original coordinates of the to-be-detected position are taken as , , and the calibrated coordinates are taken as + , .
[0041] This method uses the vertical bisector of the area on both sides that satisfies the relationship between the two sides as the calibration position to calibrate the carrier to be calibrated. Compared with the existing technology, the curve area-based bisector algorithm fully considers the actual shape of the curve corresponding to the data sequence, so that the middle position of the curve corresponding to the determined sequence is closer to the true geometric center of the target area. It can avoid the error caused by relying solely on the peak or trough position for judgment, and significantly improve the calibration accuracy and stability.
[0042] As one implementation method, in this embodiment of the application, the area of the curve corresponding to the data sequence calculated in steps S2 and S4 includes: S21. Perform differential calculation on the data sequence to obtain the derivative sequence and determine the peak and trough positions; like Figure 2 As shown, in step S21, the data sequence is differentiated to obtain the derivative sequence. Based on the derivative curve corresponding to the derivative sequence, the peak position and the trough position are determined. The peak position is the position of the maximum value of the derivative d1, and the trough position is the position of the minimum value of the derivative d2, which correspond to the positions where the positive and negative changes of the acquired signal value are the greatest, respectively.
[0043] S22. Set the initial horizontal intercept line according to the position of the wave crest and the position of the wave trough; Step S22 includes: comparing the signal value corresponding to the peak position and the signal value corresponding to the trough position, and setting an initial horizontal intercept line based on the smaller of the two values.
[0044] It should be noted that, as Figure 2 As shown, the original signal values corresponding to the peak and trough positions are compared, and the smaller value is taken as the initial horizontal intercept line L_line. That is, the initial horizontal intercept line is determined based on the signal value at the position where the positive and negative directions of the signal value change the most. The initial horizontal intercept line is set perpendicular to the initial vertical bisector.
[0045] S23. Adjust the initial horizontal intercept line until the number of intersections between the initial horizontal signal intercept line and the curve corresponding to the data sequence is the preset number of intersections, and then take the corresponding initial horizontal signal intercept line as the final horizontal intercept line. In a specific embodiment, the preset number of intersection points in step S23 is 2. The method for determining the number of intersection points between the initial intercept line and the curve corresponding to the data sequence is as follows: Multiply the difference between two adjacent signal values in the data sequence and the initial horizontal signal intercept line; if the product is less than or equal to 0, then that point is considered an intersection. The specific algorithm is as follows: (RX(i)-L_line)*(Rx(i+l) - L_line)<= 0 In the formula, RX(i) is the value of the i th signal in the data sequence, and RX(i+1) is the value of the i+1 th signal in the data sequence. Horizontal intercept line eligibility determination: determine the number of intersection points of the current initial horizontal intercept line and the curve corresponding to the data sequence. If the number of intersection points is equal to 2, it is determined that the intercept line is eligible. If it is not equal to 2, the intercept line is moved upward (L_line = L_line + 1) and re-determined until the number of intersection points is equal to 2, and the corresponding initial horizontal intercept line is determined as the final horizontal intercept line.
[0046] Further, it is also necessary to determine whether the above two intersection points are located on both sides of the data sequence curve to ensure the relative accuracy of the position of the horizontal intercept line. There are many specific determination methods, such as first determining the peak position of the data sequence curve, and then comparing the signal values of the two intersection points with the signal value of the peak position. If the signal values of the two intersection points are distributed on different sides of the peak, it is determined that the position of the horizontal intercept line is accurate, otherwise the position of the horizontal intercept line needs to be reselected.
[0047] S24, the partial curve area and the total curve area are both area of the region defined above the final horizontal intercept line.
[0048] It should be noted that the partial curve area is the area of the closed region formed between the curve corresponding to the data sequence and the final vertical solution curve and the final horizontal intercept line; and the total curve area is the area of the closed region formed between the curve corresponding to the data sequence and the final horizontal intercept line.
[0049] Compared with directly calculating the area between the curve corresponding to the data sequence, the horizontal axis and the initial vertical bisector, the area calculation method based on the final horizontal intercept line in the embodiment improves the accuracy of the area calculation result, thereby improving the accuracy of the calibration.
[0050] As an implementation manner, in the embodiment of the application, step S3 comprises: S31, determining a preset starting point; S32, moving the initial vertical bisector horizontally from the preset starting point. Each time the initial vertical bisector is moved, the partial curve area of the curve corresponding to the data sequence on one side of the initial vertical bisector is calculated to obtain a plurality of partial curve areas.
[0051] Further, as an implementation manner, step S31 comprises: S311, taking one of the intersection points of the final horizontal intercept line and the curve corresponding to the data sequence as the preset starting point.
[0052] It should be noted that, according to the intersection of the final horizontal intercept line and the curve corresponding to the data sequence in step S311, the preset starting point of the initial vertical bisector is moved horizontally, that is, one of the positions where the signal value changes from positive to negative direction is moved, which can effectively reduce the area calculation amount. Compared with moving from the origin of the coordinate system or from one end of the curve corresponding to the data sequence, the calibration position can be found faster, and the efficiency of obtaining the calibration position is improved.
[0053] As another embodiment, step S31 comprises: S312, taking the maximum or minimum value of the derivative sequence as the starting position, finding the first position in the derivative sequence where the absolute value of the derivative is less than or equal to the preset peak flat section threshold as the preset starting point.
[0054] In actual application, if the maximum value of the derivative sequence is taken as the starting point, the value is searched to the right along the derivative curve; if the minimum value of the derivative curve is taken as the starting point, the value is searched to the left along the derivative curve. Specifically, taking the maximum value of the derivative sequence as an example, the starting position of the peak flat section is determined as follows: using the characteristic that the signal value of the peak flat section fluctuates less, the peak position (the maximum value of the derivative sequence) or the valley position (the minimum value of the derivative sequence) is searched to the right, and the first position where the absolute value of the derivative is less than or equal to the preset peak flat section threshold is found as the starting position of the peak flat section of the curve corresponding to the data sequence. The preset peak flat section threshold is a relatively small value, which represents the allowable range of the "flat section" fluctuation. The smaller the value, the more stable the "flat section" is considered, the more strict the determination is, and the larger the value is, the more relaxed it is. The value can be determined according to the actual trend of the original reflected light signal combined with experience and fault tolerance requirements. Selecting the peak flat section starting position of the curve corresponding to the data sequence as the preset starting point of the initial bisector can further improve the area calculation efficiency.
[0055] As an embodiment, the method determines the preset intersection point through step S311, and obtains the final vertical bisector position as the calibration position by calculating the area of the curve corresponding to the data sequence above the final intercept line in the manner that both the partial curve area and the total curve area belong to the area defined above the final horizontal intercept line.
[0056] In specific embodiments, as shown in Figure 4 the area of the curve corresponding to the data sequence above the final intercept line is calculated by using an initial vertical bisector that is moved, the initial vertical bisector divides the curve corresponding to the data sequence above the final intercept line into two parts, and the position where the area difference between the left and right is the smallest is the final bisector position The specific process is as follows: calculating the total area S_all of the curve corresponding to the data sequence above the final horizontal intercept line, and scanning the initial bisector from the preset starting point from left to right along the curve corresponding to the data sequence, while calculating the area S_left on the left, and when the area on the left is greater than or equal to half of the total area (S_all / 2), ending the scanning, and taking the middle position of the curve corresponding to the data sequence at the end of the scanning as the final vertical bisector.
[0057] As another implementation, the method determines the preset intersection point through step S312, and obtains the final vertical bisector position as the calibration position by taking the area of the partial curve and the total area of the curve as the area of the region defined above the final horizontal intercept line.
[0058] In the embodiment, the area between the curve corresponding to the data sequence, the horizontal axis and the initial vertical bisector is directly calculated, and the accuracy of the area calculation result is improved based on the final horizontal intercept line to improve the accuracy of the calibration; meanwhile, the start position of the flat section of the peak of the curve corresponding to the data sequence is selected as the preset starting point to further improve the area calculation efficiency.
[0059] As another implementation, step S31 includes: deriving the data sequence to obtain a derivative sequence; taking the maximum value or the minimum value of the derivative sequence as the start position, and finding the first position with an absolute value less than or equal to a preset peak flat section threshold in the derivative sequence as the preset starting point.
[0060] As another implementation, step S31 includes: deriving the data sequence to obtain a derivative sequence and determine peak positions and valley positions; setting an initial horizontal intercept line according to the peak positions and the valley positions determined by the derivative sequence; adjusting the initial horizontal intercept line until the number of intersections between the initial horizontal signal intercept line and the curve corresponding to the data sequence is the preset number of intersections, and taking the corresponding initial horizontal signal intercept line as the final horizontal intercept line; taking one of the intersections between the final horizontal intercept line and the curve corresponding to the data sequence as the preset starting point.
[0061] As another implementation, the method determines the preset intersection point through S311, and obtains the final vertical bisector position as the calibration position by taking the area of the partial curve and the total area of the curve as the area of the region defined above the horizontal axis.
[0062] As another implementation, the method determines the preset intersection point by S312, and obtains the final vertical bisector position as the calibration position by taking the area of the region defined by the partial curve areas and the total curve area as the curve area corresponding to the data sequence as the calculation data.
[0063] The application also provides another position calibration method, comprising: T1, moving the carrier to be calibrated from a first initial position along a first orthogonal direction, obtaining a first data sequence according to the first signal collected by the optical detection assembly; calculating a first total curve area corresponding to the first data sequence; setting a first initial vertical bisector for horizontal movement, the first initial vertical bisector intersects the curve corresponding to the first data sequence; calculating a plurality of first partial curve areas of the curve corresponding to the first data sequence on each side of the first initial vertical bisector; determining the first initial vertical bisector located at the middle position of the curve corresponding to the first data sequence as the first final vertical bisector according to the relationship between the plurality of first partial curve areas and the first total curve area; and taking the position of the first final vertical bisector as the calibration position of the first orthogonal direction; In specific embodiments, in the detection and calibration mechanism as shown in Figure 2 , the first orthogonal direction of the calibration mechanism is the X direction, and the second orthogonal direction is the Y direction. The first initial position in T1 is determined with the center position of the carrier to be calibrated as the reference, and the coordinates of the first initial position are: The default values of n and m are 0. is the preset collection step distance in the X direction. is the preset number of collection points in the X direction. The preset values such as the preset collection step distance and the preset number in the application can be determined according to the actual application. Preferably, the preset collection step distance is an odd number.
[0064] The object moving block 22 moves along the X direction by one step at a preset step distance , and each time it moves by one step distance, the light emitting assembly 11 is turned on, and the data of the optical detection assembly 12 is collected at the same time, until the preset number of collection points in the X direction are collected, and the first data sequence is obtained by sorting the first signals of all collection points in the collection order.
[0065] The specific calibration step T1 based on the X direction is consistent with the implementation manner in steps S1-S6, and details are not repeated here. In step T1, the compensation distance of the first orthogonal direction is obtained according to the first vertical bisector position, the preset step distance, the preset collection number and the initial position, and the position of the to-be-calibrated carrier is calibrated based on the compensation distance of the first orthogonal direction. The calculation method of the compensation distance of the first orthogonal direction is as follows:
[0066] In the formula, the first final vertical bisector position is The calibration step number of the X direction is 0 by default. The preset collection step distance of the X direction is The preset number of collection points of the X direction is
[0067] T2, determine the second initial position according to the first orthogonal direction calibration position, control the to-be-calibrated carrier to move along the second orthogonal direction from the second initial position, and obtain the second data sequence according to the second signal collected by the optical detection assembly; calculate the second curve total area corresponding to the second data sequence; set the second initial vertical bisector of the transverse movement, the second initial vertical bisector intersects the curve corresponding to the second data sequence; calculate the plurality of second partial curve areas on each side of the second initial vertical bisector corresponding to the curve of the second data sequence; determine the second initial vertical bisector located in the middle position of the curve corresponding to the second data sequence as the second final vertical bisector according to the relationship between the plurality of second partial curve areas and the second curve total area; and take the second final vertical bisector position as the second orthogonal direction calibration position. It should be noted that the second initial position of the Y direction calibration is determined according to the first orthogonal direction calibration position of the X axis direction. The second initial position is determined according to the compensation distance of the first orthogonal direction The coordinates of the second initial position are as follows: In the formula, the calibration step number of the Y direction is The default value of the calibration step number of the Y direction is 0. The preset collection step distance of the Y direction is The preset number of collection points of the Y direction is. Preferably, the preset collection step distance is an odd number.
[0068] The specific calibration step T2 based on the Y direction is consistent with the implementation manner of steps S1-S6, and details are not repeated here.
[0069] T3, position calibration is performed on the to-be-calibrated carrier according to the first orthogonal direction calibration position and the second orthogonal direction calibration position.
[0070] In actual application, step T3 comprises: obtaining a compensation distance in the first orthogonal direction according to the first orthogonal direction calibration position; obtaining a compensation distance in the second orthogonal direction according to the second orthogonal direction calibration position; performing position calibration on the to-be-calibrated carrier according to the compensation distance in the first orthogonal direction and the compensation distance in the second orthogonal direction.
[0071] In specific embodiments, the compensation distance in the first orthogonal direction is obtained according to the second vertical bisector position, a preset step distance, a preset number of acquisition times and an initial position, and the position calibration is performed on the to-be-calibrated carrier based on the compensation distance in the second orthogonal direction. The compensation distance in the second orthogonal direction is calculated as follows:
[0072] In the formula, P2 is the middle position in the second orthogonal direction; is the middle position in the second orthogonal direction; is the calibration step number in the Y direction, the default value of P0 is 0; is the preset acquisition step distance in the Y direction; is the preset number of acquisition points in the Y direction.
[0073] After the compensation distance in the first orthogonal direction and the compensation distance in the second orthogonal direction are obtained, position calibration is performed on the to-be-detected position, taking the original coordinates of the to-be-detected position as an example, the calibrated coordinates are , . , .
[0074] It should be noted that, by determining the second initial position according to the middle position in the first orthogonal direction and then calibrating the second orthogonal direction, the application can eliminate the influence of calibration sequence on the detection result, effectively solving the problem of inconsistent calibration results of the same axis caused by the coupling of calibration sequence of two-axis directions in the prior art.
[0075] The present application effectively solves the problems of inconsistent calibration results of the same axis, insufficient positioning accuracy and poor calibration stability caused by the sequence coupling of two-axis direction calibration in the prior art by independently calibrating the calibration carrier in the first orthogonal direction and the second orthogonal direction based on the area method, realizes the effect that the two-axis calibration results are not affected by the sequence and the repeated calibration stability is better, and significantly improves the accuracy of detection position calibration.
[0076] In the present application, the effectiveness of the method is also proved by experimental data. First, the experimental environment and the corresponding experimental parameter settings are introduced, and then the detailed experimental results and the corresponding experimental result explanations are given.
[0077] 1. Calibration accuracy comparison: the same detection calibration mechanism, the same tool block and the same preset step distance (20 steps) are used in the prior art and the present scheme respectively, and calibration is performed in the Y direction, as shown in Figure 5 The results show that the compensation distance of the prior art is -172, and the compensation distance of the present method is -54, there is a difference of 120 steps (6 step distances) between the two calibration methods, and after calibration, the present method is more centered in the Y direction.
[0078] 2. Calibration stability comparison: multiple detection calibration mechanisms (5) are used in the prior art and the present scheme respectively, the same calibration tool block is repeatedly calibrated 10 times, and the same calibration step distance (20 steps) is used to compare the stability of the two different calibration methods, and the results of the prior art and the present scheme are shown in Table 1 and Table 2 respectively: Table 1. Fluctuation of multiple calibration results of the prior art
[0079] Table 2. Fluctuation of multiple calibration results of the present method
[0080] The results show that even if the same detection calibration mechanism and the same calibration tool block are used, the calibration results of the prior art still have certain fluctuations, while the present method has better calibration repeatability.
[0081] 3. Calibration sequence consistency comparison: multiple detection calibration mechanisms (12) are used, and the calibration results of the X direction are compared by calibrating X first and then calibrating Y, and calibrating Y first and then calibrating X, and the results are as follows: Table 3. Calibration sequence consistency of the prior art and the present method
[0082] The results show that the calibration results of the prior art are easily affected by the calibration sequence in the same direction (X direction), while the present method is not affected by the calibration sequence.
[0083] Conclusion: Compared with the prior art, the method has higher calibration accuracy, stronger calibration stability, and calibration results are not affected by the order in two-axis calibration.
[0084] In the embodiments provided in the present application, it should be understood that the disclosed method and system can be implemented in other manners. The above described system embodiments are merely schematic, for example, the division of the modules is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0085] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instructions and related hardware, and the above-mentioned program instructions can be stored in a computer readable storage medium, and the program instructions are executed to execute the steps of the above-mentioned method embodiments; and the above-mentioned storage medium includes mobile storage equipment, read only memory (Read Only Memory, ROM), magnetic disc or optical disc and various storage program codes.
[0086] It should be understood that if "system", "device", "unit" and / or "module" are used in the present application, it is only a method for distinguishing different components, elements, parts, portions or assemblies of different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0087] As shown in the present application and claims, unless the context clearly indicates otherwise, "one", "a", "an" and / or "the" do not refer to the singular, but also include the plural. Generally, the terms "comprise" and "include" only indicate the inclusion of the steps and elements explicitly identified, and these steps and elements do not constitute an exclusive list, and the method or device can also include other steps or elements. The element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, product or device comprising the element.
[0088] Furthermore, the terms "first", "second", etc. are used herein only to describe one implementation, and do not imply either an actual temporal sequence or an order of importance, unless specifically stated otherwise. Thus, a feature defined with a "first" and a "second" can implicitly or explicitly include one or more of these features. The meaning of "a", "an", and "the" includes singular and plural referents unless the context clearly dictates otherwise.
[0089] If flow diagrams are used to describe the embodiments herein, it will be understood that each block of the flow diagram, and combinations of blocks in the flow diagram, can be implemented by various means, such as hardware, software, firmware, or any combination thereof. It will also be understood that each block of the flow diagram and / or combinations of blocks in the flow diagram can be implemented by electronic hardware, computer software, or combinations of both. Furthermore, it will be understood that the flow diagrams can include branches and loops not specifically shown, and that the order of the blocks can be changed. It will also be understood that all these changes
[0090] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many embodiments will be apparent to those of skill in the art upon reading the above description. The scope of the application should, therefore, be determined not with reference to the above description, but instead with reference to the appended claims, along with their full scope of equivalents.
Claims
1. A method for calibrating a detection position, characterized in that, include: The carrier to be calibrated is controlled to move from its initial position along the calibration direction, and a data sequence is obtained based on the signals collected by the optical detection components. Calculate the total area of the curves corresponding to the data sequence; An initial vertical bisector is set for the horizontal movement, and the initial vertical bisector intersects the curve corresponding to the data sequence; Calculate the area of the curve corresponding to the data sequence on one side of each initial vertical bisector; Using the relationship between the areas of the multiple partial curves and the total area of the curves, an initial vertical bisector located at the middle position of the curve corresponding to the data sequence is determined, which serves as the final vertical bisector. The final vertical bisector position is used as the calibration position to calibrate the carrier to be calibrated.
2. The detection position calibration method according to claim 1, characterized in that, The calculation of the area of multiple portions of the curve corresponding to the data sequence on one side of each initial vertical bisector includes: Determine the preset starting point; The initial vertical bisector is moved laterally from the preset starting point. Each time it is moved, the area of the curve corresponding to the data sequence on one side of the initial vertical bisector is calculated to obtain multiple areas of the curve.
3. The detection position calibration method according to claim 2, characterized in that, Calculating the area of the curve corresponding to the data sequence includes: The data sequence is differentially differentiated to obtain the derivative sequence and determine the peak and trough positions; An initial horizontal cut-off line is set based on the peak position and the trough position; Adjust the initial horizontal intercept line until the number of intersections between the initial horizontal signal intercept line and the curve corresponding to the data sequence is a preset number of intersections, then use the corresponding initial horizontal signal intercept line as the final horizontal intercept line. Both the area of the partial curve and the total area of the curve belong to the area defined above the final horizontal cut-off line.
4. The detection position calibration method according to claim 3, characterized in that, The determination of the preset starting point includes: One of the intersection points of the final horizontal intercept line and the curve corresponding to the data sequence is taken as the preset starting point.
5. The detection position calibration method according to claim 3, characterized in that, The determination of the preset starting point includes: Using the maximum or minimum value of the derivative sequence as the starting position, find the position in the derivative sequence where the absolute value of the first derivative is less than or equal to a preset peak-to-flat-segment threshold, and use this position as the preset starting point.
6. The detection position calibration method according to claim 2, characterized in that, The determination of the preset starting point includes: By performing differential calculation on the data sequence, a derivative sequence is obtained; Using the maximum or minimum value of the derivative sequence as the starting position, find the position in the derivative sequence where the absolute value of the first derivative is less than or equal to a preset peak-to-flat-segment threshold, and use this position as the preset starting point.
7. The detection position calibration method according to claim 2, characterized in that, The determination of the preset starting point includes: The data sequence is differentially differentiated to obtain the derivative sequence and determine the peak and trough positions; The initial horizontal intercept line is set based on the peak and trough positions determined by the derivative sequence; Adjust the initial horizontal intercept line until the number of intersections between the initial horizontal signal intercept line and the curve corresponding to the data sequence is a preset number of intersections, then use the corresponding initial horizontal signal intercept line as the final horizontal intercept line. One of the intersection points of the final horizontal intercept line and the curve corresponding to the data sequence is taken as the preset starting point.
8. The detection position calibration method according to claim 3 or 7, characterized in that, The step of setting an initial horizontal intercept line based on the peak position and the trough position includes: The signal values corresponding to the peak positions and the signal values corresponding to the trough positions are compared, and the initial horizontal intercept line is set based on the smaller of the two values.
9. The detection position calibration method according to any one of claims 1-7, characterized in that, The step of determining the initial vertical bisector located at the midpoint of the curve corresponding to the data sequence, using the relationship between the areas of the multiple partial curves and the total area of the curve, as the final vertical bisector, includes: Determine the relationship between the area of the partial curve and the total area of the curve; The initial vertical bisector corresponding to the partial curve area that is closest to half of the total curve area is selected as the final vertical bisector.
10. A method for calibrating a detection position, characterized in that, include: The carrier to be calibrated is controlled to move from a first initial position along a first orthogonal direction, and the first final vertical bisector is determined by the position calibration method according to any one of claims 1-9; The position of the first final vertical bisector is used as the first orthogonal direction calibration position; The second initial position is determined based on the first orthogonal direction calibration position, and the second final vertical bisector is determined by the position calibration method according to any one of claims 1-9; The position of the second final vertical bisector is used as the second orthogonal direction calibration position; The position of the carrier to be calibrated is calibrated according to the first orthogonal direction calibration position and the second orthogonal direction calibration position.