CN117291931A - Building space segmentation method and system based on maximum inscribed rectangle - Google Patents

Building space segmentation method and system based on maximum inscribed rectangle Download PDF

Info

Publication number
CN117291931A
CN117291931A CN202311232617.1A CN202311232617A CN117291931A CN 117291931 A CN117291931 A CN 117291931A CN 202311232617 A CN202311232617 A CN 202311232617A CN 117291931 A CN117291931 A CN 117291931A
Authority
CN
China
Prior art keywords
building space
text
point
points
rectangle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311232617.1A
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bangtu Information Technology Co ltd
Original Assignee
Shanghai Bangtu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bangtu Information Technology Co ltd filed Critical Shanghai Bangtu Information Technology Co ltd
Priority to CN202311232617.1A priority Critical patent/CN117291931A/en
Publication of CN117291931A publication Critical patent/CN117291931A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/04Architectural design, interior design

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Character Input (AREA)

Abstract

The invention provides a building space segmentation method and system based on a maximum inscribed rectangle, comprising the following steps: acquiring a building space image to be segmented, and reading the number of marked text points in the building space image to be segmented; solving the maximum inscribed rectangle of the building space image to be segmented based on the marked text points to obtain the maximum inscribed rectangle of the marked text points; for the building space images to be segmented of different numbers of marked text points, carrying out different processing on the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, and outputting a building space segmentation image; the method carries out multi-space division based on the maximum inscribed rectangle, and the abstract space division problem is represented as an actual image processing problem, so that the building space under the condition of various marked text points is accurately divided and accords with building specifications.

Description

Building space segmentation method and system based on maximum inscribed rectangle
Technical Field
The invention relates to the technical field of image processing, in particular to a building space segmentation method and system based on a maximum inscribed rectangle.
Background
In CAD images of building spaces, different textual identifications are typically employed in different types of spaces at different locations. The abstract building space segmentation may be embodied as an image processing problem that solves for the largest inscribed rectangle in space. However, for a building space containing a plurality of text labels, the space division needs to meet the condition that the space division is not coincident and meet the artificial division basis of a standardized building.
In the prior art, most of methods for solving the maximum inscribed rectangle are as follows: and searching space contour points, arbitrarily selecting two contour points for pairing and traversing in sequence, and selecting the rectangle with the largest area from the traversed rectangle, namely the largest inscribed rectangle to be solved. The solving method is low in calculation speed, and is difficult to meet the requirement of space division according to texts in residential buildings.
Disclosure of Invention
The invention provides a building space segmentation method and system based on a maximum inscribed rectangle, which can be used for visualizing the abstract space division problem and solving the problems of segmenting building spaces under various conditions of identifying text points and conforming to building professional specifications.
In order to solve the technical problems, the invention provides a building space segmentation method based on a maximum inscribed rectangle, which comprises the following steps:
acquiring a building space image to be segmented, and reading the number of marked text points in the building space image to be segmented;
solving the maximum inscribed rectangle of the building space image to be segmented based on the marked text points to obtain the maximum inscribed rectangle of the marked text points;
and carrying out different processing on the maximum inscribed rectangles of the marked text points to obtain space segmentation results for the building space images to be segmented of different numbers of marked text points, and outputting the building space segmentation images.
The embodiment of the invention carries out multi-space division based on the maximum inscribed rectangle, and the abstract space division problem is embodied as an actual image processing problem. And reading the marked text points of the building space image, solving the maximum inscribed rectangle of the space where each text point is located based on the marked text points, and carrying out corresponding processing according to the conditions of different marked text points, thereby obtaining a space segmentation result and realizing accurate and standard-compliant division of the building space which only contains one marked text point and a plurality of marked text points.
Further, the acquiring the building space image to be segmented, and reading the number of the marked text points in the building space image to be segmented specifically includes:
building space mask images generated by converting building space images and marked text points input by a user through a program;
and taking the generated building space mask image as a building space image to be segmented, and taking the number of marked text points input by a user as the number of marked text points in the building space image to be segmented.
Further, solving the maximum inscription rectangle of the building space image to be segmented based on the marked text points to obtain the maximum inscription rectangle of the marked text points, wherein the method specifically comprises the following steps:
searching all grid points in the building space image to be segmented, taking a transverse coordinate as a transverse scale and a longitudinal coordinate as a longitudinal scale based on any grid point;
dividing the text into four text areas of upper left, upper right, lower left and lower right according to a transverse ruler and a longitudinal ruler based on marked text points;
performing de-duplication and background point removal processing on grid points of the upper left text region and the lower right text region to obtain a set LU formed by N processed upper left text region grid points and a set RD formed by M processed lower right text region grid points;
randomly selecting any grid point in the set LU and any grid point in the set RD to be combined pairwise to obtain a combined rectangle;
filtering the rectangle with background characteristics from the obtained combined rectangle to obtain a combined rectangle without background;
and selecting the background-free combined rectangle with the largest area as the largest inscribed rectangle of the marked text point.
The embodiment of the invention researches a maximum inscribed rectangle solving method based on marked text points, a grid area is divided by establishing a transverse ruler and a longitudinal ruler, grid points in the selected grid area are randomly combined in pairs to obtain combined rectangles, rectangles containing background features are filtered, and finally the combined rectangle with the largest area is the maximum inscribed rectangle. The method has high calculation speed and meets the requirement of solving the maximum inscribed rectangle of the marked text points in the building space.
Further, for the building space images to be segmented of different numbers of marked text points, different processing is performed on the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, and building space segmentation images are output, specifically:
for a building space image to be segmented which only contains a single marked text point, the building space segmentation result is the maximum inscribed rectangle of the marked text point, and a building space segmentation image is output;
and for the building space image to be segmented containing two or more marked text points, carrying out different processing on the maximum inscribed rectangle of each marked text point according to different superposition conditions of the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, and outputting a building space segmentation image.
Further, for the building space image to be segmented containing two or more marked text points, according to different superposition situations of the maximum inscribed rectangles of each marked text point, different processing is performed on the maximum inscribed rectangles of each marked text point to obtain a space segmentation result, specifically:
for the situation that the maximum inscribed rectangle of each marked text point does not contain a public area, the construction space segmentation result is the combination result of the maximum inscribed rectangle of each marked text point, and a construction space segmentation image is output;
for the situation that the maximum inscribed rectangle of each marked text point contains a public area but is not overlapped, selecting a next-level inscribed rectangle which corresponds to each marked text point and does not contain other text points, combining the next-level inscribed rectangles of each marked text point to obtain a building space segmentation result, and outputting a building space segmentation image;
and under the condition that the maximum inscription rectangles of all the marked text points completely coincide, acquiring a text center point through an OCR model, constructing a central line based on the text center point, dividing and updating the maximum inscription rectangles of all the marked text points according to the central line, combining the updated maximum inscription rectangles to obtain a building space segmentation result, and outputting a building space segmentation image.
The embodiment of the invention realizes the solving of the maximum inscribed rectangle of various marked text points, thereby obtaining the space segmentation results of different types of building images, having high calculation efficiency and high accuracy of the segmentation results and conforming to the building space specification.
Correspondingly, the embodiment of the invention provides a building space segmentation system based on a maximum inscribed rectangle, which comprises the following components: the system comprises a text point identification module, a maximum inscribed rectangle module and a space segmentation module;
the text point identification module is used for acquiring a building space image to be segmented and reading the number of marked text points in the building space image to be segmented;
the maximum inscription rectangle module is used for solving the maximum inscription rectangle of the building space image to be segmented based on the marked text points, and obtaining the maximum inscription rectangle of the marked text points;
the space segmentation module is used for carrying out different processing on the maximum inscribed rectangles of the marked text points to obtain space segmentation results for the building space images to be segmented of different numbers of marked text points, and outputting the building space segmentation images.
Further, the text point identification module includes: acquiring an image unit and a text point reading unit;
the image acquisition unit is used for converting a building space image input by a user and a marked text point into a building space mask image through a program;
the text point reading unit is used for taking the generated building space mask image as a building space image to be segmented, and taking the number of marked text points input by a user as the number of marked text points in the building space image to be segmented.
Further, the maximum inscribed rectangle module includes: a first unit, a second unit, a third unit, a fourth unit, a fifth unit, and a sixth unit;
the first unit is used for searching all grid points in the building space image to be segmented, and based on any grid point, the first unit takes transverse coordinates as a transverse scale and longitudinal coordinates as a longitudinal scale;
the second unit is used for dividing the text into four text areas of upper left, upper right, lower left and lower right according to the transverse ruler and the longitudinal ruler based on the marked text points;
the third unit performs duplicate removal and background point removal processing on grid points of the upper left text region and the lower right text region to obtain a set LU formed by N processed upper left text region grid points and a set RD formed by M processed lower right text region grid points;
the fourth unit is configured to randomly select any grid point in the set LU and any grid point in the set RD to perform pairwise combination, so as to obtain a combined rectangle;
the fifth unit is used for filtering the rectangle with the background characteristic from the obtained combined rectangle to obtain a combined rectangle without the background;
and the sixth unit is used for selecting the combined rectangle without the background with the largest area as the largest inscribed rectangle of the marked text point.
Further, the spatial division module includes: a single text point space division unit and a multi text point space division unit;
the single text point space segmentation unit is used for outputting a building space segmentation image for a building space image to be segmented, wherein the building space image only contains a single marked text point, and the building space segmentation result is the maximum inscribed rectangle of the marked text point;
the multi-text-point space segmentation unit is used for carrying out different processing on the maximum inscribed rectangle of each marked text point according to different superposition conditions of the maximum inscribed rectangle of each marked text point to obtain a space segmentation result and outputting a building space segmentation image for building space images to be segmented, wherein the building space images contain two or more marked text points.
Further, the multi-text-point space division unit includes: a first case subunit, a second case subunit, and a third case subunit;
the first situation subunit is configured to output a building space segmentation image when the maximum inscribed rectangle of each marked text point does not contain a public area, where the building space segmentation result is a combination result of the maximum inscribed rectangle of each marked text point;
the second condition subunit is configured to select a next-level inscribed rectangle which does not contain other text points and corresponds to each marked text point, and combine the next-level inscribed rectangles of each marked text point to obtain a building space segmentation result and output a building space segmentation image for the situation that the largest inscribed rectangle of each marked text point contains a public area but does not coincide;
the third condition subunit is configured to obtain a text center point through an OCR model for a situation that maximum inscribed rectangles of each marked text point completely coincide, construct a center line based on the text center point, divide and update the maximum inscribed rectangles of each marked text point according to the center line, combine the updated maximum inscribed rectangles to obtain a building space segmentation result, and output a building space segmentation image.
Drawings
Fig. 1: the invention provides a flow diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 2: the invention provides a result schematic diagram of an embodiment of text region division;
fig. 3: the result schematic diagram of one embodiment of the maximum inscribed rectangle solving method of the marked text points is provided by the invention;
fig. 4: the invention provides a result schematic diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 5: the invention provides a result schematic diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 6: the invention provides a result schematic diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 7: the invention provides a result schematic diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 8: the invention provides a result schematic diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 9: the invention provides a result schematic diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 10: the invention provides a result schematic diagram of one embodiment of a building space segmentation method based on a maximum inscribed rectangle;
fig. 11: the invention provides a construction schematic diagram of one embodiment of a building space segmentation system based on a maximum inscribed rectangle;
fig. 12: the invention provides a structural schematic diagram of one embodiment of a text point identification module;
fig. 13: the invention provides a structural schematic diagram of one embodiment of a maximum inscribed rectangle module;
fig. 14: the invention provides a structural schematic diagram of one embodiment of a space division module.
Detailed Description
The following description of the embodiments of the present invention will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that, for the azimuth terms such as terms "center", "lateral", "longitudinal", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc., the azimuth and positional relationships are based on the azimuth or positional relationships shown in the drawings, it is merely for convenience of describing the present invention and simplifying the description, and it is not necessary to indicate or imply that the method or system referred to must have a specific azimuth, be constructed and operated in a specific azimuth, but it should not be construed as limiting the specific protection scope of the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features. Thus, a definition of "a first", "a second" feature may explicitly or implicitly include one or more of such features.
Example 1
The segmentation of building space images with human marks is an important content in the field of image processing. The invention provides a building space segmentation method based on a maximum inscribed rectangle, which is used for realizing the accurate and building specification-compliant segmentation of building spaces under the condition of various marked text points by imaging abstract space division problems into actual image processing problems.
Based on the above requirements, as shown in fig. 1, embodiment 1 of the present invention provides a building space division method based on a maximum inscribed rectangle, which includes steps S1 to S3, and the steps are specifically as follows:
s1, acquiring a building space image to be segmented, and reading the number of marked text points in the building space image to be segmented. The method comprises the steps of S1.1 to S1.2, wherein the steps are as follows:
s1.1, converting a building space image input by a user and a marked text point through a program to generate a building space mask image.
In the embodiment of the invention, the building space image input by the user is the building space image such as living room, living room and the like, and the input building space image is converted into the building space mask image through the program, so that the follow-up identification of the manually marked text points is facilitated, and the accuracy of space segmentation is ensured.
S1.2, taking the generated building space mask image as a building space image to be segmented, and taking the number of marked text points input by a user as the number of marked text points in the building space image to be segmented.
And S2, solving the maximum inscription rectangle of the building space image to be segmented based on the marked text points, and obtaining the maximum inscription rectangle of the marked text points. The method comprises the steps of S2.1 to S2.6, wherein the steps are as follows:
s2.1, searching all grid points in the building space image to be segmented, and taking transverse coordinates as a transverse scale and longitudinal coordinates as a longitudinal scale based on any grid point.
S2.2, dividing the text into four text areas of upper left, upper right, lower left and lower right according to a transverse ruler and a longitudinal ruler based on marked text points.
And establishing text point coordinates by taking marked text points in the building space image as an origin, taking transverse coordinates as a transverse ruler and taking longitudinal coordinates as a longitudinal ruler. The image is divided into four text areas of upper left, upper right, lower left and lower right by taking the marked text point as the center and taking the horizontal and vertical scales as the limit. A text region division result of the embodiment of the present invention is shown in FIG. 2, where pt is a marked text point as an origin in FIG. 2.
S2.3, performing de-duplication and background point removal processing on grid points of the upper left text region and the lower right text region to obtain a set LU formed by N processed upper left text region grid points and a set RD formed by M processed lower right text region grid points.
And carrying out duplicate removal and background spot removal processing on grid points of the upper left text area and the lower right text area, thereby avoiding the influence of factors such as furniture, electric wires, clutter and the like in the building space image on solving the maximum inscribed rectangle. After the de-duplication and de-background processing are completed, the remaining N grid points in the upper left text area constitute an upper left text area grid point set LU, and the remaining M grid points in the lower right text area constitute a set RD.
S2.4, randomly selecting any grid point in the set LU and any grid point in the set RD to be combined pairwise, and obtaining a combined rectangle.
S2.5, filtering the rectangle with the background characteristic from the obtained combined rectangle to obtain a combined rectangle without the background.
S2.6, selecting the background-free combined rectangle with the largest area as the largest inscribed rectangle of the marked text point. The maximum inscribed rectangle of the finally obtained marked text point is shown in fig. 3, and pt is the marked text point in fig. 3.
In the prior art, the method solves the largest inscribed rectangle, specifically comprises the steps of searching contour points, selecting two points from the contour points, sequentially traversing the two points to form a plurality of rectangles, and selecting the rectangle with the largest area from the rectangles as the largest inscribed rectangle. The embodiment of the invention provides a method for solving the maximum inscribed rectangle based on the marked text points, which can meet the requirement of solving the maximum inscribed rectangle of the marked text points through the step S2, and has the advantages of small calculated amount and high calculation efficiency.
S3, carrying out different processing on the maximum inscribed rectangles of the marked text points to obtain space segmentation results for the building space images to be segmented of different numbers of marked text points, and outputting the building space segmentation images. The method comprises the steps of S3.1 to S32, wherein the steps are as follows:
s3.1, outputting a building space segmentation image for the building space image to be segmented, wherein the building space image only contains a single marked text point, and the building space segmentation result is the maximum inscribed rectangle of the marked text point.
For a spatial image of a building to be segmented that contains only a single marked text point, the single marked text point means that the spatial region in which it is located contains only one functional room region. Therefore, the maximum inscribed rectangle of the marked text point obtained by step S2 is taken as the division result of the building space image to be divided to be processed, and the building space division image is output to the user.
S3.2, for the building space image to be segmented containing two or more marked text points, carrying out different processing on the maximum inscribed rectangle of each marked text point according to different superposition conditions of the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, and outputting a building space segmentation image. The method comprises the steps S3.2.1 to S3.2.3, and the steps are as follows:
s3.2.1, when the maximum inscribed rectangle of each marked text point does not include a common region, the construction space division result is a combination result of the maximum inscribed rectangles of each marked text point, and the construction space division image is output.
For the case where the largest inscribed rectangle of each marked text point does not contain a common region, as in the two non-adjacent bedroom spaces in the embodiment of the present invention, referring to fig. 4, there are two marked text points pt1 and pt2 and the largest inscribed rectangle of the marked text points pt1 and pt2 does not contain a common region. The construction space division result in this case is a combined result of the maximum inscribed rectangles of the marker text points pt1 and pt2, and the construction space division image is output to the user.
S3.2.2 for the situation that the maximum inscription rectangle of each marked text point contains a public area but is not overlapped, selecting the next inscription rectangle which corresponds to each marked text point and does not contain other text points, combining the next inscription rectangles of each marked text point to obtain a building space segmentation result, and outputting a building space segmentation image.
For the case that the maximum inscribed rectangle of each marked text point contains a common area but does not coincide, the next-level inscribed rectangle of each marked text point needs to be solved and discussed in a classified way. The embodiment of the invention provides a plurality of specific examples, as shown in fig. 5, 6, 7, 8 and 9, two marked text points pt1 and pt2 exist, and the maximum inscribed rectangles of the marked text points pt1 and pt2 contain common areas but do not overlap. At this time, the next-level inscription rectangle of pt1 needs to be solved until pt is not included in the obtained next-level inscription rectangle, and the obtained next-level inscription rectangle is used as the latest maximum inscription rectangle of the marked text point pt 1. After the latest maximum inscribed rectangle of pt1 is removed from the building space image to be segmented, the latest maximum inscribed rectangle of pt2 is solved in the remaining area.
In the embodiment of the invention, in order to ensure the accuracy of space segmentation, the secondary solution of the secondary inscribed rectangle of each marked text point is also needed according to the steps. In the secondary solving process, the next-level inscribed rectangle of the pt2 is solved first to obtain the latest maximum inscribed rectangle of the marked text point pt2, and then the latest maximum inscribed rectangle of the pt1 is solved.
And (3) combining the two solving results, taking the latest maximum inscribed rectangle of the marked text points pt1 and pt2 as a final segmentation result, and outputting a building space segmentation image to a user.
S3.2.3, for the situation that the maximum inscribed rectangles of all the marked text points completely coincide, acquiring a text center point through an OCR model, constructing a central line based on the text center point, dividing and updating the maximum inscribed rectangles of all the marked text points according to the central line, combining the updated maximum inscribed rectangles to obtain a building space segmentation result, and outputting a building space segmentation image.
For the case where the maximum inscribed rectangles of the respective mark text points completely coincide, as in the case where a space is shared by living room, restaurant, etc., as shown in fig. 10, there are two mark text points pt1 and pt2 and the maximum inscribed rectangles of the mark text points pt1 and pt2 completely coincide. All marked text points in the image are first identified by an OCR (text recognition) model and a text center point is obtained. And constructing a text center line based on the obtained text center point, positioning the marked text points in the image into a vertical or horizontal position relation according to specific conditions, carrying out vertical or horizontal average division on the maximum inscribed rectangle of the marked text points according to the text center line, and updating the maximum inscribed rectangle of each marked text point by using the divided rectangles. And combining the updated maximum inscribed rectangles to obtain a building space segmentation result, and outputting a building space segmentation image to a user, as shown in fig. 6.
Through the steps, the space division problem of a plurality of marked text points is discussed in a classified manner, a corresponding division method is provided, accurate division of the artificially marked building space image is realized, and the division result accords with building specifications.
Based on the construction space segmentation result obtained in the step, a 2D image of the construction space can be restored. Further, the user can restore the 3D model of the building space according to the width and the height of the wall body of the actual building space. In addition, the user can also review whether to pass through specifications of living rooms, living rooms and the like in combination with building related aesthetic drawing specifications so as to verify the practicability and the robustness of the building space method provided by the invention.
The embodiment of the invention has the following beneficial effects:
compared with the prior art, the building space segmentation method based on the maximum inscribed rectangle provided by the invention has the advantages that the abstract space segmentation problem is embodied into the actual image processing problem, and the building space under the condition of various marked text points is accurately and accord with the building specification by combining the marked text points.
Example 2
Based on the foregoing content of embodiment 1, an embodiment of the present invention provides a building space segmentation system based on a maximum inscribed rectangle, the system structure is shown in fig. 11, and the system includes a text point identification module 101, a maximum inscribed rectangle module 102, and a space segmentation module 103.
The text point identification module 101 is configured to obtain a building space image to be segmented, and read the number of marked text points in the building space image to be segmented.
The maximum inscription rectangle module 102 is configured to solve the maximum inscription rectangle of the building space image to be segmented based on the marked text point, and obtain the maximum inscription rectangle of the marked text point.
The space segmentation module 103 is configured to perform different processing on the maximum inscribed rectangles of the marked text points to obtain space segmentation results for the to-be-segmented building space images of different numbers of marked text points, and output the building space segmentation images.
In one possible implementation manner, the text point identification module 101, as shown in fig. 12, includes: an image unit 201 is acquired and a text dot reading unit 202 is read.
The image obtaining unit 201 is configured to convert a building space image and a marked text point input by a user into a building space mask image.
The text point reading unit 202 is configured to take the generated building space mask image as a building space image to be segmented, and take the number of marked text points input by the user as the number of marked text points in the building space image to be segmented.
In one possible implementation, the maximum inscribed rectangle module 102, as shown in fig. 13, includes: a first unit 301, a second unit 302, a third unit 303, a fourth unit 304, a fifth unit 305, and a sixth unit 306.
The first unit 301 is configured to find all grid points in the building space image to be segmented, and based on any grid point, take the transverse coordinates as a transverse scale and take the longitudinal coordinates as a longitudinal scale.
The second unit 302 is configured to divide the text into four text areas of upper left, upper right, lower left and lower right according to a horizontal ruler and a vertical ruler based on marking text points.
The third unit 303 performs de-duplication and de-background processing on the grid points of the upper left text region and the lower right text region, to obtain a set LU formed by N processed upper left text region grid points and a set RD formed by M processed lower right text region grid points.
The fourth unit 304 is configured to randomly select any grid point in the set LU and any grid point in the set RD to perform pairwise combination, so as to obtain a combined rectangle.
The fifth unit 305 is configured to filter the rectangle with the background feature from the obtained combined rectangle, to obtain a combined rectangle without background.
The sixth unit 306 is configured to select the combined rectangle without background with the largest area as the largest inscribed rectangle of the marked text point.
In one possible implementation, the spatial segmentation module 103, as shown in fig. 14, includes: a single text point space division unit 401 and a multiple text point space division unit 402.
The single text point space segmentation unit 401 is configured to output a building space segmentation image for a building space image to be segmented, which contains only a single labeled text point, where the building space segmentation result is the maximum inscribed rectangle of the labeled text point.
The multi-text-point space segmentation unit 402 is configured to, for a building space image to be segmented that contains two or more marked text points, perform different processing on the maximum inscribed rectangle of each marked text point according to different overlapping situations of the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, and output a building space segmentation image.
Further, the multi-text-point spatial segmentation unit 402 includes: a first case subunit 501, a second case subunit 502, and a third case subunit 503.
The first case subunit 501 is configured to output a building space division image when the maximum inscribed rectangle of each marked text point does not contain a common area, where the building space division result is a combination result of the maximum inscribed rectangles of each marked text point.
The second case subunit 502 is configured to select, for a case where the largest inscribed rectangle of each marked text point includes a common area but does not overlap, a next-level inscribed rectangle corresponding to each marked text point and including no other text points, combine the next-level inscribed rectangles of each marked text point to obtain a building space segmentation result, and output a building space segmentation image.
The third situation subunit 503 is configured to obtain a text center point through an OCR model for a situation that maximum inscribed rectangles of each marked text point completely overlap, construct a center line based on the text center point, divide and update the maximum inscribed rectangles of each marked text point according to the center line, combine the updated maximum inscribed rectangles to obtain a building space segmentation result, and output a building space segmentation image.
The embodiment of the invention has the following beneficial effects:
the invention provides a building space segmentation system based on maximum inscribed rectangles, which is used for segmenting building spaces by reading the number of marked text points and solving the maximum inscribed rectangles of the marked text points, so that the building spaces under various marked text points are accurately partitioned and accord with building specifications.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.

Claims (10)

1. The building space segmentation method based on the maximum inscribed rectangle is characterized by comprising the following steps of:
acquiring a building space image to be segmented, and reading the number of marked text points in the building space image to be segmented;
solving the maximum inscribed rectangle of the building space image to be segmented based on the marked text points to obtain the maximum inscribed rectangle of the marked text points;
and carrying out different processing on the maximum inscribed rectangles of the marked text points to obtain space segmentation results for the building space images to be segmented of different numbers of marked text points, and outputting the building space segmentation images.
2. The building space segmentation method based on the largest inscribed rectangle according to claim 1, wherein the steps of obtaining the building space image to be segmented, and reading the number of the marked text points in the building space image to be segmented are as follows:
building space mask images generated by converting building space images and marked text points input by a user through a program;
and taking the generated building space mask image as a building space image to be segmented, and taking the number of marked text points input by a user as the number of marked text points in the building space image to be segmented.
3. The building space segmentation method based on the maximum inscribed rectangle according to claim 1, wherein the method is characterized in that the maximum inscribed rectangle of the building space image to be segmented is solved based on the marked text points, and the maximum inscribed rectangle of the marked text points is obtained specifically by:
searching all grid points in the building space image to be segmented, taking a transverse coordinate as a transverse scale and a longitudinal coordinate as a longitudinal scale based on any grid point;
dividing the text into four text areas of upper left, upper right, lower left and lower right according to a transverse ruler and a longitudinal ruler based on marked text points;
performing de-duplication and background point removal processing on grid points of the upper left text region and the lower right text region to obtain a set LU formed by N processed upper left text region grid points and a set RD formed by M processed lower right text region grid points;
randomly selecting any grid point in the set LU and any grid point in the set RD to be combined pairwise to obtain a combined rectangle;
filtering the rectangle with background characteristics from the obtained combined rectangle to obtain a combined rectangle without background;
and selecting the background-free combined rectangle with the largest area as the largest inscribed rectangle of the marked text point.
4. The building space segmentation method based on the maximum inscribed rectangle according to claim 1, wherein for the building space images to be segmented of different numbers of marked text points, different processing is performed on the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, and a building space segmentation image is output, specifically:
for a building space image to be segmented which only contains a single marked text point, the building space segmentation result is the maximum inscribed rectangle of the marked text point, and a building space segmentation image is output;
and for the building space image to be segmented containing two or more marked text points, carrying out different processing on the maximum inscribed rectangle of each marked text point according to different superposition conditions of the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, and outputting a building space segmentation image.
5. The building space segmentation method based on the maximum inscribed rectangle according to claim 4, wherein for the building space image to be segmented containing two or more marked text points, different processing is performed on the maximum inscribed rectangle of each marked text point according to different superposition conditions of the maximum inscribed rectangle of each marked text point to obtain a space segmentation result, specifically:
for the situation that the maximum inscribed rectangle of each marked text point does not contain a public area, the construction space segmentation result is the combination result of the maximum inscribed rectangle of each marked text point, and a construction space segmentation image is output;
for the situation that the maximum inscribed rectangle of each marked text point contains a public area but is not overlapped, selecting a next-level inscribed rectangle which corresponds to each marked text point and does not contain other text points, combining the next-level inscribed rectangles of each marked text point to obtain a building space segmentation result, and outputting a building space segmentation image;
and under the condition that the maximum inscription rectangles of all the marked text points completely coincide, acquiring a text center point through an OCR model, constructing a central line based on the text center point, dividing and updating the maximum inscription rectangles of all the marked text points according to the central line, combining the updated maximum inscription rectangles to obtain a building space segmentation result, and outputting a building space segmentation image.
6. A building space segmentation system based on a maximum inscribed rectangle, comprising: the system comprises a text point identification module, a maximum inscribed rectangle module and a space segmentation module;
the text point identification module is used for acquiring a building space image to be segmented and reading the number of marked text points in the building space image to be segmented;
the maximum inscription rectangle module is used for solving the maximum inscription rectangle of the building space image to be segmented based on the marked text points, and obtaining the maximum inscription rectangle of the marked text points;
the space segmentation module is used for carrying out different processing on the maximum inscribed rectangles of the marked text points to obtain space segmentation results for the building space images to be segmented of different numbers of marked text points, and outputting the building space segmentation images.
7. The largest inscribed rectangle-based building space segmentation system of claim 6, wherein the text point identification module comprises: acquiring an image unit and a text point reading unit;
the image acquisition unit is used for converting a building space image input by a user and a marked text point into a building space mask image through a program;
the text point reading unit is used for taking the generated building space mask image as a building space image to be segmented, and taking the number of marked text points input by a user as the number of marked text points in the building space image to be segmented.
8. A largest inscribed rectangle-based building space segmentation system of claim 6, wherein the largest inscribed rectangle module comprises: a first unit, a second unit, a third unit, a fourth unit, a fifth unit, and a sixth unit;
the first unit is used for searching all grid points in the building space image to be segmented, and based on any grid point, the first unit takes transverse coordinates as a transverse scale and longitudinal coordinates as a longitudinal scale;
the second unit is used for dividing the text into four text areas of upper left, upper right, lower left and lower right according to the transverse ruler and the longitudinal ruler based on the marked text points;
the third unit performs duplicate removal and background point removal processing on grid points of the upper left text region and the lower right text region to obtain a set LU formed by N processed upper left text region grid points and a set RD formed by M processed lower right text region grid points;
the fourth unit is configured to randomly select any grid point in the set LU and any grid point in the set RD to perform pairwise combination, so as to obtain a combined rectangle;
the fifth unit is used for filtering the rectangle with the background characteristic from the obtained combined rectangle to obtain a combined rectangle without the background;
and the sixth unit is used for selecting the combined rectangle without the background with the largest area as the largest inscribed rectangle of the marked text point.
9. A largest inscribed rectangle-based building space division system of claim 6, wherein the space division module comprises: a single text point space division unit and a multi text point space division unit;
the single text point space segmentation unit is used for outputting a building space segmentation image for a building space image to be segmented, wherein the building space image only contains a single marked text point, and the building space segmentation result is the maximum inscribed rectangle of the marked text point;
the multi-text-point space segmentation unit is used for carrying out different processing on the maximum inscribed rectangle of each marked text point according to different superposition conditions of the maximum inscribed rectangle of each marked text point to obtain a space segmentation result and outputting a building space segmentation image for building space images to be segmented, wherein the building space images contain two or more marked text points.
10. The largest inscribed rectangle-based building space segmentation system of claim 9, wherein the multiple text point spatial segmentation unit comprises: a first case subunit, a second case subunit, and a third case subunit;
the first situation subunit is configured to output a building space segmentation image when the maximum inscribed rectangle of each marked text point does not contain a public area, where the building space segmentation result is a combination result of the maximum inscribed rectangle of each marked text point;
the second condition subunit is configured to select a next-level inscribed rectangle which does not contain other text points and corresponds to each marked text point, and combine the next-level inscribed rectangles of each marked text point to obtain a building space segmentation result and output a building space segmentation image for the situation that the largest inscribed rectangle of each marked text point contains a public area but does not coincide;
the third condition subunit is configured to obtain a text center point through an OCR model for a situation that maximum inscribed rectangles of each marked text point completely coincide, construct a center line based on the text center point, divide and update the maximum inscribed rectangles of each marked text point according to the center line, combine the updated maximum inscribed rectangles to obtain a building space segmentation result, and output a building space segmentation image.
CN202311232617.1A 2023-09-22 2023-09-22 Building space segmentation method and system based on maximum inscribed rectangle Pending CN117291931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311232617.1A CN117291931A (en) 2023-09-22 2023-09-22 Building space segmentation method and system based on maximum inscribed rectangle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311232617.1A CN117291931A (en) 2023-09-22 2023-09-22 Building space segmentation method and system based on maximum inscribed rectangle

Publications (1)

Publication Number Publication Date
CN117291931A true CN117291931A (en) 2023-12-26

Family

ID=89243813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311232617.1A Pending CN117291931A (en) 2023-09-22 2023-09-22 Building space segmentation method and system based on maximum inscribed rectangle

Country Status (1)

Country Link
CN (1) CN117291931A (en)

Similar Documents

Publication Publication Date Title
CN110568451B (en) Method and device for generating road traffic marking in high-precision map
KR100915600B1 (en) Method for measuring 3-dimensinal coordinates of images using a target for ground control point
CN108228798A (en) The method and apparatus for determining the matching relationship between point cloud data
CN111310278B (en) Ship automatic modeling method based on simulation
CN111291438B (en) File processing method and device, electronic equipment and storage medium
CN111854758A (en) Indoor navigation map conversion method and system based on building CAD (computer-aided design) drawing
CN110704559B (en) Multi-scale vector surface data matching method
CN114399677A (en) Pointer instrument identification method based on text region reading
CN109885608A (en) A kind of canal business system of artificial intelligence big data
CN108596115A (en) A kind of vehicle checking method, apparatus and system based on convolutional neural networks
CN111159451A (en) Power line point cloud dynamic monomer method based on spatial database
US5038285A (en) Method for computer-generating a two-dimensional map of a three-dimensional surface
CN117291931A (en) Building space segmentation method and system based on maximum inscribed rectangle
CN112991490A (en) Informatization chart production method and system
CN116775790A (en) Self-adaptive coordinate conversion algorithm based on accurate point positioning of model
CN107330975A (en) A kind of three-dimensional military marker mapping system
CN116311299A (en) Method, device and system for identifying structured data of table
CN108960226A (en) A kind of pointer instrument class expression value number reading method and device
CN115468568A (en) Indoor navigation method, device and system, server equipment and storage medium
JPWO2010092680A1 (en) Map information processing apparatus, map information processing method, map information processing program, and recording medium
CN104933705B (en) A kind of space-time loop data structure carries out the method and device of slot detection
CN114742868A (en) Point cloud registration method and device and electronic equipment
KR20100117986A (en) Method for measuring the location similarity of spatial object on digital maps and map matching using the same
CN112487124A (en) Method for converting dot-shaped elements in CorelDraw map into SuperMap by using VBA
JP3488041B2 (en) Deformation map data compression method, deformation map data compression device, and recording medium storing deformation map data compression program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination