Rail transit graphic space contour identification method and system
By converting the station building drawing information into a two-dimensional matrix and performing logical operations and automatic identification of area identification algorithms, the traditional CAD drawing method is solved, and the problems of high workload, error-prone and difficult updates in the design of rail transit stations are realized, and the design efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411566563.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Traditional CAD drawing methods have problems such as high workload, error-prone and update difficulties in rail transit station design, especially in complex engineering projects, which are difficult to achieve automation and intelligence.
By converting station building drawing information into a two-dimensional matrix, and performing logical operations and automatic identification of area identification algorithms, we can identify the outline and adjacent relationship of building elements to realize automated drawing.
Improves design efficiency and accuracy, reduces the workload of manual drawing, shortens design cycles, speeds up project progress, and improves design consistency and data support capabilities.
Smart Images

Figure CN119763141A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of architectural drawing processing, and more specifically, relates to a method and system for recognizing the spatial contour of rail transit graphics. Background Art
[0002] With the rapid development of China's rail transit, station construction has become an important part of urban infrastructure. In this process, the application of CAD (computer-aided design) technology is crucial, which can improve design efficiency, ensure design accuracy, and provide accurate guidance for subsequent construction. However, traditional CAD drawing methods have certain limitations, especially in complex engineering projects such as rail transit stations, where the design workload is huge and the demand for automation and intelligence is increasingly urgent.
[0003] Rail transit station designers need to use CAD software to draw station floor plans, which include not only the station's floor plan, but also the detailed dimensions and locations of architectural elements such as walls, columns, and rooms. These drawings are the basis for subsequent construction and equipment installation, and their accuracy is directly related to the quality and safety of the project.
[0004] At present, CAD software mainly constructs complex building structures through basic graphic elements such as line segments and circles. Designers need to draw these elements through CAD software and then combine them into more complex structures. Although this method improves design efficiency to a certain extent, it still has the following problems:
[0005] Large workload: Designers need to spend a lot of time on drawing, especially in large projects, the workload is particularly huge.
[0006] Error-prone: Manual drawings are prone to errors, especially in complex structures, where a small mistake may cause the entire design to need to be revisited.
[0007] Difficult to update: Once the design is completed, any modification requires redrawing the relevant parts, which is not only time-consuming but also prone to introducing new errors.
[0008] In order to solve these problems, the development of automated drawing tools is particularly important. These tools can automatically identify and draw elements in drawings, reduce manual intervention, and improve design efficiency and accuracy. However, despite the importance of the development of automated drawing tools, the existing technologies still have some limitations. One of the key difficulties is that since CAD graphic objects are composed of lines, how to automatically identify CAD lines into building objects and data such as walls, structural columns, and space outlines through automated tools for the next step of automated drawing tools. Summary of the invention
[0009] In order to solve the above technical problems, the present invention proposes a rail transit graphic spatial contour recognition method, comprising:
[0010] Convert the station building drawing information into a two-dimensional matrix, wherein each element in the two-dimensional matrix is a positive number or 0, a positive number represents a line segment, and 0 represents a non-building element area;
[0011] A logical operation is performed on the two-dimensional matrix, and the outlines and adjacent relationships of the building elements in the two-dimensional matrix are automatically identified through a region identification algorithm.
[0012] Further, converting the station building drawing information into a two-dimensional matrix includes: representing the building elements in the station building drawing information as continuous line segments in the two-dimensional matrix;
[0013] Set a marker value for the endpoints of each line segment to distinguish endpoints, intersections, and overlapping line segments.
[0014] Furthermore, performing a logical operation on the two-dimensional matrix includes: starting from the point [0,0] of the two-dimensional matrix, and gradually traversing the two-dimensional matrix along the X axis or the Y axis;
[0015] The value of each point in the two-dimensional matrix is determined. If the value is greater than 0, the corresponding point is skipped. If the value is equal to 0, the corresponding point is marked as a region and the values of its adjacent points are updated.
[0016] Further, automatically identifying the outlines and adjacent relationships of the building elements in the two-dimensional matrix by a region identification algorithm includes: assigning negative values to unidentified points in the two-dimensional matrix as region identification numbers, with the initial region number being -1, and decreasing the number each time a new unidentified region is encountered;
[0017] Merge adjacent unidentified points into the same area and update their area identification numbers;
[0018] The points in the two-dimensional matrix are traversed in all directions of the two-dimensional matrix to ensure that all adjacent regions are correctly identified and merged.
[0019] Further, the adjacent region numbers are compared, and if there are regions with different numbers but connected, the regions are recorded as regions to be merged;
[0020] Based on the recorded area list, connected areas are merged and given unified numbers.
[0021] Furthermore, points with values greater than or equal to 100 in each area are found as the endpoints or intersections of the building segments, thereby completing the contour recognition.
[0022] The present invention also proposes a rail transit graphic space contour recognition system, comprising:
[0023] A matrix construction module is used to convert the station building drawing information into a two-dimensional matrix, wherein each element in the two-dimensional matrix is a positive number or 0, a positive number represents a line segment, and a 0 represents a non-building element area;
[0024] The recognition module is used to perform logical operations on the two-dimensional matrix and automatically recognize the outlines and adjacent relationships of the building elements in the two-dimensional matrix through a region identification algorithm.
[0025] Further, converting the station building drawing information into a two-dimensional matrix includes: representing the building elements in the station building drawing information as continuous line segments in the two-dimensional matrix;
[0026] Set a marker value for the endpoints of each line segment to distinguish endpoints, intersections, and overlapping line segments.
[0027] Furthermore, performing a logical operation on the two-dimensional matrix includes: starting from the point [0,0] of the two-dimensional matrix, and gradually traversing the two-dimensional matrix along the X axis or the Y axis;
[0028] The value of each point in the two-dimensional matrix is determined. If the value is greater than 0, the corresponding point is skipped. If the value is equal to 0, the corresponding point is marked as a region and the values of its adjacent points are updated.
[0029] Further, automatically identifying the outlines and adjacent relationships of the building elements in the two-dimensional matrix by a region identification algorithm includes: assigning negative values to unidentified points in the two-dimensional matrix as region identification numbers, with the initial region number being -1, and decreasing the number each time a new unidentified region is encountered;
[0030] Merge adjacent unidentified points into the same area and update their area identification numbers;
[0031] The points in the two-dimensional matrix are traversed in all directions of the two-dimensional matrix to ensure that all adjacent regions are correctly identified and merged.
[0032] In general, the above technical solution conceived by the present invention has the following beneficial effects compared with the prior art:
[0033] 1. Increased productivity
[0034] Automated drawing: By converting the identified building data and space outlines into building object data and applying logical operations, the building elements are automatically identified and marked, reducing the workload of manual drawing and significantly improving productivity.
[0035] Reduce design time: The application of automated tools using the identified data allows designers to complete drawing design faster, shortening the design cycle and speeding up project progress.
[0036] 2. Improvement of quality
[0037] Reduce human errors: The recognized data is automatically recognized, which reduces the errors that may occur in the manual drawing process and improves the accuracy of the drawings.
[0038] Improve design consistency: The unified recognition algorithm ensures consistency among different designers when handling similar tasks, avoiding quality issues caused by individual differences.
[0039] 3. Emergence of useful features
[0040] Data support: The structured information generated by automated tools provides accurate data support for the construction of BIM and digital twin systems, enhancing the functionality of these systems.
[0041] Enhanced decision support: Through automated identification and data extraction, more comprehensive information is provided to the design and construction teams to support more scientific decision-making.
[0042] 4. Improvement of technical adaptability
[0043] Flexibility and scalability: This invention patent can adapt to the identification of architectural elements of different shapes and structures, and has good flexibility and scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flow chart of the method of embodiment 1 of the present invention;
[0045] Figure 2 System structure diagram of embodiment 2 of the present invention. DETAILED DESCRIPTION
[0046] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0047] The method provided by the present invention can be implemented in the following terminal environment, and the terminal may include one or more of the following components: a processor, a storage medium, and a display screen. The storage medium stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method described in the following embodiment.
[0048] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts in the entire terminal, and executes various functions of the terminal and processes data by running or executing instructions, programs, code sets or instruction sets stored in the storage medium, and calling data stored in the storage medium.
[0049] The storage medium may include a random access memory (RAM) or a read-only memory (ROM). The storage medium may be used to store instructions, programs, codes, code sets or instructions.
[0050] The display screen is used to display the user interface of each application.
[0051] In addition, those skilled in the art can understand that the structure of the above terminal does not constitute a limitation on the terminal, and the terminal may include more or fewer components, or combine certain components, or arrange the components differently. For example, the terminal also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, and a power supply, which will not be described in detail here.
[0052] Example 1
[0053] like Figure 1 As shown, an embodiment of the present invention provides a method for recognizing the spatial contour of a rail transit graphic, comprising:
[0054] Step 101, converting the station building drawing information into a two-dimensional matrix, wherein each element in the two-dimensional matrix is a positive number or 0, a positive number represents a line segment, and 0 represents a non-building element area;
[0055] Step 102: perform a logical operation on the two-dimensional matrix, and automatically identify the outlines and adjacent relationships of the building elements in the two-dimensional matrix through a region identification algorithm.
[0056] Specifically, converting the station building drawing information into a two-dimensional matrix includes: representing the building elements in the station building drawing information as continuous line segments in the two-dimensional matrix;
[0057] Set a marker value for the endpoints of each line segment to distinguish endpoints, intersections, and overlapping line segments.
[0058] Specifically, performing a logical operation on the two-dimensional matrix includes: starting from the point [0,0] of the two-dimensional matrix, and gradually traversing the two-dimensional matrix along the X axis or the Y axis;
[0059] The value of each point in the two-dimensional matrix is determined. If the value is greater than 0, the corresponding point is skipped. If the value is equal to 0, the corresponding point is marked as a region and the values of its adjacent points are updated.
[0060] Specifically, automatically identifying the outlines and adjacent relationships of the building elements in the two-dimensional matrix by using a region identification algorithm includes: assigning negative values to unidentified points in the two-dimensional matrix as region identification numbers, with the initial region number being -1, and decreasing the number each time a new unidentified region is encountered;
[0061] Merge adjacent unidentified points into the same area and update their area identification numbers;
[0062] The points in the two-dimensional matrix are traversed in all directions of the two-dimensional matrix to ensure that all adjacent regions are correctly identified and merged.
[0063] Specifically, the numbers of adjacent regions are compared, and if there are regions with different numbers but connected, the regions are recorded as regions to be merged;
[0064] Based on the recorded area list, connected areas are merged and given unified numbers.
[0065] Specifically, points with values greater than or equal to 100 in each area are found as the endpoints or intersections of the building segments, thereby completing contour recognition.
[0066] In order to make contour recognition more accurate, this embodiment further proposes the following model or function to optimize the above technical solution, as shown below:
[0067] A multidimensional mapping function is used to transform the two-dimensional matrix M into a nonlinear mapping in a high-dimensional space to achieve compression and efficient representation of building elements:
[0068]
[0069] Where M′(i, j) is the high-dimensional building element at position (i, j), σ is the activation function (such as sigmoid or ReLU), n is the number of dimensions, and α k is the weight of the kth dimension, M(i, j) is the building element at position (i, j), p is the first adjustment factor of the multidimensional mapping, q is the second adjustment factor of the multidimensional mapping, and r is the third adjustment factor of the multidimensional mapping.
[0070] The contour detection function is used to identify the boundaries of building elements from the new two-dimensional matrix composed of high-dimensional building elements M′(i, j), as shown below:
[0071]
[0072] Among them, α1′ is the first weight in the x-axis direction, x is the x-axis, n′ is the first adjustment factor of the building element in the x-axis direction, β1′ is the second weight in the x-axis direction, p′ is the second adjustment factor of the building element in the x-axis direction, q′ is the third adjustment factor of the building element in the x-axis direction, α2′ is the first weight in the y-axis direction, y is the y-axis, m is the first adjustment factor of the building element in the y-axis direction, β2′ is the second weight in the y-axis direction, r′ is the second adjustment factor of the building element in the y-axis direction, and s is the third adjustment factor of the building element in the y-axis direction.
[0073] The region merging function H(M′) is used to merge adjacent regions in the new two-dimensional matrix M′ to reduce redundant numbers, as follows:
[0074]
[0075] Among them, λ is the region merging adjustment factor, N(i, j) is the neighborhood of position (i′, j′), and w i,j is the neighborhood weight of position (i′, j′), and M′(i′, j′) is the high-dimensional building element at position (i′, j′).
[0076] In order to make this embodiment clearer, the following describes embodiment 1 in detail, as shown below:
[0077] The architectural station drawing information is converted into a 2D matrix, where the matrix information is extracted from the station wall, structural column and other data. The matrix can be optimized through other invention patents or methods to reduce the matrix size, but the matrix should be able to represent the relative connection relationship of the line segments in the drawing. The matrix is represented by only positive numbers and 0.
[0078] In this matrix, if the data represented by a point in the matrix is greater than 0, it means that the point is on a certain wall or structure edge segment, and if it is equal to 0, it means that the point is not on any segment.
[0079] Perform logical operation A on all elements of the matrix, starting from point [0,0], either on the X axis or the Y axis. The method of logical operation A is:
[0080] a) The global record currently has regional value numbers, represented by negative numbers, which decrease by 1 in sequence and are initially 0.
[0081] b) Determine the value of the position:
[0082] i. If it is greater than 0, skip this point and jump to step e);
[0083] ii. If the point value is less than 0, for example -3, then the value of the area to be modified is recorded as the point value (-3), and the next step c is executed directly;
[0084] iii. If the point value is equal to 0, reduce the current area value by one, for example, if the current area value is -2, then change it to -3, and change the matrix point value to the current area value, such as (-3). Record the area value to be modified as the modified value of the point (-3), and proceed to the next step c;
[0085] c) Determine the value of the element to the right of the point:
[0086] i. If the value is 0, change the value of the point to the value of the area that needs to be modified recorded in b), such as (-3).
[0087] ii. If the value is greater than 0, no action is taken.
[0088] iii. If the value is less than 0, no action will be taken.
[0089] d) Determine the value of the element below the point:
[0090] i. If the value is 0, change the value of the point to the value of the area that needs to be modified recorded in b), such as (-3).
[0091] ii. If the value is greater than 0, no action is taken.
[0092] iii. If the value is less than 0, no action will be taken.
[0093] e) The execution of this point is completed, and operation A is performed on the next point.
[0094] At this point, we have completed coloring all the regions of the matrix and obtained multiple regions with different region values. However, due to the characteristics of the operation A method, in non-standard rectangular spaces, there will be situations where they belong to the same region but have different region values. For example, in a horizontal inverted L-shaped room, since only the adjacent spaces on the right and bottom are considered each time, the lower left region and the upper right region cannot be merged.
[0095] Therefore, we need to perform logical operation B on the matrix again, starting from the point [0,0], either on the X axis or the Y axis. The method of logical operation B is:
[0096] a) Determine the value of the element at this point:
[0097] i. If the value of the point element is greater than or equal to 0, jump directly to step d)
[0098] ii. If the value of the point element is less than 0, execute the next step b);
[0099] b) Determine the value of the element to the right of the point:
[0100] iii. If the value is greater than or equal to 0, do nothing and proceed to the next step.
[0101] iv. If the value is less than 0, and the value of the point on the right is equal to the value of the element at that point, do nothing and proceed to the next step.
[0102] v. If the value is less than 0, and the value of the right point is not equal to the value of the point element, the point area value and the right area value are recorded in an array, indicating that the two areas are connected and can be merged.
[0103] c) Determine the value of the element below the point:
[0104] vi. If the value is greater than or equal to 0, do nothing and proceed to the next step.
[0105] vii. If the value is less than 0 and the value of the lower point is equal to the value of the point element, no operation is performed and the next step is executed.
[0106] viii. If the value is less than 0, and the lower point value is not equal to the point element value, the point area value and the lower area value are recorded in an array, indicating that the two areas are connected and can be merged.
[0107] d) The execution of this point is completed, and operation B is performed on the next point.
[0108] By operating B, we get a list set of mergeable regions, where multiple regions may need to be merged, for example, -1 and -2 are connected, and -2 and -3 are connected. In this case, we merge each list of mergeable regions to get the maximum mergeable set of each list, such as [-1, -2, -3], [-4, -5]. At this time, we extract the maximum value of each mergeable list, such as -1 from [-1, -2, -3]. At the same time, we extract the minimum value or replace it with a new non-repeating value. We convert the maximum mergeable set into a dictionary form, such as {-1: [-1, -2, -3], -4: [-4, -5]}.
[0109] At the same time, we perform logical operation C on the matrix again, starting from the point [0,0], either on the X axis or the Y axis. The method of logical operation C is:
[0110] a) Determine the value of the element at this point:
[0111] i. If the value of the point element is greater than or equal to 0, no operation is performed.
[0112] ii. If the value of the point element is less than 0, check whether the value belongs to a set in the maximum mergeable set. If so, modify it to the total maximum value or new value. For example, if the value is -2, it belongs to the set -1:[-1,-2,-3], and we modify the value from -2 to -1.
[0113] b) The execution of this point is completed, and operation C is performed on the next point.
[0114] By operating C, we merge all connected regions in the matrix and assign different region value numbers to them;
[0115] Because each area value must be enclosed by a line segment or point, and its value is greater than 0, we can find the envelope segment of the area by looking for adjacent points whose area values are greater than 0.
[0116] At this point, we can know the range and area of the region through the envelope segment, but if we want to convert the region information into segment information, we need to know the specific position of the first point of the envelope region segment in the matrix. In traditional image recognition methods, it can be recognized by corner point detection, such as the Harris corner point detection method, but this method requires more computing resources. Therefore, the present invention proposes a new method for finding the first point of the envelope line through the characteristics of rail transit buildings.
[0117] When we first converted the building station drawing information into a 2D matrix, we filled the matrix with positive numbers by filling the line segment information. At this time, we filled the points and segments with different magnitude values, such as 100 for the end points of the line segment and 1 for each point passed by the line segment. If we encounter repeated points, such as the connection point of two line segments or the intersection of line segments, we add their values, such as the connection point of two line segments is 200, and the intersection point is 2.
[0118] Due to the structural characteristics of rail transit buildings, there will not be a large number of repeated line segments, so we distinguish all the values in the envelope, and the points greater than or equal to 100 are the corner points of the area and the endpoints of the line segments.
[0119] However, there is another problem with this method. If the architectural CAD drawing is not a line segment connection point but an intersection point, it is impossible to determine whether it is a corner point of the area. For example, if two line segments are in a cross intersection, their intersection point is the corner point of the area but is not actually the endpoint of a line segment.
[0120] Therefore, in order to solve this problem, because the value of each intersection must be greater than 1, and generally not greater than 100, we judge each value in the area to determine whether it is an intersection or the data is not 1 due to the overlap of some line segments. The judgment is also relatively easy, because this problem will only occur when multiple line segments completely overlap, otherwise the point is an intersection. We only need to judge the upper, lower, left, and right values of the point. If it is an intersection, its upper, lower, left, and right values should not be greater than 1 at the same time, otherwise it is not an intersection but a situation where the line segments overlap.
[0121] So far, we have obtained the envelope segments and the first point information of all areas. By connecting them in sequence, we can complete the recognition method of the building outline. In the next step, we will use this recognition method to classify the walls, structural columns, room areas and other contents in the building drawing into several cases.
[0122] In a building map composed of building walls and structural columns, we will get multiple areas, including areas composed of walls, areas composed of structural columns, and areas composed of room outlines. Multiple areas may overlap, so we need a set of methods to split them. We first identify all structural columns through the contour recognition method, because the number of sides of general structural columns is basically fixed. Even the number of sides of heterogeneous structural columns or circular structural columns is a known parameter. We can obtain a set of target areas that may be structural columns by screening the number of sides in the area. Then, for structural columns, the different sizes of the columns and the size of the shortest side of the column envelope are known parameters. We can determine the final set of target areas for structural columns by screening the edge set and comparing the size characteristics of the structural columns.
[0123] After obtaining the target area set of structural columns, the next step is to remove the structural area from the set to be determined and determine the wall area. The wall area may be a long rectangular area or multiple rectangular areas spliced together. Its characteristic is that the shortest side is the thickness of the wall. Regardless of whether it is a single rectangle or multiple rectangles, the number of sides must be the number of rectangles x2+2, +2 represents the two short sides at the end of the wall, that is, the thickness of the wall. Therefore, we can extract features from the areas represented by all walls through the wall thickness parameters and the number of wall edges.
[0124] After obtaining the wall area and the structure area, the remaining area set is mainly the possible room space area set. We generally identify it through the minimum room area, the number of room outline edges, and whether the area contains room text to obtain the possible room space area set.
[0125] Example 2
[0126] like Figure 2 As shown, an embodiment of the present invention further provides a rail transit graphic space contour recognition system, comprising:
[0127] A matrix construction module is used to convert the station building drawing information into a two-dimensional matrix, wherein each element in the two-dimensional matrix is a positive number or 0, a positive number represents a line segment, and a 0 represents a non-building element area;
[0128] The recognition module pair is used to perform logical operations on the two-dimensional matrix and automatically recognize the outlines and adjacent relationships of the building elements in the two-dimensional matrix through a region identification algorithm.
[0129] Specifically, converting the station building drawing information into a two-dimensional matrix includes: representing the building elements in the station building drawing information as continuous line segments in the two-dimensional matrix;
[0130] Set a marker value for the endpoints of each line segment to distinguish endpoints, intersections, and overlapping line segments.
[0131] Specifically, performing a logical operation on the two-dimensional matrix includes: starting from the point [0,0] of the two-dimensional matrix, and gradually traversing the two-dimensional matrix along the X axis or the Y axis;
[0132] The value of each point in the two-dimensional matrix is determined. If the value is greater than 0, the corresponding point is skipped. If the value is equal to 0, the corresponding point is marked as a region and the values of its adjacent points are updated.
[0133] Specifically, automatically identifying the outlines and adjacent relationships of the building elements in the two-dimensional matrix by using a region identification algorithm includes: assigning negative values to unidentified points in the two-dimensional matrix as region identification numbers, with the initial region number being -1, and decreasing the number each time a new unidentified region is encountered;
[0134] Merge adjacent unidentified points into the same area and update their area identification numbers;
[0135] The points in the two-dimensional matrix are traversed in all directions of the two-dimensional matrix to ensure that all adjacent regions are correctly identified and merged.
[0136] Specifically, the numbers of adjacent regions are compared, and if there are regions with different numbers but connected, the regions are recorded as regions to be merged;
[0137] Based on the recorded area list, connected areas are merged and given unified numbers.
[0138] Specifically, points with values greater than or equal to 100 in each area are found as the endpoints or intersections of the building segments, thereby completing contour recognition.
[0139] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0140] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0141] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only storage medium (ROM, Read-Only Memory), random access storage medium (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0145] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A method for recognizing the spatial contour of a rail transit graphic, characterized in that: include: Convert the station building drawing information into a two-dimensional matrix, wherein each element in the two-dimensional matrix is a positive number or 0, a positive number represents a line segment, and 0 represents a non-building element area; A logical operation is performed on the two-dimensional matrix, and the outlines and adjacent relationships of the building elements in the two-dimensional matrix are automatically identified through a region identification algorithm.
2. A rail transit graphic spatial contour recognition method as claimed in claim 1, characterized in that: Converting the station building drawing information into a two-dimensional matrix includes: representing the building elements in the station building drawing information as continuous line segments in the two-dimensional matrix; Set a marker value for the endpoints of each line segment to distinguish endpoints, intersections, and overlapping line segments.
3. A rail transit graphic spatial contour recognition method as claimed in claim 2, characterized in that: The logical operation on the two-dimensional matrix includes: starting from the point [0,0] of the two-dimensional matrix, traversing the two-dimensional matrix step by step along the X axis or the Y axis; The value of each point in the two-dimensional matrix is determined. If the value is greater than 0, the corresponding point is skipped. If the value is equal to 0, the corresponding point is marked as a region and the values of its adjacent points are updated.
4. A rail transit graphic spatial contour recognition method as claimed in claim 3, characterized in that: Automatically identifying the outlines and adjacent relationships of the building elements in the two-dimensional matrix by a region identification algorithm includes: assigning negative values to unidentified points in the two-dimensional matrix as region identification numbers, with the initial region number being -1, and decreasing the number each time a new unidentified region is encountered; Merge adjacent unidentified points into the same area and update their area identification numbers; The points in the two-dimensional matrix are traversed in all directions of the two-dimensional matrix to ensure that all adjacent regions are correctly identified and merged.
5. A rail transit graphic spatial contour recognition method as claimed in claim 4, characterized in that: Compare the numbers of adjacent regions, and if there are regions with different numbers but connected, record the regions as regions that need to be merged; Based on the recorded area list, connected areas are merged and given unified numbers.
6. A method for recognizing spatial contours of rail transit graphics as claimed in claim 5, characterized in that: Find the points with values greater than or equal to 100 in each area as the endpoints or intersections of the building segments to complete the contour recognition.
7. A rail transit graphic spatial contour recognition system, characterized in that: include: A matrix construction module is used to convert the station building drawing information into a two-dimensional matrix, wherein each element in the two-dimensional matrix is a positive number or 0, a positive number represents a line segment, and 0 represents a non-building element area; The recognition module is used to perform logical operations on the two-dimensional matrix and automatically recognize the outlines and adjacent relationships of the building elements in the two-dimensional matrix through a region identification algorithm.
8. A rail transit graphic spatial contour recognition system as claimed in claim 7, characterized in that: Converting the station building drawing information into a two-dimensional matrix includes: representing the building elements in the station building drawing information as continuous line segments in the two-dimensional matrix; Set a marker value for the endpoints of each line segment to distinguish endpoints, intersections, and overlapping line segments.
9. A rail transit graphic spatial contour recognition system as claimed in claim 8, characterized in that: The logical operation on the two-dimensional matrix includes: starting from the point [0,0] of the two-dimensional matrix, traversing the two-dimensional matrix step by step along the X axis or the Y axis; The value of each point in the two-dimensional matrix is determined. If the value is greater than 0, the corresponding point is skipped. If the value is equal to 0, the corresponding point is marked as a region and the values of its adjacent points are updated.
10. A rail transit graphic spatial contour recognition system as claimed in claim 9, characterized in that: Automatically identifying the outlines and adjacent relationships of the building elements in the two-dimensional matrix by a region identification algorithm includes: assigning negative values to unidentified points in the two-dimensional matrix as region identification numbers, with the initial region number being -1, and decreasing the number each time a new unidentified region is encountered; Merge adjacent unidentified points into the same area and update their area identification numbers; The points in the two-dimensional matrix are traversed in all directions of the two-dimensional matrix to ensure that all adjacent regions are correctly identified and merged.
Citation Information
Patent Citations
Automatic segmentation method for electrical equipment drawing
CN116109651A
Building indoor semantic model construction method and system based on multi-dimensional image coding
CN116228985A
Method and device for processing picture data of construction drawing and computer readable recording medium storing control program for the method
JP2000187730A