Rail wear detection device, rail wear detection method, and program

The rail wear detection device generates pseudo-contours from point cloud data to identify and quantify wear, addressing the lack of wear detection in existing systems and ensuring timely rail maintenance.

JP2026101001APending Publication Date: 2026-06-22KUMONOS CORP

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
KUMONOS CORP
Filing Date
2024-12-10
Publication Date
2026-06-22

AI Technical Summary

Technical Problem

Existing technologies fail to accurately detect the wear amount of railway rails, which is crucial for determining the replacement time and maintaining rail integrity, as they do not provide methods for quantifying rail wear.

Method used

A rail wear detection device and method that generates a pseudo-contour of the rail cross-section from point cloud data, identifies characteristic pseudo-straight sections, matches them with reference contour lines, and calculates wear based on differences between these contours, registering the data for further analysis.

Benefits of technology

Enables accurate detection and quantification of rail wear, facilitating timely replacement and maintaining rail stability and safety by providing a systematic approach to wear assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026101001000001_ABST
    Figure 2026101001000001_ABST
Patent Text Reader

Abstract

Detects the amount of wear on railway tracks. [Solution] This rail wear detection device detects the amount of wear on a railway rail and includes: a generation means (101) that generates a pseudo-contour of the cross-section of a railway rail based on point cloud data included in a region of a predetermined length in the longitudinal direction of the railway rail from three-dimensional point cloud data of a railway track including the railway rail; a identification means (102) that identifies pseudo-straight sections, which are characteristic parts of the rail included in the pseudo-contour; a fitting means (103) that matches the pseudo-straight sections, which are characteristic parts of the rail included in the pseudo-contour with the reference straight sections, which are characteristic parts of the reference contour obtained from the cross-sectional shape of a standard rail, and superimposes the pseudo-contour and the reference contour; a detection means (104) that detects the amount of wear on the railway rail based on the difference between the superimposed reference contour and the pseudo-contour; and a registration means (105) that collects the data obtained from the railway rail wear detection process and registers it in a dataset.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a rail wear detection device for detecting the wear amount of railway rails.

Background Art

[0002] Wear of the rail head and reduction of the cross-sectional area of the rail must be replaced immediately because if left unattended, rail accessories and the like will interfere with the building limit, and other cracks are likely to occur. In addition, other dangerous damages during operation and those worn into a shape where the wheels are likely to derail must be replaced immediately. Further, wear in the rail is closely related to the occurrence of cracks that may cause rail breakage and also causes a change in the shape of the rail. If the shape of the rail changes due to wear, it is conceivable that the running stability and curve passing performance of the passing railway vehicle may be affected. Rail wear is particularly common in the outer rail (outer rail) of curves, and measures such as rail replacement are taken according to the progress.

[0003] Patent Document 1 describes a system for creating a track trajectory using laser point clouds. In the technique described in this Patent Document 1, it is described that a rail gauge corner trajectory and a center line of the track pitch that is a track are obtained.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] In the technique described in Patent Document 1, although creating a rail trajectory is described, obtaining the wear amount of the rail is not described. Therefore, even if the technique described in Patent Document 1 is used, the wear amount used for determining the rail replacement time and the like cannot be detected.

[0006] This disclosure provides a rail wear detection device, a rail wear detection method, and a program related to the detection of the amount of wear on railway rails. [Means for solving the problem]

[0007] The rail wear detection device of this disclosure includes a generation means for generating a pseudo-contour of the cross-section of a railway rail based on point cloud data of a railway track including a railway rail, which is included in a region of a predetermined length in the longitudinal direction of the railway rail, A means for identifying the pseudo-straight sections, which are characteristic parts of the rail included in the pseudo-contour line, The pseudo-straight sections, which are characteristic parts of the rail included in the pseudo-outline, A fitting means that matches the reference straight section, which is a characteristic part of the reference contour line obtained from the cross-sectional shape of the standard rail of a railway track, with the pseudo contour line and the reference contour line, and superimposes them. A detection means for detecting the amount of wear on railway rails based on the difference between superimposed pseudo contour lines and reference contour lines, The system includes a registration means for compiling data obtained from the railway rail wear detection process and registering it in a dataset.

[0008] These general and specific embodiments may be implemented by systems, methods, and computer programs, or combinations thereof. [Effects of the Invention]

[0009] According to the rail wear detection device, rail wear detection method, and program of this disclosure, the amount of wear on railway rails can be detected. [Brief explanation of the drawing]

[0010] [Figure 1] This is a block diagram showing an example of the configuration of a rail wear amount detection device according to an embodiment. [Figure 2] This is an example of a cross-sectional structural diagram of railway rails as defined by JIS standards (JIS 50kgN). [Figure 3A]This is an example of three-dimensional point cloud data of a railway track including rails viewed from directly above. [Figure 3B] It shows a cross-sectional plan view created by a three-dimensionally displayed reference line. [Figure 4A] It shows an example of a point cloud developed (orthographically projected) onto a cross-sectional plan view created by a reference line from three-dimensional point cloud data. [Figure 4B] It is a partially enlarged view of FIG. 4A. [Figure 4C] It is a pseudo-contour line extracted from point cloud data on the cross-sectional plan view of FIG. 4A. [Figure 4D] It is a partially enlarged view of FIG. 4C. [Figure 5A] It is an example of being divided into a mesh shape based on point cloud data on the cross-sectional plan view of FIG. 4A. [Figure 5B] It is a partially enlarged view of FIG. 5A. [Figure 5C] It is an example of extracting line segments from the point cloud of FIG. 5B. [Figure 5D] It is another example of extracting line segments from a point cloud. [Figure 5E] It is a partially enlarged view of the dashed-line area of FIG. 5D. [Figure 5F] It is an example of generating a composite line segment from two line segments of FIG. 5E. [Figure 5G] It is an example of extracting a new line segment from the composite line segment generated in FIG. 5F. [Figure 5H] It is an example of creating perpendicular line segments at both ends of each line segment extracted in FIG. 5C. [Figure 5I] It is an example of connecting line segments using the perpendicular lines created in FIG. 5H. [Figure 5J] It is an example of a pseudo-contour line generated by connecting line segments. [Figure 5K] It is an example of a point cloud within a mesh rectangle. [Figure 5L] It is an example of obtaining an orthogonal regression line from the point cloud within the rectangle of FIG. 5K. [Figure 5M] It is an example of a point cloud within a rectangle. [Figure 5N]This is an example of finding an orthogonal regression line from the point cloud within the rectangle in Figure 5M. [Figure 6A] This diagram illustrates the characteristic features identified from the pseudo-linear sections. [Figure 6B] This diagram explains how to determine if a pseudo-straight section is the web of the rail. [Figure 6C] This diagram illustrates how to determine if a pseudo-straight section is located on the right side of the rail's web. [Figure 6D] This diagram illustrates how to determine if a pseudo-straight section is located on the left side of the rail's web. [Figure 6E] This diagram illustrates the relationship between the lower right and lower left detection areas of the rail. [Figure 6F] This diagram illustrates an example of the dimensions of the lower right and lower left judgment regions. [Figure 7A] This diagram illustrates the fitting of the pseudo-contour line to the reference contour line. [Figure 7B] This figure shows the initial state of fitting between the pseudo-contour and the reference contour. [Figure 7C] This is a diagram showing the initial fitting state. [Figure 7D] This figure shows the fitting state following Figure 7C. [Figure 7E] This figure shows the fitting state following Figure 7D. [Figure 7F] This diagram shows the entire fitting process. [Figure 7G] This is a diagram showing the comparison area. [Figure 7H] This figure shows an example of the dimensions of a comparison area. [Figure 8A] This figure shows the point cloud on the cross-sectional plane and the reference contour lines projected onto the cross-sectional plane. [Figure 8B] This is a magnified view of a portion of Figure 8A, showing the difference between the point cloud and the reference contour line projected onto the cross-sectional plane. [Figure 9A] This is a diagram illustrating the extraction of wear areas. [Figure 9B] This is a magnified view of a portion of the pseudo-contour line and reference contour line after fitting is complete. [Figure 9C] This is a diagram illustrating the extraction of wear areas. [Figure 9D] This figure, following Figure 9C, explains the extraction of the wear region. [Figure 9E] This diagram illustrates the intersection point CP1 used to extract the wear region. [Figure 9F] This diagram illustrates the intersection point CP2 used to extract the wear region. [Figure 9G] This figure illustrates a method for extracting wear regions using intersections CP1 and CP2. [Figure 9H] This is an example of an extracted wear area on the right-hand rail. [Figure 9I] This is an example of the extracted wear area and wear height for the rail on the right. [Figure 9J] This is an example of extracted wear areas on the left rail. [Figure 9K] This is an example of the extracted wear area and wear height for the rail on the left. [Figure 10A] This is an example showing fitted reference contours and wear areas for the left and right rails on a cross-sectional plane. [Figure 10B] Figure 10A shows an example of how to determine the track width. [Figure 10C] This is an example of displaying the fitted reference contour line and wear area on the cross-sectional plane of Figure 10A in three dimensions after coordinate transformation. [Figure 10D] This is an example of data registered in a dataset. [Figure 11] This shows a schematic flowchart of the process for detecting rail wear. [Figure 12] This is an example of a continuous rail wear detection process (fitting process). [Figure 13] This flowchart shows the process for extracting pseudo-contour lines. [Figure 14A] This is a flowchart showing the process of extracting line segments from a point cloud. [Figure 14B] This is a flowchart following Figure 14A. [Figure 15] This flowchart shows the process of extracting line segments from a point cloud within a rectangular mesh. [Figure 16] This flowchart shows the process for identifying characteristic parts. [Figure 17A] This flowchart shows the process for identifying characteristic features of pseudo-contour lines. [Figure 17B] This is a flowchart following Figure 17A. [Figure 17C] This is a flowchart following Figure 17B. [Figure 18A] This flowchart shows the process for determining whether the pseudo-straight section is on the left or right side of the rail's underside. [Figure 18B] This is a flowchart following Figure 18A. [Figure 19A] This is a flowchart showing the fitting process. [Figure 19B] This is a flowchart following Figure 19A. [Figure 19C] This is a flowchart following Figure 19B. [Figure 19D] This is a flowchart following Figure 19C. [Figure 19E] This is a flowchart following Figure 19D. [Figure 20] This flowchart explains the subroutine processing (S514) of the flowchart in Figure 19C. [Figure 21A] This diagram illustrates the subroutine processing (S515) of the flowchart in Figure 19C. [Figure 21B] This is a flowchart following Figure 21A. [Figure 22A] This diagram illustrates the subroutine processing (S516) of the flowchart in Figure 19C. [Figure 22B] This is a flowchart following Figure 22A. [Figure 23] This flowchart explains the subroutine processing (S518) of the flowchart in Figure 19C. [Figure 24]This flowchart explains the subroutine processing (S519) of the flowchart in Figure 19C. [Figure 25A] This flowchart explains the subroutine processing (S528) in the flowchart shown in Figure 19D. [Figure 25B] This is a flowchart following Figure 25A. [Figure 25C] This is a flowchart following Figure 25B. [Figure 25D] This is a flowchart following Figure 25B. [Figure 25E] This is a flowchart following Figure 25D. [Figure 25F] This is a flowchart following Figure 25D. [Figure 25G] This is a flowchart following Figure 25F. [Figure 26] This flowchart shows the process for detecting and registering the amount of wear. [Modes for carrying out the invention]

[0011] The rail wear detection device according to this embodiment detects the amount of wear on railway rails using three-dimensional point cloud data. The rail wear detection device according to this embodiment will be described below with reference to the drawings. In the following description, the same components are denoted by the same reference numerals and their descriptions are omitted.

[0012] In the following, "track" and "railway track" are considered synonymous, referring to a road consisting of a track bed, sleepers, rails, etc., for running electric trains and other vehicles. Furthermore, in the following, "rail" and "railway rail" are considered synonymous, referring to a part of the track, a steel rod-shaped road laid to move the wheels of electric trains and other vehicles in a specific direction.

[0013] Figure 1 shows an example of a rail wear detection device 1, which provides a data analysis device, a data analysis method, and a program for detecting the amount of wear on railway rails based on three-dimensional point cloud data of a railway track including railway rails.

[0014] The generation means 101 sets an arbitrary reference line (cross-section) perpendicular to the longitudinal direction of the railway rails from the 3D point cloud data of the railway track including the railway rails, cuts out the 3D point cloud data of the railway track with a rectangular region created based on the arbitrary reference line (cross-section), and performs a coordinate transformation on the cut-out 3D point cloud data with respect to the reference line (cross-section) within that rectangular region to create point cloud data on the cross-sectional plane. The generation means 101 extracts a virtual shape of the railway track, including the railway rails as they appear on the cross-sectional plane, from the point cloud data on the cross-sectional plane. The virtual shape extracted by the generation means 101 is called a "pseudo-contour."

[0015] Identification means 102 is an identification means that extracts straight sections from the pseudo-contour and identifies them as straight sections of characteristic parts of the rail. The straight sections extracted from the pseudo-contour are called "pseudo-straight sections," and if the pseudo-straight sections are identified as straight sections that are characteristic parts of the rail, then the pseudo-straight sections are called "pseudo-straight sections that are characteristic parts."

[0016] The fitting means 103 uses the shape obtained from the cross-sectional shape of an arbitrary standard rail of a railway rail as a "reference contour line (training data)," searches for which straight part of the reference contour line (training data) corresponds to the pseudo-straight part, which is a characteristic part of the rail, matches the straight parts to each other, transforms the coordinates of the reference contour line, and superimposes it with the pseudo-contour line.

[0017] The detection means 104 detects the amount of wear on the railway rails based on the difference between the superimposed reference contour line and the pseudo contour line.

[0018] The registration means 105 collects the data obtained from the railway rail wear detection process and registers it in the dataset.

[0019] The rail wear amount detection device 1 is a computer comprising a control unit 10 such as a CPU that performs data processing, a storage unit 11 such as a hard disk, RAM, or ROM built into the computer that stores data, a communication unit 12 that performs data transmission and reception with external devices via a network, an input unit 13 used for data input, and an output unit 14 used for data output. For example, the storage unit 11 stores a wear amount detection program P, standard data D1, 3D point cloud data D2, point cloud data on a cross-sectional plane D2S, result data D3, and processing parameters D4. The control unit 10 reads the wear amount detection program P from the storage unit 11 and executes it, thereby performing processing as a generation means 101, a identification means 102, a fitting means 103, a detection means 104, and a registration means 105.

[0020] Standard data D1 is data relating to the standards set for railway rails. Railway rails in Japan are defined by JIS standards and are used according to the characteristics of the line section. For example, each part of the rail is generally defined as the head A1, body A2, and bottom A3 from top to bottom, as shown in Figure 2, an example of a cross-sectional structure diagram of a railway rail defined by JIS standards (JIS 50kgN), and the shape and size of each part are defined. Specifically, as shown in Figure 2, the head width A4, rail height A5, head height A6, body height A7, bottom height A8, bottom width A9, joint angle θ, etc. are defined. Therefore, standard data D1 is data that includes shape and size information of the cross-section perpendicular to the longitudinal direction of the rail, which is determined by at least these standards. In other words, standard data D1 is numerical data of vertex coordinates that can be represented as a continuous line of geometric data for the shape of the standard rail cross-section as shown in Figure 2. In the following explanation, as shown in Figure 2, the cross-section of the standard rail is represented in the XY plane, which is represented by the X axis and Y axis. The cross-sectional shape of the standard rail is used as the reference contour. In fact, the reference contour is stored in a table (array) using the XY coordinate values ​​of the local coordinate system. The dimensions of the JIS standard 50kgN rail are A4 (65mm), A5 (153mm), A6 (49mm), A7 (74mm), A8 (30mm), and A9 (127mm). Other railway rails are defined by the JIS standard, such as JIS 40kgN, JIS 50kg, and JIS 60kg, and these are registered in the standard data D1 in each table (array) using the XY coordinate values ​​of the local coordinate system. For convenience, the JIS standard 50kgN rail is used as an example in the explanation of the rail wear detection method and program.

[0021] 3D point cloud data D2 is 3D point cloud data of a railway track including rails, and is also called a point cloud. 3D point cloud data D2 is a large-capacity data set consisting of multiple points represented by 3D coordinates (X,Y,Z) obtained as field observation data by a 3D laser scanner.

[0022] A laser scanner measures distance by measuring the time it takes for a laser pulse to travel back and forth between the object and the sensor, without touching the object. Simultaneously, it obtains the object's 3D coordinates by measuring the time taken for the laser beam to travel back and forth and the direction from which the laser beam was emitted. There are two measurement principles: the "Time of Flight method," which calculates distance from the time it takes for the laser to reflect off the object and return, and calculates angle from the direction and angle of the laser's movement, and obtains 3D position information from this distance and angle information; and the "Phase Shift method," which calculates the measurement distance using the "phase difference (interference wave)" of several different laser wavelengths. Because thousands to hundreds of thousands of laser pulses are emitted per second, the acquired 3D data is generally called "point cloud data" because it is a collection of points. For example, a fixed laser scanner can be manually moved at predetermined intervals along a railway track to perform laser measurements. Alternatively, multiple laser scanners can be set up at predetermined intervals to perform laser measurements. Furthermore, in a mobile mapping system, a laser scanner is mounted on a railway vehicle moving along the railway track, and a laser is projected from the top of the vehicle diagonally downwards in accordance with the vehicle's movement. The laser's optical axis is scanned horizontally, and laser pulses are emitted at minute angle intervals within the scanning angle range. The distance is measured based on the time from laser emission to the reception of reflected light, and at the same time, the direction of laser emission, time, and the position and orientation of the laser scanner on the vehicle are also measured. From this measurement data, point cloud data representing the three-dimensional coordinates of the points where the laser pulses were reflected is obtained. 3D point cloud data D2 may also be generated from these measurement methods.

[0023] The result data D3 is registered in the result data D3 dataset by the registration means 105, which compiles the data obtained by the rail wear amount detection device 1.

[0024] Furthermore, the D3 dataset may be output to a Geographic Information System (GIS). By doing so, the data can be organized geospatially and accumulated as geographic information, enabling maintenance and management of the rail network, as well as statistical classification and analysis.

[0025] The processing parameter D4 is information used to provide control conditions for the operation required for processing in the rail wear amount detection device 1. The user pre-enters each condition parameter into a file, and the file is read from the input unit 13 and the communication unit 12 and set in the storage unit 11. It is also possible to input new parameters and correct existing ones through the input unit 13.

[0026] 《Generation means》 The generation means 101 sets an arbitrary reference line (cross-section) perpendicular to the longitudinal direction of the railway rails from the 3D point cloud data D2 of the railway track including the railway rails, cuts out the 3D point cloud data D2 of the railway track in a rectangular area created based on that reference line (cross-section), performs a coordinate transformation on the cut-out 3D point cloud data D2 along the reference line (cross-section), and creates point cloud data D2S on the cross-sectional plane.

[0027] The generation means 101 extracts the virtual shape of the railway track, including the railway rails as they appear on the cross-sectional plane, from the point cloud data D2S on the cross-sectional plane. The virtual shape extracted by the generation means 101 is used as a pseudo-contour.

[0028] The generation means 101 reads 3D point cloud data D2 from the storage unit 11, sets an arbitrary reference line (cross-section) L perpendicular to the longitudinal direction of the railway track and rails, as shown in an example in Figure 3A, and creates a region with a predetermined width in the depth direction perpendicular to the reference line (cross-section) L. The observed 3D point cloud data D2 contained within this predetermined region (for example, inside a rectangle created by expanding 5 cm to the left and right of the reference line L) B1 is transformed in coordinates along the reference line L and projected onto the cross-section plane. The point cloud data projected onto the cross-section plane is called D2S. The cross-section plane is set perpendicular to the reference line L. In most cases, the gradient in the longitudinal direction of the rails is not considered, but if the gradient is large, the gradient in the longitudinal direction of the rails is considered and the plane perpendicular to the gradient is also made available. The arrow AR in Figure 3A indicates the direction in which the cross-section plane is created. The tip LST of the reference line L corresponds to the left end on the cross-section plane, and the tip LEN of the reference line L corresponds to the right end on the cross-section plane. Figure 4A shows the 3D point cloud data D2 within rectangle B1 unfolded on a cross-sectional plane after coordinate transformation. The width, which is expanded by 5 cm to the left and right of the reference line L, is parameterized and pre-set by processing parameter D4.

[0029] Figure 3B shows a cross-sectional plane created by a 3D-displayed reference line L. The reference line L is set perpendicular to the longitudinal direction of the railway track and rails. The reference line is set as the X-axis, the vertical direction as the Y-axis, and the longitudinal direction (depth) of the railway track and rails as the Z-axis. Therefore, the cross-sectional plane in Figure 3B defines the XY plane. The point cloud within the area created by widening from the reference line L is orthogonally projected onto the cross-sectional plane on the reference line L. Furthermore, the reference line L can be created by setting the centerline of the railway track and generating a cross-sectional reference line L at a certain distance (pitch) interval to continuously detect the amount of rail wear. Alternatively, it is possible to extract the longitudinal edge of the rail and generate a cross-sectional reference line L at a certain distance (pitch) interval to continuously detect the amount of rail wear. Or, it is possible to interactively input an arbitrary reference line L via the mouse, which is the input unit 13, and detect the amount of rail wear.

[0030] Figure 4A shows an example of unfolding 3D point cloud data D2 onto a cross-sectional plane created by a reference line. Figure 4B is an enlarged view of the dashed area B2 in Figure 4A. As shown in Figures 4A and 4B, the laser strikes rails, sleepers, bolts, leaf springs, etc., and the virtual cross-sectional shape is displayed by these point clouds. However, there are also areas that the laser does not strike. In reality, the point cloud data D2S on the cross-sectional plane is 3D data with the horizontal axis as X, the vertical axis as Y, and the depth as Z, but the Z value of the depth is not used. Therefore, the cross-sectional plane defines the XY plane.

[0031] The arrow AR shown in Figure 4A corresponds to the direction of creation of the cross-sectional plane in Figure 3A, the line segment L shown in Figure 4A corresponds to the reference line L in Figure 3A, LST shown in Figure 4A indicates the left end of the cross-sectional plane and corresponds to the tip LST of the reference line L in Figure 3A, and LEN shown in Figure 4A indicates the right end of the cross-sectional plane and corresponds to the tip LEN of the reference line L in Figure 3A.

[0032] As shown in Figure 4C as an example, by dividing the point cloud data orthorectified onto a cross-sectional plane into lines and extracting them as continuous lines, a pseudo (virtual) shape of the terrain and artificial structures on the cross-sectional plane can be obtained. Figure 4D is an enlarged view of the dashed area B3 in Figure 4C. In addition, there are areas of the terrain and artificial structures where the laser does not hit, and the continuous lines are interrupted in those areas, so multiple continuous lines are extracted. The continuous lines extracted from these point clouds are called pseudo-contour lines L1.

[0033] The generation means 101 is, for example, a diagram of a portion of the 3D point cloud data D2 of a railway track viewed from above, as shown in Figure 3A. In reality, the range of the 3D point cloud data D2 varies and is wide, ranging from several kilometers or tens of kilometers of railway track to the entire station.

[0034] Because the 3D point cloud data D2 is large in size, it is composed of multiple files that are divided into a quadri-tree structure in a planar manner or an oct-tree structure in a spatial manner, and stored in the computer's built-in memory unit 11. These multiple files, divided into quadri-tree or spatial domains, are managed by the implementation system, which allows for the efficient retrieval of wide-area 3D point cloud data D2 within any desired range.

[0035] The point cloud data D2 contains points within a predetermined region. Figure 4A is an orthogonal projection of the point cloud data contained within region B1, indicated by the dashed line in Figure 3A, onto the cross-section (XY plane).

[0036] If the 3D point cloud data D2 is considered the universal set, the point cloud extracted by region B1 is a subset, and the point cloud that is orthogonally projected (coordinate transformed) onto the cross-sectional plane (XY plane) is stored in the storage unit 11 as the point cloud data D2S on the cross-sectional plane.

[0037] The point cloud data D2S on the cross-sectional plane is stored in the memory unit 11 by dividing the space of the point cloud D2S mapped to the cross-sectional plane into a quadtree or octree tree structure. This makes area searches of the point cloud more efficient. Similarly, each figure automatically generated from the point cloud is also stored in the memory unit 11 by dividing the space of the point cloud D2S on the cross-sectional plane into a quadtree or octree tree structure. This makes area searches, figure intersections, and figure calculations of the figures more efficient. Quadtrees and octrees are used, for example, in collision detection between objects in the space of game software. These structural storage mechanisms are commonly used in the rail wear amount detection device 1 by the generation means 101, identification means 102, fitting means 103, detection means 104, and registration means 105. The memory unit 11 is implemented as a background system that manages point cloud data and figure data. In the implementation, if there is no depth Z across the region, the region is partitioned into a quadtree structure. If there is a depth Z across the region, the region is partitioned into an octtree structure. Further explanations are omitted as they are background implementation systems and would make the explanation too complicated.

[0038] Figure 4B is an enlarged view of region B2 shown by the dashed line in Figure 4A. As shown in Figure 4C, the generation means 101 generates a plurality of pseudo-contour lines L1, which are the shapes of the railway track including the rails, from the point cloud data D2S on the cross-sectional plane.

[0039] Furthermore, the generation means 101 typically generates multiple pseudo-contour lines L1 depending on the distribution of the point cloud data. This is because, in reality, the laser points do not usually hit the entire rail, and the distribution of the orthoprojected point cloud generates multiple intermittent pseudo-contour lines L1. Figure 4D shows the pseudo-contour lines L1 on an enlarged view of region B3 indicated by the dashed line in Figure 4C.

[0040] The generation means 101, as a method for generating pseudo-contour lines L1 from the point cloud, divides the entire area of ​​the point cloud data D2S on the cross-sectional plane into equal vertical and horizontal sections using lines. Each of these sections is called a "mesh." The method employs a divide and conquer algorithm, dividing the area into small sections, extracting line segments from the point cloud within each small section (mesh), and connecting and merging the multiple line segments extracted from each section (each mesh).

[0041] Specifically, as shown in Figure 5A, the generation means 101 divides the point cloud data D2S on the cross-sectional plane into a mesh-like structure, dividing it into smaller regions, and extracts line segments from the point cloud within each of these regions (mesh areas). Methods for extracting line segments from the point cloud include kernel methods, principal component analysis, RANSAC (Random Sample Consensus), regression lines, orthogonal regression lines, etc. In this example, the entire area is divided into a mesh of 1 cm vertical x 1 cm horizontal. The vertical and horizontal dimensions of the mesh are parameterized and set in advance by the processing parameter D4.

[0042] Figure 5B is an enlarged view of Figure 5A, showing an example of where point clouds exist within each mesh-like section (mesh). Figure 5C is an example of extracting line segments by finding orthogonal regression lines from the point clouds within each mesh-like section (mesh) in Figure 5B. Figure 5D is an example of extracting line segments by finding orthogonal regression lines from the point clouds within each mesh-like section (mesh), resulting in two similar parallel line segments being extracted in the vicinity. Figure 5E shows an enlarged view of Figure 5D. This is an example of what happens when densely populated areas of the point cloud are divided by the boundary lines between adjacent meshes when the mesh is created. A method for dealing with this is shown in Figure 5F. As shown in Figure 5E, if line segment B is extracted from the point cloud within the area of ​​mesh B, the generation means 101 creates a rectangle (square) with a width of 1 mm on both sides based on line segment B, and searches whether the created rectangle (square) and the already extracted line segment exist. In the example in Figure 5E, the rectangle created by line segment B intersects with the already extracted line segment A. The process checks whether the rectangle intersects with an existing line segment or whether an existing line segment is contained within the rectangle, thereby determining whether or not there is an existing line segment in the vicinity of the currently extracted line segment.

[0043] The width dimensions of the extracted line segments are parameterized and pre-set by processing parameter D4.

[0044] Figure 5F shows an example of generating a composite line segment from two line segments, A and B. Let the endpoints of line segment A be PA1 and PA2, and the endpoints of line segment B be PB1 and PB2. Looking at PB1 and PB2 from line segment A, point PB2 lies outside line segment A, so point PB2 is on the perpendicular to line segment A, and point PA2' is found on the extension of line segment A. Similarly, looking at PA1 and PA2 from line segment B, point PA1 lies outside line segment B, so point PA1 lies on the perpendicular to line segment B, and point PB1' is found on the extension of line segment B. Find the midpoint of line segment PB2-PA2' and the midpoint of line segment PA1-PB1', and connect these midpoints to create the composite line segment C. After the composite line segment C is created, as shown in Figure 5G, the original line segments A and B are deleted, a rectangle is created again with composite line segment C at the center, and a new line segment is extracted from the point cloud within that rectangular area. Line segment D in Figure 5G is the newly extracted line segment.

[0045] Furthermore, if the lengths of both line segment A and line segment B are shorter than the preset lengths, a composite line segment will not be created. Also, if line segment A is shorter than the preset length and line segment B is longer than the preset length, line segment B will be processed as composite line segment C. Conversely, if line segment B is shorter than the preset length and line segment A is longer than the preset length, line segment A will be processed as composite line segment C. The preset lengths are parameterized and are set in advance by processing parameter D4.

[0046] In the method for extracting line segments from a point cloud within a mesh rectangle, the generation means 101 first finds an orthogonal regression line for all points within the mesh rectangle.

[0047] Figure 5K shows an example of a point cloud within a mesh rectangle, and Figure 5L shows an example of finding an orthogonal regression line from the vertically distributed point cloud within the rectangle in Figure 5K. Figure 5M shows another example of a point cloud within a mesh rectangle, and Figure 5N shows an example of finding an orthogonal regression line from the horizontally distributed point cloud within the rectangle in Figure 5M.

[0048] Furthermore, if the perpendicular length between a line segment obtained using the orthogonal regression line and the point cloud within the rectangle is longer than a threshold, that point is treated as an outlier, excluded, and the orthogonal regression line is recalculated. The threshold for this perpendicular length is pre-set as processing parameter D4, for example, within 1.5 mm or 2 mm.

[0049] Figure 5H shows some examples where, for all extracted line segments, perpendicular line segments (left and right) are created at the start and end points of those segments. Figure 5I shows an example where all extracted line segments are extended, and the intersection points with the perpendicular line segments are found, and the line segments are connected to each other. The purpose of the perpendicular line segments is to connect the extracted line segments. If the extracted line segments are extended alone, intersection points often cannot be created. Therefore, by creating perpendicular line segments (left and right) at the start and end points of all extracted line segments, extending the extracted line segments often results in accurately hitting (intersecting with) the perpendicular line segments at the start and end points of other line segments. This method makes it possible to connect (link) line segments, and by repeating this process continuously, a continuous line is created. In the example in Figure 5I, if Line 59 is the first line segment, then the line segment Line 59 is repeatedly connected in two directions: the extension line L59-1 in the diagonal downward direction to the left and the extension line R59-1 in the diagonal upward direction to the right. The two consecutive lines are then joined together to form a single continuous line. If there is no intersection, the connection between the line segments is broken, and the repeated process ends. Therefore, when the direction of the line segments is aligned and the connected line segments obtained at the intersections of the extension lines L59-1, L59-2, L59-3...L59-n, as shown in Figure 5I, are merged, a continuous line segment is extracted as shown in Figure 5J.

[0050] Figure 5J shows a continuous line of pseudo-contour lines L1 created by connecting (linking) the extracted line segments. The pseudo-contour lines L1 graphically represent the virtual cross-sectional shape of a feature (structure) as a continuous line. Multiple pseudo-contour lines L1 are stored in the result data D3 of the storage unit 11. After the process of connecting (linking) the extracted line segments, the stored pseudo-contour lines L1 may be added, updated, or deleted using the mouse of the input unit 13 to perform shaping processing.

[0051] 《Identification means》 The identification means 102 processes the multiple pseudo-contour lines L1 obtained by the generation means 101 one by one in sequence.

[0052] The processing method mainly consists of two steps. First, the vertical straight lines of the pseudo-contour line L1 are extracted. The pseudo-contour line L1 is a continuous line composed of multiple line segments (edges). Line segments (edges) with similar directions in the vertical direction are grouped together and the straight lines are extracted. "Vertical direction" refers to the Y-axis direction. The extracted vertical straight lines are called pseudo-straight lines.

[0053] Next, it is determined whether the pseudo-straight section is a straight section, which is a characteristic feature of the rail. If it is determined that the pseudo-straight section is a straight section, it is identified as a straight section, which is a characteristic feature of the rail. Once identified, the pseudo-straight section is registered as a pseudo-straight section, which is a characteristic feature of the rail. As a result, multiple pseudo-straight sections, which are characteristic features of the rail, are generated, enabling fitting of multiple rails on the cross-sectional plane, thus supporting single-track, double-track, and double-double-track railway lines.

[0054] The identification means 102 extracts a pseudo-straight section in the vertical direction from the pseudo-contour line L1. It then determines whether this extracted pseudo-straight section in the vertical direction is a straight section that is a characteristic part of the rail, or not. Referring to Figure 2, the straight section that is a characteristic part of the rail may be the side sections of the head A1 and body A2 of the standard rail. Comparing the side sections of the head A1 and body A2 in Figure 2, the straight sections on both sides of the body A2 are longer than the straight sections on both sides of the head A1. Also, the body A2 of the rail is less prone to friction and deterioration over time than the straight section of the head A1, and is a more stable part. Therefore, as shown in Figure 6A, the identification means 102 identifies the pseudo-straight section C of the pseudo-contour line L1 of the rail shape as a straight section that is a characteristic part of the rail. Figure 6A shows the pseudo-straight section C extracted from the pseudo-contour line L1. The pseudo-straight section C is shown as a thick solid line, and for convenience, the start and end points of the thick solid line are indicated by horizontal lines.

[0055] The identification means 102 must identify the pseudo-straight section C as the rail's web A2, which is a characteristic part of the rail's shape. Furthermore, it must also identify whether the siding is on the left or right side of the rail's web A2.

[0056] In identifying the pseudo-straight section C as a straight section that is a characteristic part of the rail shape, the identification means 102, as shown in Figure 6B, takes GB as the starting point (lower side) and GT as the ending point (upper side) of the straight section C, and assumes that the rail head A1 is located at the line segment GB-GT of the pseudo-straight section C, and adds a slightly larger rectangular area of ​​the rail head to the upper side of the pseudo-straight section C.

[0057] The rectangular area at the top of the rail is defined as the rail head detection area R0. The height R0_H of the rail head detection area R0 is calculated from the standard rail dimensions in Figure 2 as follows: rail web height A7 (74mm) + rail head height A6 (49mm) + 20mm - height of pseudo-straight section C. The 20mm is a margin of safety. (R0_H = A7(74mm) + A6(49mm) + 20mm - height of pseudo-straight section C)

[0058] The width of the head detection region R0 is set to be larger than the width A4 (65mm) of the rail head, with a width of 60mm on either side of the line segment C of the pseudo-straight section. The head detection region R0 is created by extending point GT' by length R0_H in the direction of line segment GB-GT, which is the pseudo-straight section C, then translating line segment GT-GT' 60mm to the left to create line segment TA-TB, and translating line segment GT-GT' 60mm to the right to create line segment TD-TC. The rectangle formed by vertices TA, TB, TC, and TD is defined as the head detection region R0. The vertex with the maximum height of the pseudo-contour line L1 within the head detection region R0 is extracted, and it is assumed that this vertex is the rail head, and it is determined whether or not that vertex is appropriate. In the example in Figure 6B, the maximum height, vertex PMA, is determined to be appropriate if it is 10 mm lower than the height of the top edge of the head detection region R0 and 30 mm higher than the height of the bottom edge of the head detection region R0. If the difference between the height of vertex PMA and the height of the bottom edge of the head detection region R0 is less than 30 mm, the height of the rail head is too small and is determined to be inappropriate. Furthermore, if there is an intersection between the top edge of the head detection region R0 and the pseudo-contour line L1, it is determined to be inappropriate. Also, if the intersection points of the head detection region R0 and the pseudo-contour line L1 are located on the top edge and left and right edges of the head detection region R0, it is determined to be inappropriate.

[0059] The thresholds of 10mm and 30mm are pre-set using processing parameter D4.

[0060] The dimensions of the standard rails, A7 (74mm), A6 (49mm), with a 20mm margin and a 60mm width on the left and right sides of the rectangle, are pre-set using processing parameter D4.

[0061] When identifying the pseudo-straight section C, the identification means 102 performs two determinations: one to determine that it is a straight section in the vertical direction on the right side of the rail web A2, as shown in Figure 6C, and another to determine that it is a straight section in the vertical direction on the left side of the rail web A2, as shown in Figure 6D. As shown in the example in Figure 6C, the identification means 102 sets a lower-right determination area R1 on the lower-right side of the pseudo-straight section C, and similarly sets a lower-left determination area R2 on the lower-left side of the pseudo-straight section C. The identification means 102 also searches the point cloud data D2S on the cross-sectional plane to find out how many points are within the lower-right determination area R1 and the lower-left determination area R2. The identification means 102 determines whether or not there are points within the lower-right determination area R1 and the lower-left determination area R2, and then determines whether the pseudo-straight section C corresponds to the right-side siding of the rail web A2 or to the left-side siding of the rail web A2. Furthermore, the identification means 102 can also determine whether or not the pseudo-straight section C is a rail. As shown in the example in Figure 6C, if there is a point in the lower right determination area R1 and no point in the lower left determination area R2, the pseudo-straight section C is determined to correspond to the right-side lateral line of the rail's web A2. As shown in the example in Figure 6D, if there is no point in the lower right determination area R1 and a point in the lower left determination area R2, the pseudo-straight section C is determined to correspond to the left-side lateral line of the rail's web A2. Also, in the case of Figure 6C, the lower left determination area R2 is inside the rail, and the laser hits the surface of the rail but not the inside of the rail, so the presence of a point in this area is contradictory. On the other hand, the absence of points in both the lower right determination area R1 and the lower left determination area R2 is also contradictory. For example, if a point is present in the lower right determination area R1 and also in the lower left determination area R2, it is considered to be another structure (track marker, wall, etc.) rather than a rail. For example, if there is no point in the lower right determination area R1 and also no point in the lower left determination area R2, it is considered to be another structure (track marker, wall, etc.) rather than a rail.

[0062] Figure 6E shows an example where, in the determination of the vertical straight section on the left side of the rail web A2, the lower right determination area R1, shown as a solid line, is inside the rail, and in the determination of the vertical straight section on the right side of the rail web A2, the lower left determination area R2, shown as a dashed line, is inside the rail. This indicates that there are no points inside the rail because the laser does not hit that area.

[0063] Figure 6C shows a method for determining that the pseudo-straight section C corresponds to the vertical straight section on the right side of the rail's web A2. A lower-right determination area R1 is set in a predetermined lower-right portion of the pseudo-straight section C, and a lower-left determination area R2 is set in a predetermined lower-left portion of the pseudo-straight section C. Specifically, as shown in Figure 6C, the identification means 102 creates a rectangular lower-right determination area R1 and a rectangular lower-left determination area R2 with predetermined dimensions, symmetrically arranged around the line segment of the pseudo-straight section C and parallel to the line segment of the pseudo-straight section C. These dimensions are parameterized and set in advance by the processing parameter D4.

[0064] Figure 6F shows an example of the dimensions of the lower right judgment region R1 and the lower left judgment region R2. The line segment of the pseudo-line segment C shown in Figure 6B is made parallel to the vertical side pseudo-line segment C, with GB at the bottom and GT at the top. For convenience, the lower part of the pseudo-line segment C is shown in a magnified view in Figure 6F. If we take point EB, which is 60 mm extended from point GB in the direction of line segment GT-GB, and point ET, which is 10 mm extended from point GB in the direction of line segment GB-GT, then line segment EB-ET is translated 4 mm to the right to create line segment RA-RB, and then line segment RA-RB is translated 6 mm to the right to create line segment RD-RC, creating a rectangle with vertices RA, RB, RC, and RD. This rectangle is defined as the lower right judgment region R1. Similarly, in the lower left judgment region R2, line segment EB-ET is translated 4 mm to the left to create line segment LA-LB, and then line segment LA-LB is translated 6 mm to the left to create line segment LD-LC, creating a rectangle with vertices LA, LB, LC, and LD. This rectangle is defined as the lower left judgment region R2.

[0065] Figure 6D shows a method for determining that the pseudo-straight section C corresponds to the vertical straight section on the left side of the rail's web A2. In the example shown in Figure 6D, following the example in Figure 6F, a lower right determination region R1 and a lower left determination region R2 are created from the pseudo-straight section C, and the number of points included in the point cloud data D2S on the cross-sectional plane that fall within the areas of the lower right determination region R1 and the lower left determination region R2 is searched. The lower right determination region R1 is inside the rail, and if there are no points in the lower right determination region R1 and there are points in the lower left determination region R2, the identification means 102 determines that it corresponds to the vertical straight section on the left side of the rail's web A2. Thus, this is an example of the inverse event of Figure 6C.

[0066] The identification means 102 determines and identifies whether the vertical pseudo-straight section C extracted from the aforementioned pseudo-contour line L1 corresponds to the straight section on the right side of the rail web A2, which is a characteristic part of the rail, the straight section on the left side of the rail web A2, or neither. If the identification means 102 identifies the pseudo-straight section C as a characteristic part of the rail, it will be referred to as "the pseudo-straight section C which is a characteristic part".

[0067] Fitting method The fitting means 103 uses the shape obtained from the cross-sectional shape of an arbitrary standard rail of a railway rail as the "reference contour line L2" (training data), searches for which straight part of the reference contour line (training data) corresponds to the pseudo-straight part C, which is a characteristic part of the rail, and matches the straight parts to each other, transforms the coordinates of the reference contour line, and superimposes it with the pseudo-contour line.

[0068] The identification means 102 determined whether the pseudo-straight section C was on the left or right side of the rail web. The fitting means 103, as shown in Figure 7A, searches for which part of the straight section on the right side of the rail web A2 of the reference contour line L2 obtained from the cross-sectional shape of the standard rail identified by the standard data D1 corresponds to the pseudo-straight section C, which is a characteristic part of the rail on the right side of the pseudo-contour line L1 identified by the identification means 102. Figure 7A shows an example in which the characteristic part C' of the straight section on the right side of the rail web A2 of the reference contour line L2 of the standard rail, which corresponds to the pseudo-straight section C, a characteristic part of the pseudo-contour line L1, was found. Therefore, the fitting means 103 moves the pseudo-straight section C, which is a characteristic part of the pseudo-contour line L1, from the bottom of the straight section on the right side of the rail web A2 of the standard contour line L2 of the standard rail, gradually upward in arbitrary increments, along the straight section on the right side of the rail web A2 of the standard contour line L2. From that point, it moves the same distance as the characteristic pseudo-straight section C to extract the straight section C' and find the corresponding point between the line segments. This straight section C' is designated as the "characteristic reference straight section C'". The "characteristic pseudo-straight section C" is the corresponding point between the line segments. The fitting means 103 also keeps the "characteristic pseudo-straight section C" fixed and creates multiple "characteristic reference straight sections C'", and determines which "characteristic reference straight section C'" corresponds best to the "characteristic pseudo-straight section C".

[0069] Since the corresponding points between line segments have been found as described above, the fitting means 103 needs to perform a coordinate transformation between the two points of the line segments and use the standard rail reference contour line L2 as training data to map (transform) it onto the cross-sectional plane, which is the coordinate system of the pseudo-contour line L1, and superimpose them. Next, the fitting means 103 calculates the average value of the difference between the reference contour line mapped onto the cross-sectional plane and the point cloud in the superimposed state.

[0070] To briefly explain the fitting means 103, it gradually performs coordinate transformations between two points on line segments at regular intervals in an upward direction, maps the reference contour line L2 onto the cross plane, calculates the average value of the difference with the point cloud, detects the minimum value of the average difference from these repeated processes, and finds the optimal fitting state with the least error.

[0071] Figure 7B is a schematic diagram of the initial state of the fitting process as an example. The fitting means 103 fixes the lower end point GB and the upper end point GT of the line segment of the pseudo-straight section C, which is a characteristic part on the right side of the rail of the pseudo-contour line L1 identified from the pseudo-contour line L1, and calculates the distance between the lower end point GB and the upper end point GT to be BaseDist. The fitting means 103 also defines the lower end point as point KB and the upper end point as point KT of the line segment of the straight section on the right side of the rail web A2 of the reference contour line L2, sets the initial cumulative distance SumDist to 0.0, and finds the first intermediate point KMB by moving the cumulative distance SumDist on the reference contour line L2 in the direction of the upper end point KT from the lower end point KB. Here, "intermediate point KMB" is the point corresponding to the lower end point GB of the pseudo-straight section C, which is a characteristic part during fitting. The fitting means 103 further moves the distance BaseDist along the reference contour line L2 in the direction of point KT, which is above point KMB, to find a second intermediate point KMT. The "second intermediate point KMT" corresponds to point GT, which is the pseudo-straight section C, a characteristic part on the right side of the rail of the pseudo-contour line L1. Thus, the reference straight section C', a characteristic part of the reference contour line L2, can be determined. In the initial state, points KB and KMB are the same point. Therefore, the fitting means 103 can associate the pseudo-straight section C, a characteristic part of the pseudo-contour line L1, with the reference straight section C', a characteristic part of the reference contour line L2, and map (transform) the reference contour line L2, which is the standard rail, onto the cross-sectional plane, which is the coordinate system of the pseudo-contour line L1, and superimpose them.

[0072] For coordinate transformation, the pseudo-linear section C, which is a characteristic part of the pseudo-contour line L1, and the reference linear section C', which is a characteristic part of the reference contour line L2, are matched, and a coordinate transformation is performed between the two points on the line segments to obtain transformation parameters (rotation, displacement, scale coefficient). Then, the reference contour line L2, which is the standard rail, is mapped onto the cross-sectional plane using the obtained transformation parameters. In practice, the reference contour line L2, which is the standard rail, is mapped (coordinate transformed) onto the cross-sectional plane to become the 'reference contour line L2'. The fitting means 103 can then calculate the difference between overlapping lines. Figure 7C shows the initial fitting state. In practice, the fitting means 103 calculates the difference between the reference contour line L2' mapped (coordinate transformed) onto the cross-sectional plane and the point cloud in the vicinity of the line. This is because there are locations where points exist but the pseudo-contour line L1 could not be extracted. Since a certain level of point density is required to extract the pseudo-contour line L1, if a small number of points are scattered sparsely, the pseudo-contour line L1 will not be extracted. Therefore, the difference calculation by the fitting means 103 is not performed between line segments, but rather between the reference contour line L2', which is obtained by mapping the reference contour line L2 onto the coordinate system (cross-sectional plane) of the pseudo-contour line L1, and the point cloud D2S on the cross-sectional plane in its vicinity. Furthermore, as shown in Figures 7H, 8A, and 8B, a predetermined area for calculating the difference with the point cloud in the vicinity of the continuous line of the reference contour line L2' mapped onto the cross-sectional plane is predetermined for the following reason: In reality, this is to compare the difference with the widened, smooth curved portion of the rail bottom A3 shown in Figure 2, which is sturdy and has little deterioration over time.

[0073] Figures 7C to 7E show an example of the fitting process in the fitting means 103 in sequence. Figure 7F is a schematic diagram of the entire fitting process in the fitting means 103. A pitch (step width) is set for repeated processing, and the fitting means 103 determines a first intermediate point KMB by gradually moving the cumulative distance (SumDist) upward from the lowest point KB of the straight section of the rail web A2 of the reference contour line L2 of the standard rail, according to the pitch (step width). A second intermediate point KMT is determined by moving the distance BaseDist in the direction of the uppermost point KT from point KMB, along the straight section of the rail web A2 of the reference contour line L2. Therefore, the line segment GB-GT of the pseudo-straight section C, which is a characteristic part of the pseudo-contour line L1, corresponds to the line segment KMB-KMT of the reference straight section C', which is a characteristic part of the reference contour line L2. A coordinate transformation is performed between these two line segments, and the fitting means 103 calculates the difference between the reference contour line L2', which is the standard rail, and the point cloud D2S on the cross-sectional plane near the mapped reference contour line L2' in a predetermined comparison area described later using Figure 7G. The fitting means 103 adopts the mapped reference contour line L2' with the smallest difference among the iterative processes. The loop terminates when the upper endpoint KMT of the line segment of the reference straight section C', which is a characteristic part of the standard rail's reference contour line L2, crosses point KT (the uppermost point of the straight section). In fact, the step width is parameterized and set in advance by processing parameter D4. For example, the step width is set to 0.10 mm, 0.20 mm, 0.25 mm, or 0.30 mm. Figures 7C to 7E show the fitting process in order. Figure 7F is a schematic diagram of the entire fitting process, where the reference contour line L2', shown as a thick solid line, is the optimal shape in the fitting process, as it is a projection of the reference contour line L2, which is the cross-sectional shape of the standard rail.

[0074] As shown in Figure 7G, the fitting means 103 sets a comparison area R3 at a predetermined position based on the pseudo-straight line portion C, which is a characteristic part, similar to the setting of the lower right determination area R1 and the lower left determination area R2 described above. The position of this comparison area R3 is set so as shown in Figure 7G to include the smoothly sloping and outward-spreading portion of the bottom A3 of the rail shown in Figure 2.

[0075] Figure 7H shows the dimensions of the comparison region R3. The dimensions of the comparison region R3 are parameterized and set in advance by the processing parameter D4. Regarding the creation of the comparison region R3, if the line segment of the pseudo-straight section C, which is a characteristic part on the right side of the rail of the pseudo-contour line L1 identified from the pseudo-contour line L1, is made parallel to the line segment of the pseudo-straight section C, which is a characteristic part, then the fitting means 103 sets point EB' to be 80 mm extended from point GB in the direction of line segment GT-GB, then translates line segment EB'-GB 4 mm to the right to create line segment DA-DB, and further translates line segment DA-DB 60 mm to the right to create line segment DD-DC, and the rectangle with vertices DA, DB, DC, DD is made the comparison region R3. Furthermore, the fitting means 103 also creates a rectangular comparison area R3 on the left side with the same dimensions, parallel to the line segment of the straight portion of the pseudo-straight portion C, which is a characteristic part on the left side of the rail identified from the pseudo-contour line L1.

[0076] Figure 8A shows the smoothly curving portion of the bottom A3 of the rail shown in Figure 2. Figure 8B is an enlarged view of the dashed area B3 in Figure 8A. In the example in Figure 8B, the perpendiculars between the point cloud D2S on the cross-sectional plane within the comparison region R3 and the corresponding points D2S on the cross-sectional plane within the comparison region R3 are shown as solid lines. In actual examples, the fitting means 103 calculates the perpendicular length dh for multiple points within each side, which is the distance (difference) from the point to the smoothly curving portion of the bottom A3 of the rail. It then adopts perpendicular lengths dh that are within a threshold (e.g., within 2 mm) and temporarily stores them in a table (array). The threshold for perpendicular length is parameterized and set in advance by the processing parameter D4. Furthermore, the fitting means 103 sets a threshold for the number of perpendicular lengths adopted. For example, if the number is less than 30, it skips to the next process without calculating the average value of the perpendicular lengths. The threshold for perpendicular length and the limit on the number are also parameterized and set in advance by the processing parameter D4.

[0077] The fitting means 103 sorts the perpendicular lengths registered in the table (array) in ascending order if the number of perpendicular lengths registered in the table is greater than or equal to a threshold (30 points in the example above). For example, it selects the 1st to 30th perpendicular lengths sorted in ascending order and calculates the average of the perpendicular lengths from the 1st to 30th perpendicular lengths. This is done to maintain fairness because the fitting process is repeated. Regarding "fairness," in multiple fitting processes, the number of registered perpendicular lengths varies. For example, if there are 45 registered perpendicular lengths, and there are many perpendicular lengths with small values ​​from the 31st to 45th positions, calculating the average using the 1st to 30th positions would result in a bias in the average. The fitting means 103 then selects the smallest average from the multiple averages obtained through the repeated process, and adopts the reference contour line L2' mapped with that smallest average as the closest to the local pseudo-contour line L1. Figure 7F shows an example of the entire fitting process, where the reference contour line L2', shown as a solid line, is adopted as the closest to the pseudo-contour line L1. The reference contour line L2' that best approximates the pseudo-contour line L1 is referred to as the "fitted reference contour line L2'".

[0078] Detection means The detection means 104 detects the amount of wear on the railway rails based on the difference between the superimposed reference contour line L2' and the pseudo contour line L1. For example, as shown in Figure 9A, when the pseudo contour line L1 and the reference contour line L2' are superimposed, the detection means 104 considers the geometric region (polygon) (blacked-out area) formed between the pseudo contour line L1 and the reference contour line L2', which is formed using the pseudo contour line L1 and the reference contour line L2', as the rail wear region.

[0079] Figure 9B shows the state after fitting is complete. It shows the state of the rail head A1 of the reference contour line L2' and the pseudo contour line L1. The reference contour line L2' is on the upper side and the pseudo contour line L1 is on the lower side. Since the pseudo contour line L1 is linearized from the observed point cloud, depending on the state of the observed point cloud, there may be multiple pseudo contour lines L1 that are not continuously connected. Wear regions are detected taking these factors into consideration.

[0080] Figure 9C shows the continuous line of the rail head A1 of the reference contour line L2'. The vertices from vertex number 509 to 747 of the continuous line of the rail head A1 of the reference contour line L2' are cut out and used. Specifically, as shown in Figure 9D, the detection means 104 creates points by continuously marking the continuous line of the head A1 of the reference contour line L2' at a predetermined pitch (step width), and calculates the intersection points between the line segments drawn down from these points in the same direction as the rail inclination (DIR) and the line segments of the pseudo contour line L1. If intersection points exist, these intersection points are stored in the order in which they were created. In this example, the pitch (step width) is 0.3 mm. The pitch (step width) is parameterized and set in advance by the processing parameter D4.

[0081] As shown in Figure 9E, the detection means 104 extends the line segment of the pseudo-contour line L1 at the first intersection point and calculates the intersection point with the continuous line of the rail head A1 of the reference contour line L2', and sets that intersection point as CP1. Also, as shown in Figure 9F, the detection means 104 extends the line segment of the pseudo-contour line L1 at the last intersection point and calculates the intersection point with the continuous line of the rail head A1 of the reference contour line L2', and sets that intersection point as CP2. Thus, the figure is closed by the intersection points CP1 and CP2, and a polygon figure is created.

[0082] As shown in Figure 9G, the detection means 104 creates a polygon using intersections CP1 and CP2 as nodes. Specifically, starting from CP1, the intersections with the line segments of the lower pseudo-contour line L1 are recorded in order, so the detection means 104 traces these intersections to the end. Next, from CP2, the detection means 104 traces multiple points descending in the direction of the rail's inclination from the continuous line of the head A1 of the stored reference contour line L2', in reverse order from the last point to the first point. This returns to intersection CP1, thus creating a closed figure. Therefore, the detection means 104 can generate a polygon figure representing the wear region.

[0083] Figure 9H shows an example of an extracted wear region AT_Polygon (the black-filled area). The area of ​​the polygon shape AT_Polygon (the black-filled area) can be calculated, and the area is 0.000147 m². 2 The reduction rate of the rail cross-sectional area was 2.269527%. Figure 9I shows an example of determining the wear height from the extracted wear region (polygon shape). From Figure 9G, for each point of the pseudo-contour line L1 on the lower side from CP1 to CP2 in the polygon, the intersection point is found so that it is perpendicular to the line segment of the reference contour line L2', the distance is calculated, and the line segment AT_LINE that maximizes this distance is found. The found line segment AT_LINE is taken as the wear height. In the example in Figure 9I, the wear height AT_Line was 3.72 mm.

[0084] Figures 9H and 9I show the right rail in Figure 4A, while Figures 9J and 9K show extracted wear regions AT_Polygon (black areas) of the left rail in Figure 4A. Figure 9J is an example of the extracted wear region AT_Polygon (black area) for the left rail. The area of ​​the wear region is 0.000210 m². 2 The reduction in rail cross-sectional area was 3.238435%. Figure 9K shows an example of the calculated wear height for the left rail. The wear height AT_Line was 4.51 mm.

[0085] 《Method of Registration》 The registration means 105 collects the data obtained by the rail wear detection device 1 and registers it in the result data D3 dataset. By registering it in the dataset as structured data, it becomes usable in databases, spreadsheet software, GIS (Geographic Information System), etc. Figure 10D shows an example of data registered in the dataset. In practice, the polygon shape AT_Polygon generated as shown in Figures 9H and 9J, detected by the detection means 104, is registered as the rail wear area. Furthermore, the attribute information detected by the detection means 104, such as the wear amount, the maximum wear height of the rail, the cross-sectional area of ​​the wear area, and the rail reduction rate, is registered. For the maximum wear height of the rail, the line segment AT_LINE is registered as the wear height.

[0086] The registration means 105 also registers the continuous lines of the fitted reference contour line L2' as shapes. The registration means 105 further registers the continuous lines of the extracted pseudo contour line L1 as shapes.

[0087] The registered figures are converted to the coordinate system of the original 3D point cloud data D2 and then registered. The registration means 105 also registers a primary key for associating each registered figure, and a reference line L as a primary key in geospace. For example, the registration means 105 makes it possible to identify the right and left sides of the up rail of the Tokaido Shinkansen using a recognizable code system and a reference line L as a primary key in geospace. The registration means 105 also registers the processing time (timestamp). The registration means 105 stores the result data D3 in the storage unit 11, adding the primary key for association to each data. Alternatively, the registration means 105 may register the data in the database server via the network of the communication unit 12 from the result data D3 in the storage unit 11. Alternatively, it may link with a GIS (Geographic Information System) via the network of the communication unit 12 from the result data D3 in the storage unit 11. Alternatively, the registration means 105 may register the result data D3 from the storage unit 11 into the database of the output unit 14. Alternatively, it may link with the GIS (Geographic Information System) of the output unit 14 using the result data D3 from the storage unit 11. Alternatively, it may output the result data D3 from the storage unit 11 to a file on the external storage device of the output unit 14. The registration means 105 can also register observation information as metadata in the database.

[0088] Figure 10A shows an example of displaying the fitted reference contour line L2' and wear area for the left and right rails on a cross-sectional plane. Figure 10B shows an example of determining the track width from the fitted reference contour line L2' and wear area for the left and right rails on the cross-sectional plane shown in Figure 10A. When determining the track width, it is calculated from the fitted reference contour line L2' excluding the wear area for the left and right rails. Furthermore, once the track width is determined, the track center point can be determined. Figure 10C shows an example of displaying the fitted reference contour line L2' and wear area for the left and right rails on the cross-sectional plane shown in Figure 10A, after coordinate transformation in three dimensions.

[0089] Figure 12 shows an example of continuous rail wear detection processing (fitting processing). Specifically, it is an example where fitting processing is performed continuously, and the results of each fitting process are converted into structured data by the registration means 105 and registered in the dataset for display. The continuous line LS connects the center points of the left rail in a continuous line.

[0090] The continuous line RS in Figure 12 connects the center points of the right rail in a continuous line. The continuous line CNT in Figure 12 connects the midpoint between the center points of the left rail and the center points of the right rail. Therefore, this is an example of determining the centerline of a railway track.

[0091] The rail wear detection device 1 may be implemented by a single computer, or by a combination of multiple computers connected via a network. Alternatively, for example, the rail wear detection device 1 may be configured to use data stored on an external storage medium.

[0092] <Detection process for rail wear amount> Using the flowchart shown in Figure 11, the rail wear detection process performed by the rail wear detection device 1 will be explained using each means.

[0093] The generation means 101 sets an arbitrary reference line (cross-section line) L perpendicular to the longitudinal direction of the railway rails from the 3D point cloud data D2 of the railway track including the railway rails, cuts out the 3D point cloud data D2 of the railway track in a rectangular area created based on the reference line (cross-section line) L, and performs a coordinate transformation on the cut-out 3D point cloud data D2 in that rectangular area with respect to the reference line (cross-section line) L to create point cloud data D2S on the cross-sectional plane (S1). Specifically, the generation means 101 reads out the 3D point cloud data D2 from the storage unit 11, sets an arbitrary reference line (cross-section line) L perpendicular to the longitudinal direction of the railway track and rails as shown in an example in Figure 3A, and creates an area with a predetermined width in the depth direction perpendicular to the reference line (cross-section line) L, and projects the observed 3D point cloud data D2 contained within that predetermined area (for example, inside a rectangle created by expanding 5 cm to the left and right with respect to the reference line L) onto the cross-sectional plane by performing a coordinate transformation on the reference line L. The point cloud data projected onto that cross-sectional plane is denoted as D2S. Schematic diagrams are shown in Figures 3A to 3B and Figures 4A to 4B.

[0094] Next, the generation means 101 extracts the virtual shape of the railway track, including the railway rails projected onto the cross-sectional plane, from the point cloud data D2S on the cross-sectional plane, and designates the extracted virtual shape as the pseudo-contour line L1 (S2). Specifically, the generation means 101 extracts the virtual cross-sectional shape displayed from the point cloud data D2S on the cross-sectional plane, which was coordinate-transformed in step S1, as a continuous line segment. At this time, the cross-sectional shape of the artificial structure is extracted into multiple continuous line segments. For example, rails, sleepers, stones (ballast), etc., are extracted as multiple continuous line segments. The generation means 101 designates these extracted multiple continuous lines as the pseudo-contour line L1. The method of extracting the pseudo-contour line L1 by the generation means 101 will be described later using the flowcharts shown in Figures 13 to 15. Schematic diagrams are shown in Figures 4A to 4D and Figures 5A to 5N.

[0095] The identification means 102 processes the multiple pseudo-contour lines L1 obtained in step S2 one by one. This processing mainly consists of two steps. First, the vertical straight portion of the pseudo-contour line L1 is extracted. The pseudo-contour line L1 is a continuous line composed of multiple line segments (edges). Line segments (edges) with similar directions in the vertical direction are grouped together and the straight portion is extracted. "Vertical direction" refers to the Y-axis direction. The extracted vertical straight portion is called the pseudo-straight portion C.

[0096] Next, it is determined whether the pseudo-straight section C is a straight section, which is a characteristic part of the rail, or not (S3). If it is determined that the pseudo-straight section C is a straight section, which is a characteristic part of the rail, then it is identified as a straight section, which is a characteristic part of the rail. If identified, the pseudo-straight section C is registered as a pseudo-straight section C, which is a characteristic part of the rail. Therefore, since multiple pseudo-straight sections C, which are characteristic parts of the rail, are generated, it becomes possible to fit multiple rails on the cross-sectional plane, and thus the railway line can be single-track, double-track, or double-double-track.

[0097] The method for extracting the pseudo-straight section C, which is the straight portion from the pseudo-contour line L1 in step S3, and the method for identifying the pseudo-straight section C as a characteristic part of the rail will be described later using the flowcharts shown in Figures 16 to 18B. A schematic diagram is shown in Figures 6A to 6F.

[0098] The fitting means 103 reads the JIS 50kgN cross-sectional shape of the standardized rail from the standard data D1 stored in the storage unit 11 (S4). As shown in Figure 2, the cross-section of the standardized rail is represented in the XY plane, which is represented by the X and Y axes. The cross-sectional shape of the standardized rail is defined as the reference contour line L2. In practice, the reference contour line L2 is stored in a table (array) using the XY coordinate values ​​of the local coordinate system. A schematic diagram is shown in Figure 2.

[0099] The fitting means 103 searches for which straight section of the reference contour line L2 of the standard data D1 read in step S4 corresponds to the pseudo-straight section C, which is a feature area identified in step S3, and matches the straight sections to each other. It then transforms the coordinates of the reference contour line and superimposes it with the pseudo-contour line. Furthermore, the above process is repeated to fit (approximate) the reference contour line to the pseudo-contour line (a cloud of points in the vicinity of the pseudo-contour line) (S5). Details of the fitting algorithm will be described later using the flowcharts shown in Figures 19A to 25G. In step S5, the fitting means 103 generates a reference contour line L2' which is a standard rail reference contour line L2 fitted (approximated) onto the cross-sectional plane. A schematic diagram is shown in Figures 7A to 7H and Figures 8A to 8B.

[0100] The detection means 104 detects the amount of wear (S6) based on the result of step S5. Specifically, the detection means 104 superimposes the pseudo-contour line L1 with the reference contour line L2' fitted in step S5, and extracts the polygonal shape formed between the pseudo-contour line L1 and the fitted reference contour line L2' at the head of the rail as the wear region. It then determines the maximum wear height of the rail, the cross-sectional area of ​​the wear region, and the rate of reduction of the rail. The wear amount detection process in step S6 will be described later using the flowchart shown in Figure 26. A schematic diagram is shown in Figures 9A to 9K.

[0101] The registration means 105 collects the data obtained from the railway rail wear detection process and registers it in the result data D3 dataset. The data is registered in the dataset as structured data (S7). Figure 10D shows an example of data being registered in the dataset. In addition, the geometric data is converted to the coordinate system of the original 3D point cloud data D2 and registered. A schematic diagram is shown in Figure 10D.

[0102] The rail wear detection device 1 can detect rail wear using 3D point cloud data D2 obtained from a laser scanner. This allows for understanding the current state of railway rails. Furthermore, by collecting and creating a database of this data, railway rails can be maintained and managed. An example is shown in the schematic diagrams in Figures 10C and 12.

[0103] 《Extraction process for pseudo-contour lines》 The extraction process of the pseudo-contour line L1 in step S2 of the flowchart in Figure 11 will be explained using the flowchart shown in Figure 13. First, the generation means 101 actually divides the entire area of ​​the point cloud data D2S on the cross-sectional plane into equal vertical and horizontal sections with lines (S801), as shown in Figure 5A. Each of the divided sections is called a mesh. In the example in Figure 5A, the entire area of ​​the point cloud data D2S on the cross-sectional plane is divided into a mesh of 1 cm vertical x 1 cm horizontal. The vertical and horizontal dimensions of the mesh are parameterized and set in advance by the processing parameter D4.

[0104] The generation means 101 sequentially searches for line segments for all meshes (S802).

[0105] The generation means 101 determines whether the search for line segments has been completed for all meshes (S803).

[0106] If the search across all meshes is not complete (if the result is "No" in S803), the generation means 101 extracts line segments from the point cloud within the rectangular area of ​​the mesh (S804). The process returns to step S802.

[0107] Specifically, the generation means 101 checks how many points exist in the rectangular area of ​​the mesh, and if the number of points in the rectangular area of ​​the mesh is greater than or equal to a predetermined value, it extracts a line segment from the point segment. Here, there is a case where a similar line segment has already been registered in the vicinity of the extracted line segment. This is an example of what happens when a dense area of ​​points in the point segment is divided into two by the boundary line between adjacent meshes when the mesh is created. The process of extracting a line segment from the point segment in the rectangular area of ​​the mesh in step S804 will be described later using the flowcharts shown in Figures 14A and 14B.

[0108] Figure 5B is a magnified view of a part of Figure 5A, showing the location where the point cloud is contained within a mesh-like rectangular area. Figure 5C is a magnified view of a part of Figure 5A, showing the result of extracting line segments from the point cloud within the mesh-like rectangular area. Figure 5D shows an example of a case where, when a mesh is created, a dense area of ​​the point cloud is divided into two by the mesh boundary.

[0109] When the search is completed for all meshes (if "Yes" is selected in S803), the generation means 101 creates lines of a predetermined width to the left and right, perpendicular to the extracted line segments, at the start and end points of all extracted line segments (S805).

[0110] Figure 5H shows some examples where, for all extracted line segments, perpendicular line segments are created to the left and right of the starting and ending points. In the example shown in Figure 5H, the width is set to 2 mm on the left and 2 mm on the right. This width dimension is parameterized and pre-set by processing parameter D4. Since extracted line segments often do not intersect when extended, creating perpendicular line segments on the starting and ending points allows an extracted line segment to intersect (create an intersection) with the perpendicular line segment on the starting or ending point side of another line segment when extended. This makes it possible to connect line segments, and by repeatedly processing them in a continuous manner, a continuous line is created.

[0111] The generation means 101 connects the extracted line segments to generate a continuous line of pseudo-contour lines L1 (S806). The generation means 101 stores these multiple continuous lines of pseudo-contour lines L1 in the result data D3 of the storage unit 11 (S807).

[0112] In step S806, specifically, in the example shown in Figure 5I, if Line 59 is the first line segment, then the line segment Line 59 is repeatedly connected in two directions: the extension line L59-1 in the diagonal downward direction to the left and the extension line R59-1 in the diagonal upward direction to the right. The two continuous lines are then joined together to form a single continuous line. If there is no intersection, the connection between the line segments is broken, and the repeated process ends. Therefore, when the direction of the line segments is aligned and the connected line segments obtained at the intersection of the line segment Line 59 and the extension lines L59-1, L59-2, L59-3...L59-n, as shown in Figure 5I, are merged, a continuous line segment is extracted as shown in Figure 5J. When connecting line segments, if the distance between the two ends at the connection point is shorter than a predetermined threshold, the midpoint (average value) between the two points is calculated and adjusted. Conversely, if the distance between the two ends is greater than a predetermined threshold, the generation means 101 connects the two ends without adjusting them. Here, the distance threshold is set to 0.5 mm as an example. The length dimension is parameterized and set in advance by processing parameter D4. The state of connection between line segments may be further checked and adjusted.

[0113] Furthermore, for extracted line segments that have been connected, a flag is set to control the process and prevent overlapping connections. Here, the length for extending the extracted line segments is set to 5 mm as an example. This length dimension is parameterized and is set in advance by processing parameter D4. For line segments that have not been connected, a flag is set, and they may or may not be treated as individual line segments and pseudo-contour lines L1.

[0114] For the connection process, recursive processing is performed on all extracted line segments until all of them are flagged. As a result, multiple pseudo-contour lines L1, which are continuous lines, are generated.

[0115] Figure 5J shows the continuous lines of the pseudo-contour line L1, which was created by connecting the extracted line segments. The pseudo-contour line L1, extracted from the point cloud data D2S on the cross-sectional plan view, graphically represents the virtual cross-sectional shape of the feature (structure) as a continuous line.

[0116] The generation means 101 registers a series of pseudo-contour lines L1 as graphics in the result data D3 of the storage unit 11 (S807). Figures 4C and 4D are examples showing multiple pseudo-contour lines L1.

[0117] The process of extracting line segments from a point cloud within a mesh-like rectangular region (step S804 in Figure 13) will be explained using the flowcharts shown in Figures 14A and 14B. There are two main processes involved in extracting line segments from a point cloud within a mesh-like rectangular region. The first is to extract the line segments from the point cloud within the mesh-like rectangular region, and the second is to search for similar line segments that have already been extracted and registered in the vicinity of the extracted line segments. If such segments exist, these line segments are combined to create a composite line segment, and a rectangle is created by expanding the area around the composite line segment to the left and right. A new line segment is then extracted from the point cloud within this rectangle, and the previously registered line segments are updated (overwritten) with the new line segments. The reason why such a process is necessary is that when a mesh is created, areas of high point density are divided into two by the mesh boundary. Conversely, if no similar line segment has already been extracted and registered in the vicinity of the extracted line segment, the extracted line segment will be registered as a new segment.

[0118] Figure 5D shows an example of what happens when a dense area of ​​points in a point cloud is divided into two by the mesh boundary during mesh creation.

[0119] As shown in Figure 14A, the generation means 101 checks how many points are in the point cloud within the mesh rectangle, and if the number of points in the rectangle is greater than or equal to a predetermined number, it extracts line segments from the point cloud within the rectangle (S811). This predetermined number of points is parameterized and set in advance by the processing parameter D4. The process of extracting line segments from the point cloud within the rectangle will be described later using the flowchart shown in Figure 15.

[0120] Next, the generation means 101 determines whether or not a line segment has been extracted (S812).

[0121] If no line segment is extracted (i.e., "No" is found in S812), the process ends, and the process in step S804 of the flowchart shown in Figure 13 is terminated, returning to step S802.

[0122] If a line segment is extracted (if "Yes" is answered in S812), the generation means 101 searches for already registered line segments in the vicinity of the extracted line segment (S813). For example, as shown in Figure 5E, if line segment B is extracted from the point cloud within the rectangular area of ​​mesh B, a rectangle with a width of 1 mm on both sides is created based on line segment B, and a search is performed to see if the created rectangle contains an already extracted line segment. In the example in Figure 5E, the rectangle created by line segment B intersects with the already extracted line segment A. By checking whether the rectangle intersects with an existing line segment or whether the rectangle contains an existing line segment, it is possible to determine whether or not there is an existing line segment in the vicinity of the currently extracted line segment. The width dimensions of the extracted line segment are parameterized and set in advance by processing parameter D4.

[0123] The generation means 101 determines whether or not there were similar line segments (S814).

[0124] If similar line segments exist (if the answer is "Yes" in S814), the generation means 101 combines the extracted line segment with the already registered line segment to create a composite line segment (S815).

[0125] As shown in Figure 5F, the creation of a composite line segment in step S815 is an example of generating a composite line segment from two line segments, A and B. Let the endpoints of line segment A be PA1 and PA2, and the endpoints of line segment B be PB1 and PB2. Looking at the endpoints of line segment B, PB1 and PB2 from line segment A, point PB2 is outside line segment A, so point PB2 is a point on the perpendicular line to line segment A, and point PA2' is found on the extension of line segment A. Similarly, looking at the endpoints of line segment A, PA1 and PA2 from line segment B, point PA1 is outside line segment B, so point PA1 is a point on the perpendicular line to line segment B, and point PB1' is found on the extension of line segment B. The midpoints of line segments PB2-PA2' and PA1-PB1' are found, and by connecting these midpoints, the composite line segment C is created.

[0126] If the lengths of both line segments A and B are shorter than the preset lengths, a composite line segment is not created. Conversely, if line segment A is shorter than the preset length and line segment B is longer than the preset length, line segment B is processed as composite line segment C. Conversely, if line segment B is shorter than the preset length and line segment A is longer than the preset length, line segment A is processed as composite line segment C. The preset lengths are parameterized and are set in the processing parameter D4.

[0127] Next, as shown in the flowchart of Figure 14B, the generation means 101 expands the composite line segment to the left and right by a predetermined width to create a rectangle (S816). The width of this dimension is parameterized and set in advance by the processing parameter D4.

[0128] Furthermore, the generation means 101 checks how many points are in the point cloud within the rectangle, and if the number of points in the rectangle is greater than or equal to a predetermined number, it extracts a line segment from the point cloud within the rectangle (S817). Figure 5G shows an example of a newly extracted line segment D.

[0129] The generation means 101 determines whether or not a line segment has been extracted (S818).

[0130] If no data is extracted (if the result in S818 is "No"), the process terminates, and step S804 of the flowchart shown in Figure 13 is exited.

[0131] If a line segment is extracted (if the answer is "Yes" in S818), the generation means 101 overwrites the already extracted and registered line segment with the extracted line segment (S819).

[0132] Figure 5G shows an example in step S819 where the content registered in the result data D3 of the storage unit 11 for line segment A, which was already registered as shown in Figure 5F, is overwritten (updated) with the content of the newly extracted line segment D. After that, line segment B and composite line segment C in Figure 5F are deleted as they are no longer needed.

[0133] In the flowchart of Figure 14A, if there is no already registered line segment similar to the line segment extracted in step S811 (i.e., "No" in S814), the generation means 101 registers the extracted line segment as a new shape in the result data D3 of the storage unit 11 (S820), and then terminates the process of step S804 in the flowchart shown in Figure 13, returning to step S802.

[0134] Using the flowchart shown in Figure 15, the process of extracting line segments from the point cloud within the rectangle in step S811 of Figure 14A and step S817 of Figure 14B will be explained.

[0135] The generation means 101 sets the minimum number of points in the rectangular area of ​​the mesh (S831). This predetermined number of points is parameterized and set in advance by the processing parameter D4. When setting the minimum number of points, it is related to the density of the point cloud, and for example, it can be set to around 10 to 30 points. Here, lngSET_MinPointCount = 10 is used as an example.

[0136] Next, the generation means 101 reads the point cloud D2S on the cross-sectional plane into the mesh region. It checks how many points exist in the point cloud within the mesh region (S832). The generation means 101 assigns the number of points in the point cloud within that mesh region to the variable lngPointCount.

[0137] Furthermore, the generation means 101 determines whether the number of points in the mesh region (lngPointCount) is equal to or greater than a predetermined number of points (lngSET_MinPointCount) (S833).

[0138] If the score is not equal to or greater than the predetermined score (lngPointCount ≥ lngSET_MinPointCount is not true) (if the answer is "No" in S833), or if the score is less than the predetermined score, the process terminates. The process returns to step S811 or step S817 in Figure 14A.

[0139] If the number of points is greater than or equal to a predetermined number (lngPointCount ≥ lngSET_MinPointCount) (if "Yes" is answered in S833), the generation means 101 calculates an orthogonal regression line for all of the point clouds (S834). Figures 5K to 5N show examples of calculating an orthogonal regression line for all point clouds within a rectangle.

[0140] If the perpendicular length between a line segment obtained using the orthogonal regression line and the point cloud within the rectangle is longer than a threshold, the generation means 101 removes that point as an outlier and calculates the orthogonal regression line again. The threshold for the perpendicular length is set in advance as processing parameter D4 to be within 1.5 mm or 2 mm.

[0141] 《Identification of characteristic parts》 Using the flowchart shown in Figure 16, the process of identifying feature regions by the identification means 102 in step S3 of the flowchart shown in Figure 11 will be explained.

[0142] The identification means 102 processes the multiple pseudo-contour lines L1 obtained by the generation means 101 one by one. This processing mainly consists of two steps. First, the vertical straight portion of the pseudo-contour line L1 is extracted. The pseudo-contour line L1 is a continuous line composed of multiple line segments (edges). Line segments (edges) with similar directions in the vertical direction are grouped together and the straight portion is extracted. "Vertical direction" refers to the Y-axis direction. The extracted vertical straight portion is called the pseudo-straight portion C.

[0143] Next, it is determined whether the pseudo-straight section C is a straight section, which is a characteristic feature of the rail. If it is determined that the pseudo-straight section C is a straight section, it is identified as a straight section, which is a characteristic feature of the rail. Once identified, the pseudo-straight section C is registered as a pseudo-straight section C, which is a characteristic feature of the rail. Thus, by generating multiple pseudo-straight sections C, which are characteristic features of the rail, it becomes possible to perform fitting processing for multiple rails on the cross-sectional plane.

[0144] Figure 16 illustrates the overall flow of the identification means 102. The flowchart shown in Figures 17A to 17C shows the process of extracting the pseudo-straight section C from the pseudo-contour line L1. The flowchart shown in Figures 18A to 18B shows the process of identifying the pseudo-straight section C as a characteristic part of the rail. Schematic diagrams are also shown in Figures 6A to 6F.

[0145] As preparation, the identification means 102 generates pseudo-straight sections C, which are characteristic parts of the rail, from a plurality of pseudo-contour lines L1, and creates a predetermined number of tables (arrays) (for example, 100) to store the pseudo-straight sections C, which are characteristic parts of the rail (S301). The variable ISpan_Count stores a value that counts the number of line segments of the pseudo-straight sections C, which are characteristic parts, that are generated. It is initially initialized to 0. The arrays Span_X1_T

[0100] , Span_Y1_T

[0100] , Span_X2_T

[0100] , and Span_Y2_T

[0100] store the coordinate values ​​of the line segments of the pseudo-straight sections C, which are characteristic parts. The array Span_Dist_T

[0100] stores the distance (length) of each line segment. The array intLeft_Right_Code_T

[0100] stores a discrimination code that determines whether the straight section of the rail web is on the left or right side. Let 1 be the left side and 2 be the right side. For example, for the line segment of the pseudo-linear section C, which is the third feature area, point GB of the pseudo-linear section C is stored in (Span_X1_T[3],Span_Y1_T[3]). Point GT of the pseudo-linear section C is stored in (Span_X2_T[3],Span_Y2_T[3]). The length of that line segment is stored in Span_Dist_T[3]. intLeft_Right_Code_T[3] stores the discrimination code for the left or right side of the linear section of the rail web. For example, if it is the linear section on the right side of the rail web, intLeft_Right_Code_T[3]=2. Also, the variable IZCount stores the number of pseudo-contour lines L1 extracted by the generation means 101. (Here, "linear section of the rail web" refers to area A2 in Figure 2.)

[0146] Since the specific means 102 generates a pseudo-straight line section C from a plurality of pseudo-contour lines L1, the counter for the pseudo-contour lines L1 to be processed is set to k, and the variable k is initialized to 0 as an initial value (S302).

[0147] The identification means 102 adds 1 to the variable k based on the number of pseudo-contour lines L1 (S303). The k = k+1 pseudo-contour line L1 is the target of processing.

[0148] If k is less than or equal to the number of pseudo-contour lines L1 (IZCount) (if the answer is "Yes" in S304), the identification means 102 stores the number of vertices in n for the k-th pseudo-contour line L1 registered in the memory unit 11, and reads vertex coordinate values ​​from 1 to n into the vertex coordinate tables XT[n], YT[n] (S305).

[0149] On the other hand, if k is not less than or equal to the number of pseudo-contour lines L1 (IZCount) (i.e., "No" in S304), the identification means 102 sorts the array storing the pseudo-linear sections C, which are feature parts, in descending order of the length of the pseudo-linear sections C (S307). Then the identification process of feature parts is terminated. The reason for sorting the detected pseudo-linear sections C, which are feature parts, in descending order of the length of the pseudo-linear sections C is that longer pseudo-linear sections C are more stable as a benchmark and have better fitting accuracy. For example, it is possible that multiple pseudo-linear sections C are extracted from the same rail, so in such cases, the fitting process is performed using the longest pseudo-linear section C. In practice, the rail that is fitted first is adopted and registered.

[0150] The identification means 102 performs the identification process for the k-th pseudo-contour line L1 feature area, which was loaded into the table in step S305 (S306). The identification means 102 extracts the pseudo-straight line portion C, which is a feature area, from the continuous line of the pseudo-contour line L1, determines that the pseudo-straight line portion C is a feature area of ​​the rail, and identifies it as the pseudo-straight line portion C, which is a feature area of ​​the rail. The identification process for the k-th pseudo-contour line L1 feature area is implemented as a subroutine. This is done using the flowchart shown in Figures 17A to 17C. Once the subroutine processing is complete, the identification means 102 returns to step S303.

[0151] As shown in the flowchart of Figure 17A, the identifying means 102 is, for example, the number of vertices of the k-th pseudo-contour line L1 is n, and the vertex coordinates of the pseudo-contour line L1 are XT[n], YT[n] (S310).

[0152] The identification means 102 assigns the initial value of 0 to the variable i, which is an index that sequentially traverses the vertex coordinate table (array) of the pseudo-contour line L1 from 1 to n (S311).

[0153] The identifying means 102 adds 1 to the index variable i (S312).

[0154] If the index variable i is less than or equal to n-1 (if the answer is "Yes" in S313), the identification means 102 calculates the difference between the X and Y components of the (i+1)th vertex coordinate and the i-th vertex coordinate of the pseudo-contour line L1, and finds the absolute value of the difference between the X and Y components. The identification means 102 denotes the absolute value of the difference in the X components as DX and the absolute value of the difference in the Y components as DY (S314).

[0155] Furthermore, if the index variable i is not less than or equal to n-1 (i.e., "No" in S313), the identification means 102 returns to the caller (step S306 in Figure 16).

[0156] The identification means 102 compares DY with DX following step S314 (S315). If DY is larger (if "Yes" is answered in S315), the identification means 102 substitutes i+1 for the variable j (S316). In this case, the line segment is larger in the vertical direction.

[0157] Furthermore, if the DX component is larger (i.e., "No" in S315), the identification means 102 returns to step S312. In this case, the line segment is larger in the horizontal direction.

[0158] Following step S316, the identification means 102 assigns j to the variable End_Num (S317). End_Num stores the last index of the vertex coordinate table (array) of the straight line interval (S317).

[0159] Next, as shown in Figure 17B, the identification means 102 searches for points on the line segment (XT[i],YT[i])-(XT[i+1],YT[i+1]) using the variable j index in steps S318 to S322. The search is performed on points i+1 and beyond, specifically points i+2 to n.

[0160] Specifically, the identifying means 102 adds 1 to the index variable j (S318).

[0161] Next, the identification means 102 determines whether the index variable j is greater than or less than the last vertex number n (S319). If j ≤ n (if "Yes" is found in S319), the identification means 102 calculates the perpendicular length between the line segment (XT[i],YT[i])-(XT[i+1],YT[i+1]) and the point (XT[j],YT[j]) in order to determine whether the point (XT[j],YT[j]) lies on the line segment (XT[i],YT[i])-(XT[i+1],YT[i+1]) (S320). For example, let DH_LEN be the absolute value of the calculated perpendicular length.

[0162] The identification means 102 determines whether the perpendicular length DH_LEN is within a threshold (S321). This determines whether the point (XT[j], YT[j]) lies on a straight line. For example, the identification means 102 determines whether the calculated perpendicular length DH_LEN ≤ 0.4 mm. The threshold (0.4 mm) is parameterized and set in advance by the processing parameter D4.

[0163] When the perpendicular length DH_LEN is within the threshold (if "Yes" is answered in S321), the identification means 102 sets End_Num = j and temporarily stores j in the variable End_Num (S322). Then, the process returns to step S318 to check the following point.

[0164] As shown in Figure 17B, if j ≤ n is not true (if the answer is "No" in S319), or if the perpendicular length DH_LEN is not within a predetermined value (if the answer is "No" in S321), the j-th point (XT[j], YT[j]) is not on the straight line of the line segment (XT[i], YT[i]) - (XT[i+1], YT[i+1]). Therefore, the identification means 102 considers the temporarily stored interval from the i-th to the End_Num-th as a straight line interval, assigns the coordinate values ​​of the point at index i to the variables x1 and y1 (x1=XT[i], y1=YT[i]), and assigns the coordinate values ​​of the point at index End_Num to the variables x2 and y2 (x2=XT[End_Num], y2=YT[End_Num]) (S323).

[0165] Next, the identifying means 102 compares the magnitudes of y1 and y2 in order to align the line segments so that the smaller value on the vertical axis (Y coordinate) is the starting point and the larger value on the vertical axis (Y coordinate) is the ending point (S324).

[0166] If y1 > y2 (if "Yes" is answered in S324), then y1 is greater than (higher than) y2, so the identification means 102 swaps the XY coordinate values ​​of the starting and ending points (S325). Proceed to step S326.

[0167] If y1 > y2 is not true (i.e., "No" in S324), the identification means 102 performs a determination process to determine whether the pseudo-straight section C of the line segment (x1, y1) - (x2, y2) is on the left or right side of the rail's web A2, and assigns the determination code obtained as a result, which indicates whether the straight section is on the left or right side of the rail's web A2, to the variable intLRCode (S326). This determination process in step S326 is a subroutine and will be described later using the flowcharts shown in Figures 18A and 18B.

[0168] Next, as shown in the flowchart in Figure 17C, it is determined whether the value of the variable intLRCode is 0 (S327).

[0169] If intLRCode is not 0 (i.e., "No" in S327), the identification means 102 has identified the feature portion A2 of the rail body, and proceeds to register that information (S328). Specifically, the identification means 102 adds 1 to the counter variable ISpan_Count, which counts the number of line segments in the pseudo-straight section C, which is the identified feature portion (ISpan_Count = ISpan_Count + 1). Furthermore, the coordinates of the starting point of the line segment (Span_X1_T[ISpan_Count]=x1, Span_Y1_T[ISpan_Count]=y1) and the coordinates of the ending point of the line segment (Span_X2_T[ISpan_Count]=x2, Span_Y2_T[ISpan_Count]=y2), and the distance between the starting and ending points are stored in Span_Dist_T[ISpan_Count]. (Span_Dist_T[ISpan_Count] = distance between (x1, y1) and (x2, y2)). In addition, the identification means 102 stores the value of the variable intLRCode in intLeft_Right_Code_T[ISpan_Count]. intLRCode stores a value of 1 or 2 indicating whether it is on the left or right side of the rail's belly A2. The identification means 102 then proceeds to the next step S329.

[0170] If intLRCode=0 (if "Yes" is answered in S327), the characteristic part A2 of the rail's abdomen was not identified, so identification means 102 determines whether index j is greater than the last vertex number n (S329).

[0171] If j is greater than n (i.e., "Yes" in S329), the process returns to the caller (S306 in Figure 16). Furthermore, if j is less than or equal to n (i.e., "No" in S329), the identification means 102 substitutes j-1 for the index variable i (S330). Then the process returns to step S312 in Figure 17A.

[0172] Using the flowcharts shown in Figures 18A and 18B, the subroutine in step S326 of the flowchart shown in Figure 17B will be explained. In the subroutine of step S326, the identification means 102 performs a determination process to determine whether the line segment (x1, y1)-(x2, y2), which is the pseudo-straight line portion C of the pseudo-contour line L1, is on the left or right side of the rail's belly A2. The identification means 102 then returns the determination code, which is the result of determining whether the straight line portion is on the left or right side of the rail's belly A2, to the caller. Specifically, if it is on the left side of the rail's belly A2, the identification means 102 returns 1 to the caller. If it is on the right side of the rail's belly A2, the identification means 102 returns 2 to the caller. If it is neither, the identification means 102 returns 0 to the caller. S326 in Figure 17B, which is the caller, receives the return value in the variable intLRCode.

[0173] The identification means 102 sets parameters related to subroutine processing as preparation (S350). For example, the identification means 102 sets a threshold for the length of the pseudo-straight section C, SET_Min_Dist = 0.020 (2cm), sets the dimensions and threshold for creating the head determination area R0, and sets the dimensions for creating the lower right determination area R1 and the lower left determination area R2. Each value is parameterized and set in advance by the processing parameter D4. Figure 6B shows the dimensions of the head determination area R0. Figure 6F shows the dimensions of the lower right determination area R1 and the lower left determination area R2.

[0174] If the distance between line segments (x1,y1)-(x2,y2) is less than the value of the variable SET_Min_Dist (i.e., "Yes" in S351), the identification means 102 returns to the caller with return 0 (S352). This is because if the distance between line segments (x1,y1)-(x2,y2) is less than the value of the variable SET_Min_Dist and the line segment is short, the fitting accuracy will be poor. In this case, the identification means 102 determines that it is neither a straight section on the left nor the right side of the rail's webbed, returns judgment code 0 to the caller, and returns to S326 in the flowchart of Figure 17B, which is the caller. For example, in S350 of the flowchart of Figure 18A, SET_Min_Dist = 0.020 (2cm).

[0175] If the distance between line segments (x1,y1)-(x2,y2) is greater than or equal to the value of the variable SET_Min_Dist (i.e., "No" in S351), the identification means 102 creates a head determination region R0 from line segments (x1,y1)-(x2,y2), searches for pseudo-contour lines L1 within the region, and finds the vertex with the largest Y coordinate value (S353). In other words, it searches for the point with the highest elevation. Also, in accordance with the example in Figure 6B, the vertex found here is conveniently referred to as point PMA. Figure 6B is an example in which the starting point (lower side) and ending point (upper side) of the pseudo-straight section C are set to GB and the ending point (upper side) are set to GT, and it is assumed that the rail head A1 is located on the line segment GB-GT of the pseudo-straight section C, and a slightly larger rectangular area of ​​the rail head is attached to the upper side of the pseudo-straight section C. In Figure 6B, the rectangular area of ​​the rail head is set as the head determination region R0. The height R0_H of the head detection region R0 is calculated from the standard rail dimensions in Figure 2 as follows: rail web height A7 (74mm) + rail head height A6 (49mm) + 20mm - height of pseudo-straight section C. 20mm is the margin width. (R0_H = A7(74mm) + A6(49mm) + 20mm - height of pseudo-straight section C)

[0176] The width of the head detection region R0 is set to be larger than the width A4 (65mm) of the rail head, with a width of 60mm on either side of the line segment of the pseudo-straight section C. The head detection region R0 is defined as a rectangle formed by creating point GT' by extending point GT by length R0_H in the direction of line segment GB-GT, which is the pseudo-straight section C, then translating line segment GT-GT' 60mm to the left to create line segment TA-TB, and translating line segment GT-GT' 60mm to the right to create line segment TD-TC, with vertices TA, TB, TC, and TD forming the head detection region R0. The vertex PMA with the maximum height of the pseudo-contour line L1 within the head detection region R0 is extracted, and assuming that vertex PMA is the rail head, it is determined whether or not that vertex PMA is appropriate.

[0177] The identification means 102 determines, as shown in Figure 6B, whether or not the vertex PMA was obtained as a search result within the head determination region R0 (S354).

[0178] If a vertex cannot be obtained (if the answer is "Yes" in S354), the identification means 102 returns to the caller (S326 in the flowchart of Figure 17B) with a return of 0 (S355). That is, since there was no part corresponding to the rail head A1, the identification means 102 returns a determination code of 0 to the caller, determining that it is neither the left nor the right straight section of the rail's body.

[0179] When a vertex is obtained (if the result is "No" in S354), as shown in Figure 18B, the identification means 102 assumes that the rail head A1 is located in the pseudo-straight section C and determines whether the obtained vertex PMA is at an appropriate height (S356).

[0180] Regarding the determination in step S356, in practice, as shown in Figure 6B, if the vertex PMA, which is the highest point, is 10 mm lower than the height of the top edge of the head determination area R0 and 30 mm higher than the height of the bottom edge of the head determination area R0, it is determined to be appropriate. If the difference between the height of vertex PMA and the height of the bottom edge of the head determination area R0 is less than 30 mm, the height of the rail head is too small and it is determined to be inappropriate. Also, if there is an intersection between the top edge of the head determination area R0 and the pseudo-contour line L1, it is determined to be inappropriate. Furthermore, if the intersection points of the head determination area R0 and the pseudo-contour line L1 exist on the top edge and left and right edges of the head determination area R0, it is determined to be inappropriate.

[0181] The thresholds of 10mm and 30mm mentioned above are pre-set using processing parameter D4.

[0182] The dimensions of the standard rails mentioned above—A7, A6, a 20mm clearance, and a 60mm width on the left and right sides of the rectangle—are pre-set using processing parameter D4.

[0183] The identification means 102 determines whether the acquired vertex PMA is at an appropriate height (S357).

[0184] If the determination is inappropriate (if the result is "No" in S357), the identification means 102 returns to the caller (S326 in the flowchart of Figure 17B) with a return of 0, indicating that it is not a straight section on either the left or right side of the rail's belly (S358).

[0185] If the determination is appropriate (if "Yes" is answered in S357), the identification means 102 determines whether the line segment (x1,y1)-(x2,y2) of the pseudo-straight section C is on the left or right side of the rail web A2, by creating a rectangular lower right determination area R1 and a lower left determination area R2 on the cross-sectional plane from the line segment (x1,y1)-(x2,y2) of the pseudo-straight section C (S359). These are shown in schematic diagrams in Figures 6C to 6F.

[0186] The identification means 102 reads the point cloud data D2S on the cross-sectional plane into the lower right determination area R1 and the lower left determination area R2, and determines the number of points in the lower right determination area R1 and the lower left determination area R2 (S360). By checking the number of points obtained, the identification means 102 can determine whether the line segment (x1,y1)-(x2,y2) of the pseudo-straight section C is on the left or right side of the rail's web.

[0187] The identification means 102 determines whether the number of points in the lower right determination area R1 is greater than or equal to a specified number, and whether there are 0 points in the lower left determination area R2 (S361). If the number of points in the lower right determination area R1 is greater than or equal to a specified number, and there are 0 points in the lower left determination area R2 (if "Yes" is found in S361), the identification means 102 returns to the caller (step S326 in the flowchart of Figure 17B) with return 2 (S362). The line segment (x1, y1) - (x2, y2) of the pseudo-straight section C is determined to be the straight section on the right side of the rail's web. This is shown in the schematic diagram of Figure 6C. The specified number in step S361 is set in advance by the processing parameter D4, for example, to 10 points or more.

[0188] If the number of points in the lower right determination area R1 is greater than or equal to a specified number, and there are not zero points in the lower left determination area R2 (in the case of "No" in S361), the identification means 102 determines whether the number of points in the lower left determination area R2 is greater than or equal to a specified number, and whether there are zero points in the lower right determination area R1 (S363).

[0189] When the number of points in the lower left determination area R2 is greater than or equal to a specified number, and there are 0 points in the lower right determination area R1 (if "Yes" is found in S363), the identification means 102 returns to the caller (S326 in the flowchart of Figure 17B) with return 1 (S365). That is, the line segment (x1, y1) - (x2, y2) of the pseudo-straight section C is determined to be the straight section on the left side of the rail's web. This is shown in the schematic diagram of Figure 6D. The specified number in step S363 is set in advance by the processing parameter D4, for example, to 10 points or more.

[0190] If the number of points in the lower left determination area R2 is greater than or equal to a specified number, and there are more than 0 points in the lower right determination area R1 (if "No" is found in S363), the system returns to the caller (S326 in the flowchart of Figure 17B) with a return code of 0 (S364). In other words, the identification means 102 determines that the line segment (x1, y1) - (x2, y2) of the pseudo-straight section C is not a straight section on either the left or right side of the rail's web, and returns a determination code of 0 to the caller.

[0191] Fitting process Using the flowcharts shown in Figures 19A to 19E, we will explain the reading of standard data in step S4 and the fitting process in step S5 of the flowchart shown in Figure 11.

[0192] As shown in Figure 19A, the fitting means 103 prepares by allocating a table (array) and setting parameters (S501).

[0193] Specifically, the fitting means 103 reserves a coordinate table (array) that stores the continuous lines of the reference contour line L2, which is the cross-sectional shape of the standard rail, with a slightly larger size (KGPointCount=951,KGX_T

[0955] ,KGY_T

[0955] ).

[0194] The fitting means 103 converts the reference contour line L2 into a coordinate system on the cross-sectional plane during the fitting process, and reserves a slightly larger coordinate table (array) to store the coordinate-transformed reference contour line L2's continuous lines (KNPointCount = 951, KNX_T

[0955] , KNY_T

[0955] ).

[0195] Furthermore, the fitting means 103 secures a table (as shown in Figure 7B, a table that stores the coordinate values ​​from the starting point KB to the ending point KT of the rail web of the reference contour line L2) that stores the vertex coordinates of the straight portion on the right or left side of the rail web. (KPointCount = 0,KX_T

[0100] ,KY_T

[0100] ,SumDist_TBL

[0100] )

[0196] Furthermore, as shown in Figure 7B, the fitting means 103 sets the step size for moving the straight portion of the rail web of the reference contour line L2 from the starting coordinate KB to the ending coordinate KT (Pic_Length = 0.0003 (0.3 mm)). The ISpan_Count variable stores the number of registered pseudo-straight sections C, which are characteristic parts, registered in the identification process S3 of the specific part shown in Figure 11 of the identification means 102.

[0197] In step S4 of the flowchart shown in Figure 11, the fitting means 103 reads the JIS 50kgN cross-sectional shape of the standardized rail from the standard data D1 stored in the storage unit 11. The fitting means 103 reads the continuous lines of the reference contour line L2, which is the JIS 50kgN cross-sectional shape of the standardized rail, into a coordinate table (array) (S502). The fitting means 103 stores the number of vertices of the read cross-sectional shape in the variable KGPointCount. For example, the number of read vertices KGPointCount = 951 points. The fitting means 103 also stores the X coordinate value of each vertex in the array elements KGX_T[1] to KGX_T

[0951] . And the fitting means 103 stores the Y coordinate value of each vertex in the array elements KGY_T[1] to KGY_T

[0951] .

[0198] Next, the fitting means 103 initializes the index variable i, which is used to extract the pseudo-linear portion C, which is one of the registered feature regions, to 0 (S503).

[0199] Furthermore, the fitting means 103 adds 1 to the index variable i (S504).

[0200] Next, the fitting means 103 initializes the variables necessary for the fitting process (S505). Specifically, the fitting means 103 assigns the maximum number 9999.0 as the initial value for the variable Min_AA_DDist in order to store the minimum value of the average of the differences. Also, the fitting means 103 assigns 0.0 as the initial value for the variable Sum_Dist in order to store the cumulative distance.

[0201] The fitting means 103 determines whether the extraction of the pseudo-linear portion C, which is a feature area of ​​the pseudo-contour line L1 of the index variable i, has been completed (S506).

[0202] If variable i is greater than variable ISpan_Count (i.e., "Yes" in S506), the fitting means 103 terminates the fitting process.

[0203] If variable i is less than or equal to variable ISpan_Count (i.e., "No" in S506), fitting means 103 extracts the elements of the pseudo-straight section C, which is the feature part of the pseudo-contour line L1 at index variable i, into each variable (S507). Specifically, fitting means 103 stores the starting coordinates in variables ax and ay (ax = Span_X1_T[i], ay = Span_Y1_T[i]), the ending coordinates in variables bx and by (bx = Span_X2_T[i], by = Span_Y2_T[i]), the distance between two points, which is the length of the pseudo-straight section C, which is the feature part, in variable BaseDist (BaseDist=Span_Dist_T[i]), and a discrimination code that determines whether it is the left or right straight section of the rail's belly, in variable intLeft_Right_Code. These correspond to the starting coordinates GB(ax,ay) and ending coordinates GT(bx,by) of the pseudo-linear section C, which is a characteristic part of Figure 7B.

[0204] The fitting means 103 checks for the geometric intersection between the pseudo-linear portion C, whose index is the i-th feature portion, and the already registered reference contour line L2' (the same location, which has already been fitted and registered as a reference contour line L2') (S508). In step S508, the "fitting rail" refers to the fitted reference contour line L2'.

[0205] The fitting means 103 determines whether there was a geometric intersection (S509).

[0206] If a geometric intersection occurs (if "Yes" is answered in S509), and assuming that a reference contour line L2' that has already been registered already exists at the same location, the fitting means 103 returns to step S504 of the flowchart in Figure 19A in order to process the next feature area, the pseudo-linear section C.

[0207] If there is no geometric intersection (in which case the result is "No" in S509), the fitting means 103 determines whether the variable intLeft_Right_Code, which is a discrimination code that determines whether it is the left or right straight section of the rail's web A2, is 1 (S510).

[0208] If the variable intLeft_Right_Code=1 (if "Yes" is selected in S510), the fitting means 103 assumes that the position of the pseudo-straight section C, which is a feature part, corresponds to the left side of the rail web A2, which is a standard rail. In step S502, the fitting means 103 cuts out the vertex coordinates of the straight section on the left side of the rail web of the reference contour line L2 from the read reference contour line L2, and stores the number of vertices of the cut-out straight section on the left side of the web in the variable KPointCount (S511). For example, if the number of vertices of the cut-out straight section is KPointCount=43, the array elements KX_T[1] to KX_T

[43] will store the X coordinate value of each cut-out vertex. The array elements KY_T[1] to KY_T

[43] will store the Y coordinate value of each cut-out vertex. These will be stored in order from the bottom to the top of the straight section on the left side of the rail web A2 of the cross-sectional shape of the standard rail.

[0209] If the variable intLeft_Right_Code is not 1 (i.e., "No" in S510), the fitting means 103 determines whether the variable intLeft_Right_Code, which is a discrimination code used to determine whether it is the left or right straight section of the rail's web A2, is 2 (S512).

[0210] If the variable intLeft_Right_Code is not 2 (i.e., "No" in S512), the fitting means 103 returns to step S504 of the flowchart in Figure 19A.

[0211] If the variable intLeft_Right_Code=2 (if "Yes" is selected in S512), the fitting means 103 assumes that the position of the pseudo-straight section C, which is a feature part, corresponds to the right side of the rail web A2, which is a standard rail. In step S502, the fitting means 103 cuts out the vertex coordinates of the straight section on the right side of the rail web of the reference contour line L2 from the read reference contour line L2, and stores the number of vertices of the cut-out straight section on the right side of the web in the variable KPointCount (S513). For example, if the number of vertices of the cut-out straight section is KPointCount=43, the array elements KX_T[1] to KX_T

[43] will store the X coordinate value of each cut-out vertex. The array elements KY_T[1] to KY_T

[43] will store the Y coordinate value of each cut-out vertex. These will be stored in order from the bottom to the top of the straight section on the left side of the rail web A2 of the cross-sectional shape of the standard rail.

[0212] Once the array has finished loading, the fitting means 103 calculates the cumulative distance from the starting point to the ending point from the coordinate array of the straight portion of the rail web A2 of the reference contour line L2, which is a standard rail, and stores it in the distance array (S514), as shown in the flowchart of Figure 19C. This process is implemented as a subroutine and will be described later using the flowchart shown in Figure 20.

[0213] Subsequently, as shown in Figure 7B, the fitting means 103 calculates point KMB(kax,kay) by moving a cumulative distance Sum_Dist from the coordinates of the starting point KB, using the coordinate array of the straight portion of the rail web A2 of the reference contour line L2. It then obtains the indices Index_A and Index_B of the interval in the calculated array (S515). For example, if point KMB(kax,kay) is found at the midpoint between the 3rd and 4th points in the coordinate array, Index_A is 3 and Index_B is 4. This process is implemented as a subroutine and will be described later using the flowcharts shown in Figures 21A and 21B.

[0214] Next, as shown in Figure 7B, the fitting means 103 calculates point KMT(kbx,kby) moved by a distance BaseDist from the coordinate array of the straight portion of the rail web A2 of the reference contour line L2, and the point KMB(kax,kay) obtained in step S515 and section index Index_A (S516).

[0215] This process is implemented as a subroutine and will be described later using the flowcharts shown in Figures 22A and 22B.

[0216] Next, the fitting means 103 determines whether or not points KMB and KMT have been determined (S517).

[0217] If points KMB and KMT cannot be determined (if the result is "No" in S517), fitting means 103 determines whether Min_AA_DDist is less than 999.0 (S520). In step S505, the variable Min_AA_DDist is initially set to the maximum number 9999.0. Therefore, in the determination in step S532, if Min_AA_DDist < 999.0 is 'true', it means that the average value of the smallest difference (amount of deviation) has been obtained during the iterative process.

[0218] If Min_AA_DDist is not < 999.0 (i.e., "No" is returned in S520), return to step S504 of the flowchart in Figure 19A.

[0219] When Min_AA_DDist < 999.0 (if "Yes" is answered in S520), the fitting means 103 transforms (maps) the reference contour line L2 to the coordinate system of the pseudo contour line L1 (the coordinate system of the cross-sectional plane) and registers the shape of the coordinate-transformed reference contour line L2' (S521). The coordinate transformation is performed using the transformation parameter that had the smallest average difference (amount of deviation). The fitting means 103 performs the transformation using the transformation parameter that is temporarily stored. The temporarily stored parameter is stored in step S531 of the flowchart in Figure 19E, which will be described later. The variables of the temporarily stored transformation parameter are AK0_Min, AK1_Min, BK0_Min, and BK1_Min. Therefore, using the parameters AK0_Min, AK1_Min, BK0_Min, and BK1_Min, the coordinates of each vertex of the reference contour line L2 are transformed (mapped) to the coordinate system of the pseudo contour line L1 (the coordinate system of the cross-sectional plane). This mapped reference contour line L2' is then defined as the reference contour line L2'. This coordinate transformation process is implemented as a subroutine and will be explained using the flowchart shown in Figure 24. The transformed reference contour line L2' is then registered as a shape. Once the shape is registered in step S521, the fitting process is completed for one rail. The reference contour line L2' referred to here is the same as that shown in Figure 7F. Figure 7F shows an example of the entire fitting process, where the reference contour line L2' shown as a solid line is adopted as the closest to the pseudo contour line L1.

[0220] Once the process in step S521 is complete, the process returns to step S504 in the flowchart of Figure 19A.

[0221] If both points KMB and KMT are obtained (if "Yes" is answered in S517), the fitting means 103 performs a coordinate transformation process using the two points and obtains transformation parameters (S518). The fitting means 103 was able to find corresponding points from the line segment GB(ax,ay)-GT(bx,by) of the pseudo-straight line section C, which is a feature area, and the reference straight line section C', KMB(kax,kay) and KMT(kbx,kby), which is a feature area of ​​the rail web A2 of the reference contour line L2. Therefore, the fitting means 103 obtains the parameters AK0, AK1, BK0, BK1 and Scale for the coordinate transformation using the two points, where the points (kax,kay) and (kbx,kby) before transformation are moved to the points (ax,ay) and (bx,by) after transformation. This coordinate transformation using two points is implemented as a subroutine and will be described later using the flowchart shown in Figure 23. As a result, the parameters for the coordinate transformation between the two points—AK0, AK1, BK0, BK1, and Scale—are obtained. Regarding Scale, the value is almost always close to 1.0, which is within the valid range. You can check the Scale value if necessary.

[0222] Next, the fitting means 103 transforms (maps) the coordinates of each vertex of the reference contour line L2 to the coordinate system of the pseudo contour line L1 (the coordinate system of the cross-sectional plane) using the parameters AK0, AK1, BK0, and BK1 obtained in step S518 (S519). The reference contour line L2 mapped onto this cross-sectional plane is called the reference contour line L2'. This process is implemented as a subroutine and will be explained using the flowchart shown in Figure 24.

[0223] Next, as shown in Figure 19D, the fitting means 103 determines whether the variable intLeft_Right_Code = 1 or not (S522).

[0224] When the variable intLeft_Right_Code = 1 (if "Yes" is answered in S522), the pseudo-straight section C, which is the feature area, is the straight section on the left side of the rail web A2, and the fitting means 103 creates a comparison area R3 to the left of the pseudo-straight section C, which is the feature area, on the transverse plane (S523).

[0225] When the variable intLeft_Right_Code is not equal to 1 (in the case of "No" in S522), the fitting means 103 determines whether the variable intLeft_Right_Code is equal to 2 (S524).

[0226] When the variable intLeft_Right_Code is not equal to 2 (in the case of "No" in S524), it returns to step S504 of the flowchart in FIG. 19A.

[0227] When the variable intLeft_Right_Code is equal to 2 (in the case of "Yes" in S524), the pseudo straight line part C which is a feature part is a straight line part on the right side of the abdomen A2 of the rail, and the fitting means 103 creates a comparison region R3 on the right side on the cross-sectional plane from the pseudo straight line part C which is a feature part (S525).

[0228] Subsequently, the fitting means 103 acquires the point group within the region of the comparison region R3 from the point group data D2S on the cross-sectional plane (S526). Specifically, the number of point groups within the comparison region R3 is substituted into the variable RPointCount, and a table (array) of the point groups within the comparison region R3, RX_T[RPointCount + 3], RY_T[RPointCount + 3] is secured (secured slightly more than RPointCount), and the point groups within the comparison region R3 are read from the point group data D2S on the cross-sectional plane into the tables (arrays) RX_T, RY_T. Thus, the point groups are read into tables RX_T[1], RY_T[1] to RX_T[RPointCount], RY_T[RPointCount]. (For the reference figures, refer to FIGS. 7G and 7H)

[0229] Next, the fitting means 103 determines whether the number of point groups within the comparison region R3 is more than the specified number (whether the number of point groups is equal to or more than the specified number) (S527). The specified number is parameterized and is set in the preprocessing parameter D4 in advance. For example, the specified number is set to 30 points or more. This is because if the number of points is small, the average value of the separation amount will lack reliability.

[0230] If the number is less than the specified number (when "No" in S527), the process proceeds to step S532 of the flowchart in FIG. 19E.

[0231] If the number is greater than or equal to the specified number (when "Yes" in S527), in step S526, the fitting means 103 obtains the difference (distance) between the point group within the acquired comparison region R3 and each line segment of the reference contour line L2' mapped onto the cross-sectional plane by coordinate transformation in step S519, as shown in FIGS. 8A and 8B (S528). Specifically, the fitting means 103 obtains the average value AA_DDist of the differences (distances) between the point group within the region and each line segment of the reference contour line L2'. This process is subroutinized and will be described later using the flowcharts shown in FIGS. 25A to 25G.

[0232] After obtaining the difference (distance), the fitting means 103 determines whether the average value has been obtained (S529).

[0233] If the average value has not been obtained (when "No" in S529), the process proceeds to step S532.

[0234] If the average value has been obtained (when "Yes" in S529), the fitting means 103 determines whether Min_AA_DDist is greater than AA_DDist (S530). Here, since AA_Dist is obtained for each iteration process, this is to adopt the average value of the smallest difference (distance) among them.

[0235] If Min_AA_DDist > AA_DDist is not true (when "No" in S530), the process proceeds to step S532.

[0236] If Min_AA_DDist > AA_DDist (if "Yes" is answered in S530), the fitting means 103 temporarily stores the average value of the deviation amount and its conversion parameters (S531). Specifically, the fitting means 103 temporarily records the average value of the difference (deviation amount) of the variable AA_DDist in Min_AA_DDist (Min_AA_DDist = AA_DDist). Therefore, the variable Min_AA_DDist is assigned the average value of the minimum difference (deviation amount) during the iterative process. Furthermore, the fitting means 103 temporarily stores the parameter value of variable AK0 in variable AK0_Min (AK0_Min = AK0), the parameter value of variable AK1 in variable AK1_Min (AK1_Min = AK1), the parameter value of variable BK0 in variable BK0_Min (BK0_Min = BK0), and the parameter value of variable BK1 in variable BK1_Min (BK1_Min = BK1). Step S531 can detect the minimum value of the average value of the difference (deviation amount) from among the repeated processes.

[0237] The fitting means 103 adds the value of the pitch variable Pic_Length to the cumulative travel distance variable Sum_Dist, for example, Sum_Dist = Sum_Dist + Pic_Length (S532). The value of Pic_Length is 0.0003 (0.3 mm).

[0238] In step S532, the amount of movement is added to the cumulative distance traveled, and the loop is repeated. The process returns to step S515 in Figure 19C.

[0239] Next, using the flowchart in Figure 20, we will explain the subroutine processing of step S514 in the flowchart of Figure 19C. Step S514 is a process that calculates the cumulative distance from the starting point to the ending point from a table (array) of the straight portion of the rail web of the standard rail, the reference contour line L2, and stores it in a distance table (array). The fitting means 103 assigns the number of vertices to the variable KPointCount, the array variables KX_T and KY_T are assigned the vertex coordinates of the left or right straight portion of the rail web of the reference contour line L2 from 1 to KPointCount, and assigns the cumulative distance from the starting point to each element of the distance table (array) variable SumDist_T. (In the example in Figure 7B, this refers to the section from the starting point KB to the ending point KT of the reference contour line L2.)

[0240] As shown in the flowchart of Figure 20, the fitting means 103 first performs initialization (S540). Specifically, the fitting means 103 stores the coordinate values ​​of the vertices of element 1 in the variables ax and ay, ax=KX_T[1] and ay=KY_T[1], assigns the cumulative distance of 0.0 to the first element, SumDist_T[1] = 0.0, the variable Sum_Dist_TP = 0.0 which is used to calculate the cumulative distance and is initially initialized to 0.0, and i=2, where i is an index variable and is initially stored with the value 2.

[0241] Next, the fitting means 103 determines whether the index variable i is less than or equal to KPointCount (S541).

[0242] If i ≤ KPointCount is not true (i.e., "No" in S541), the fitting means 103 terminates this subroutine process and returns to step S514 of the flowchart in Figure 19C, which is the caller.

[0243] When i ≤ KPointCount (if "Yes" is answered in S541), the fitting means 103 calculates the cumulative distance (S542). The fitting means 103 stores the X coordinate value of the i-th element in bx = KX_T[i], stores the Y coordinate value of the i-th element in by = KY_T[i], calculates the distance of the line segment (ax, ay) - (bx, by), and stores it in the variable dist. Sum_Dist_TP = Sum_Dist_TP + dist adds the value of the variable dist to the variable Sum_Dist_TP. SumDist_T[i] = Sum_Dist_TP stores the cumulative distance from the starting point, which is the value of the variable Sum_Dist_TP, in the i-th element of the array SumDist_T[i].

[0244] Next, the fitting means 103 stores the coordinate value of the i-th element in the variables ax and ay (ax = KX_T[i], ay = KY_T[i]) (S542).

[0245] Next, the fitting means 103 adds 1 to the index variable i (S543). Then the process returns to step S541.

[0246] The flowcharts in Figures 21A and 21B will be used to explain the process of step S515 of the flowchart (subroutine) in Figure 19C. In step S515, the fitting means 103 finds the intermediate point KMB (kax, kay) obtained by moving a cumulative distance Sum_Dist from the starting point coordinates using an array of straight portions of the rail web A2 of the reference contour line L2. In step S515, the array of straight portions of the rail web A2 of the reference contour line L2 stores the number of vertices in the variable KPointCount, and the array variables KX_T, KY_T, and SumDist_T store the vertex coordinates of the straight portions of the rail web of the reference contour line L2 from 1 to KPointCount, and the cumulative distance from the starting point. In step S515, the intermediate point KMB (kax, kay) obtained by moving a cumulative distance Sum_Dist from the starting point is found, and the index Index_A and Index_B of the array of the interval in which the point was found are returned. Furthermore, it returns 1 if the process is successful and 0 if it fails. (It finds the KMB point of the reference contour line L2 in Figures 7B to 7F.)

[0247] As shown in the flowchart in Figure 21A, the fitting means 103 first performs initialization (S550). Specifically, the fitting means 103 initializes the index variable j to 0 (j=0) and the flag variable indicating whether an intermediate point has been found to 0 (intFind_Signal = 0). A value of 0 is the flag (signal) when no intermediate point is found, and a value of 1 is the flag (signal) when an intermediate point is found. The fitting means 103 initializes the indices Index_A and Index_B, which are the intervals when an intermediate point is found, to 0. It also assigns Sum_Dist to SDist (SDist=Sum_Dist). In this subroutine, for convenience, SDist is assumed to be "an arbitrary distance".

[0248] Next, the fitting means 103 adds 1 to the index variable j (j = j + 1) (S551).

[0249] Thereafter, the fitting means 103 determines whether the index variable j is less than or equal to KPointCount - 1 (S552).

[0250] When j ≦ KPointCount - 1 is not satisfied (when the answer is "No" in S552), the process proceeds to step S559 in the flowchart of FIG. 21B.

[0251] When j ≦ KPointCount - 1 (when the answer is "Yes" in S552), the fitting means 103 determines whether SumDist_T[j] ≦ SDist ≦ SumDist_T[j + 1], that is, whether an arbitrary distance (SDist) is within the interval between j and j + 1 (S553). Since each element of the table (array) SumDist_T stores the cumulative distance, specifically, the fitting means 103 determines whether an arbitrary distance (SDist) is within the interval between j and j + 1.

[0252] If it is not within the interval (when the answer is "No" in S553), the process returns to step S551.

[0253] If it is within the interval (when the answer is "Yes" in S553), the fitting means 103 obtains the remaining distance as shown in the flowchart of FIG. 21B (S554). Since R_Dist = SDist - SumDist_T[j] and an arbitrary distance (SDist) is within the interval between j and j + 1, specifically, the fitting means 103 can obtain the remaining distance by subtracting the cumulative distance SumDist_T[j] at the start of this interval from an arbitrary distance (SDist). The fitting means 103 stores the remaining distance in the variable R_Dist.

[0254] Subsequently, the fitting means 103 calculates the distance between intervals j and j+1 (S555). Specifically, the fitting means 103 stores the j-th X coordinate value of the element in ax (ax=KX_T[j]), stores the j-th Y coordinate value of the element in ay (ay=KY_T[j]), stores the (j+1)-th X coordinate value of the element in bx (bx=KX_T[j+1]), stores the (j+1)-th Y coordinate value of the element in by (by=KY_T[j+1]), calculates the distance of the line segment (ax,ay)-(bx,by) and stores it in the variable Dist.

[0255] Furthermore, the fitting means 103 calculates the distance ratio (S556). Specifically, the fitting means 103 divides the remaining distance by the interval distance to calculate the distance ratio and stores it in the variable RT (RT = R_Dist / Dist).

[0256] Next, the fitting means 103 calculates the midpoint (S557). Specifically, the fitting means 103 calculates the x-coordinate of the midpoint for the x component and stores it in the variable kax (kax = ax + RT×(bx-ax)), and calculates the y-coordinate of the midpoint for the y component and stores it in the variable kay (kay = ay + RT×(by-ay)). This completes the calculation of the midpoint KMB(kax,kay).

[0257] Next, the fitting means 103 stores 1 in the flag (signal) variable (intFind_Signal = 1), stores j in the variable Index_A, which is the index of the found interval, and stores j+1 in the variable Index_B (S558).

[0258] After that, the fitting means 103 returns to step S515 of the flowchart in Figure 19C, which is the caller. At that time, it returns the value of the variable intFind_Signal (S559). If intFind_Signal=1, the fitting means 103 returns the intermediate point KMB(kax,kay), the interval Index_A, Index_B for which that point was found, and 1, because the intermediate point could be calculated. On the other hand, if intFind_Signal=0, the fitting means 103 returns 0 because the intermediate point could not be calculated.

[0259] The subroutine processing of step S516 in the flowchart of Figure 19C will be explained using the flowcharts in Figures 22A and 22B. In step S516, the fitting means 103 obtains the intermediate point KMB(kax,kay) obtained by moving the cumulative distance Sum_Dist from the starting point coordinates, which was obtained in step S515 of Figure 19C, from the array of straight portions of the rail web A2 of the reference contour line L2, and the point KMT(kbx,kby) obtained by moving the cumulative distance BaseDist from the array index Index_A of the section in which that point was obtained. In step S516, the fitting means 103 obtains the array of straight portions of the rail web A2 of the reference contour line L2, where the number of vertices is stored in the variable KPointCount, and the array variables KX_T, KY_T, and SumDist_T store the vertex coordinates of the straight portions of the rail web of the reference contour line L2 from 1 to KPointCount, and the cumulative distance from the starting point. In step S516, the fitting means 103 returns point KMT(kbx,kby) which is moved from the intermediate point KMB(kax,kay) by BaseDist. It also returns 1 if the process is successful and 0 if it fails. Furthermore, if a point could not be found in step S515 of the flowchart in Figure 19C, the fitting means 103 does not execute the process in step S516. (Point KMT is found from KMB of the reference contour line L2 in Figures 7B to 7F.)

[0260] As shown in the flowchart of Figure 22A, the fitting means 103 first performs initialization (S618). Specifically, the fitting means 103 stores Index_A in the index variable i. Index_A is the index obtained in step S515 of the flowchart in Figure 19C, and the fitting means 103 searches from that index onward. The flag variable indicating whether the intermediate point KMT was found is initialized to 0 (intFind_Signal = 0). A value of 0 indicates that the intermediate point KMT was not found, and a value of 1 is the flag (signal) indicating that the intermediate point KMT was found.

[0261] The fitting means 103 determines whether the index variable i+1 is less than KPointCount (S619).

[0262] If i+1 < KPointCount (i.e., "No" in S619), proceed to step S626 of the flowchart in Figure 22B.

[0263] When i+1 < KPointCount (if "Yes" is answered in S619), the fitting means 103 calculates the distance between point KMB(kax,kay) and point (KX_T[i],KY_T[i]) and stores it in Dist_A (S620).

[0264] The fitting means 103 calculates the distance between point KMB(kax,kay) and point (KX_T[i+1],KY_T[i+1]) and stores it in Dist_B (S621).

[0265] The fitting means 103 determines whether the distance BaseDist lies between the intervals i and i+1 using the conditional statement (Dist_A < BaseDist) AND (Dist_B ≥ BaseDist) (S622). It determines whether there exists a point at the midpoint of the line segments (KX_T[i], KY_T[i]) and (KX_T[i+1], KY_T[i+1]) that is at a distance of BaseDist from point KMB (kax, kay). If the conditional statement is false (if "No" is found in S622), 1 is added to index i (S623), and the process returns to step S619 in the flowchart of Figure 22A.

[0266] The fitting means 103 calculates the intersection of the circle and the line segment if the condition in S622 is true (if "Yes" is given in S622). It finds the intersection of the line segment (KX_T[i],KY_T[i])-(KX_T[i+1],KY_T[i+1]) and the circle whose center coordinates are point KMB(kax, kay) and whose radius is BaseDist. In this case, two intersection points are found, so the intersection point on the line segment (KX_T[i],KY_T[i])-(KX_T[i+1],KY_T[i+1]) is selected and set as KMT(kbx,kby) (S624).

[0267] Next, the fitting means 103 stores 1 in the flag (signal) variable (intFind_Signal = 1) (S625).

[0268] Subsequently, the fitting means 103 returns the value of the variable intFind_Signal and returns to step S516 of the flowchart in Figure 19C, which is the caller (S626). If intFind_Signal=1, the fitting means 103 returns the intermediate point KMT(kbx, kby) and 1, as the intermediate point has been calculated. On the other hand, if intFind_Signal=0, the fitting means 103 returns 0 if the intermediate point cannot be calculated and terminates the subroutine.

[0269] Using the flowchart in Figure 23, the subroutine processing of step S518 in the flowchart in Figure 19C will be explained. Step S518 is the process of calculating the transformation parameters for a coordinate transformation using two points. As shown in Figures 7C to 7E, the reference straight section C', KMB(kax,kay) and KMT(kbx,kby), which are characteristic parts of the rail web A2 of the reference contour line L2, are treated as the two points (AX,AY) and (BX,BY) before the subroutine transformation, and the line segments GB(ax,ay) and GT(bx,by) of the pseudo-straight section C, which are characteristic parts, are treated as the two points (AX_NEW,AY_NEW) and (BX_NEW,BY_NEW) after the subroutine transformation. A coordinate transformation process using two points is then performed, and the transformation parameters are calculated. The transformation parameters for transforming the reference contour line L2 to the reference contour line L2' in the coordinate system on the cross-sectional plane are calculated. (See Figures 7B to 7F for reference diagrams.)

[0270] The fitting means 103 calculates the transformation parameters for a coordinate transformation using two points (S560). Here, the fitting means 103 finds the parameters (AK0, BK0, AK1, BK1, Scale) for a two-point transformation where two points (AX, AY) and (BX, BY) before the transformation move to two points (AX_NEW, AY_NEW) and (BX_NEW, BY_NEW) after the transformation. AK0 is the amount of movement of the x component, BK0 is the amount of movement of the y component, AK1 is the cosθ of the rotation parameter, BK1 is the sinθ of the rotation parameter, and Scale is the scale, and returns these to the caller (step S518 in the flowchart of Figure 19C).

[0271] Specifically, the fitting means 103 determines sxd, syd, and tpv from the points (AX, AY) and (BX, BY) before transformation. The fitting means 103 also determines xd and yd from the points (AX_NEW, AY_NEW) and (BX_NEW, BY_NEW) after transformation. sxd = BX - AX ... (1.1) syd=BY-AY ···(1.2) tpv=sxd×sxd+syd×syd (1.3) xd = BX_NEW - AX_NEW ... (1.4) yd = BY_NEW - AY_NEW ... (1.5)

[0272] Subsequently, the fitting means 103 determines the rotation parameters AK1 and BK1 from the obtained sxd, syd, tpv, xd, and yd. AK1=((sxd×xd)+(syd×yd)) / tpv ···(2.1) BK1=((sxd×yd)-(syd×xd)) / tpv ···(2.2)

[0273] Next, the fitting means 103 determines the origin (AK0, BK0) and the scale. AK0=AX_NEW-(AK1×AX)+(BK1×AY) ···(3.1) BK0=BY_NEW-(BK1×AX)-(AK1×AY) ···(3.2) Scale=sqrt(AK1×AK1+BK1×BK1) ···(3.3) sqrt is a function that calculates the positive square root of the value of AK1 × AK1 + BK1 × BK1.

[0274] Using the flowchart in Figure 24, the subroutine processing of step S519 in the flowchart in Figure 19C will be explained. Step S519 is the process of transforming (mapping) the coordinate system of the reference contour line L2 to the coordinate system of the pseudo contour line L1 (the coordinate system of the cross-sectional plane). Specifically, the coordinates of each vertex of the reference contour line L2 are transformed (mapping) to the coordinate system of the pseudo contour line L1 (the coordinate system of the cross-sectional plane). The reference contour line L2 that has been transformed on the cross-sectional plane is then designated as the reference contour line L2'. (See Figures 7B to 7F for reference diagrams.)

[0275] This process is implemented as a subroutine. For example, the fitting means 103 performs a coordinate transformation on the cross-sectional plane using the transformation parameters for the two-point coordinate transformation obtained in subroutine process S518. The coordinate table (array) of the continuous line of the reference contour line L2, with a number of elements KGPointCount = 951, and the coordinate table (KGX_T[1], KGY_T[1]) ~ (KGX_T

[0951] , KGY_T

[0951] ), is stored in the coordinate table (array) of the reference contour line L2', with a number of elements 1 to 951, KNPointCount = 951, (KNX_T[1], KNY_T[1]) ~ (KNX_T

[0951] , KNY_T

[0951] ).

[0276] First, the fitting means 103 stores 0 as the initial value in the index variable k (S570).

[0277] Next, the fitting means 103 adds 1 to the index variable k (S571).

[0278] Furthermore, the fitting means 103 determines whether the index variable k is less than or equal to the variable KGPointCount (S572).

[0279] If k ≤ KGPointCount (i.e., "No" in S572), the process terminates and returns to step S519 of the flowchart in Figure 19C, which is the caller.

[0280] If k ≤ KGPointCount (if "Yes" is answered in S572), the fitting means 103 performs a transformation to the coordinate system on the cross-sectional plane (S573) and returns to step S571. The coordinates are transformed to the new coordinates according to the transformation parameters calculated in subroutine processing S518. KNX_T[k] = AK0 + (KGX_T[k]×AK1-KGY_T[k]×BK1) ···(4.1) KNY_T[k] = BK0 + (KGX_T[k]×BK1+ KGY_T[k]×AK1) ···(4.2)

[0281] The subroutine processing of step S528 in the flowchart of Figure 19D will be explained using the flowcharts in Figures 25A to 25F. In step S528, the fitting means 103 determines the amount of separation between the point cloud within the comparison region R3 and each line segment of the edge portion of the rail bottom A3 of the reference contour line L2' which has been coordinate-transformed onto the cross-sectional plane. The variable RPointCount stores the number of points in the point cloud within the comparison region R3, and the coordinate table (array) of the point cloud is (RX_T[1], RY_T[1])~(RX_T[RPointCount], RY_T[RPointCount]). The number of vertices of the reference contour line L2', which has been transformed into a coordinate system on the cross-sectional plane, is stored in the variable KNPointCount. The vertex coordinate table (array) of the reference contour line L2' is (KNX_T[1], KNY_T[1])~(KNX_T[KNPointCount], KNY_T[KNPointCount]). The fitting means 103 returns the average value of the difference (amount of deviation) as an output result, storing the value in the variable AA_DDist at step S528 of the flowchart in Figure 19D. If the average value of the difference (amount of deviation) can be found, the fitting means 103 returns 1 at S528 of the flowchart in Figure 19D of the calling program. On the other hand, if the average value of the difference (amount of deviation) cannot be found, the fitting means 103 returns 0 at S528 of the flowchart in Figure 19D of the calling program. (See Figures 7G to 7H and Figures 8A to 8B for reference diagrams.)

[0282] First, as shown in the flowchart of Figure 25A, the fitting means 103, as preparation 1, allocates 1 to RPointCount for each table (array) (S580). Here, the fitting means 103 allocates tables (arrays) RDH_T[RPointCount+3] and RDH_NEW_T[RPointCount+3] to store the separation amount (perpendicular length dh), and an array intMark_T[RPointCount+3] to store a flag indicating whether the separation amount (perpendicular length) was stored or not. Furthermore, it initializes the values ​​of each element in the tables from index 1 to RPointCount+3 and intMark_T to 0.

[0283] Next, the fitting means 103 performs parameter setting and initialization as preparation 2 (S581). Each of these parameter values ​​is parameterized and has been set in advance by processing parameter D4. For example, the fitting means 103 sets the variable SET_DH_Range=0.002 as the threshold for the amount of separation (perpendicular length) between a point and a line segment, and will not adopt it (consider it noise) unless the amount of separation (perpendicular length) is within 2 mm. The variables intSET_Left_StPos=178 and intSET_Left_EnPos=286 are the index of the starting point and the index of the ending point that indicate the smooth curved portion on the left side of the bottom of the rail of the reference contour line L2', from number 178 to 286. The variables intSET_Right_StPos=29 and intSET_Right_EnPos=137 are the indices of the starting and ending points, respectively, that indicate the smooth curved portion on the right side of the bottom of the rail of the reference contour line L2', from the 29th to the 137th point. Furthermore, the fitting means 103 does not calculate the average unless at least 30 points of separation (perpendicular length) have been calculated. This is because calculating the average of the separation (perpendicular length) would be unreliable if the number of points is small. In addition, the fitting means 103 initializes the index variable n to 0. Moreover, the fitting means 103 initializes the variable intMarkCount, which counts the number of times the separation (perpendicular length) has been calculated, to 0.

[0284] Next, the fitting means 103 determines whether it is the left straight section of the rail's web A2, specifically whether intLeft_Right_Code=1 (S582).

[0285] When intLeft_Right_Code=1 (if "Yes" is answered in S582), the fitting means 103 sets the index numbers from the start to the end of the smooth edge portion on the left side of the bottom A3 of the reference contour line L2' (S583). Next, the process proceeds to step S586 of the flowchart in Figure 25B. Specifically, the fitting means 103 sets the index of the starting point to the variable intSt_Pos (intSt_Pos = intSET_Left_StPos) and the index of the ending point to the variable intEn_Pos (intEn_Pos = intSET_Left_EnPos). Here, in step S581, the numbers that constitute the continuous line of the smooth edge portion on the left side of the bottom A3 of the reference contour line L2', as specified by the parameter, are from starting point 178 to ending point 286.

[0286] If ntLeft_Right_Code is not 1 (i.e., "No" in S582), the fitting means 103 determines whether it is the straight section on the right side of the rail's web A2, specifically whether intLeft_Right_Code is 2 or not (S584).

[0287] If intLeft_Right_Code is not 2 (i.e., "No" in S584), the fitting means 103 releases the memory of the allocated array RDH_T, RDH_NEW_T, intMark_T and returns 0 to step S528 of the flowchart in Figure 19D of the calling device. A return of 0 means that the fitting process was unable to achieve an approximation.

[0288] If intLeft_Right_Code=2 (if "Yes" is selected in S584), the fitting means 103 sets the index numbers from the start to the end of the smooth edge portion on the right side of the bottom A3 of the reference contour line L2' (S585). Proceed to step S586 in the flowchart of Figure 25B. Specifically, the fitting means 103 sets the index of the starting point to the variable intSt_Pos (intSt_Pos = intSET_Right_StPos) and the index of the ending point to the variable intEn_Pos (intEn_Pos = intSET_Right_EnPos). Here, in step S581, the numbers that constitute the continuous line of the smooth edge portion on the right side of the bottom A3 of the reference contour line L2', as specified by the parameter, are from starting point 29 to ending point 137.

[0289] As shown in the flowchart of Figure 25B, the fitting means 103 adds 1 to the index variable n (S586). Here, the index variable n specifies an element of the coordinate table of the point cloud within the comparison region R3.

[0290] Next, the fitting means 103 determines whether the index variable n is less than or equal to the number of points RPointCount in the point cloud within the comparison region R3 (S587).

[0291] If n ≤ RPointCount is not true (i.e., the result in S587 is "No"), proceed to step S597 of the flowchart in Figure 25D.

[0292] When n ≤ RPointCount (if "Yes" is answered in S587), the fitting means 103 retrieves a point from the coordinate table of the point cloud within the comparison region R3 of the index variable n (S588). Specifically, the fitting means 103 stores the X coordinate value of the nth element from the coordinate table in px (px = RX_T[n]) and the Y coordinate value of the nth element from the coordinate table in py (py = RY_T[n]).

[0293] Next, the fitting means 103 initializes the index variable m with the index intSt_Pos of the starting point that indicates the smooth curved portion on the left or right side of the rail bottom A3 of the reference contour line L2' (m = intSt_Pos) (S589).

[0294] Next, the fitting means 103 determines whether the index variable m is less than or equal to the index immediately preceding the endpoint (S590).

[0295] If m ≤ intEn_Pos-1 (i.e., "No" in S590), return to step S586.

[0296] When m ≤ intEn_Pos-1 (if "Yes" is answered in S590), the fitting means 103 sets the line segment (ax, ay)-(bx,by) (S591). Specifically, the fitting means 103 stores the X coordinate of index variable m in variable ax from the coordinate table KNX_T[m] (ax = KNX_T[m]), stores the Y coordinate of index variable m in variable ay from the coordinate table KNY_T[m] (ay = KNY_T[m]), stores the X coordinate of index variable m+1 in variable bx from the coordinate table KNX_T[m+1] (bx = KNX_T[m+1]), and stores the Y coordinate of index variable m+1 in variable by from the coordinate table KNY_T[m+1] (by = KNY_T[m+1]).

[0297] Subsequently, the fitting means 103 calculates the perpendicular length dh when a perpendicular is drawn from point (px, py) to the line segment (ax, ay)-(bx,by) (S592). A function is used to calculate the perpendicular length. For example, the function call is intResult_OnLine = Calc_ Perpendicular(ax, ay, bx, by, px, py, dh). As a result, the variable dh is stored in the perpendicular length, and the variable intResult_OnLine returns whether point (px,py) lies on the line segment (ax, ay)-(bx,by) or not. If the returned value is 1, the point lies on the line; if it is 0, the point lies not on the line.

[0298] The fitting means 103 determines whether the point (px,py) lies within the line segment (ax,ay)-(bx,by) (S593). Specifically, the fitting means 103 determines whether intResult_OnLine=1.

[0299] When intResult_OnLine=1 (if "Yes" is found in S593), the fitting means 103 determines whether point (px,py) is within the line segment (ax,ay)-(bx,by) and whether |dh| is less than or equal to SET_DH_Range (S594). In determining whether |dh|≦SET_DH_Range, if the absolute value of the perpendicular length dh obtained by the fitting means 103 is less than or equal to SET_DH_Range, then point (px,py) is considered to be a point on the smooth edge portion of the bottom A3 of the reference contour line L2'. The value of the variable SET_DH_Range is set to 2mm in step S581 of the flowchart in Figure 25A.

[0300] If |dh| ≤ SET_DH_Range (i.e., "No" in S594), return to step S586 of the flowchart in Figure 25B and process the following points.

[0301] When |dh| ≤ SET_DH_Range (if "Yes" is answered in S594), the fitting means 103 stores a flag 1 (intMark_T[n] = 1) indicating that the perpendicular length (difference) has been calculated for point px = RX_T[n], py = RY_T[n] in step S588 of the flowchart in Figure 25B, and temporarily stores the absolute value of the perpendicular length (difference) (RDH_T[n] = |dh|). The fitting means 103 also counts the number of differences adopted (intMarkCount = intMarkCount + 1) (S595). The fitting means 103 returns to step S586 of the flowchart in Figure 25B and processes the next point.

[0302] If intResult_OnLine is not 1 (i.e., "No" in S593), the fitting means 103 determines that point (px,py) is not within the line segment (ax,ay)-(bx,by) and adds 1 to the index variable m (S596). The process returns to step S590 of the flowchart in Figure 25B and executes the processing of the next line segment.

[0303] The fitting means 103 then proceeds to step S597 of the flowchart in Figure 25D, initializing the index variable l to 0 (S597). In the flowcharts of Figures 25B and 25C, the fitting means 103 calculates the perpendicular length between the point cloud and each line segment, and very rarely, there are points outside the line segments that are not calculated. For this reason, in the flowcharts of Figures 25D and 25E, the distance between the point cloud and the vertex of the smooth edge portion of the bottom A3 of the reference contour line L2' is calculated again as the difference.

[0304] Next, the fitting means 103 adds 1 to the index variable l (S598).

[0305] Subsequently, the fitting means 103 determines whether the index variable l is within the number of points RPointCount in the point cloud within the comparison region R3 (S599).

[0306] When l ≤ RPointCount (if "Yes" is answered in S599), the fitting means 103 determines whether the perpendicular length has already been calculated by checking if intMark_T[l] = 1 (S600).

[0307] If intMark_T[l]=1, that is, if the perpendicular length has already been calculated (if "Yes" is answered in S600), return to step S598.

[0308] If intMark_T[l] is not 1 (i.e., "No" in S600), the fitting means 103 assumes that the perpendicular length has not yet been calculated and retrieves a point from the coordinate table of the point cloud within the comparison region R3 of the index variable l (S601). Specifically, the fitting means 103 stores the X coordinate value of the l-th element from the coordinate table in px (px = RX_T[l]) and the Y coordinate value of the l-th element from the coordinate table in py (py = RY_T[l]).

[0309] Next, the fitting means 103 initializes the index variable ix with the index intSt_Pos of the starting point of the smooth curve portion on the left or right side of the rail bottom A3 of the reference contour line L2' (ix = intSt_Pos) (S602).

[0310] Next, proceed to step S603 of the flowchart in Figure 25E, and add 1 to index ix (S603).

[0311] Next, the fitting means 103 determines whether the index variable ix is ​​less than or equal to the endpoint index intEn_Pos (S604).

[0312] If ix ≤ intEn_Pos (i.e., "No" in S604), return to step S598 in Figure 25D.

[0313] When ix ≤ intEn_Pos (if "Yes" is answered in S604), the fitting means 103 obtains the coordinates of the vertex at index ix into variables kx and ky (S605). The X coordinate value of the ixth element from the coordinate table is stored in kx (kx = KNX_T[ix]), and the Y coordinate value of the ixth element from the coordinate table is stored in ky (ky = KNY_T[ix]). These vertex coordinates are the smooth curved portion on the left or right side of the rail bottom A3 of the reference contour line L2'.

[0314] Next, the fitting means 103 calculates the distance, which is the difference (amount of separation) between a point (px, py) in the comparison region R3 and the vertex coordinates (kx, ky) of the smooth curve portion on the left or right side of the rail bottom A3 of the reference contour line L2', and stores it in the variable Dist_AB (S606).

[0315] By checking whether the variable Dist_AB, which stores the distance, is less than or equal to SET_DH_Range, it is determined whether the point (px,py) is a point in the vicinity of the vertex coordinates (kx,ky) of the smooth edge portion of the bottom A3 of the reference contour line L2' (S607). As mentioned above, the value of the variable SET_DH_Range is set to 0.002 (2mm) in step S581 of the flowchart in Figure 25A.

[0316] If Dist_AB ≤ SET_DH_Range is not true (i.e., "No" in S607), then point (px, py) is not a point in the vicinity of the vertex coordinates (kx, ky) of the smooth edge portion of the bottom A3 of the reference contour line L2', and the process returns to step S603.

[0317] If the variable Dist_AB, which stores the distance, is less than or equal to SET_DH_Range (i.e., "Yes" in S607), then point (px, py) is considered to be a point in the vicinity of the vertex coordinates (kx, ky) of the smooth edge portion of the bottom A3 of the reference contour line L2', and point (RX_T[l], RX_T[l]) has been adopted. Therefore, fitting means 103 stores flag 1 as the distance to indicate that the distance has been adopted (intMark_T[l] = 1), and temporarily stores the distance, which is the difference (distance) between point (px, py) in the comparison region R3 and the vertex coordinates (kx, ky) of the smooth curve portion of the bottom A3 of the rail of the reference contour line L2' (RDH_T[l] = Dist_AB). Also, the number of adopted points is counted (intMarkCount = intMarkCount + 1) (S608). Next, return to step S598 of the flowchart in Figure 25D.

[0318] In step S599 of the flowchart in Figure 25D, if l ≤ RPointCount is not true (i.e., the result in "No" in S599), the fitting means 103 determines whether the number of points for which the separation amount has been calculated is at least equal to or greater than intSET_Range_PointCount (S609). Here, the variable intMarkCount stores the number of points for which the separation amount has been calculated. Also, in step S581 of Figure 25A, the variable intSET_Range_PointCount is set to 30, and here, unless at least 30 points have had the separation amount (perpendicular length) calculated, the average value is not calculated.

[0319] If intMarkCount is not greater than or equal to intSET_Range_PointCount (i.e., "No" in S609), the memory allocated for the arrays RDH_T, RDH_NEW_T, and intMark_T is released, and 0 is returned to step S528 of the flowchart in Figure 19D of the calling function. A return of 0 indicates that the average value of the difference could not be calculated.

[0320] When intMarkCount ≥ intSET_Range_PointCount (i.e., "Yes" in S609), fitting means 103 initializes each variable in order to calculate the average value of the deviation (S610). Specifically, fitting means 103 initializes the index variable iy to 0, the variable SumDH which sums the deviations to 0.0, and the counter variable intCount to 0. The reason for initializing the counter variable intCount = 0 is to combine only the differences (deviations) marked in table intMark_T into a new table (array) RDH_NEW_T.

[0321] Proceed to step S611 of the flowchart in Figure 25F. The fitting means 103 adds 1 to the index variable iy (S611).

[0322] Furthermore, the fitting means 103 determines whether the index variable iy is less than or equal to the number of points RPointCount in the point cloud within the comparison region R3 (S612).

[0323] When iy ≤ RPointCount (if "Yes" is answered in S612), the fitting means 103 determines whether the difference (amount of deviation) has been calculated and stored by checking if intMark_T[iy] = 1 (S613).

[0324] If intMark_T[iy] is not 1 (i.e., "No" in S613), the fitting means 103 assumes that the difference (amount of deviation) has not been calculated and returns to step S611.

[0325] When intMark_T[iy]=1 (if "Yes" is answered in S613), the fitting means 103 assumes that the difference (deviation amount) has been calculated and adds 1 to the counter variable intCount (S614).

[0326] Furthermore, the fitting means 103 stores RDH_T[iy] in RDH_NEW_T[intCount] (S615). Only the marked (intMark_T[iy]=1) difference (amount of deviation) is stored in the new table RDH_NEW_T[intCount].

[0327] If iy ≤ RPointCount is not true (i.e., "No" in S612), the fitting means 103 sorts elements 1 to intCount of the table (array), RDH_NEW_T, which now contains the newly summarized differences (deviation amounts), in ascending order (smallest to largest) (S616).

[0328] The fitting means 103 calculates the average of the differences (differences) between elements 1 to intSET_Range_PointCount of the table (array), RDH_NEW_T, as shown in the flowchart in Figure 25G, and stores it in the variable AA_Dist. The reason for calculating the average across elements 1 to intSET_Range_PointCount is to maintain fairness in the average value AA_Dist. When the process of calculating the difference is repeated, the number of elements for which the average is calculated is kept the same for fairness (intSET_Range_PointCount = 30). In this case, the average is calculated using elements 1 to 30. This is because, as the actual number of difference values ​​obtained varies during repeated processing, calculating the average using a varying number of elements would be unfair. Furthermore, the reason the table (array) RDH_NEW_T is sorted in ascending order is that if there are many small deviation values ​​after intSET_Range_PointCount = 30 in the table (array) RDH_NEW_T, a bias will occur in the average value, resulting in a lack of fairness.

[0329] As preparation, the fitting means 103 initializes the counter variable iz to 0 and the variable SumDH, which aggregates the difference (amount of deviation), to 0.0 (S617).

[0330] Add 1 to the counter variable iz (S618).

[0331] When iz ≤ intSET_Range_PointCount (if "Yes" is answered in S619), the fitting means 103 adds the difference (amount of deviation) value RDH_NEW_T[iz] to the variable SumDH, which aggregates the difference (amount of deviation) (S620). Then, the process returns to step S618.

[0332] If iz ≤ intSET_Range_PointCount (i.e., "No" in S619), the fitting means 103 calculates the average value of the differences (amount of deviation) by dividing SumDH, which is the sum of the differences (amount of deviation), by the number intSET_Range_PointCount, and stores it in the variable AA_Dist (S621).

[0333] After the fitting means 103 obtains the average value AA_Dist of the difference (amount of deviation), it releases the memory of the array RDH_T, RDH_NEW_T, and intMark_T, which were allocated in memory, and returns to step S528 of the flowchart in Figure 19D of the caller with a return value of 1. The meaning of the return value 1 is that the average value of the difference has been obtained and the average value has been stored in the variable AA_Dist.

[0334] 《Process for detecting wear amount》 Using the flowchart shown in Figure 26, the wear detection process in step S6 of the flowchart shown in Figure 11 will be explained. The amount of wear on the railway rail is detected based on the difference between the superimposed reference contour line L2' and the pseudo contour line L1. For example, as shown in Figure 9A, when the pseudo contour line L1 and the reference contour line L2' are superimposed, the detection means 104 considers the geometric region (polygon) (blacked-out portion) between the pseudo contour line L1 and the reference contour line L2', formed using the pseudo contour line L1 and the reference contour line L2', as the rail wear region.

[0335] In the detection process, the pseudo-contour line L1 and the reference contour line L2' are superimposed, and the polygonal shape formed between the pseudo-contour line L1 and the reference contour line L2' at the rail head A1 is defined as the wear region. The maximum wear height of the rail, the cross-sectional area of ​​the wear region, and the rail reduction rate are then determined. (See Figures 9A to 9K for reference diagrams.)

[0336] As shown in the flowchart of Figure 26, the detection means 104 reads the continuous lines of the rail head A1 of the registered reference contour line L2' into an array (table) (S701). The detection means 104 reads the vertex coordinates from, for example, the starting point index number 509 to the ending point index number 747 into an array (table) as shown in Figure 9C. The starting and ending point index numbers are parameterized and set in advance by the processing parameter D4.

[0337] Next, as shown in the example in Figure 9D, the detection means 104 marks the continuous line of the rail head A1 of the read reference contour line L2' with a length of Pic_Len, and from the marked points, creates line segments downward in the same direction as the rail inclination DIR, and finds the intersection with the pseudo contour line L1 (S702). The length of the downward line segments is predetermined. The marking width of the variable Pic_Len and the length of the downward line segments are parameterized and set in advance by the processing parameter D4. In the example, the variable Pic_Len = 0.0003, and the marking width is 0.3 mm. The length of the downward line segments is set to approximately 2.5 cm by the parameter. If the downward line segments are too long, they will intersect with line segments of the pseudo contour line L1 other than the rail head A1 that are below, so a threshold is set. The detection means 104 stores the line segment of the pseudo-contour line L1 whose intersection point was first determined, as shown in the enlarged view example in Figure 9E. Furthermore, the detection means 104 stores the line segment of the pseudo-contour line L1 whose intersection point was last determined, as shown in the enlarged view example in Figure 9F.

[0338] As shown in the enlarged view example in Figure 9E, the detection means 104 extends the line segment of the pseudo contour line L1 of the intersection point initially determined in the previous step S702, calculates the intersection point with the continuous line of the rail head A1 of the reference contour line L2', and sets that intersection point as CP1 (S703).

[0339] Furthermore, as shown in the enlarged view example in Figure 9F, the detection means 104 extends the line segment of the pseudo contour line L1 of the intersection point that was last determined in the previous step S702, calculates the intersection point with the continuous line of the rail head A1 of the reference contour line L2', and sets that intersection point as CP2 (S704).

[0340] Subsequently, as shown in the example in Figure 9G, the detection means 104 traces from point CP1 to the intersection with the pseudo-contour line L1 formed on the lower side in order and connects the lines, then passes through point CP2 and traces the reference contour line L2' back to point CP1, connecting the lines as shown in the example in Figure 9H, and creates the wear polygon AT_Polygon (S705).

[0341] Next, as shown in the examples in Figures 9I and 9K, the detection means 104 finds the intersection point of the pseudo-contour line L1 located on the lower side of the polygon from CP1 to CP2, such that it is perpendicular to the line segment of the reference contour line L2', calculates the distance, and finds the line segment AT_LINE that maximizes that distance. The found line segment AT_LINE is defined as the wear height (S706).

[0342] The detection means 104 determines the area of ​​the polygon and uses it as the cross-sectional area of ​​wear, and also determines the rate of decrease of the rail cross-sectional area (S707).

[0343] Subsequently, the registration means 105 registers the wear polygon AT_Polygon, the line segment AT_LINE indicating the wear height, the wear height, the wear cross-sectional area, etc., as a dataset in the result data D3 (S708). Figure 10D shows an example of data registered in the dataset.

[0344] As described above, the above embodiments have been explained as examples of the technology disclosed in this application. However, the technology in this disclosure is not limited thereto and can be applied to embodiments that are modified, replaced, added, or omitted as appropriate.

[0345] The program update systems, control systems, mobile devices, program update methods, and programs described in all claims of this disclosure are implemented by hardware resources, such as a processor, memory, and cooperation with the program. [Industrial applicability]

[0346] The rail wear detection device, rail wear detection method, and program of this disclosure are useful, for example, for determining the condition of railway rails. [Explanation of Symbols]

[0347] 1. Rail wear detection device 10 Control Unit 11 Storage section 12 Communications Department 13 Input section 14 Output section 101 Generation means 102 Specific means 103 Fitting means 104 Detection means P Wear Amount Detection Program

Claims

1. A generation means for generating a pseudo-contour line, which is a virtual shape of the cross-section of a railway rail, based on point cloud data of a railway track including the rail, that is included in a region of a predetermined length in the longitudinal direction of the railway rail, A means for identifying a pseudo-straight section which is a characteristic part of the rail included in the pseudo-contour line, A fitting means that matches the pseudo-straight section with the reference straight section, which is a characteristic part of the reference contour line obtained from the cross-sectional shape of the standard railway rail, and superimposes the pseudo-contour line and the reference contour line, A detection means for detecting the amount of wear on the railway rail based on the difference between the superimposed pseudo contour line and the reference contour line, A rail wear amount detection device characterized by including [a specific feature].

2. A rail wear detection device for detecting the amount of wear on railway rails, A generation means for generating a pseudo-contour line, which is a virtual shape of the cross-section of the railway rail, from three-dimensional point cloud data of the railway track including the railway rail, A means for extracting straight lines from the pseudo-contour lines to represent pseudo-straight sections that are characteristic parts of the railway rail, and identifying the pseudo-straight sections as characteristic parts of the railway rail, A fitting means that uses the shape obtained from the cross-sectional shape of the aforementioned railway rail standard as a reference contour line, searches which straight portion of the reference contour line the pseudo-straight portion corresponds to, matches the straight portions to each other, transforms the coordinates of the reference contour line, and superimposes it with the pseudo-contour line. A detection means for detecting the amount of wear on the railway rail based on the difference between the superimposed reference contour line and the pseudo contour line, Includes, The generating means is An arbitrary reference line perpendicular to the longitudinal direction of the railway rail is set, the 3D point cloud data of the railway track is cut out in a rectangular region created based on the arbitrary reference line, the 3D point cloud data of the cut-out rectangular region is subjected to a coordinate transformation along the reference line to create point cloud data on a cross-sectional plane, and the virtual shape of the railway track, including the railway rail as projected on the cross-sectional plane, is extracted from the point cloud data on the cross-sectional plane. A rail wear amount detection device characterized by the following features.

3. A registration means that collects the data obtained from the railway rail wear detection process and registers it in a dataset. The rail wear amount detection device according to claim 1 or 2, further comprising the features described above.

4. The aforementioned pseudo-contour line is a continuous line and is composed of multiple line segments. The fitting means is From the aforementioned pseudo-contour lines, similar line segments are gathered and grouped in the Y-axis direction according to predetermined conditions to extract the straight line portion. The extracted linear portion in the Y-axis direction is defined as the pseudo-linear portion. A rail wear amount detection device according to claim 1 or 2, characterized in that it is a rail wear amount detection device.

5. The fitting means is When determining whether the aforementioned pseudo-straight section is a straight section that is a characteristic part of the rail, When the pseudo-straight section is identified as a straight portion which is a characteristic part of the rail, the pseudo-straight section is designated as a pseudo-straight section. A rail wear amount detection device according to claim 1 or 2, characterized in that it is a rail wear amount detection device.

6. The aforementioned specifying means is, A lower right determination area is set on the lower right side of the pseudo-straight line portion. A lower left determination area is set on the lower left side of the aforementioned pseudo-straight line section. It is determined whether or not there are a predetermined number of points in the aforementioned lower right determination area. Determine whether there are a predetermined number of points or more in the lower left determination area. If there are a predetermined number of points in the lower right determination area and no points in the lower left determination area, it is determined that the pseudo-straight section corresponds to the vertical straight section on the right side of the underside of the railway rail, and the pseudo-straight section is identified as the characteristic part on the right side of the underside of the railway rail. The rail wear amount detection device according to claim 5.

7. The aforementioned specifying means is, A lower right determination area is set on the lower right side of the pseudo-straight line portion. A lower left determination area is set on the lower left side of the aforementioned pseudo-straight line section. It is determined whether or not there are a predetermined number of points in the aforementioned lower right determination area. Determine whether there are a predetermined number of points or more in the lower left determination area. If there are no points in the lower right determination area, and there are a predetermined number or more points in the lower left determination area, it is determined that the pseudo-straight section corresponds to the vertical straight section on the left side of the railway rail's underside, and the pseudo-straight section is identified as the characteristic part on the left side of the railway rail's underside. The rail wear amount detection device according to claim 5.

8. The fitting means is (A) Create a comparison region from the pseudo-linear section, (B) The pseudo-straight section is moved gradually upward in a constant step size, starting from the bottom of the straight section of the rail web of the reference contour line of the standard rail. (C) Extract the reference straight line portion, which is a characteristic part, from the reference contour line, and search for corresponding locations between line segments. (D) Perform a coordinate transformation between the two points on the line segments, (E) The reference contour line is mapped onto the cross-sectional plane which is the coordinate system of the pseudo contour line and superimposed, and the average value of the difference between the reference contour line mapped onto the cross-sectional plane and the point cloud in the comparison area is calculated. (F) From the repeated processes of (B) to (E), the minimum value of the average difference is detected, and the state with the least error is determined as the optimal fitting state. (G) The reference contour line in the optimal fitting state is defined as the fitted reference contour line. A rail wear amount detection device according to claim 1 or 2, characterized in that it is a rail wear amount detection device.

9. The detection means is The fitting means generates a polygonal shape between the superimposed reference contour and the pseudo contour to represent the rail wear area. Rail wear amount detection device according to claim 1 or 2.