Subway station room layout drawing wall line extraction method based on improved Canny algorithm and Hough transform

The improved Canny algorithm and Hough transform method addresses the inefficiencies and inaccuracies of traditional wall line extraction methods by enhancing precision and efficiency, allowing seamless integration into CAD software.

CN120318082AActive Publication Date: 2025-07-15HARBIN INST OF TECH

Patent Information

Application Number
CN202510309478.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-15
Estimated Expiration
2045-03-17

AI Technical Summary

Technical Problem

In the prior art, the vector extraction of wall lines of subway station room layout drawings relies on manual annotation or semi-automatic identification, which is low efficiency and low accuracy, making it difficult to meet the needs of design cycle compression and engineering cost control.

Method used

Using the improved Canny algorithm and Hough transformation method, the wall line geometric information of the subway station room layout drawings is extracted through image multi-channel CLAHE processing, Laplace sharpening, Canny edge detection and Hough transformation.

Benefits of technology

It realizes the automatic precise extraction and standardized output of the subway station room layout drawings and wall lines, supports the import of CAD software, improves design efficiency and accuracy, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318082A_ABST
    Figure CN120318082A_ABST
Patent Text Reader

Abstract

The invention provides a subway station room layout drawing wall line extraction method based on an improved Canny algorithm and Hough transform. According to the method, through image multi-channel CLAHE processing enhancement and Laplacian sharpening, an improved Canny edge detection algorithm and Hough transform are applied to detect wall lines, then wall line merging is carried out, wall line geometric data of a standardized subway station room layout drawing are extracted, an output file can be directly imported into CAD software, good practical engineering application adaptability is achieved, and the method is suitable for popularization and application. The problems that a traditional method is low in efficiency, poor in precision and unstructured in output are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the cross - technical field of rail transit informatization and computer vision, and particularly to a method for extracting the wall lines of the subway station room layout drawing based on an improved Canny algorithm and Hough transform. The method is particularly suitable for the accurate recognition of room wall lines in subway room layout drawings and the output of standardized vector data. Background Art

[0002] In recent years, with the accelerated advancement of urbanization in China, the construction of rail transit has entered a stage of rapid development. In the process of urbanization development, the scale of rail transit lines in China has been continuously expanding, the design complexity of subway station rooms has been significantly improved, and the contradiction between the compressed design cycle and the demand for engineering cost control has become increasingly prominent. At the same time, the penetration of artificial intelligence technologies (such as computer vision and deep learning) in the field of civil engineering has given rise to new paradigms of "intelligent transportation" and "intelligent civil engineering". Technologies such as the automatic and accurate analysis of the wall lines of subway station room layout drawings and the output of standardized vector data provide strong support for the intelligent transformation of future large - scale rail transit construction.

[0003] Aiming at the problems of low efficiency and low accuracy in the vectorization extraction of the wall lines of traditional subway station room layout drawings, which rely on manual annotation or semi - automatic recognition by software, in the design process of subway station room layout, through multi - channel collaboration to enhance the image and an improved edge detection technology for the wall lines of the drawing room, combined with a wall line merging algorithm, the wall line information of the subway station room layout drawing can be automatically and accurately extracted and output, facilitating the intelligent design and construction application of subsequent CAD projects and improving the design efficiency. Summary of the Invention

[0004] The purpose of the present invention is to solve the problems in the prior art, and a method for extracting the wall lines of the subway station room layout drawing based on an improved Canny algorithm and Hough transform is proposed.

[0005] The present invention is realized through the following technical solutions. The present invention proposes a method for extracting the wall lines of the subway station room layout drawing based on an improved Canny algorithm and Hough transform, and the method includes the following steps:

[0006] A. Apply contrast - limited adaptive histogram equalization (CLAHE) processing to the B, G, and R channels of the input color - block map of the subway station room layout respectively to enhance the image contrast, and apply a Laplacian sharpening kernel for high - frequency sharpening enhancement of the color - block edge wall lines;

[0007] B. By using a median filter to replace Gaussian filtering to filter non-linear noise in each sharpened channel, performing Canny edge detection on each channel separately, fusing the multi-channel room edge wall line detection results through bitwise OR operation, and performing binarization processing and morphological closing operation on the fused room edge wall lines to connect the broken wall lines;

[0008] C. Detect and extract the room wall line information through Hough transform, merge adjacent room wall lines with similar angles based on length-weighted direction consistency, and obtain the wall line geometric information of the subway station room layout drawing to support import into CAD software.

[0009] Further, the specific steps of step A are as follows:

[0010] a1. Separate the BGR color channels of the subway station room layout color block diagram;

[0011] a2. Independently apply contrast-limited adaptive histogram equalization (CLAHE) processing to each channel to enhance the image contrast;

[0012] a3. Apply a Laplacian sharpening kernel for high-frequency sharpening enhancement of the color block edge wall lines.

[0013] Further, the specific steps of step B are as follows:

[0014] b1. Use a median filter to perform non-linear denoising on each enhanced channel;

[0015] b2. Detect the room edge wall lines of each channel using a double-threshold Canny algorithm, and obtain the room edge wall line diagrams of each color channel, which are respectively denoted as E B , E G and E R ;

[0016] b3. Generate a combined edge map E fusion = E B ∨ E G ∨ E R through bitwise OR operation;

[0017] b4. Perform binarization processing and morphological closing operation on the fused room edge wall lines to connect the broken wall lines.

[0018] Further, the specific steps of step C are as follows:

[0019] c1. Detect through Hough transform to obtain the initial wall line set L = {l1, l2,..., l n};

[0020] c2. Perform direction consistency determination on any two wall lines l i , l j ∈ L;

[0021] c3. Determine the spatial proximity of wall line pairs with the same direction;

[0022] c4. Perform weighted direction averaging on wall lines with the same direction and spatial proximity to obtain the merged direction and determine the endpoints of the merged wall line;

[0023] c5. Store the information of the extracted room wall lines in an Excel table, supporting CAD import.

[0024] Further, in step c2, for any two wall lines l i , l j ∈L, where the two endpoints of wall line l i are represented by (x1, y1) and (x2, y2), and the two endpoints of wall line l j are represented by (x′1, y′1) and (x′2, y′2), calculate the angle difference: Δθ = |θ i - θ j |, and the actual angle difference needs to be corrected to Δθ 实际 = min(Δθ, 180° - Δθ). If Δθ 实际 <θ t , then the two wall lines are considered to have similar angles, where θ t is a preset angle threshold.

[0025] Further, in step c3, calculate the minimum Euclidean distance between two wall lines l i , l j ∈L with the same direction If d min <d t , then the two wall lines are considered close enough, where d t is a preset distance threshold.

[0026] Further, in step c4, for wall lines l i , l j ∈L that satisfy the same direction and spatial proximity, calculate the merged main direction through weighted averaging. The direction vectors of wall lines l i , l j ∈L are represented by the differences of their endpoints: v i = (x2 - x1, y2 - y1), v j = (x′2 - x′1, y′2 - y′1); the lengths of the two wall lines are respectively: The direction vector after weighted averaging: The modulus v merge The components in the x and y directions: Normalize the merged direction vector:

[0027] Further, in step c4, project the four endpoints (x1, y1) and (x2, y2) (x′1, y′1) (x′2, y′2) of the two wall lines onto the weighted average direction u, and the projection value is calculated by the dot product formula: proj(p) = p x ·u x +p y ·u y , where the point p = (p x , p y ) is any endpoint; determine the merged endpoints: That is, the starting point of the merged wall line is the endpoint with the minimum projection value, corresponding to the leftmost point on the main direction, and the ending point is the endpoint with the maximum projection value, corresponding to the rightmost point on the main direction.

[0028] The present invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method for extracting wall lines from the subway station room layout drawing based on the improved Canny algorithm and Hough transform are implemented.

[0029] The present invention also provides a computer-readable storage medium for storing computer instructions, and when the computer instructions are executed by a processor, the steps of the method for extracting wall lines from the subway station room layout drawing based on the improved Canny algorithm and Hough transform are implemented.

[0030] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0031] The present invention provides a method for extracting wall lines from the subway station room layout drawing based on the improved Canny algorithm and Hough transform. By performing multi-channel CLAHE processing and Laplacian sharpening on the image, applying the improved Canny edge detection algorithm and Hough transform to detect the wall lines and then merging the wall lines, the geometric data of the wall lines of the standardized subway station room layout drawing is extracted. The output file can be directly imported into CAD software, which has good adaptability for practical engineering applications, and solves the problems of low efficiency, poor accuracy, and unstructured output of the traditional method. Description of the Drawings

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0033] Figure 1It is a flow chart of a method for extracting wall lines from subway station room layout drawings based on an improved Canny algorithm and Hough transform according to the present invention;

[0034] Figure 2 They are the color block diagram of the subway station room layout and the station room name annotation diagram input in the present invention;

[0035] Figure 3 They are the room wall lines extracted after image preprocessing enhancement and improved Canny detection in the present invention;

[0036] Figure 4 It is a schematic diagram of the principle of merging adjacent room wall lines with similar angles based on length-weighted direction consistency in the present invention;

[0037] Figure 5 It is a schematic diagram of the processing result after Hough transform and wall line merging in the present invention;

[0038] Figure 6 It is a schematic diagram of the effect of importing the extracted wall line geometric data into CAD in the present invention. Specific embodiments

[0039] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0040] Combined with Figures 1-6 , the present invention proposes a method for extracting wall lines from subway station room layout drawings based on an improved Canny algorithm and Hough transform. The method includes the following steps:

[0041] A. Apply contrast-limited adaptive histogram equalization (CLAHE) processing to the B, G, and R channels of the input color block diagram of the subway station room layout to enhance the image contrast, and apply a Laplacian sharpening kernel for high-frequency sharpening enhancement of the color block edge wall lines;

[0042] B. Filter the non-linear noise of each sharpened channel by using a median filter instead of a Gaussian filter, perform Canny edge detection on each channel respectively, fuse the multi-channel room edge wall line detection results through bitwise OR operation, and perform binary processing and morphological closing operation on the fused room edge wall lines to connect the broken wall lines;

[0043] C. Detect and extract the room wall line information through the Hough transform, merge adjacent room wall lines with similar angles based on the length-weighted direction consistency, and obtain the wall line geometric information of the subway station room layout drawing, which supports importing into CAD software.

[0044] The specific steps of step A are as follows:

[0045] a1. Separate the BGR color channels of the subway station room layout color block diagram;

[0046] a2. Independently apply the contrast-limited adaptive histogram equalization CLAHE processing to each channel to enhance the image contrast;

[0047] a3. Apply the Laplacian sharpening kernel for high-frequency sharpening enhancement of the color block edge wall lines.

[0048] The specific steps of step B are as follows:

[0049] b1. Use the median filter for non-linear denoising of each enhanced channel;

[0050] b2. Use the Canny algorithm with double thresholds to detect the room edge wall lines of each channel, and obtain the room edge wall line diagrams of each color channel, which are respectively denoted as E B , E G and E R ;

[0051] b3. Generate a combined edge map E fusion = E B ∨ E G ∨ E R ;

[0052] b4. Perform binarization processing and morphological closing operation on the fused room edge wall lines to connect the broken wall lines.

[0053] The specific steps of step C are as follows:

[0054] c1. Through the Hough transform detection, obtain the initial wall line set L = {l1, l2,..., l n};

[0055] c2. Perform the direction consistency determination for any two wall lines l i , l j ∈ L;

[0056] c3. Perform the spatial proximity determination for the wall line pairs with consistent directions;

[0057] c4. Perform the weighted direction average for the wall lines with consistent directions and spatial proximity to obtain the merged direction and determine the endpoints of the merged wall line;

[0058] c5. Store the information of the extracted room wall lines into an Excel table, supporting CAD import.

[0059] In step c2, for any two wall lines l i , l j ∈L, where the two endpoints of wall line l i are represented by (x1, y1) and (x2, y2), and the two endpoints of wall line l j are represented by (x′1, y′1) and (x′2, y′2), calculate the angle difference: Δθ = |θ i - θ j |. The actual angle difference needs to be corrected to Δθ 实际 = min(Δθ, 180° - Δθ). If Δθ 实际 <θ t , then the two wall lines are considered to have similar angles, where θ t is the preset angle threshold.

[0060] In step c3, calculate the minimum Euclidean distance between two wall lines l i , l j ∈L If d min <d t , then the two wall lines are considered to be close enough, where d t is the preset distance threshold.

[0061] In step c4, for wall lines l i , l j ∈L that are in the same direction and spatially adjacent, calculate the combined main direction by weighted average. The direction vectors of wall lines l i , l j ∈L are represented by the difference of their endpoints: v i = (x2 - x1, y2 - y1), v j = (x′2 - x′1, y′2 - y′1); The lengths of the two wall lines are respectively: Weighted average direction vector: Magnitude v merge Components in the x and y directions: Normalize the combined direction vector:

[0062] In step c4, project the four endpoints (x1, y1), (x2, y2), (x′1, y′1), and (x′2, y′2) of the two wall lines onto the weighted average direction u. The projection value is calculated by the dot product formula: proj(p) = p x ·u x + p y ·u y, where the point p = (p x , p y ) is an arbitrary end point; determine the merged end points: That is, the starting point of the merged wall line is the end point with the minimum projection value, corresponding to the leftmost point in the main direction, and the end point is the end point with the maximum projection value, corresponding to the rightmost point in the main direction.

[0063] Embodiment

[0064] In this embodiment, the present invention is applied to the extraction of wall line geometric information of the layout drawing of a subway station room in a certain place. Figure 1 The method flow chart of the present invention is given. Figure 2 The original color block diagram of the subway station room layout and the station room name annotation diagram are given. Figure 3 The extracted room wall lines after image preprocessing enhancement and improved Canny detection are given; Figure 4 The schematic diagram of the principle of merging adjacent room wall lines with similar angles based on length-weighted direction consistency is given, including two wall lines to be merged, the merged direction after length-weighted averaging, and the end points of the merged wall line. Figure 5 It is a schematic diagram of the processing result after Hough transform and wall line merging, Figure 6 It is a schematic diagram of the effect of importing the extracted wall line geometric data into CAD.

[0065] In this embodiment, step A enhances the image through multi-channel preprocessing of the color block diagram of the subway station room layout, and performs three-channel color separation, CLAHE processing to enhance the image contrast, and Laplacian sharpening on the color block diagram of the subway station room layout such as Figure 2 . After that, step B extracts the room wall lines as shown in Figure 3 through improved Canny edge detection and morphological closing operation.

[0066] In this embodiment, step C extracts the room wall line information through Hough transform, and then merges adjacent room wall lines with similar angles based on length-weighted direction consistency. The principle of wall line merging is as shown in Figure 4 . The results before and after merging are as shown in Figure 5 . The wall line geometric information of the subway station room layout drawing obtained supports importing into CAD software to generate vector line segments, as shown in Figure 6 .

[0067] The present invention proposes a method for extracting wall lines from subway station room layout drawings based on an improved Canny algorithm and Hough transform, including the following steps: enhancing the image preprocessing of the original subway station room layout color block drawings, separating the BGR color channels, and performing contrast-limited adaptive histogram equalization (CLAHE) on each of the three channels to enhance the image contrast, and then sharpening and enhancing the room edge wall lines on each of the three color channels through a Laplacian convolution kernel; performing Canny edge detection on each of the processed channels respectively, combining median filtering to replace Gaussian filtering to filter non-linear noise, and fusing the multi-channel room edge wall line detection results; performing binarization processing and morphological closing operation on the fused room edge wall lines to connect the broken wall lines; using Hough transform to detect and extract the room wall line information, and merging adjacent and similar-angle room wall lines based on the direction consistency weighted by the line segment length to obtain the wall line geometric information of the subway station room layout drawings, supporting one-key import into engineering design software such as AutoCAD and Revit to generate vector graphics. The present invention can be applied to the digital conversion of subway station room design drawings, improve the accuracy and efficiency of drawing geometric information extraction, output structured data, reduce labor costs, and promote the intelligent upgrade of the engineering design process.

[0068] The present invention also proposes an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the method for extracting wall lines from subway station room layout drawings based on an improved Canny algorithm and Hough transform.

[0069] The present invention also proposes a computer-readable storage medium for storing computer instructions, and when the computer instructions are executed by a processor, it implements the steps of the method for extracting wall lines from subway station room layout drawings based on an improved Canny algorithm and Hough transform.

[0070] The memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DRRAM). It should be noted that the memory of the method described in the present invention is intended to include but not limited to these and any other suitable types of memory.

[0071] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as high-density digital video discs (DVDs)), or semiconductor media (such as solid state discs (SSDs)), etc.

[0072] In the implementation process, the steps of the above method can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0073] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiments can be completed by the integrated logic circuit in the hardware of the processor or instructions in software form. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.

[0074] The above has introduced in detail the method for extracting the wall lines of the subway station room layout drawings based on the improved Canny algorithm and the Hough transform proposed by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for extracting wall lines of subway station room layout drawings based on an improved Canny algorithm and Hough transform, characterized in that, The method includes the following steps: A. Apply contrast-limited adaptive histogram equalization (CLAHE) processing to the B, G, and R channels of the input color patch map of the subway station room layout respectively to enhance the image contrast, and apply a Laplacian sharpening kernel for high-frequency sharpening enhancement of the color patch edge wall lines; B. Filter the non-linear noise of each sharpened channel by using a median filter instead of a Gaussian filter, perform Canny edge detection on each channel respectively, fuse the multi-channel room edge wall line detection results through bitwise OR operation, and perform binarization processing and morphological closing operation on the fused room edge wall lines to connect the broken wall lines; C. Detect and extract the room wall line information through the Hough transform, merge adjacent and similar-angle room wall lines based on the length-weighted direction consistency to obtain the wall line geometric information of the subway station room layout drawing, which supports importing into CAD software.

2. The method according to claim 1, characterized in that, The specific steps of step A are as follows: a1. Separate the BGR color channels of the color patch map of the subway station room layout; a2. Independently apply contrast-limited adaptive histogram equalization (CLAHE) processing to each channel to enhance the image contrast; a3. Apply a Laplacian sharpening kernel for high-frequency sharpening enhancement of the color patch edge wall lines.

3. The method according to claim 1, wherein The specific steps of step B are as follows: b1. Perform non-linear denoising on each enhanced channel using a median filter; b2. Use the Canny algorithm with double thresholds to detect the room edge wall lines of each channel, and the room edge wall line diagrams of each color channel are respectively denoted as E B , E G and E R ; b3. Generate the combined edge map E through bitwise OR operation fusion = E B ∨ E G ∨ E R ; b4. Perform binarization processing and morphological closing operation on the fused room edge wall lines to connect the broken wall lines.

4. The method according to claim 1, characterized in that The specific steps of step C are as follows: c1. By Hough transform detection, obtain the initial wall line set L = {l1, l2,..., l n}; c2. For any two wall lines l i , l j ∈ L, perform the direction consistency determination; c3. Determine the spatial proximity of wall line pairs with consistent directions; c4. Perform weighted direction averaging on the wall lines with consistent directions and spatial proximity to obtain the merged direction and determine the endpoints of the merged wall lines; c5. Store the information of the extracted room wall lines in an Excel table, which supports importing into CAD.

5. The method according to claim 4, characterized in that In step c2, for any two wall lines l i , l j ∈L, where the two endpoints of wall line l i are represented by (x1, y1) and (x2, y2), and the two endpoints of wall line l j are represented by (x′1, y′1) and (x′2, y′2), calculate the angle difference: Δθ = |θ i - θ j |. The actual angle difference needs to be corrected to Δθ 实际 = min(Δθ, 180° - Δθ). If Δθ 实际 < θ t , it is considered that the angles of the two wall lines are similar, where θ t is a preset angle threshold.

6. The method according to claim 5, characterized in that, In step c3, calculate the minimum Euclidean distance between two wall lines l i , l j ∈ L If d min < d t , it is considered that the two wall lines are close enough, where d t is a preset distance threshold.

7. The method according to claim 6, characterized in that, In step c4, for the wall lines l i , l j ∈L that meet the conditions of consistent direction and spatial proximity, the merged principal direction is calculated by weighted average. The direction vectors of the wall lines l i , l j ∈L are represented by the differences between their endpoints: v i =(x2 - x1, y2 - y1), v j =(x′2 - x1′, y′2 - y1′); The lengths of the two wall lines are respectively: The direction vector after weighted average: The modulus v merge The components in the x and y directions: Normalize the merged direction vector:

8. The method according to claim 7, wherein In step c4, project the four endpoints (x1, y1) and (x2, y2) (x′1, y′1) (x′2, y′2) of the two wall lines onto the weighted average direction u, and the projection value is calculated by the dot product formula: proj(p) = p x ·u x +p y ·u y , where the point p = (p x , p y ) is any endpoint; determine the merged endpoints: That is, the starting point of the merged wall line is the endpoint with the minimum projection value, corresponding to the leftmost point on the main direction, and the ending point is the endpoint with the maximum projection value, corresponding to the rightmost point on the main direction.

9. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-8.

10. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, it implements the steps of the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Architectural-drawing-based automatic identification method for column and wall

    CN108376248A

  • Wall recognition method, computer equipment and readable storage medium

    CN114756928A

  • Wall surface detection method of indoor mobile robot and storage medium

    CN116645388A

  • Line segment detection method and device, storage medium and computer program product

    CN118172404A

  • Method and system for detection of in-panel mura based on hough transform and gaussian fitting

    US20190206043A1

Cited By

  • Subway room layout intelligent design method based on Stable Diffusion

    CN120930230A

  • A subway room layout intelligent design method based on stable diffusion

    CN120930230B