Assembled staircase modeling method and related equipment based on intelligent recognition

By performing image processing and intelligent recognition technology on CAD drawings, vector features of stair components are extracted and processed, the ladder segment component units are formed, and parameterized models are generated, which solves the problem of being unable to efficiently identify stair components in the existing technology, and efficient design and construction are achieved.

CN119557962BActive Publication Date: 2025-06-06SHENZHEN DALEZHUANG CONSTR TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510111367.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-06-06
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

The prior art cannot efficiently identify stair components and automatically generate parameterized models, resulting in limited design and production efficiency of prefabricated stairs.

Method used

By image processing on the target CAD drawing, the vector feature sets of multiple sets of parallel line arrays and parallel line segments are extracted, effectiveness screening and pairing are performed, and the ladder component unit is formed, and parameter detection and parameterization are performed through preset detection algorithms to generate a stair model.

Benefits of technology

It realizes efficient identification and precise modeling of prefabricated stair components, improving design and construction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557962B_ABST
    Figure CN119557962B_ABST
Patent Text Reader

Abstract

The present invention provides a method for modeling an assembled staircase based on intelligent recognition and related equipment, the method comprising: performing image processing on a target CAD drawing to obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays; screening the effectiveness of the parallel line arrays according to the vector feature sets, pairing the screened parallel line arrays, and forming the successfully paired parallel line arrays into stair segment component units; performing parameter detection on the stair segment component units through a preset detection algorithm to obtain the stair segment parameters of the stair segment component units, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component units; performing parameterized processing on the stair segment component units according to the stair segment parameters to obtain stair parameters, and generating a stair model according to the stair parameters and the stair segment component units. The present invention realizes efficient recognition and accurate modeling of assembled staircase components through intelligent recognition and parametric modeling, and effectively improves the design and construction efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building assembly, and in particular to an assembled stair modeling method based on intelligent recognition and related equipment. Background Art

[0002] With the promotion of prefabricated building technology, the intelligent design and modeling of stair modules have become a key link in improving construction efficiency and quality. Traditional prefabricated stair modeling usually relies on manual reading of CAD drawings and manual identification of stair segment types and parameters. This method is time-consuming and labor-intensive, prone to identification errors, and affects modeling accuracy and construction quality. Especially in complex architectural designs, CAD drawings contain a large amount of line segments, surfaces, and feature information. Manual analysis makes it difficult to quickly and accurately extract geometric features related to stairs and generate models. The existing technology lacks intelligent processing methods for CAD drawings in stair modeling, and cannot efficiently identify stair components and automatically generate parametric models, thereby restricting the design and production efficiency of prefabricated stairs. Summary of the invention

[0003] The main purpose of the present invention is to solve the technical problem that the prior art cannot efficiently identify staircase components and automatically generate parametric models, thereby restricting the design and production efficiency of assembled stairs;

[0004] A first aspect of the present invention provides a method for modeling an assembled staircase based on intelligent recognition, the method comprising:

[0005] Acquire a target CAD drawing, and perform image processing on the target CAD drawing to obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays;

[0006] Screening the effectiveness of the parallel line arrays according to the vector feature set, pairing the screened parallel line arrays, and forming stair segment component units with the successfully paired parallel line arrays;

[0007] Performing parameter detection on the stair segment component unit by a preset detection algorithm to obtain stair segment parameters of the stair segment component unit, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component unit;

[0008] The stair segment component unit is parameterized according to the stair segment parameters to obtain stair parameters, and a stair model is generated according to the stair parameters and the stair segment component unit.

[0009] Optionally, in a first implementation of the first aspect of the present invention, the step of acquiring a target CAD drawing and performing image processing on the target CAD drawing to obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays includes:

[0010] Obtain a target CAD drawing, perform Gaussian filtering on the target CAD drawing, and perform grayscale conversion and threshold segmentation on the target CAD drawing after the Gaussian filtering to obtain a binary image;

[0011] Performing morphological operations on the binary image to obtain an edge image, and performing straight line detection on the edge image to obtain a plurality of straight line segments;

[0012] The line segments are grouped according to the coordinate information of the plurality of straight line segments to obtain a plurality of parallel line arrays, and feature extraction processing is performed on the line segments in the plurality of parallel line arrays to obtain vector feature sets of the parallel line segments in the plurality of parallel line arrays.

[0013] Optionally, in a second implementation of the first aspect of the present invention, screening the effectiveness of the parallel line array according to the vector feature set, pairing the screened parallel line arrays, and forming the successfully paired parallel line arrays into stair component units includes:

[0014] Detecting the number of parallel line segments in each parallel line array to obtain the number of line segments in each parallel line array, and filtering out parallel line arrays whose number of line segments is less than a preset threshold;

[0015] Calculating the average length of the parallel line segments in the parallel line array remaining after screening according to the vector feature set, and screening the remaining parallel line array for validity according to the average length to obtain a valid parallel line array;

[0016] The distances between the effective parallel line arrays are calculated, and the parallel line arrays whose distances are less than a preset distance threshold are screened out for pairing to obtain the stair segment component unit.

[0017] Optionally, in a third implementation of the first aspect of the present invention, the step of performing parameter detection on the stair segment component unit by using a preset detection algorithm to obtain the stair segment parameters of the stair segment component unit includes:

[0018] Performing polygonal approximation detection on the stair segment component unit to obtain broken line data, and counting the number of broken lines in the stair segment component unit according to the broken line data;

[0019] Calculating the number of steps and detecting the height of steps for the array of parallel lines in the stair segment component unit, and determining the type of the stair segment component unit in combination with the number of broken lines to obtain the stair segment type;

[0020] The text mark in the stair segment component unit and the difference in the number of steps between the stair segment component units are identified, and the direction of the stair segment component unit is determined according to the text mark and the difference in the number of steps to obtain the stair segment direction.

[0021] Optionally, in a fourth implementation of the first aspect of the present invention, the identifying the text mark in the stair segment component unit and the difference in the number of steps between the stair segment component units, and determining the direction of the stair segment component unit according to the text mark and the difference in the number of steps, to obtain the stair segment direction includes:

[0022] Initialize two stair segment component units that meet preset conditions among all stair segment component units to opposite directions, and identify whether there are preset direction text marks within the parallel line range of the two stair segment component units in opposite directions;

[0023] If yes, the directions of the two staircase component units in opposite directions are determined according to the direction text mark to obtain the corresponding staircase directions;

[0024] If not, then perform region segmentation on the two stair component units in opposite directions according to the broken line data to obtain segmented stair regions, and count the number of steps in each stair region;

[0025] The direction of each stair step area is determined according to the difference between the number of steps in each stair step area to obtain the corresponding stair step direction.

[0026] Optionally, in a fifth implementation of the first aspect of the present invention, parameterizing the stair segment component unit according to the stair segment parameters to obtain stair parameters, and generating a stair model according to the stair segment parameters and the stair segment component unit includes:

[0027] The preset floor heights are distributed and calculated according to the stair segment types to obtain the total step height and top height offset of the stairs;

[0028] Performing size parameter detection on the parallel line array in the stair component unit to obtain the first step line, the number of steps and the step width;

[0029] The positions of the endpoints of the first and last line segments in the stair component unit are calculated to obtain the rotation angle parameters, and the stair model is generated according to the total step height, the top height offset, the first step sight line, the number of steps, the step width and the rotation angle parameters.

[0030] Optionally, in a sixth implementation of the first aspect of the present invention, the position calculation of the endpoints of the first and last line segments in the stair segment component unit to obtain a rotation angle parameter, and generating the stair model according to the total step height, the top height offset, the first step sight line, the number of steps, the step width and the rotation angle parameter includes:

[0031] Constructing vectors for the first and last line segment endpoints in the stair segment component unit to obtain endpoint vectors, and calculating the dot product of the endpoint vector and any parallel line vector;

[0032] Selecting the starting point of the first and last points of the stair segment component unit according to the consistency of the dot product and the positive direction of the coordinate axis to obtain the stair segment starting point, and normalizing the stair segment starting point and the endpoint vector to obtain the rotation angle parameter;

[0033] A single-flight stair model is generated according to the total height of the steps, the top height offset, the first step sight line, the number of steps, the step width and the rotation angle parameters, and the single-flight stair model is combined according to the stair type to obtain the stair model.

[0034] A second aspect of the present invention provides an assembled staircase modeling device based on intelligent recognition, the assembled staircase modeling device based on intelligent recognition comprising:

[0035] A drawing processing module, used for acquiring a target CAD drawing and performing image processing on the target CAD drawing to obtain a plurality of parallel line arrays and vector feature sets of parallel line segments in the plurality of parallel line arrays;

[0036] A stair segment generation module, used for screening the effectiveness of the parallel line array according to the vector feature set, pairing the screened parallel line arrays, and forming stair segment component units with the successfully paired parallel line arrays;

[0037] A parameter calculation module, used to perform parameter detection on the stair segment component unit by a preset detection algorithm to obtain stair segment parameters of the stair segment component unit, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component unit;

[0038] The staircase generation module is used to perform parameterization processing on the staircase component unit according to the staircase parameters to obtain staircase parameters, and to generate a staircase model according to the staircase parameters and the staircase component unit.

[0039] The third aspect of the present invention provides an assembled staircase modeling device based on intelligent recognition, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected through lines; the at least one processor calls the instructions in the memory so that the assembled staircase modeling device based on intelligent recognition performs the steps of the above-mentioned assembled staircase modeling method based on intelligent recognition.

[0040] A fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, which, when executed on a computer, enable the computer to execute the steps of the above-mentioned method for modeling prefabricated stairs based on intelligent recognition.

[0041] The above-mentioned method and related equipment for modeling assembled stairs based on intelligent recognition obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in multiple sets of parallel line arrays by performing image processing on target CAD drawings; the parallel line arrays are screened for effectiveness according to the vector feature sets, and the screened parallel line arrays are paired, and the successfully paired parallel line arrays are formed into stair segment component units; the stair segment component units are parameterized by a preset detection algorithm to obtain the stair segment parameters of the stair segment component units, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component units; the stair segment component units are parameterized according to the stair segment parameters to obtain stair parameters, and a stair model is generated according to the stair parameters and the stair segment component units. The present invention realizes efficient recognition and accurate modeling of assembled stair components through intelligent recognition and parametric modeling, and effectively improves the design and construction efficiency.

[0042] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic diagram of a first embodiment of a method for modeling an assembled staircase based on intelligent recognition in an embodiment of the present invention;

[0045] Figure 2 A schematic diagram of an embodiment of a prefabricated stair modeling device based on intelligent recognition in an embodiment of the present invention;

[0046] Figure 3It is a schematic diagram of an embodiment of an assembled staircase modeling device based on intelligent recognition in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.

[0049] To facilitate understanding of this embodiment, firstly, a method for modeling an assembled staircase based on intelligent recognition disclosed in an embodiment of the present invention is described in detail. Figure 1 As shown, the method comprises the following steps:

[0050] 101. Obtain a target CAD drawing, and perform image processing on the target CAD drawing to obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays;

[0051] In one embodiment of the present invention, the step of acquiring a target CAD drawing and performing image processing on the target CAD drawing to obtain multiple groups of parallel line arrays and vector feature sets of parallel line segments in the multiple groups of parallel line arrays includes: acquiring a target CAD drawing, performing Gaussian filtering on the target CAD drawing, and performing grayscale conversion and threshold segmentation on the target CAD drawing after the Gaussian filtering to obtain a binary image; performing morphological operations on the binary image to obtain an edge image, and performing straight line detection on the edge image to obtain multiple straight line segments; grouping the line segments according to the coordinate information of the multiple straight line segments to obtain multiple groups of parallel line arrays, and performing feature extraction processing on the line segments in the multiple groups of parallel line arrays to obtain vector feature sets of parallel line segments in the multiple groups of parallel line arrays.

[0052] Specifically, after obtaining the CAD drawing to be processed and marking it as the target CAD drawing, the Gaussian filtering algorithm is used to remove the noise in the CAD drawing image. The Gaussian kernel function is:

[0053] ;

[0054] in, , is the center point of the Gaussian kernel, and σ is the standard deviation of the Gaussian kernel. For the center point The convolution kernel value of the Gaussian convolution kernel G is applied to the pixel points of image I. And the surrounding pixels, calculate the weighted average, the formula is as follows:

[0055] ;

[0056] in, Represents the pixel value after processing. is the size of the Gaussian kernel, is the Gaussian kernel in The value at Represents the original value of the pixel used in the calculation. By calculating the above formula, the Gaussian noise of the image can be eliminated and the image quality can be improved. After Gaussian filtering, the image needs to be grayscale converted and threshold segmented to facilitate subsequent line detection and feature extraction. First, the color image is converted to a grayscale image. The weight formula is:

[0057] ;

[0058] Calculate the proportion of the R, G, and B channel values ​​of each pixel in the grayscale image, and perform weighted summation to obtain the grayscale value. Then perform binarization on the grayscale image and calculate each grayscale level. The specific formula for the number of foreground pixels, the number of background pixels and the average grayscale value of foreground / background is as follows:

[0059] ;

[0060] ;

[0061] ;

[0062] in, is the number of foreground pixels; is the number of background pixels, is the average gray value of the foreground, is the average gray value of the background, is the maximum gray level of the image, is the proportion of pixels with gray level to the total number of pixels. Then calculate the weighted average of the foreground and background grayscale means, and the weighted average of the number of foreground and background pixels, and then calculate the maximum inter-class variance:

[0063] ;

[0064] ;

[0065] ;

[0066] Among them, the threshold is the value that produces the maximum between-class variance, that is By Set the pixels to 0, which are greater than or equal to The pixels are set to 255 to construct a binary image output.

[0067] Specifically, next, it is necessary to perform erosion and dilation operations on the binary image. The erosion operation formula and the dilation operation formula are as follows:

[0068] ;

[0069] ;

[0070] Specifically, is the dilation kernel, which is a logical or operation to reduce noise and connect line segments. After completing the morphological operation, the edge image is obtained, and then the Canny operator is used to detect the boundaries of the edge image to find the line segments and curves in the image. After that, the edge image is detected by Hough transform. Hough transform realizes line detection by converting the straight line in the image space to the point in the parameter space. During the detection process, it is necessary to set the appropriate angle resolution and distance resolution, and set the appropriate voting threshold. Finally, multiple straight line segments are obtained, which contain the starting and ending point coordinate information of the line segments. Finally, grouping and feature extraction are performed according to the coordinate information of the straight line segments. By analyzing the geometric features such as the slope and intercept of the straight line segments, the line segments with similar slopes and intercepts are grouped together, thereby obtaining multiple groups of parallel line arrays. Then, the HOG (Histogram of Directed Gradients) algorithm is used to extract features from the line segments in these parallel line arrays. The processing process of the HOG algorithm is to divide the image into small calculation units (set the window size to 64×128 and the block size to 16×16), calculate the gradient direction histogram in each unit (set 9 directions), and combine these histogram information into a feature descriptor vector. The resulting vector feature set contains information such as the direction, length, position relationship, and gradient change of the line segment, which will be used in the subsequent line segment analysis and processing process.

[0071] 102. Screening the effectiveness of the parallel line array according to the vector feature set, pairing the screened parallel line arrays, and forming the successfully paired parallel line arrays into stair component units;

[0072] In one embodiment of the present invention, the effectiveness screening of the parallel line array according to the vector feature set, and pairing the screened parallel line arrays, and forming the successfully paired parallel line arrays into a stair component unit include: detecting the number of parallel line segments in each parallel line array to obtain the number of line segments in each parallel line array, and screening out parallel line arrays with a number of line segments less than a preset threshold; calculating the average length of the parallel line segments in the parallel line arrays remaining after the screening according to the vector feature set, and screening the effectiveness of the remaining parallel line arrays according to the average length to obtain a valid parallel line array; calculating the distance between the valid parallel line arrays, and screening out parallel line arrays with a distance less than a preset distance threshold for pairing to obtain the stair component unit.

[0073] Specifically, we first need to count the number of line segments in each set of parallel line arrays, because each staircase must be defined by a sufficient number of parallel lines. According to the requirements in the material, each set of parallel lines must have no less than 4 lines to form a valid staircase, because a staircase requires at least 4 parallel lines to define its basic structural features. For example, in a typical staircase, multiple parallel lines are required to define the front and rear edges of the steps and the overall outline. For those parallel line arrays with less than 4 line segments, since they cannot fully represent the structural features of a staircase, they are judged as miscellaneous lines or other irrelevant building components and need to be removed from subsequent processing. The setting of this number threshold is based on the basic requirements of staircase construction to ensure that the selected parallel line groups can fully express the geometric features of the staircase. In actual processing, for example, if a set of parallel line arrays contains only 3 line segments, it is obviously impossible to form a complete staircase structure, and such a line segment group will be directly excluded.

[0074] Specifically, we need to calculate the average length of parallel line segments and perform a second round of screening. Based on the line segment length information in the vector feature set, calculate the average length of each remaining set of parallel line arrays. The calculation formula is:

[0075] ;

[0076] Where n is the total number of line segments in the parallel line group, Represents the length of the i-th line segment. The calculation of the average length is intended to ensure that the selected parallel line groups have appropriate size characteristics. For example, the material mentions that there are 5 line segments in a parallel line group, with lengths of 10, 12, 11, 9, and 13, respectively. The average length is (10+12+11+9+13) / 5=11. Set the coefficient k=0.8, and compare the average length of this group of parallel lines with the average lengths of other parallel line groups. If the average length of the current parallel line group is less than 0.8 times the average length of other groups, it is considered that the group of line segments is not suitable as stair segment candidates in terms of size and needs to be eliminated. This length-based screening ensures the dimensional uniformity of stair segment components.

[0077] Specifically, the last step is the distance calculation and pairing process between parallel line arrays. The distance between the remaining valid parallel line arrays is calculated, and the vertical distance between the two sets of parallel lines is calculated to determine whether they can form a complete stair segment. When calculating the distance between the valid parallel line arrays, it is necessary to determine the appropriate preset distance threshold. In architectural design, wall thickness is an important structural parameter, which is not only related to the load-bearing capacity of the building, but also directly affects the installation space of the stairs. Since the stairs usually need to be fixed on the wall, the distance between the two sets of parallel lines will inevitably be restricted by the wall thickness. Setting 20 cm as the preset distance threshold is based on the common thickness of the standard building wall. This value can not only ensure the stability of the stair structure, but also meet the needs of construction and installation. In the actual calculation process, the endpoint coordinate data of each set of parallel lines is first extracted, and then the vertical distance between the two sets of parallel lines is calculated. When the distance between two sets of parallel lines is 15 cm, since it is less than the preset wall thickness, the two sets of parallel lines will be determined by the system as being able to be paired. After successful pairing, these parallel line groups will be used as a whole stair segment component unit for subsequent parameter calculation and type determination. This pairing method based on actual building dimensions takes into account the physical constraints of the building structure, so that the identified stair component units are consistent with engineering practice and meet construction standards.

[0078] 103. Perform parameter detection on the stair segment component unit by using a preset detection algorithm to obtain stair segment parameters of the stair segment component unit, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component unit;

[0079] In one embodiment of the present invention, the parameter detection of the stair segment component unit by a preset detection algorithm to obtain the stair segment parameters of the stair segment component unit includes: performing polygonal approximation detection on the stair segment component unit to obtain broken line data, and counting the number of broken lines in the stair segment component unit based on the broken line data; calculating the number of steps and detecting the step height of the parallel line array in the stair segment component unit, and determining the type of the stair segment component unit based on the number of broken lines to obtain the stair segment type; identifying the text mark in the stair segment component unit and the difference in the number of steps between the stair segment component units, and determining the direction of the stair segment component unit based on the text mark and the difference in the number of steps to obtain the stair segment direction.

[0080] Specifically, the stair segment component unit is processed by using a polygonal approximation algorithm, which identifies the broken line features in the stair segment by setting an appropriate approximation accuracy (such as 0.01). In the polygonal approximation process, any group of parallel line segments is selected as a benchmark for processing, and the line segments that intersect with the benchmark line segments are searched in other parallel line arrays. When intersecting line segments are detected, they are marked as broken lines and recorded in the broken line data. During the detection process, it is necessary to traverse all parallel line groups in the stair segment component unit and count the specific number of broken lines in each group. For example, when there is a line segment in a group of parallel line arrays that intersects with line segments in other parallel line groups, this line segment is identified as a broken line. Through broken line detection and statistics, the system obtains the distribution of broken lines in the stair segment component unit, and these data will be directly used for subsequent stair type determination.

[0081] Specifically, based on the obtained break line data, the system needs to analyze the parallel line array in the stair segment component unit, calculate the number of steps and detect the step height. The number of steps is calculated by counting the number of intervals between parallel lines, and the step height is obtained by measuring the vertical distance between adjacent parallel lines. After obtaining these basic data, the system will make a comprehensive judgment based on the number of break lines obtained in the previous step. The judgment rule is designed based on the structural characteristics of the stairs: when there is only one break line in the stair segment component unit, it means that the stairs have only one turn in the middle position, which is a typical feature of a double-tread ladder, so it is judged as a double-tread ladder; when there are multiple break lines, it means that the stairs have multiple turns during the ascent process, which is a structural form that must be adopted by the scissors ladder in order to achieve a larger height span in a limited space, so it is judged as a scissors ladder. In the absence of a break line, the system needs to make a judgment based on the number of steps. When the number of steps is less than 14, due to the relatively small climbing height, the double-tread ladder structure can meet the needs, so it is judged as a double-tread ladder. If the number of steps exceeds 14, the step height needs to be further checked. When the step height is less than or equal to 180, it indicates that the stairs need to complete a larger height span in a smaller vertical space. In this case, a scissor ladder structure is more reasonable, so it is determined to be a scissor ladder. When the step height is greater than 180, it indicates that the stairs have enough vertical space for layout, and a double-tread ladder structure is simpler and more intuitive, so it is determined to be a double-tread ladder. Through this multi-level judgment mechanism based on structural characteristics and spatial conditions, the system can accurately identify the most suitable stair section type in different scenarios.

[0082] Specifically, the system first identifies the text information in the stair segment component unit and looks for the direction mark of "up" or "down". While identifying the text mark, the system also needs to calculate the difference in the number of steps between the stair segment component units. When the text mark is detected, the system will directly determine the direction of the stair segment based on the text mark, and process the corresponding parallel line array to maintain the opposite direction relationship between the two stair segments in the same group of stairs. In the case where no text mark is detected, the system will use the break line to segment the stair segment, and determine the direction by comparing the number of steps on both sides after segmentation. The side with fewer steps is marked as "up" and the side with more steps is marked as "down", and the corresponding parallel line array is adjusted accordingly. In the case where there is neither a text mark nor a break line, the system will use a random selection method to specify one side as "up" and the other side as "down". Through this multiple judgment mechanism, the system ensures that each stair segment can obtain a clear direction mark, laying the foundation for subsequent stair parameter calculation and model generation.

[0083] Furthermore, the identifying of the textual markings in the stair segment component units and the difference in the number of steps between the stair segment component units, and determining the direction of the stair segment component units based on the textual markings and the difference in the number of steps to obtain the stair segment direction includes: initializing two stair segment component units that meet preset conditions among all stair segment component units to opposite directions, and identifying whether there are preset direction textual markings within the range of parallel lines of the two stair segment component units in opposite directions; if yes, determining the direction of the two stair segment component units in opposite directions based on the direction textual marking to obtain the corresponding stair segment direction; if not, performing regional segmentation on the two stair segment component units in opposite directions based on the broken line data to obtain segmented stair segment areas, and counting the number of steps in each stair segment area; determining the direction of each stair segment area based on the difference between the number of steps in each stair segment area to obtain the corresponding stair segment direction.

[0084] Specifically, after obtaining all stair component units, the system first needs to select two stair component units that meet the preset conditions. These two stair component units are usually adjacent and constitute a complete stair structure. The two stair component units are initialized and marked as opposite directions. Such initial settings are based on the basic characteristics of the stair structure, because the two stair sections of a complete staircase must have opposite directions of travel. Next, the system performs text recognition within the parallel line range of the two stair component units in opposite directions, mainly identifying the two direction text labels of "up" or "down". This type of text label is usually marked by designers in CAD drawings to clearly indicate the direction of travel of the stairs. The system scans each area within the parallel line range, extracts possible text information, and matches the recognized text information with the preset direction text to determine whether there is a valid direction label.

[0085] Specifically, when the system recognizes the direction text mark within the parallel line range of the stair segment component unit, the direction of the stair segment will be determined directly based on these text marks. Specifically, if the "up" mark is detected within the parallel line range of a stair segment component unit, then the stair segment will be determined as the upward direction, and the opposite stair segment will be automatically determined as the downward direction. This determination method respects the original annotation information in the design drawing. The system also needs to process the corresponding parallel line array to maintain the opposite direction relationship between the two stair segments in the same group of stairs. During the processing, the system will record the position information of the text mark and the corresponding stair segment relationship to ensure the accuracy and consistency of the direction determination. This direction determination method based on text marks is direct and reliable because it reflects the original intention of the designer.

[0086] Specifically, when no directional text mark is detected, the system will use the previously obtained broken line data to perform regional segmentation on the stair component unit. The stair segment is divided into different areas by the broken line position, and then the number of steps is counted for each segmented area. The number of steps is counted by calculating the number of intervals between parallel lines in each area. This statistical method accurately reflects the actual number of steps in each area. After the statistics are completed, the system compares the difference in the number of steps between different areas. Based on the characteristics of the stair structure, the area with a smaller number of steps usually corresponds to the upward direction, while the area with a larger number of steps corresponds to the downward direction. This is because the upward section usually requires fewer steps to complete the height climb. According to this rule, the system determines the direction of each stair segment area and adjusts the corresponding parallel line array accordingly.

[0087] 104. Perform parameterization on the stair segment component unit according to the stair segment parameters to obtain stair parameters, and generate a stair model according to the stair parameters and the stair segment component unit.

[0088] In one embodiment of the present invention, parameterizing the stair segment component unit according to the stair segment parameters to obtain stair parameters, and generating a stair model according to the stair segment parameters and the stair segment component unit includes: allocating and calculating the preset floor height according to the stair segment type to obtain the total step height and top height offset of the stairs; performing size parameter detection on the parallel line array in the stair segment component unit to obtain the first step line, the number of steps and the step width; calculating the positions of the endpoints of the first and last line segments in the stair segment component unit to obtain rotation angle parameters, and generating the stair model according to the total step height, the top height offset, the first step line, the number of steps, the step width and the rotation angle parameters.

[0089] Specifically, the system calculates the preset floor height in different ways according to the identified stair segment type. For the scissor ladder structure, since it needs to complete the climbing of the entire floor height in one stair segment, the preset floor height is directly used as the total height of the steps. For example, when the floor height is 3.2 meters, the total height of the scissor ladder steps is set to 3.2 meters, and the top height offset is set to 0. For the double-running ladder structure, since it completes the floor height climbing through two stair segments, the preset floor height needs to be evenly distributed to the two stair segments, so the preset floor height is divided by 2 as the total height of the steps. For example, when the floor height is 3 meters, the total height of the double-running ladder steps is set to 1.5 meters, and the top height offset is set to the total height of the steps 1.5 meters. This height allocation method based on the stair segment type fully considers the structural characteristics and usage requirements of different types of stairs, and ensures the correct arrangement of the stairs in space through reasonable parameter settings.

[0090] Specifically, to detect the size parameters of the parallel line array, it is necessary to analyze the parallel line array in the stair component unit, calculate the effective length of the parallel line array, and use the mode of the line segment length as the value of the first-level step line. For example, when the mode of the length of the parallel line segment is 90 cm, the system sets 90 cm as the first-level step line. Next, the number of steps is calculated based on the preset floor height and step height limit. The specific calculation method is to divide the floor height by the step height limit and round up. For example, when the floor height is 3 meters and the step height limit is 17.5 cm, the number of steps is calculated to be 18. At the same time, the system also needs to calculate the effective gap between parallel lines, and determine the step width by counting the mode value of the parallel line interval. For example, when the mode of the gap value is 25 cm, the system sets the step width to 26 cm.

[0091] Specifically, the calculation of the rotation angle parameters and model generation requires the position calculation of the endpoints of the first and last line segments in the stair segment component unit, by calculating the line segment vector composed of the starting points of the first line segment and the last line segment, and judging whether the dot product of the vector and any parallel line vector is consistent with the positive direction of the coordinate axis. Based on the judgment result, if the dot product result is consistent with the positive direction of the coordinate axis, the starting point of the first line segment is selected as the starting point of the stair segment, otherwise the starting point of the last line segment is selected as the starting point of the stair segment. After determining the starting point, the system normalizes the vector between the starting point of the first line segment and the starting point of the last line segment to obtain the rotation angle parameter. Finally, the system integrates all the calculated parameters, including the total height of the step, the top height offset, the first step line, the number of steps, the step width, and the rotation angle parameter, to generate a single-run stair model, and then combines the models according to the previously determined stair segment type to finally form a complete stair model.

[0092] Furthermore, the position calculation of the endpoints of the first and last line segments in the stair segment component unit is performed to obtain a rotation angle parameter, and the stair model is generated according to the total height of the step, the top height offset, the first step line, the number of steps, the step width and the rotation angle parameter, including: vector construction of the first and last line segment endpoints in the stair segment component unit to obtain an endpoint vector, and calculation of the dot product of the endpoint vector and any parallel line vector; selection of the starting point of the first and end points of the stair segment component unit is performed based on the consistency of the dot product and the positive direction of the coordinate axis to obtain the stair segment starting point, and normalization of the stair segment starting point and the endpoint vector to obtain the rotation angle parameter; generation of a single-run staircase model according to the total height of the step, the top height offset, the first step line, the number of steps, the step width and the rotation angle parameter, and combination processing of the single-run staircase model according to the stair segment type to obtain the stair model.

[0093] Specifically, for the first and last line segment endpoints in the stair segment component unit, it is necessary to construct a vector pointing from the first endpoint to the last endpoint. This endpoint vector describes the extension direction of the stair segment in the plane. At the same time, select any parallel line from the parallel line array of the stair segment component unit and use it as a reference vector. Both vectors contain coordinate information and can reflect the spatial layout characteristics of the stair segment. Next, calculate the dot product of the endpoint vector and the selected parallel line vector. The dot product operation will obtain a scalar value, which reflects the angle relationship between the two vectors. The dot product calculation uses the standard formula in vector algebra, that is, the sum of the products of the corresponding components of the two vectors. The calculation result of the dot product is used to subsequently determine the spatial direction of the stair segment, which is of great significance for determining the starting point and rotation angle of the stairs. Through the construction of vectors and the calculation of dot products, the system obtains the basic characteristic data of the spatial layout of the stair segment.

[0094] Specifically, the starting point selection and rotation angle calculation require comparing the calculated dot product value with the positive direction of the coordinate axis to determine whether they are consistent. When the dot product result is consistent with the positive direction of the coordinate axis, it means that the extension direction of the stair segment is basically consistent with the main direction of the coordinate system. At this time, the starting point of the first line segment is selected as the starting point of the stair segment; conversely, when the dot product result is inconsistent with the positive direction of the coordinate axis, the starting point of the last line segment is selected as the starting point of the stair segment. After selecting the starting point, the system normalizes the starting point and endpoint vectors of the stair segment. The normalization process unifies the length of the vector to unit length and retains the direction information. The vector obtained in this way is the standardized direction vector. By calculating the angle of the standardized direction vector, the rotation angle parameter is obtained. This parameter reflects the rotation angle of the stair segment relative to the reference coordinate system and provides a direction reference for the subsequent generation of the stair model.

[0095] Specifically, the model generation and combination processing needs to generate a single-run stair model based on the calculated parameters. In this process, the total height of the steps determines the vertical height of the stairs, the top height offset determines the position offset of the top of the stairs, the first step line defines the size of the starting step, the number of steps and the step width jointly determine the specific size of each step, and the rotation angle parameter controls the rotation direction of the entire stair model in the plane. After generating the single-run stair model, the system combines the models according to the previously identified stair segment types. For scissor stairs, the single-run stair models need to be combined according to the broken line position so that they can complete the climbing of the entire floor height in a limited space; for double-run stairs, two single-run stair models need to be combined in a symmetrical or parallel manner so that they can complete the climbing of the floor height in sections. During the combination process, the system also needs to consider the turning point position of the stairs to ensure the continuity and practicality of the overall structure. Through this parametric model generation and combination method, the system finally generates a complete stair model, which not only meets the design intent of the original drawing, but also meets the application needs of actual engineering.

[0096] In this embodiment, by performing image processing on the target CAD drawing, multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays are obtained; the parallel line arrays are screened for effectiveness according to the vector feature set, and the screened parallel line arrays are paired, and the successfully paired parallel line arrays are formed into stair segment component units; the stair segment component units are parameterized by a preset detection algorithm to obtain the stair segment parameters of the stair segment component units, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component units; the stair segment component units are parameterized according to the stair segment parameters to obtain the stair parameters, and a stair model is generated according to the stair parameters and the stair segment component units. The present invention realizes efficient recognition and accurate modeling of prefabricated stair components through intelligent recognition and parametric modeling, effectively improving the design and construction efficiency.

[0097] The above describes the method for modeling an assembled staircase based on intelligent recognition in an embodiment of the present invention. The following describes the device for modeling an assembled staircase based on intelligent recognition in an embodiment of the present invention. Figure 2 In one embodiment of the present invention, an assembled stair modeling device based on intelligent recognition includes:

[0098] A drawing processing module 201 is used to obtain a target CAD drawing and perform image processing on the target CAD drawing to obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays;

[0099] A stair segment generating module 202 is used to screen the effectiveness of the parallel line arrays according to the vector feature set, and to pair the screened parallel line arrays, and to form stair segment component units with the successfully paired parallel line arrays;

[0100] A parameter calculation module 203, configured to perform parameter detection on the stair segment component unit by a preset detection algorithm to obtain stair segment parameters of the stair segment component unit, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component unit;

[0101] The staircase generation module 204 is used to perform parameterization processing on the staircase component unit according to the staircase parameters to obtain staircase parameters, and generate a staircase model according to the staircase parameters and the staircase component unit.

[0102] In an embodiment of the present invention, the assembly stair modeling device based on intelligent recognition runs the assembly stair modeling method based on intelligent recognition, and the assembly stair modeling device based on intelligent recognition obtains multiple sets of parallel line arrays and vector feature sets of parallel line segments in multiple sets of parallel line arrays by performing image processing on the target CAD drawings; the parallel line arrays are screened for effectiveness according to the vector feature sets, and the screened parallel line arrays are paired, and the successfully paired parallel line arrays are formed into stair segment component units; the stair segment component units are parameterized by a preset detection algorithm to obtain the stair segment parameters of the stair segment component units, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component units; the stair segment component units are parameterized according to the stair segment parameters to obtain stair parameters, and a stair model is generated according to the stair parameters and the stair segment component units. The present invention realizes efficient recognition and accurate modeling of assembly stair components through intelligent recognition and parametric modeling, and effectively improves the design and construction efficiency.

[0103] above Figure 2 The assembled staircase modeling device based on intelligent identification in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The assembled staircase modeling device based on intelligent identification in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0104] Figure 3 3 is a structural schematic diagram of an assembled stair modeling device based on intelligent recognition provided by an embodiment of the present invention. The assembled stair modeling device 300 based on intelligent recognition may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 may be short-term storage or persistent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the assembled stair modeling device 300 based on intelligent recognition. Furthermore, the processor 310 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the assembled stair modeling device 300 based on intelligent recognition to implement the steps of the assembled stair modeling method based on intelligent recognition.

[0105] The assembled stair modeling device 300 based on intelligent recognition may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It can be understood by those skilled in the art that Figure 3 The structure of the assembled stair modeling equipment based on intelligent recognition shown does not constitute a limitation of the assembled stair modeling equipment based on intelligent recognition provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0106] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for modeling prefabricated stairs based on intelligent recognition.

[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0108] 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 is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable 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, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0109] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for modeling assembled stairs based on intelligent recognition, characterized in that: The assembled staircase modeling method based on intelligent recognition includes: Acquire a target CAD drawing, and perform image processing on the target CAD drawing to obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays, wherein the vector feature sets include the lengths of the parallel line segments; Screening the effectiveness of the parallel line arrays according to the vector feature set, pairing the screened parallel line arrays, and forming stair segment component units with the successfully paired parallel line arrays; Performing parameter detection on the stair segment component unit by a preset detection algorithm to obtain the stair segment parameters of the stair segment component unit, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component unit; performing parameter detection on the stair segment component unit by a preset detection algorithm to obtain the stair segment parameters of the stair segment component unit comprises: performing polygonal approximation detection on the stair segment component unit to obtain broken line data, and counting the number of broken lines in the stair segment component unit according to the broken line data; performing step number calculation and step height detection on the parallel line array in the stair segment component unit, and determining the type of the stair segment component unit in combination with the number of broken lines to obtain the stair segment type; identifying the text mark in the stair segment component unit and the difference in the number of steps between the stair segment component units, and determining the direction of the stair segment component unit according to the text mark and the difference in the number of steps to obtain the stair segment direction; The stair segment component unit is parameterized according to the stair segment parameters to obtain stair parameters, and a stair model is generated according to the stair segment parameters and the stair segment component unit; the parameterization of the stair segment component unit according to the stair segment parameters to obtain stair parameters, and the stair model is generated according to the stair segment parameters and the stair segment component unit, including: allocating and calculating the preset floor height according to the stair segment type to obtain the total step height and top height offset of the stairs; performing size parameter detection on the parallel line array in the stair segment component unit to obtain the first step line, the number of steps and the step width; The first and last line segment endpoints are vector-constructed to obtain an endpoint vector, and the dot product of the endpoint vector and any parallel line vector is calculated; the starting point of the first and end points of the stair segment component unit is selected based on the consistency of the dot product and the positive direction of the coordinate axis to obtain the stair segment starting point, and the stair segment starting point and the endpoint vector are normalized to obtain a rotation angle parameter; a single-run stair model is generated based on the total height of the step, the top height offset, the first step line, the number of steps, the step width and the rotation angle parameter, and the single-run stair model is combined according to the stair segment type to obtain the stair model.

2. The method for modeling assembled stairs based on intelligent recognition according to claim 1 is characterized in that: The step of acquiring a target CAD drawing and performing image processing on the target CAD drawing to obtain multiple sets of parallel line arrays and vector feature sets of parallel line segments in the multiple sets of parallel line arrays includes: Obtain a target CAD drawing, perform Gaussian filtering on the target CAD drawing, and perform grayscale conversion and threshold segmentation on the target CAD drawing after the Gaussian filtering to obtain a binary image; Performing morphological operations on the binary image to obtain an edge image, and performing straight line detection on the edge image to obtain a plurality of straight line segments; Line segments are grouped according to coordinate information of the plurality of straight line segments to obtain a plurality of parallel line arrays, and feature extraction processing is performed on the line segments in the plurality of parallel line arrays to obtain vector feature sets of the parallel line segments in the plurality of parallel line arrays.

3. The method for modeling assembled stairs based on intelligent recognition according to claim 1 is characterized in that: The method of screening the effectiveness of the parallel line array according to the vector feature set, pairing the screened parallel line arrays, and forming stair segment component units with the successfully paired parallel line arrays comprises: Detecting the number of parallel line segments in each parallel line array to obtain the number of line segments in each parallel line array, and filtering out parallel line arrays whose number of line segments is less than a preset threshold; Calculating the average length of the parallel line segments in the parallel line array remaining after screening according to the vector feature set, and screening the remaining parallel line array for validity according to the average length to obtain a valid parallel line array; The distances between the effective parallel line arrays are calculated, and the parallel line arrays whose distances are less than a preset distance threshold are screened out for pairing to obtain the stair segment component unit.

4. The method for modeling assembled stairs based on intelligent recognition according to claim 1 is characterized in that: The step of identifying the text mark in the stair segment component unit and the difference in the number of steps between the stair segment component units, and determining the direction of the stair segment component unit according to the text mark and the difference in the number of steps to obtain the stair segment direction includes: Initialize two stair segment component units that meet preset conditions among all stair segment component units to opposite directions, and identify whether there are preset direction text marks within the parallel line range of the two stair segment component units in opposite directions; If yes, the directions of the two staircase component units in opposite directions are determined according to the direction text mark to obtain the corresponding staircase directions; If not, then perform region segmentation on the two stair component units in opposite directions according to the broken line data to obtain segmented stair regions, and count the number of steps in each stair region; The direction of each stair step area is determined according to the difference between the number of steps in each stair step area to obtain the corresponding stair step direction.

5. An assembled staircase modeling device based on intelligent recognition, characterized in that: The assembled staircase modeling device based on intelligent recognition includes: A drawing processing module, used for acquiring a target CAD drawing and performing image processing on the target CAD drawing to obtain a plurality of parallel line arrays and vector feature sets of parallel line segments in the plurality of parallel line arrays, wherein the vector feature sets include the lengths of the parallel line segments; A stair segment generation module, used for screening the effectiveness of the parallel line array according to the vector feature set, pairing the screened parallel line arrays, and forming stair segment component units with the successfully paired parallel line arrays; A parameter calculation module, for performing parameter detection on the stair segment component unit by a preset detection algorithm to obtain the stair segment parameters of the stair segment component unit, wherein the stair segment parameters include the stair segment type and stair segment direction of the stair segment component unit; the performing parameter detection on the stair segment component unit by a preset detection algorithm to obtain the stair segment parameters of the stair segment component unit comprises: performing polygonal approximation detection on the stair segment component unit to obtain broken line data, and counting the number of broken lines in the stair segment component unit according to the broken line data; performing step number calculation and step height detection on the parallel line array in the stair segment component unit, and determining the type of the stair segment component unit in combination with the number of broken lines to obtain the stair segment type; identifying the text mark in the stair segment component unit and the difference in the number of steps between the stair segment component units, and determining the direction of the stair segment component unit according to the text mark and the difference in the number of steps to obtain the stair segment direction; The staircase generation module is used to perform parameterization processing on the staircase component unit according to the staircase parameters to obtain staircase parameters, and generate a staircase model according to the staircase parameters and the staircase component unit; the parameterization processing on the staircase component unit according to the staircase parameters to obtain staircase parameters, and generating a staircase model according to the staircase parameters and the staircase component unit includes: allocating and calculating the preset floor height according to the staircase type to obtain the total step height and top height offset of the stairs; performing size parameter detection on the parallel line array in the staircase component unit to obtain the first step line, the number of steps and the step width; The first and last line segment endpoints in the component unit are constructed by vector to obtain the endpoint vector, and the dot product of the endpoint vector and any parallel line vector is calculated; the starting point of the first and end points of the stair segment component unit is selected according to the consistency of the dot product and the positive direction of the coordinate axis to obtain the stair segment starting point, and the stair segment starting point and the endpoint vector are normalized to obtain the rotation angle parameter; a single-run stair model is generated according to the total height of the step, the top height offset, the first step line, the number of steps, the step width and the rotation angle parameter, and the single-run stair model is combined according to the stair segment type to obtain the stair model.

6. An assembled staircase modeling device based on intelligent recognition, characterized in that: The assembled stair modeling device based on intelligent recognition includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the prefabricated staircase modeling device based on intelligent recognition executes the steps of the prefabricated staircase modeling method based on intelligent recognition as described in any one of claims 1-4.

7. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the method for modeling an assembled staircase based on intelligent recognition as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Architectural drawing-based automatic stair recognition method

    CN108416117A

  • Method and system for detecting form frame lines in form documents

    CN110210409A

  • Calculation method and system for stair engineering quantity

    CN112016148A