Method, device and computer equipment for determining attitude correction parameters

By using calibration blocks and image processing technology, the attitude correction parameters are calculated and optimized, and the problem of difficult to guarantee the laser perpendicularity in rail profile detection is solved, and high-precision rail profile detection is achieved.

CN114332206BActive Publication Date: 2025-03-04BEIJING IMAP TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111583872.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-03-04
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

In rail profile detection, due to installation accuracy and tolerance, the perpendicularity between the laser and the rail is difficult to ensure, resulting in errors in the detected rail profile and actual profile, and the spatial position and attitude of the laser need to be corrected.

Method used

By using the calibration block as a reference, the calibration block image data collected by the rail profile detection device is obtained, the profile of the calibration block is determined, the stretching parameters are calculated, and the attitude correction parameters are obtained by optimizing the objective function, which is used to correct the spatial position attitude of the laser.

Benefits of technology

High-precision correction of the spatial position attitude of the laser in the rail profile detection device is achieved, improving the accuracy of the detected rail profile and reducing errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332206B_ABST
    Figure CN114332206B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a method, device and computer equipment for determining attitude correction parameters. The method includes: obtaining image data of a calibration block collected by a rail profile detection device; determining the profile of the calibration block in the image data; calculating stretching parameters according to the profile of the calibration block; optimizing the objective function to obtain attitude correction parameters, the objective function is used to measure the difference between the image data before and after the stretching transformation according to the stretching parameters, and the attitude correction parameters are used to correct the position attitude of the rail profile detection device. The embodiments of this specification can obtain attitude correction parameters, which provides convenience for correcting the spatial position attitude of the laser in the rail profile detection device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and in particular, to a method, device and computer equipment for determining posture correction parameters. Background Art

[0002] During the operation of railway trains, the rails bear all the loads from the vehicles, and the matching relationship between the wheels and rails directly affects the safety of train operation. The profile of the rails is an important part of the wheel-rail relationship. The engineering department needs to master the profile status of the rails along the entire line in order to formulate reasonable maintenance and repair strategies to ensure the safety, economy and comfort of railway operation. At present, the rail profile detection device can be used to detect the rail profile in a non-contact manner based on the principle of structured light. Specifically, cameras and lasers can be arranged on the inside and outside of the rails respectively, and the intersection of the structured light and the rails can be obtained through the camera. The images of the inner and outer rails are converted to the world coordinate system using the calibrated camera parameters and the conversion relationship between the image coordinate system and the world coordinate system, and the inner and outer rail profiles are spliced ​​into the full cross-sectional profile of the rail, thereby realizing the detection of the full cross-sectional profile of the rail.

[0003] The detection accuracy of the rail profile detection device directly affects the maintenance of railway lines, so it is necessary to use reasonable technical means to ensure the accuracy of the detection. However, in actual engineering applications, due to installation accuracy, tolerance and other reasons, it is impossible to ensure that the laser is perfectly perpendicular to the rail. As a result, there is a certain error between the detected rail profile and the actual rail profile. Summary of the invention

[0004] The embodiments of this specification provide a method, device and computer equipment for determining posture correction parameters to obtain posture correction parameters, which facilitates the correction of the spatial position and posture of a laser in a rail profile detection device.

[0005] A first aspect of the embodiments of this specification provides a method for determining a posture correction parameter, comprising:

[0006] Acquiring image data of a calibration block collected by a rail profile detection device;

[0007] determining a contour of a calibration block in the image data;

[0008] Calculate stretching parameters based on the profile of the calibration block;

[0009] The objective function is optimized to obtain posture correction parameters, wherein the objective function is used to measure the difference between image data before and after stretching transformation according to the stretching parameters, and the posture correction parameters are used to correct the position posture of the rail profile detection device.

[0010] A second aspect of the embodiments of this specification provides a device for determining a posture correction parameter, including:

[0011] An acquisition unit, used to acquire image data of the calibration block collected by the rail profile detection device;

[0012] A determination unit, used to determine the profile data of the calibration block according to the image data;

[0013] A calculation unit, used for calculating stretching parameters according to the profile data;

[0014] The optimization unit is used to optimize the objective function to obtain the posture correction parameters, wherein the objective function is used to measure the difference between the image data before and after the stretching transformation according to the stretching parameters, and the posture correction parameters are used to correct the position posture of the rail profile detection device.

[0015] A third aspect of the embodiments of this specification provides a computer device, including:

[0016] at least one processor;

[0017] A memory storing program instructions, wherein the program instructions are configured to be suitable for being executed by the at least one processor, and the program instructions include instructions for executing the method as described in the first aspect.

[0018] The technical solution provided in the embodiment of this specification uses the calibration block as a reference object, and obtains the posture correction parameters by processing the image data of the calibration block collected by the rail profile detection device. The posture correction parameters can be used to correct the spatial position posture of the laser in the rail profile detection device. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 Schematic diagram of the flow of the method for determining the posture correction parameters in the embodiment of this specification;

[0021] Figure 2 Schematic diagram of a rail profile detection device in an embodiment of this specification;

[0022] Figure 3 A schematic diagram of a step block in an embodiment of this specification;

[0023] Figure 4aThe image data of one side of the step block in the embodiment of this specification;

[0024] Figure 4b The image data of the other side of the step block in the embodiment of this specification;

[0025] Figure 5 A schematic diagram of detecting a straight line from image data in the prior art;

[0026] Figure 6a For Figure 4a The schematic diagram of the light bar line segment after the intersection point is removed from the image data shown;

[0027] Figure 6b For Figure 4b The schematic diagram of the light bar line segment after the intersection point is removed from the image data shown;

[0028] Figure 7 A schematic diagram of a curve formed by multiple center points of a light bar segment in an embodiment of this specification;

[0029] Figure 8 A schematic diagram of a process for optimizing an objective function in an embodiment of this specification;

[0030] Fig. 9 This is a schematic diagram of the structure of a device for determining posture correction parameters in an embodiment of this specification;

[0031] Fig.10 Schematic diagram of the structure of a computer device in an embodiment of this specification. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0033] The prerequisite for the rail profile detection device to successfully obtain the high-precision full-section profile of the rail is that the laser planes on the inside and outside of the rail can be coplanar with high precision, otherwise it may cause the rail profile to bifurcate, the inside and outside to be different in size, etc. However, in actual engineering applications, the laser plane is not an ideal plane with no thickness, and the depth of field is not infinite, so it is difficult to achieve perfect parallel coplanarity of the lasers on both sides. In addition, due to installation accuracy, tolerance and other reasons, the lasers on both sides cannot guarantee perfect perpendicularity to the rails. The combined effect of the above factors means that there is a certain error between the detected rail profile and the actual rail profile, and the spatial position and posture of the laser need to be corrected to obtain a high-precision full-section profile of the rail.

[0034] The inventors discovered that the non-perpendicularity between the laser and the rail, viewed from the laser side, is equivalent to the rail rolling, nodding, and shaking its head. Among them, rolling does not affect the rail profile, nodding will cause the rail to stretch longitudinally, and shaking the head will cause the rail to stretch laterally. Therefore, the change in the spatial position and posture of the laser can be converted into a stretching transformation of the actual profile in a two-dimensional plane. Based on the above considerations, the embodiments of this specification utilize a calibration block to obtain posture correction parameters by calculating the longitudinal and transverse stretching coefficients, thereby correcting the posture of the laser's spatial position.

[0035] See also Figure 1 The embodiment of this specification provides a method for determining posture correction parameters, including the following steps.

[0036] Step S1: Acquire image data of a calibration block collected by a rail profile detection device.

[0037] In some embodiments, see Figure 2 The rail profile detection device may include two groups of sub-devices. The two groups of sub-devices are used to capture rail images from both inside and outside of the rail. Each group of sub-devices may include a laser and a camera.

[0038] In some embodiments, the calibration block can be used as a reference for correcting the attitude of the laser's spatial position. The calibration block can have clear horizontal and vertical features. Figure 3 The calibration block may include a step block. Two groups of steps are symmetrically arranged on the step block. Each group of steps may include at least three horizontal edges and at least three longitudinal edges, and the at least three horizontal edges and at least three longitudinal edges may form at least two steps.

[0039] It is worth noting that the horizontal edge and the longitudinal edge may be perpendicular or approximately perpendicular. For example, the angle formed by the horizontal edge and the longitudinal edge may be 90°, 89° or 91°.

[0040] In some embodiments, the image data of the calibration block can be collected by the rail profile detection device, and the image data collected by the rail profile detection device can be obtained. The image data can be grayscale image data or color image data.

[0041] One sub-device in the rail profile detection device can collect image data on one side of the calibration block, and one collected image data can be obtained. Alternatively, two sub-devices in the rail profile detection device can collect image data on both sides of the calibration block, and two collected image data can be obtained. For example, the calibration block includes a step block. The step block can be placed at the actual position of the rail so that the two groups of steps of the step block are respectively located at the actual spatial positions of the inner and outer rails of the rail. The image data of the two groups of steps of the step block can be collected from both sides by the two sub-devices in the rail profile detection device. Two image data collected by the rail profile detection device can be obtained. The two image data are as follows: Figure 4a He Ru Figure 4b shown.

[0042] Step S2: Determine the outline of the calibration block in the image data.

[0043] In some embodiments, in the related art, methods such as Hough transform can be used to detect straight lines from image data to obtain the outline of the calibration block. Figure 5 Because of the existence of reflection, the thickness of the line segments in the image data is not uniform. Directly using these straight line detection methods may cause various problems, resulting in insufficient accuracy. To this end, for each acquired image data, the intersection of the light bar segments can be removed from the image data; the center point of the light bar segment can be determined; the center point can be fitted with a straight line to obtain the light bar center line; multiple light bar center lines can be intersected to obtain the outline of the calibration block in the image data. In this way, based on the image data, assisted by the structural features of the calibration block (clear horizontal and vertical features), high-precision profile data of the calibration block can be obtained, which provides convenience for determining the posture correction parameters.

[0044] In some embodiments, the laser has light reflected back and forth in the angle area of ​​the step block, resulting in overexposure and underexposure in the imaging, making the light strip rougher than other areas. When extracting the center point of the light strip, the error is large. To this end, the intersection of the light strip line segments in the image data can be detected, and the intersection of the light strip line segments in the image data can be removed to obtain one or more light strip line segments. For example, in Figure 4a By removing the intersection of the light strip segments from the image data shown in FIG. Figure 6a The image shown. Figure 4b By removing the intersection of the light strip segments from the image data shown in FIG. Figure 6b Image shown.

[0045] Among them, the removing of the intersection of the light strip segments may be to set the pixel value at the intersection to the pixel value of the pixel in the background area. For example, the background area of ​​the image data is black, and the pixel value of the pixel in the background area is 0. The removing of the intersection of the light strip segments may be to set the pixel value at the intersection to 0. In practical applications, considering that the light strip segments at the intersection are rough, the pixel value of the pixel in the area near the intersection may be set to the pixel value of the pixel in the background area. For example, the pixel value of the pixel in the 10% area near the intersection may be set to the pixel value of the pixel in the background area. In addition, the intersection of the light strip segments may be directly removed from the image data. Alternatively, in order to eliminate interference caused by reflection, the image data may be filtered, and the intersection of the light strip segments may be removed from the filtered image data. Specifically, a Gaussian filtering algorithm may be used to filter the image data. The Gaussian filtering algorithm may include the formula Of course, other filtering algorithms may also be used to filter the image data, such as a mean filtering algorithm.

[0046] In some embodiments, the light strip segment is a rough line segment. In order to determine the outline of the calibration block, the center point of the light strip segment needs to be determined. Specifically, the energy center range area of ​​each light strip segment can be determined in the image data; the center point of each light strip segment can be extracted from the energy center range area according to the normal direction. The number of center points of each light strip segment can be multiple. For example, Figure 7 Multiple center points of a light bar segment are shown.

[0047] The energy center of the light strip segment is often at the maximum grayscale value. To this end, for the pixel column in the image data, the pixel with the largest grayscale value can be found as the target pixel; the target pixel can be taken as the center, q pixels can be taken upward and q pixels can be taken downward; the area formed by the target pixel and the 2q pixels can be taken as the energy center range area of ​​the pixel column. The energy center range area of ​​multiple pixel columns in the image data constitutes the energy center range area of ​​the light strip segment. The size of q can be flexibly set according to actual needs, for example, it can be 10 or 11, etc.

[0048] For the pixel point column in the image data, the pixel point with the largest grayscale value can be found as the target pixel point; k pixels can be taken to the left and k pixels can be taken to the right with the target pixel point as the center; a straight line fitting can be performed for the target pixel point and the 2k pixels; the normal direction of the fitting straight line at the target pixel point can be obtained; the grayscale centroid method can be used along the normal direction to extract the grayscale centroid in the energy center range area as the center point of the light strip segment. The multiple grayscale centroids extracted from multiple pixel point columns constitute multiple center points of the light strip segment. The size of k can be flexibly set according to actual needs, for example, it can be any value between 5 and 10.

[0049] For example, point P1 is the pixel with the largest gray value in a certain pixel column. The coordinates of point P1 are (x i ,y i ). You can take point P1 as the center and take k pixels to the left (x i-k ,y i ),…,(x i-1 ,y i ), take k pixels to the right (x i+1 ,y i ),…,(x i+k ,y i ), the least square method can be used to fit the straight line to obtain the straight line y = l k x+c. Among them, n=2k+1. Then, the normal direction of the straight line at point P1 can be in,

[0050] When the grayscale centroid method is used to extract the grayscale centroid in the energy center range area along the normal direction, each pixel point in the normal direction of the energy center range area can participate in the calculation of the grayscale centroid, or a pixel point can be selected every T pixels in a step-by-step manner to participate in the calculation of the grayscale centroid. For example,

[0051] In some embodiments, since the laser itself is not perfectly uniform and the surface of the calibration block is not completely smooth, the center points of the light strip segments cannot form a straight line. Figure 7 The multiple center points of a light strip segment are shown, and the multiple center points of the light strip segment form a curve. Therefore, for each light strip segment, a straight line fitting can be performed on the multiple center points of the light strip segment to obtain the light strip center line corresponding to the light strip segment. For example, the least square method can be used to perform straight line fitting to obtain the light strip center line y=ax+b. m represents the number of center points.

[0052] In some embodiments, the center lines of the light bars corresponding to the plurality of light bar segments may be extended and intersected to obtain the profile of the calibration block. The profile of the calibration block may be understood as the contour shape of the calibration block. In the profile of the calibration block, the transverse line segment represents the transverse feature of the calibration block, the longitudinal line segment represents the longitudinal feature of the calibration block, and the intersection of the transverse line segment and the longitudinal line segment represents the intersection of the transverse feature and the longitudinal feature.

[0053] Step S3: Calculate the stretching parameters according to the outline of the calibration block.

[0054] In some embodiments, the stretching parameters may include a transverse stretching parameter and a longitudinal stretching parameter. Specifically, according to the formula The transverse stretching parameters can be calculated according to the formula Calculate the longitudinal stretch parameter. Where, ξ HL represents the transverse stretching parameter, d represents the sum of the design lengths of the transverse and longitudinal sides of the calibration block, and H L1 represents the calculated length of a horizontal edge in the calibration block, H L2 represents the calculated length of another lateral edge in the calibration block, ξ VL represents the longitudinal stretch parameter, V L1 represents the calculated length of a longitudinal edge in the calibration block, V L2 Represents the calculated length of the other longitudinal edge in the calibration block.

[0055] H L1 It can be used to calculate the length of any horizontal side in the calibration block. L2 The calculated length of any other lateral edge in the calibration block, V L1 It can be the calculated length of any longitudinal edge in the calibration block, V L2 It can be the calculated length of any other longitudinal edge in the calibration block. Wherein, the calculated length can be the length calculated based on the length of the transverse edge / longitudinal edge of the calibration block outline in the image data, using the conversion relationship between the image coordinate system and the world coordinate system. The specific calculation process can refer to the existing technical implementation, such as the technology in OpenCV. For the sake of brevity of the specification, it will not be introduced here.

[0056] Step S4: Optimize the objective function to obtain posture correction parameters, wherein the objective function is used to measure the difference between image data before and after stretching transformation according to the stretching parameters, and the posture correction parameters are used to correct the position posture of the rail profile detection device.

[0057] In some embodiments, the objective function can be expressed as E(R, t) = ∑||p i -Rq i -t|| 2; Where R represents the rotation parameter, t represents the translation parameter, and p i Represents the coordinates of the pixel points in the image data before stretching transformation, q i represents the coordinates of the pixel points in the image data after the stretch transformation. i The coordinates can be (x Li ,y Li ), the transverse stretching parameter may be HL , the longitudinal stretching parameter can be ξ VL Then the q i The coordinates of can be (ξ HL ·x Li ,ξ VL ·y Li ).

[0058] The preset condition may include that the value of the objective function is less than or equal to a threshold. The posture parameter may include a stretching parameter, a rotation parameter, and a translation parameter. The stretching parameter may include a transverse stretching parameter and a longitudinal stretching parameter.

[0059] In some embodiments, see Figure 8 The coordinates of the pixel points in the image data can be corrected according to the stretching parameters to obtain the image data after the stretching transformation; the value of the objective function can be calculated according to the image data before and after the stretching transformation; the stretching parameters can be continuously adjusted until the value of the objective function meets the preset conditions. In practical applications, the ICP algorithm (Iterative Closest Point) can be used to optimize the objective function through multiple iterations.

[0060] In some embodiments, image data on one side of the calibration block can be obtained through step S1. The profile of the calibration block in the image data can be obtained through step S2. The stretching parameters can be calculated according to the profile of the calibration block in the image data through step S3. A set of posture correction parameters can be obtained through step S4. The posture correction parameters can be used to correct the spatial position posture of the laser of a group of sub-devices in the rail profile detection device, thereby correcting the spatial position posture of the single-sided laser. Alternatively, image data on both sides of the calibration block can be obtained through step S1. The profile of the calibration block in two image data can be obtained through step S2. The stretching parameters can be calculated according to the profile of the calibration block in each image data through step S3. Two sets of posture correction parameters can be obtained through step S4. The two sets of posture correction parameters can be used to correct the spatial position posture of the laser of two groups of sub-devices in the rail profile detection device, thereby correcting the spatial position posture of the double-sided laser.

[0061] In some embodiments, the posture parameters may also be verified.

[0062] Specifically, the image data on both sides of the calibration block can be obtained through step S1. The outline of the calibration block in the two image data can be obtained through step S2. The stretching parameters can be calculated according to the outline of the calibration block in each image data through step S3. Two sets of posture correction parameters can be obtained through step S4. The two sets of posture correction parameters can be used to correct the spatial position posture of the lasers of the two groups of sub-devices in the rail profile detection device, thereby realizing the correction of the spatial position posture of the lasers on both sides.

[0063] Then, for each image data, the posture correction parameter corresponding to the image data can be applied to the image data to obtain the corrected image data. Through the two corrected image data, the calculated length of a certain horizontal side of the calibration block (for example, the top horizontal side of the step block) can be obtained, and the calculated length can be compared with the designed length of the horizontal side, and the comparison result can be used as a verification result. The verification result can be used as a reference for the correction result of the spatial position posture of the laser, so as to verify the accuracy of the posture correction parameter. Among them, the comparison of the calculated length with the designed length can include: subtracting or dividing the calculated length from the designed length, etc.

[0064] In some embodiments, the spatial position and posture of the laser can be corrected by posture correction parameters. For example, after correcting the image data on both sides using two sets of posture correction parameters, it is equivalent to converting both sides to the vertical plane of the rail, thereby achieving the coplanarity of the inside and outside of the laser, and then correcting the spatial position and posture of the laser. In practical applications, the image data is corrected using posture correction parameters, and the position coordinates of the pixel points in the image data can be processed using the posture correction parameters. Specifically, for example, the horizontal stretching parameter is multiplied by the horizontal coordinate of the pixel point, and the vertical stretching parameter is multiplied by the vertical coordinate of the pixel point. For another example, the rotation parameter is multiplied by the coordinates of the pixel point, and then the translation parameter is subtracted.

[0065] The method for determining the attitude correction parameters of the embodiment of this specification uses the calibration block as a reference object, and obtains the attitude correction parameters by processing the image data of the calibration block collected by the rail profile detection device. The attitude correction parameters can be used to correct the spatial position attitude of the laser in the rail profile detection device. In this way, when the rail profile detection device is used to detect the rail profile in the future, the spatial position attitude of the laser can be corrected by the attitude correction parameters, thereby improving the accuracy of the detected rail profile.

[0066] See also Fig. 9 The embodiment of this specification also provides a posture correction parameter determination device, including:

[0067] An acquisition unit 91 is used to acquire image data of the calibration block collected by the rail profile detection device;

[0068] A determination unit 92, configured to determine the profile data of the calibration block according to the image data;

[0069] A calculation unit 93, used to calculate stretching parameters according to the profile data;

[0070] The optimization unit 94 is used to optimize the objective function to obtain the posture correction parameters, wherein the objective function is used to measure the difference between the image data before and after the stretching transformation according to the stretching parameters, and the posture correction parameters are used to correct the position posture of the rail profile detection device.

[0071] An embodiment of the computer device of the present specification is introduced below. Fig.10 Schematic diagram of the hardware structure of the computer device in this embodiment. Fig.10 As shown, the computer device may include one or more (only one is shown in the figure) processors, memory and transmission modules. Of course, it can be understood by those skilled in the art that Fig.10 The hardware structure shown is only for illustration and does not limit the hardware structure of the above-mentioned computer device. In practice, the computer device may also include Fig.10 More or fewer component units as shown; or, Fig.10 Different configurations are shown.

[0072] The memory may include a high-speed random access memory; or, it may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory or other non-volatile solid-state memory. Of course, the memory may also include a remotely set network memory. The memory may be used to store program instructions or modules of application software, such as the instructions in this manual. Figure 1 The program instructions or modules of the corresponding embodiment.

[0073] The processor may be implemented in any suitable manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. The processor may read and execute program instructions or modules in the memory.

[0074] The transmission module can be used for transmitting data via a network, for example, via a network such as the Internet, an intranet, a local area network, a mobile communication network, etc.

[0075] This specification also provides an embodiment of a computer storage medium. The computer storage medium includes but is not limited to a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), a memory card, etc. The computer storage medium stores computer program instructions. When the computer program instructions are executed, the following are achieved: Figure 1 The program instructions or modules of the corresponding embodiment.

[0076] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, computer equipment embodiment, and computer storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In addition, it is understandable that after reading this specification document, those skilled in the art can think of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.

[0077] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0078] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0079] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the present specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0080] This specification can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0081] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0082] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.

Claims

1. A method for determining posture correction parameters, comprising: Acquire image data of a calibration block collected by a rail profile detection device; the calibration block includes a step block, on which two groups of steps are symmetrically arranged, and the rail profile detection device includes two groups of sub-devices, and the two groups of sub-devices are used to collect image data of the two groups of steps; determining a contour of a calibration block in the image data; Calculate stretching parameters based on the profile of the calibration block; Optimizing the objective function to obtain a posture correction parameter, wherein the objective function is used to measure the difference between the image data before and after the stretching transformation according to the stretching parameter, and the posture correction parameter is used to correct the position posture of the rail profile detection device; The optimization of the objective function includes: correcting the coordinates of the pixel points in the image data according to the stretching parameters to obtain the image data after the stretching transformation; calculating the value of the objective function according to the image data before and after the stretching transformation; and continuously adjusting the stretching parameters until the value of the objective function meets the preset conditions; The objective function includes E(R, t) = ∑||p i -Rq i -t|| 2 ; Where R represents the rotation parameter, t represents the translation parameter, and p i Represents the coordinates of the pixel points in the image data before stretching transformation, q i Represents the coordinates of the pixel points in the image data after stretching transformation.

2. The method according to claim 1, wherein determining the outline of the calibration block in the image data comprises: removing intersections of light bar line segments in the image data; Determine the center point of the light bar segment; Fit the center point with a straight line to obtain the center line of the light strip; The center lines of multiple light strips are intersected to obtain the outline of the calibration block.

3. The method according to claim 2, wherein determining the center point of the light bar segment comprises: Determine the energy center range area of ​​each light strip line segment in the image data; According to the normal direction, the center point of each light bar segment is extracted from the energy center range area.

4. The method according to claim 1, wherein the stretching parameters include a transverse stretching parameter and a longitudinal stretching parameter; The step of calculating the stretching parameters according to the profile of the calibration block includes: According to the formula Calculate the transverse stretching parameters according to the formula Calculate longitudinal stretch parameters; ξ HL represents the transverse stretching parameter, d represents the sum of the design lengths of the transverse and longitudinal sides of the calibration block, and H L1 represents the calculated length of a horizontal edge in the calibration block, H L2 represents the calculated length of another lateral edge in the calibration block, ξ VL represents the longitudinal stretch parameter, V L1 represents the calculated length of a longitudinal edge in the calibration block, V L2 Represents the calculated length of the other longitudinal edge in the calibration block.

5. The method according to claim 1, wherein the posture correction parameter comprises at least one of the following: Stretch parameters, rotation parameters, translation parameters.

6. A device for determining a posture correction parameter, comprising: an acquisition unit, used for acquiring image data of a calibration block acquired by a rail profile detection device; the calibration block comprises a step block, on which two groups of steps are symmetrically arranged, and the rail profile detection device comprises two groups of sub-devices, and the two groups of sub-devices are used for acquiring image data of the two groups of steps; A determination unit, used to determine the profile data of the calibration block according to the image data; A calculation unit, used for calculating stretching parameters according to the profile data; an optimization unit, used to optimize an objective function to obtain a posture correction parameter, wherein the objective function is used to measure the difference between the image data before and after the stretching transformation according to the stretching parameter, and the posture correction parameter is used to correct the position posture of the rail profile detection device; The optimization of the objective function includes: correcting the coordinates of the pixel points in the image data according to the stretching parameters to obtain the image data after the stretching transformation; calculating the value of the objective function according to the image data before and after the stretching transformation; and continuously adjusting the stretching parameters until the value of the objective function meets the preset conditions; The objective function includes E(R, t) = ∑||p i -Rq i -t|| 2 ; Where R represents the rotation parameter, t represents the translation parameter, and p i Represents the coordinates of the pixel points in the image data before stretching transformation, q i Represents the coordinates of the pixel points in the image data after stretching transformation.

7. A computer device comprising: at least one processor; A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Steel rail contour real-time form identification and distortion calibration method based on three-layer matching

    CN105783779A

  • Image processing-based rail profile detecting device and method

    CN106840033A