Image post-processing method, device, electronic device and storage medium

By detecting and sorting image edge points, combining the bonding processing of overlapping area and angle relationships, the problems of unsmooth and low accuracy of irregular object edge processing are solved, and the accuracy and efficiency of building image processing are improved.

CN114092505BActive Publication Date: 2024-11-19SHENZHEN BINCENT TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111412534.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2024-11-19
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

The existing image segmentation processing technology has problems of unsmoothness and low accuracy when processing the edges of irregular objects. Especially in the image processing of buildings, the wall thickness becomes thinner and the processing speed is slower and the robustness is poor.

Method used

By detecting and sorting the edge points of the target image, the corner coordinates are determined, and the wiring and straightening are carried out according to preset rules, the wall and door and window patterns are identified and separated, and the bonding is carried out according to the overlapping area and angle relationship. , ensure smoothness and accuracy of image edges.

Benefits of technology

It achieves the smoothness and accuracy of edge processing of irregular object images, improves the robustness and efficiency of image processing, and ensures the accuracy of building images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114092505B_ABST
    Figure CN114092505B_ABST
Patent Text Reader

Abstract

The present application is applicable to the computer field, and provides an image post-processing method, device, electronic device and storage medium, including: detecting edge points of lines of a target image to obtain a number of edge point coordinates; sorting the edge point coordinates to determine corner points and corner point coordinates of the corner points; connecting and straightening the corresponding corner point coordinates according to preset rules to obtain a target pattern, wherein the target pattern includes a wall pattern and a door and window pattern. The image post-processing method of the present application can improve the edge processing accuracy of irregular object images and has good robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computers, and in particular, relates to an image post-processing method, device, electronic device and storage medium. Background Art

[0002] The current image segmentation processing generally needs to identify irregular objects, such as people, cars, animals, etc. As a type of irregular object, the image of a building generally includes different structures such as doors, windows, and walls, and the sizes are different. In the process of building construction and decoration, image processing is often required.

[0003] The existing processing method is based on post-processing work of copying image recognition, using the strategy of image growth to negotiate growth between the edge of the wall and the type of room. Edge detection is performed based on the segmentation results, and the detected straight lines are classified, merged, and other operations to obtain the straightened image and vectorized data. Although the image is smooth after processing based on the image growth strategy, a lot of accuracy is lost. For example, the thickness of the wall will become thinner, and because it loops the pixels of the entire image, the processing speed is relatively slow. Although direct edge line detection is fast, it is prone to errors in processing wall images with uneven thickness and has poor robustness. Summary of the invention

[0004] The purpose of the present application is to provide an image post-processing method, device, electronic device and storage medium, aiming to solve the technical problems of uneven edge processing and low processing accuracy of irregular object images in the prior art.

[0005] This application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an image post-processing method, comprising:

[0007] Detect edge points of lines in the target image and obtain coordinates of several edge points;

[0008] Sorting the edge point coordinates to determine corner points and corner point coordinates of the corner points;

[0009] The corresponding corner point coordinates are connected and straightened according to preset rules to obtain a target pattern.

[0010] Optionally, the target pattern includes a wall pattern and a door and window pattern.

[0011] Optionally, after obtaining the target pattern, the method further includes:

[0012] Identifying and separating the wall pattern and the door and window pattern;

[0013] The wall pattern and the door and window pattern are fitted together according to the positional relationship between the wall pattern and the door and window pattern.

[0014] Optionally, the wall pattern includes a horizontal wall pattern and a vertical wall pattern, and the step of attaching the wall pattern to the door and window pattern according to the positional relationship between the wall pattern and the door and window pattern includes:

[0015] Calculating a first overlapping area between the door and window pattern and the horizontal wall pattern;

[0016] Calculating a second overlapping area between the door and window pattern and the vertical wall pattern;

[0017] Comparing the first overlapping area with the second overlapping area;

[0018] If the first overlap area is larger than the second overlap area, the door and window pattern is bonded to the horizontal wall pattern;

[0019] If the second overlapping area is larger than the first overlapping area, the door and window pattern is fitted with the vertical wall pattern.

[0020] Optionally, the wall pattern and the door and window pattern are both rectangular, and after comparing the first overlap area with the second overlap area, the method further includes:

[0021] If the first overlap area and the second overlap area are both 0, determining a first minimum angle between the door and window pattern and the horizontal wall pattern, and determining a second minimum angle between the door and window pattern and the vertical wall pattern;

[0022] Comparing the first minimum angle with the second minimum angle;

[0023] If the first minimum angle is smaller than the second minimum angle, the door and window pattern is fitted with the horizontal wall pattern;

[0024] If the second minimum angle is smaller than the first minimum angle, the door and window pattern is fitted with the vertical wall pattern.

[0025] Optionally, after comparing the first minimum angle with the second minimum angle, the method further includes:

[0026] If the first minimum angle is consistent with the second minimum angle, it is determined that the horizontal wall pattern and the vertical wall pattern are in a parallel state;

[0027] Determining a first distance between the door and window pattern and the horizontal wall pattern;

[0028] Determining a second distance between the door and window pattern and the vertical wall pattern;

[0029] comparing the first distance and the second distance;

[0030] If the first distance is closer than the second distance, the door and window pattern is fitted with the horizontal wall pattern;

[0031] If the second distance is closer than the first distance, the door and window pattern is aligned with the vertical wall pattern.

[0032] Optionally, the step of attaching the wall pattern to the door and window pattern comprises:

[0033] Aligning the long sides of the wall pattern with the long sides of the door and window pattern;

[0034] Aligning the other long side of the wall pattern with the other long side of the door and window pattern;

[0035] If the other long side of the wall pattern and the other long side of the door and window pattern cannot be correspondingly fitted, the thickness of the door and window pattern is changed to adapt to the other long side of the wall pattern for fitting.

[0036] In a second aspect, an embodiment of the present application provides an image post-processing device, comprising:

[0037] The image detection module detects the edge points of the lines of the target image and obtains the coordinates of several edge points;

[0038] A coordinate sorting module is used to sort the edge point coordinates to determine the corner points and the corner point coordinates of the corner points;

[0039] The image processing module connects and straightens the corresponding corner point coordinates according to preset rules to obtain a target pattern.

[0040] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the image post-processing method as described above.

[0041] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to perform the steps of the image post-processing method as described above.

[0042] The image post-processing method provided by the present application detects the edge points of the lines of the target image to obtain a number of edge point coordinates; sorts the edge point coordinates to determine the corner points and the corner point coordinates of the corner points; connects and straightens the corresponding corner point coordinates according to preset rules to obtain the target pattern, which can quickly solve the problem of uneven edge processing of irregular object images, improve the edge processing accuracy of the image, and has good robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flowchart of an embodiment of the image post-processing method provided in the embodiment of the present application;

[0044] Figure 2 It is a flowchart of an embodiment of image separation and bonding provided in an embodiment of the present application;

[0045] Figure 3 This is a flow chart of an embodiment of laminating door and window patterns and wall patterns provided in an embodiment of the present application;

[0046] Figure 4 This is a flow chart of another embodiment of laminating door and window patterns with wall patterns provided in an embodiment of the present application;

[0047] Figure 5 This is a flow chart of another embodiment of laminating door and window patterns with wall patterns provided in an embodiment of the present application;

[0048] Figure 6 This is a flow chart of another embodiment of laminating door and window patterns with wall patterns provided in an embodiment of the present application;

[0049] Figure 7 is a schematic diagram of a target image of an embodiment of the image post-processing method provided in an embodiment of the present application;

[0050] Figure 8 is a schematic diagram of image recognition of an embodiment of the image post-processing method provided in an embodiment of the present application;

[0051] Fig. 9 is a schematic diagram of an embodiment of a straightening process of image post-processing provided in an embodiment of the present application;

[0052] Fig.10 It is a schematic diagram of an embodiment of the lamination process of door and window patterns and wall patterns provided in an embodiment of the present application;

[0053] Fig.11 is a schematic diagram of another embodiment of the lamination process of door and window patterns and wall patterns provided in an embodiment of the present application;

[0054] Fig.12is a schematic diagram of another embodiment of the lamination process of door and window patterns and wall patterns provided in an embodiment of the present application;

[0055] Fig.13 is a schematic diagram of another embodiment of the lamination process of door and window patterns and wall patterns provided in an embodiment of the present application;

[0056] Fig.14 is a block diagram of each module of the image post-processing device provided in an embodiment of the present application;

[0057] Fig.15 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0058] Fig.16 It is a schematic diagram of the structure of the server provided in the embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0061] As will be appreciated by those skilled in the art, the term "device" as used herein includes both wireless signal receiver devices, which are devices that only have a transmitting signal receiver without transmitting capability, and transmitting and receiving hardware devices, which are devices that have receiving and transmitting hardware capable of performing two-way communications over a two-way communications link. Such devices may include: cellular or other communications devices, which have a single line display or a multi-line display or a cellular or other communications device without a multi-line display; a PCS (Personal Communications Service), which may combine voice, data processing, fax and / or data communications capabilities; a PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar and / or a GPS (Global Positioning System) receiver; a conventional palmtop computer or other device, which has and / or includes a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver.

[0062] like Figure 1 , Figure 7 and Fig. 9 As shown, an image post-processing method provided in an embodiment of the present application includes:

[0063] S1000, detecting edge points of lines of the target image to obtain coordinates of several edge points;

[0064] S2000, sorting the edge point coordinates to determine corner points and corner point coordinates of the corner points;

[0065] S3000: Connect and straighten the corresponding corner point coordinates according to a preset rule to obtain a target pattern.

[0066] In this embodiment, the target image is a two-dimensional planar structural diagram of a building, and the building includes walls, doors, windows, and the like.

[0067] In this embodiment, if Figure 7 As shown, Figure 7 (a) is the original image of the two-dimensional plane structure diagram of the building, and (b) is the output image after recognition processing by the neural network model, in which the lines of the target image are discontinuous and intertwined. The present application obtains a vectorized target pattern by recognizing and straightening the lines of the target image.

[0068] In this embodiment, the edge points of the lines of the target image are first detected to obtain the coordinates of several edge points. Fig. 9As shown, the edge points of line A in the target image are a1 and a2, the edge points of line B in the target image are b1 and b2, and the edge points of line C in the target image are c1 and c2, and the coordinates of the edge points are further determined.

[0069] The edge point coordinates are sorted, and the coordinates of each edge point in the x-axis direction and the y-axis direction are determined respectively, and the corner points and the corner point coordinates of the corner points are further determined. The vertical corner points can be determined by the minimum and maximum coordinates in the y-axis direction after the edge points are sorted. The corner points in this embodiment are a1 and c2.

[0070] By connecting and straightening the corresponding corner point coordinates, one of the target patterns of the target image can be obtained. In actual image processing, there may be a situation as shown by line D in the target image. Whether lines A and D need to be straightened needs to be determined by judging their positional relationship in the x-axis direction.

[0071] In this embodiment, a unit distance is set for the target pattern in the x-axis direction. If the target pattern is within a unit distance, line D and line A are considered to be the same line and are straightened. Otherwise, line D and line A are considered to be different lines and do not need to be connected and straightened at the same time. Fig. 9 In the figure, the maximum distance between lines A, B and C in the x-axis direction is x1, which is within the unit distance range, so they are connected and straightened; while the distance between line D and line A is x2, which is not within the unit distance range, so line D and line A are considered to be different lines, and they are not straightened at the same time. Here, the length of the unit distance can be set arbitrarily according to the actual graphics processing situation, and there is no restriction here.

[0072] The image post-processing method provided in the embodiment of the present application can quickly straighten the lines of the target image after identifying the edge points of the lines, and can effectively exclude other lines of the target image that do not need to be straightened, thereby effectively improving the efficiency of image straightening.

[0073] like Figure 2 As shown, after obtaining the target pattern, the image post-processing method further includes:

[0074] S4000, identifying and separating the wall pattern and the door and window pattern;

[0075] S5000: Fit the wall pattern and the door and window pattern according to the positional relationship between the wall pattern and the door and window pattern.

[0076] In this embodiment, if Figure 8As shown, the target pattern includes a wall pattern and a door and window pattern. This embodiment is suitable for processing graphics in the architectural field.

[0077] After the target pattern is identified, it is further determined whether it is a wall pattern or a door and window pattern according to the structure of the building. Furthermore, the wall pattern and the door and window pattern are fitted according to the positional relationship between the wall pattern and the door and window pattern.

[0078] In actual image processing, after the target pattern is acquired, the relative position relationship of the target pattern is often unable to be determined. In this embodiment, by detecting and straightening the edge points of the lines of the wall pattern and the door and window pattern, the position relationship between the wall pattern and the door and window pattern can be further determined, so that they can be fitted to prevent the door and window pattern from being fitted to the wrong position of the wall pattern.

[0079] The image post-processing method provided in the embodiment of the present application first straightens the lines of the wall pattern and the door and window pattern respectively, and further determines the positional relationship between the wall pattern and the door and window pattern, thereby fitting the wall pattern and the door and window pattern, effectively improving the accuracy of image processing.

[0080] like Figure 3 and Fig.10 As shown, the wall pattern includes a horizontal wall pattern and a vertical wall pattern, and the step of attaching the wall pattern to the door and window pattern according to the positional relationship between the wall pattern and the door and window pattern includes:

[0081] S5100, calculating a first overlapping area between the door and window pattern and the horizontal wall pattern;

[0082] S5200, calculating a second overlapping area between the door and window pattern and the vertical wall pattern;

[0083] S5300: Compare the first overlapping area with the second overlapping area;

[0084] S5400: If the first overlapping area is larger than the second overlapping area, attaching the door and window pattern to the horizontal wall pattern;

[0085] S5500: If the second overlapping area is larger than the first overlapping area, the door and window pattern is aligned with the vertical wall pattern.

[0086] In this embodiment, the wall pattern includes a horizontal wall pattern and a vertical wall pattern. The first overlapping area between the door and window pattern and the horizontal wall pattern is S1, and the second overlapping area between the door and window pattern and the vertical wall pattern is S2. By comparing the sizes of the first overlapping area S1 and the second overlapping area S2, the positional relationship between the wall pattern and the door and window pattern can be determined.

[0087] If the first overlap area S1 is larger than the second overlap area S2, the door and window pattern is matched with the horizontal wall pattern (not shown in the figure); if the second overlap area S2 is larger than the first overlap area S1, the door and window pattern is matched with the vertical wall pattern. Fig.10 shown.

[0088] The image post-processing method provided in the embodiment of the present application can further determine the positional relationship between the wall pattern and the door and window pattern according to the size of the overlap area between the wall pattern and the door and window pattern. The image overlap area in the embodiment of the present application is only the overlap of the target image obtained after image processing, not the actual overlap in the building. Therefore, the positional relationship between the wall pattern and the door and window pattern can be determined according to the size of the overlap area with high accuracy.

[0089] like Figure 4 and Fig.11 As shown, the wall pattern and the door and window pattern are both rectangular. After comparing the first overlap area with the second overlap area, the method further includes:

[0090] S5310: If the first overlap area and the second overlap area are both 0, determine a first minimum angle between the door and window pattern and the horizontal wall pattern, and determine a second minimum angle between the door and window pattern and the vertical wall pattern;

[0091] S5320: Compare the first minimum angle with the second minimum angle;

[0092] S5330: If the first minimum angle is smaller than the second minimum angle, the door and window pattern is fitted with the horizontal wall pattern;

[0093] S5340: If the second minimum angle is smaller than the first minimum angle, the door and window pattern is aligned with the vertical wall pattern.

[0094] In this embodiment, the wall pattern and the door and window pattern are both rectangular. If the first overlap area and the second overlap area are both 0, the first minimum angle between the door and window pattern and the horizontal wall pattern is determined, and the second minimum angle between the door and window pattern and the vertical wall pattern is determined. Fig.11In the above situation, the first minimum angle and the second minimum angle may also be determined by the angle between the extension line of the door and window pattern and the line of the wall pattern.

[0095] If the first minimum angle is smaller than the second minimum angle, the door and window pattern is matched with the horizontal wall pattern; if the second minimum angle is smaller than the first minimum angle, the door and window pattern is matched with the vertical wall pattern. In actual building graphics processing, the first minimum angle and the second minimum angle have a significant difference, and it is rare that the first minimum angle and the second minimum angle are exactly equal. Therefore, the first minimum angle and the second minimum angle being exactly equal is not considered within the scope of this embodiment.

[0096] The image post-processing method provided in the embodiment of the present application can determine the positional relationship between the wall pattern and the door and window pattern according to the angles of the wall pattern and the door and window pattern, thereby ensuring that in actual graphics processing, when multiple wall patterns appear, such as horizontal wall patterns and vertical wall patterns, the positional relationship between the wall pattern and the door and window pattern will not be confused. The lines of the wall pattern and the door and window pattern are straightened and then fitted together, thereby effectively improving the accuracy of image processing involving multiple wall patterns.

[0097] like Figure 5 and Fig.12 As shown, after comparing the first minimum angle with the second minimum angle, the method further includes:

[0098] S5350: If the first minimum angle is consistent with the second minimum angle, it is determined that the horizontal wall pattern and the vertical wall pattern are in a parallel state;

[0099] S5351, determining a first distance between the door and window pattern and the horizontal wall pattern;

[0100] S5352, determining a second distance between the door and window pattern and the vertical wall pattern;

[0101] S5353, comparing the first distance and the second distance;

[0102] S5354: if the first distance is closer than the second distance, the door and window pattern is fitted with the horizontal wall pattern;

[0103] S5355. If the second distance is closer than the first distance, the door and window pattern is aligned with the vertical wall pattern.

[0104] In this embodiment, the consistency of the first minimum angle and the second minimum angle only means that the horizontal wall pattern and the vertical wall pattern are in a parallel state, that is, the target pattern includes two parallel wall patterns, and the positional relationship between the door and window pattern and the wall pattern can be determined by determining the distance between the lines of the door and window pattern and the lines of the wall pattern, so that the door and window pattern and the wall pattern are correctly fitted.

[0105] It should be noted that the horizontal wall pattern and the vertical wall pattern described herein are only used to distinguish between two walls, and do not specifically refer to the positional relationship between the wall patterns in the horizontal and vertical directions.

[0106] Specifically, Fig.12 As shown, a first distance d1 between the lines of the door and window pattern and the lines of the horizontal wall pattern is determined, and a second distance d2 between the lines of the door and window pattern and the lines of the vertical wall pattern is determined. The first distance d1 is compared with the second distance d2. If the first distance is closer than the second distance, the door and window pattern is fitted with the horizontal wall pattern. If the second distance is closer than the first distance, the door and window pattern is fitted with the vertical wall pattern.

[0107] The image post-processing method provided in the embodiment of the present application is applicable to the situation where the door and window pattern is parallel to the horizontal wall pattern and the vertical wall pattern, and the door and window pattern is located between the horizontal wall pattern and the vertical wall pattern. The positional relationship between the door and window pattern and the wall pattern can be determined based on the distance, thereby improving the image processing efficiency.

[0108] like Figure 6 and Fig.13 As shown, the step of laminating the wall pattern and the door and window pattern comprises:

[0109] S5001, correspondingly attaching the long side of the wall pattern to the long side of the door and window pattern;

[0110] S5002, correspondingly attaching the other long side of the wall pattern to the other long side of the door and window pattern;

[0111] S5003: If the other long side of the wall pattern and the other long side of the door and window pattern cannot be aligned with each other, the thickness of the door and window pattern is changed to fit the other long side of the wall pattern.

[0112] In this embodiment, the wall pattern and the door and window pattern are both rectangles, and the long side is one long side of the rectangle. When the wall pattern and the door and window pattern are bonded together, the long side of the wall pattern and the long side of the door and window pattern are first bonded together accordingly, and then the other long side of the wall pattern and the other long side of the door and window pattern are bonded together accordingly.

[0113] During the pattern processing, it will be found that the other long side and the other long side of the door and window pattern cannot be aligned with each other. Fig.13 As shown, the thickness of the door and window pattern is changed to fit the other long side of the wall pattern.

[0114] The image post-processing method provided in the embodiment of the present application changes the thickness of the door and window pattern so as to fit the wall pattern and the door and window pattern, thereby ensuring the accuracy of the fitting and improving the processing accuracy of the target pattern.

[0115] like Fig.14 As shown, the present application also provides an image post-processing device, comprising:

[0116] The image detection module 1000 detects edge points of lines of the target image to obtain coordinates of several edge points;

[0117] A coordinate sorting module 2000 is used to sort the edge point coordinates to determine the corner points and the corner point coordinates of the corner points;

[0118] The image processing module 3000 connects and straightens the corresponding corner point coordinates according to a preset rule to obtain a target pattern.

[0119] Since the above-mentioned image post-processing device is a device that corresponds one-to-one to the image post-processing method, its implementation principle is the same as that of the image post-processing method, which will not be repeated here.

[0120] In this embodiment, please refer to Fig.15 , provides a basic structural block diagram of electronic equipment.

[0121] The electronic device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. The non-volatile storage medium of the electronic device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement an image post-processing method. The processor of the electronic device is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory of the electronic device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute an image post-processing method. The network interface of the electronic device is used to connect and communicate with a terminal. Those skilled in the art will understand that Fig.15 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0122] The processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0123] The present application also provides a storage medium storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the image post-processing method described in any of the above embodiments.

[0124] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory is used to store at least one instruction, which is used to be executed by the processor to implement the image post-processing method provided in the method embodiment of the present application.

[0125] like Fig.16 The schematic diagram of the structure of a server provided in one embodiment of the present application is shown. The server is used to implement the image post-processing method provided in the above embodiment. Specifically:

[0126] The server includes a central processing unit (CPU), a system memory including a random access memory (RAM) and a read-only memory (ROM), and a system bus connecting the system memory and the central processing unit. The server also includes a basic input / output system (I / O system) that helps transfer information between various components in the computer, and a large-capacity storage device for storing an operating system, application programs, and other program modules.

[0127] The basic input / output system includes a display for displaying information and an input device such as a mouse and a keyboard for a user to input information. The display and the input device are connected to the central processing unit through an input / output controller connected to the system bus. The basic input / output system may also include an input / output controller for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus.

[0128] The mass storage device is connected to the central processing unit via a mass storage controller (not shown) connected to the system bus. The mass storage device and its associated computer readable medium provide non-volatile storage for the server. That is, the mass storage device may include a computer readable medium (not shown) such as a hard disk or a CD-ROM drive.

[0129] Without loss of generality, the computer readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above. The above-mentioned system memory and mass storage devices may be collectively referred to as memory.

[0130] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0131] The embodiments of the present invention are each process and / or box in the flowchart and / or block diagram of the method, terminal device (system) and computer program product according to the embodiments of the present invention, and the combination of the processes and / or boxes in the flowchart and / or block diagram. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the process. Figure 1 A device that specifies the functions in a block or multiple blocks in a process or multiple processes and / or a block diagram.

[0132] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified by one or more boxes.

[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0134] In addition, each functional device in each embodiment of the present invention may be integrated into the same data processing device, or each device may exist physically separately, or two or more devices may be integrated into the same device.

[0135] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other devices or steps, and the singular does not exclude the plural. Multiple devices or computer devices stated in the computer device claim can also be implemented by the same computer device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0136] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. An image post-processing method, It is characterized in that include: Detect edge points of lines in the target image and obtain coordinates of several edge points; Sorting the edge point coordinates to determine corner points and corner point coordinates of the corner points; Connecting and straightening the corresponding corner point coordinates according to preset rules to obtain a target pattern; The target patterns include wall patterns and door and window patterns; After obtaining the target pattern, the method further includes: Identifying and separating the wall pattern and the door and window pattern; The wall pattern and the door and window pattern are attached to each other according to the positional relationship between the wall pattern and the door and window pattern.

2. The image post-processing method according to claim 1, It is characterized in that The wall pattern includes a horizontal wall pattern and a vertical wall pattern, and the step of attaching the wall pattern to the door and window pattern according to the positional relationship between the wall pattern and the door and window pattern includes: Calculating a first overlapping area between the door and window pattern and the horizontal wall pattern; Calculating a second overlapping area between the door and window pattern and the vertical wall pattern; Comparing the first overlapping area with the second overlapping area; If the first overlap area is larger than the second overlap area, the door and window pattern is bonded to the horizontal wall pattern; If the second overlapping area is larger than the first overlapping area, the door and window pattern is fitted with the vertical wall pattern.

3. The image post-processing method according to claim 2, It is characterized in that The wall pattern and the door and window pattern are both rectangular. After comparing the first overlap area with the second overlap area, the method further includes: If the first overlap area and the second overlap area are both 0, determining a first minimum angle between the door and window pattern and the horizontal wall pattern, and determining a second minimum angle between the door and window pattern and the vertical wall pattern; Comparing the first minimum angle with the second minimum angle; If the first minimum angle is smaller than the second minimum angle, the door and window pattern is fitted with the horizontal wall pattern; If the second minimum angle is smaller than the first minimum angle, the door and window pattern is fitted with the vertical wall pattern.

4. The image post-processing method according to claim 3, It is characterized in that After comparing the first minimum angle with the second minimum angle, the method further includes: If the first minimum angle is consistent with the second minimum angle, it is determined that the horizontal wall pattern and the vertical wall pattern are in a parallel state; Determining a first distance between the door and window pattern and the horizontal wall pattern; Determining a second distance between the door and window pattern and the vertical wall pattern; comparing the first distance and the second distance; If the first distance is closer than the second distance, the door and window pattern is fitted with the horizontal wall pattern; If the second distance is closer than the first distance, the door and window pattern is aligned with the vertical wall pattern.

5. The image post-processing method according to claim 1, It is characterized in that The step of laminating the wall pattern and the door and window pattern comprises: Aligning the long sides of the wall pattern with the long sides of the door and window pattern; Aligning the other long side of the wall pattern with the other long side of the door and window pattern; If the other long side of the wall pattern and the other long side of the door and window pattern cannot be correspondingly fitted, the thickness of the door and window pattern is changed to adapt to the other long side of the wall pattern for fitting.

6. An image post-processing device, It is characterized in that include: The image detection module detects the edge points of the lines of the target image and obtains the coordinates of several edge points; A coordinate sorting module is used to sort the edge point coordinates to determine the corner points and the corner point coordinates of the corner points; An image processing module connects and straightens the corresponding corner point coordinates according to a preset rule to obtain a target pattern; The target patterns include wall patterns and door and window patterns; The device also includes: The image detection module is further used to identify and separate the wall pattern and the door and window pattern; The image processing module is further used to fit the wall pattern and the door and window pattern together according to the positional relationship between the wall pattern and the door and window pattern.

7. An electronic device, It is characterized in that The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the image post-processing method according to any one of claims 1 to 5.

8. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the image post-processing method according to any one of claims 1 to 5.