CN111985291A - Method and device for identifying door in house type graph and electronic equipment - Google Patents

Method and device for identifying door in house type graph and electronic equipment Download PDF

Info

Publication number
CN111985291A
CN111985291A CN202010101792.7A CN202010101792A CN111985291A CN 111985291 A CN111985291 A CN 111985291A CN 202010101792 A CN202010101792 A CN 202010101792A CN 111985291 A CN111985291 A CN 111985291A
Authority
CN
China
Prior art keywords
house type
position information
type image
door
information
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
CN202010101792.7A
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.)
Guangdong 3vjia Information Technology Co Ltd
Original Assignee
Guangdong 3vjia 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 Guangdong 3vjia Information Technology Co Ltd filed Critical Guangdong 3vjia Information Technology Co Ltd
Priority to CN202010101792.7A priority Critical patent/CN111985291A/en
Publication of CN111985291A publication Critical patent/CN111985291A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method, a device and electronic equipment for identifying doors in a house type image, which relate to the technical field of data processing and comprise the steps of obtaining a house type image to be processed; processing the house type image by utilizing a preset detection model to obtain the structure information of the house type image, wherein the structure information comprises: the method comprises the following steps that position information of central lines of all walls, position information of all rectangular frames and position information of all vertical hinged doors are obtained, and the rectangular frames are used for representing windows or sliding doors in house type images; determining the position information of all sliding doors in the house type image based on the position information of all wall central lines and the position information of all rectangular frames; and determining door information in the house type image based on the position information of all the vertical hinged doors and the position information of all the sliding doors. According to the method, the geometric characteristics of each door and the position characteristics of the door are utilized when the door information is identified, so that the effect of accurate identification can be achieved, and the technical problem of low accuracy in the door identification method in the house type graph in the prior art is effectively solved.

Description

Method and device for identifying door in house type graph and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for identifying a door in a house type graph, and an electronic device.
Background
At present, in the field of home design, designers can perform auxiliary modeling through a house type diagram identification function of indoor design software to acquire house type information and improve the design efficiency of home decoration, wherein the identification of door types and door positions in a house type diagram is taken as an important step of house type diagram identification, and the rationality problem of automatic modeling is concerned. Although most of indoor design software on the current market provides the house type figure door type and position identification functions, the identification effect is poor, the problem of house type door missing identification or type error identification exists, professional technicians are required to manually correct the house type figure door type and position identification functions, and the working efficiency is low.
In summary, the method for identifying the doors in the house type graph in the prior art has the technical problem of low accuracy.
Disclosure of Invention
The invention aims to provide a method and a device for identifying a door in a house type graph and electronic equipment, so as to solve the technical problem of low accuracy rate of the method for identifying the door in the house type graph in the prior art.
In a first aspect, an embodiment provides a method for identifying a door in a house type graph, including: acquiring a house type image to be processed; processing the house type image by using a preset detection model to obtain the structure information of the house type image, wherein the structure information comprises: the method comprises the following steps that position information of central lines of all walls, position information of all rectangular frames and position information of all vertical hinged doors are obtained, and the rectangular frames are used for representing windows or sliding doors in the house type image; determining the position information of all sliding doors in the house type image based on the position information of all wall central lines and the position information of all rectangular frames; determining door information in the house type image based on the position information of all the vertical hinged doors and the position information of all the sliding doors, wherein the door information comprises: door type information and door position information.
In an alternative embodiment, the preset detection model includes at least one of: the method comprises the steps of presetting a wall detection model, presetting a rectangular frame detection model and presetting a door detection model.
In an optional embodiment, processing the house type image by using a preset detection model to obtain structure information of the house type image includes: processing the house type image by using a preset wall detection model to obtain the position information of all wall central lines in the house type image; processing the house type image by using a preset rectangular frame detection model to obtain the position information of all rectangular frames in the house type image; and processing the house type image by using a preset door detection model to obtain the position information of all vertical hinged doors in the house type image.
In an alternative embodiment, the determining the position information of all sliding doors in the house type image based on the position information of all wall central lines and the position information of all rectangular frames includes: determining the outer contour of the house type image according to the position information of the central lines of all the walls; judging the position of each rectangular frame based on the outer contour; if the target rectangular frame is completely positioned in the outer contour, the target rectangular frame represents a sliding door in the house type image, wherein the target rectangular frame is any one of all the rectangular frames; and determining the position information of all sliding doors in the house type image based on the position information of the target rectangular frame.
In an optional embodiment, determining the outer contour of the house type image according to the position information of the central lines in all the walls includes: randomly selecting any end point of a wall central line as a starting point, and performing bidirectional traversal on the wall central line in the house type image based on the position information of all the wall central lines to obtain at least one closed space; and taking the closed space with the largest area in the at least one closed space as the outer contour of the house type image.
In an optional embodiment, determining the outer contour of the house type image according to the position information of the central lines in all the walls includes: establishing a corresponding relation between an end point of each wall center line and a wall center line connected with each end point based on the position information of all the wall center lines to obtain a plurality of corresponding relations; sequencing the wall center lines in each corresponding relation according to a preset sequence to obtain a plurality of target corresponding relations; randomly selecting an end point as a starting point, and performing bidirectional traversal on a wall center line in the house type image based on the plurality of target corresponding relations to obtain at least one closed space; and taking the closed space with the largest area in the at least one closed space as the outer contour of the house type image.
In a second aspect, an embodiment provides an apparatus for identifying a door in a house type graph, including: the acquisition module is used for acquiring a house type image to be processed; a processing module, configured to process the house type image by using a preset detection model to obtain structure information of the house type image, where the structure information includes: the method comprises the following steps that position information of central lines of all walls, position information of all rectangular frames and position information of all vertical hinged doors are obtained, and the rectangular frames are used for representing windows or sliding doors in the house type image; the first determining module is used for determining the position information of all sliding doors in the house type image based on the position information of all the wall central lines and the position information of all the rectangular frames; a second determining module, configured to determine door information in the house type image based on the position information of all the vertical hinged doors and the position information of all the sliding doors, where the door information includes: door type information and door position information.
In an alternative embodiment, the preset detection model includes at least one of: the method comprises the steps of presetting a wall detection model, presetting a rectangular frame detection model and presetting a door detection model.
In a third aspect, an embodiment provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the steps of the method described in any one of the foregoing embodiments when executing the computer program.
In a fourth aspect, embodiments provide a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of the preceding embodiments.
The door identification method in the house type graph in the prior art has the problems of missing identification of the house type door or wrong identification of the type, and needs a professional to manually correct the identification result, so that the working efficiency is low. Compared with the prior art, the invention provides a method for identifying doors in a house type image, which comprises the steps of firstly obtaining a house type image to be processed, then processing the house type image by using a preset detection model to obtain the structure information of the house type image, wherein the structure information comprises the following steps: the method comprises the following steps of obtaining position information of all wall center lines, position information of all rectangular frames and position information of all vertical hinged doors, wherein the rectangular frames are used for representing windows or sliding doors in a house type image, determining the position information of all sliding doors in the house type image based on the position information of all wall center lines and the position information of all rectangular frames, and finally determining the door information in the house type image based on the position information of all vertical hinged doors and the position information of all sliding doors, wherein the door information comprises the following steps: door type information and door position information. According to the method, the geometric characteristics of each door and the position characteristics of the door are utilized when the door information is identified, so that the effect of accurate identification can be achieved, and the technical problem of low accuracy in the door identification method in the house type graph in the prior art is effectively solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for door identification in a house layout according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a two-dimensional floor plan;
fig. 3 is a flowchart illustrating a process of determining position information of all sliding doors in a house type image based on position information of all wall central lines and position information of all rectangular frames according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of a door identification apparatus in a house layout according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
In the prior art, a house type graph door is generally divided into a sliding door and a flat-open door, a side-hung door can also be specifically divided into a single-open door or a double-open door, in terms of specific representation forms on the house type graph, the single-open door is a combination of a quarter circular arc and a rectangular frame, the double-open door is a combination of two quarter circular arcs and a rectangular frame, and the sliding door is a combination of a rectangular frame, although a method for identifying the type and the position of a door in the house type graph exists in the prior art, the problem of missing identification or type error identification exists, particularly the error identification of the sliding door, because the sliding door and a common window are both combinations of rectangular frames seen in the representation forms of the house type graph, but the rectangular frame of the sliding door is internally provided with staggered small rectangular strips, but the common window is not internally provided with staggered small rectangular frames, and because the sliding door and the common window only occupy a few pixels on the house type graph, the sliding door is easily mistakenly identified as, and then need professional technical personnel to carry out manual correction to the result of door discernment, serious influence designer's work efficiency. Embodiments of the present invention provide a method for identifying a door in a house type graph, so as to alleviate the above-mentioned problems.
Example one
The embodiment of the invention provides a method for identifying doors in a house type graph, which comprises the following steps as shown in figure 1:
step S12, a house type image to be processed is acquired.
Specifically, the method includes the steps of firstly obtaining a to-be-processed house type image, namely a two-dimensional plane house type image, as shown in fig. 2, wherein the house type image is used for displaying pixel information of the whole house type and does not have accurate point-line position information of a door, a window and a wall body.
And step S14, processing the house type image by using a preset detection model to obtain the structure information of the house type image.
After the house type image to be processed is obtained, firstly, extracting the structure information of the house type image by using a preset detection model, wherein the structure information comprises: the method comprises the steps of obtaining position information of lines in all walls, position information of all rectangular frames and position information of all vertical hinged doors, wherein the rectangular frames are used for representing windows or sliding doors in house type images.
The method comprises the following steps that position information of a wall center line, specifically position information of two end points of the wall center line is determined, and the position information of the two end points is determined, namely the position information of the wall center line is determined; the position information of the rectangular frame is specifically the position information of two vertexes on a diagonal line of the rectangular frame, and the position information of the two vertexes on the diagonal line is determined according to the characteristics of the rectangle, so that the position information of the rectangular frame can be determined; the vertical hinged door specifically comprises a single-door and a double-door, when a detection model is preset to perform feature extraction on a house type image, in view of the significant features of the single-door and the double-door on the house type image, the vertical hinged door (the single-door and the double-door) can be accurately identified, the vertical hinged door is optional, the identified vertical hinged door is marked by adopting a rectangular frame, and the position information of the vertical hinged door is specifically the position information of two vertexes on the diagonal line of the rectangular frame.
Step S16, determining the position information of all sliding doors in the house type image based on the position information of all wall center lines and the position information of all rectangular frames.
The structural information of the house type image to be processed already contains the position information of the vertical hinged door, so the position information of the sliding door in the house type image needs to be further identified, because the position information of the window and the sliding door is not distinguished and processed when the structural information is extracted in step S14, the position information of all the sliding doors in the house type image needs to be determined according to the position information of all the wall center lines and the position information of all the rectangular frames, the position information of all the wall center lines can determine the outline information of the house type image to be processed, and the position information of each rectangular frame is determined by combining the position characteristics of the sliding door and the window, so that which representative windows and which representative sliding doors in the rectangular frames can be determined.
Step S18, determining door information in the house type image based on the position information of all the side hung doors and the position information of all the sliding doors.
The position information of all the vertical hinged doors and sliding doors in the house type image is already identified, and the output result, that is, all the door information in the house type image, can be obtained by sorting the above information, where the door information includes: door type information (single door, double door, sliding door) and door position information.
The door identification method in the house type graph in the prior art has the problems of missing identification of the house type door or wrong identification of the type, and needs a professional to manually correct the identification result, so that the working efficiency is low. Compared with the prior art, the invention provides a method for identifying doors in a house type image, which comprises the steps of firstly obtaining a house type image to be processed, then processing the house type image by using a preset detection model to obtain the structure information of the house type image, wherein the structure information comprises the following steps: the method comprises the following steps of obtaining position information of all wall center lines, position information of all rectangular frames and position information of all vertical hinged doors, wherein the rectangular frames are used for representing windows or sliding doors in a house type image, determining the position information of all sliding doors in the house type image based on the position information of all wall center lines and the position information of all rectangular frames, and finally determining the door information in the house type image based on the position information of all vertical hinged doors and the position information of all sliding doors, wherein the door information comprises the following steps: door type information and door position information. According to the method, the geometric characteristics of each door and the position characteristics of the door are utilized when the door information is identified, so that the effect of accurate identification can be achieved, and the technical problem of low accuracy in the door identification method in the house type graph in the prior art is effectively solved.
The method for identifying doors in a house type graph provided by the embodiment of the invention is briefly described above, and the specific contents related thereto are described in detail below.
In an alternative embodiment, the predetermined detection model comprises at least one of: the method comprises the steps of presetting a wall detection model, presetting a rectangular frame detection model and presetting a door detection model.
As already indicated above, the preset detection model may adopt a neural network model based on a target detection network yolo series or an rcnn series, and may be selected according to actual requirements when extracting the structural information of the house type image, and the embodiment of the present invention is not particularly limited thereto.
Optionally, the preset detection model is a preset wall detection model, a model combining a preset rectangular frame detection model and a preset door detection model, the preset wall detection model adopts a neural network model based on an image instance segmentation network mask-rcnn, the model outputs discrete walls, and after each wall is processed, only the position information of two end points of a wall central line is kept; the preset rectangular frame detection model adopts a neural network model based on an image instance segmentation network mask-rcnn, and because the representation forms of the sliding door and the common window on the house type graph are relatively consistent, the sliding door and the common window are used as the same type of image labels for labeling when the model is output; the preset door detection model adopts a neural network model based on a target detection network yolov3, and in view of the obvious expression form (combination of circular arc and rectangular frame) of the side hung door, a single door and a double door can be marked as two types of image labels.
If the preset detection model is a preset wall detection model, a model combining a preset rectangular frame detection model and a preset door detection model, step S14, processing the house type image by using the preset detection model to obtain the structure information of the house type image, specifically comprising the following steps:
and step S141, processing the house type image by using a preset wall detection model to obtain the position information of all wall central lines in the house type image.
And S142, processing the house type image by using a preset rectangular frame detection model to obtain the position information of all rectangular frames in the house type image.
And S143, processing the house type image by using a preset door detection model to obtain the position information of all vertical hinged doors in the house type image.
It should be noted that, the steps S141 to S143 are exemplary processing flows, and do not represent that the processing needs to be performed according to the above sequence, and a user may select parallel processing or serial processing, and the sequence of the serial processing may also be customized according to needs, and the embodiment of the present invention does not specifically limit the processing.
The process of how to extract the structural information of the house type image is described in detail above, and the process of how to determine the position information of the sliding door is described in detail below.
In an alternative embodiment, as shown in fig. 3, the step S16, determining the position information of all sliding doors in the house type image based on the position information of all wall central lines and the position information of all rectangular frames, specifically includes the following processing steps:
step S161, determining the outline of the house type image according to the position information of the central lines in all the walls.
Step S162, the position of each rectangular frame is determined based on the outer contour.
And step S163, if the target rectangular frame is completely located in the outer contour, the target rectangular frame represents a sliding door in the house type image.
In step S164, if the target rectangular frame is not completely located within the outer contour, the target rectangular frame represents a window in the house type image.
Specifically, after position information of all wall center lines in the house type image is acquired, information of an outer contour of the house type image can be determined according to the position information, in the existing house type image, windows are all arranged on an outer wall of a building, and a sliding door is arranged inside a house type, so that the windows and the sliding door can be accurately identified according to the distinguishing characteristics, the position of each rectangular frame determined in the step S14 is judged by using the information of the outer contour, and if a target rectangular frame is completely located in the outer contour, the target rectangular frame represents the sliding door in the house type image, wherein the target rectangular frame is any one of all rectangular frames; if the target rectangular frame is not completely located within the outer contour, that is, at least one vertex of the rectangular frame is located outside the outer contour, the target rectangular frame represents a window in the house type image.
And S165, determining the position information of all sliding doors in the house type image based on the position information of the target rectangular frame.
After the label types (windows and sliding doors) of all the rectangular frames are distinguished, the position information of all the sliding doors in the house type image to be processed can be determined according to the position information of the target rectangular frame.
The process of determining the position information of the sliding door has been described above, and the step of determining the outer contour of the house type image according to the position information of the center lines of all the walls will be described in detail below.
The embodiment of the invention provides two modes for determining the outline of a house type image, wherein the first mode specifically comprises the following contents:
firstly, randomly selecting any end point of a wall central line as a starting point, performing bidirectional traversal on the wall central line in the house type image based on the position information of all the wall central lines to obtain at least one closed space, and then taking the closed space with the largest area in the at least one closed space as the outer contour of the house type image.
Specifically, each wall centerline includes two end points, one end point of one wall centerline in the house type image is arbitrarily selected as a starting point, the connection relation between the wall central lines can be determined according to the position information of the wall central lines, all the wall central lines can be traversed based on the connection relation, in order to ensure that all polygons in the house type image are obtained, the embodiment of the invention adopts a two-way traversal strategy, for ease of understanding, as illustrated below, if the two ends of the centerline of the wall numbered 1 are a and B, and assuming that the traversal from endpoint a to endpoint B is a forward traversal, the traversal from endpoint B to endpoint a is a reverse traversal, during the bidirectional traversal of the wall center lines in the house-type image, it is required to ensure that each wall center line is traversed in the forward direction and in the reverse direction, and after the bidirectional traversal is finished, at least one closed space can be obtained, and the closed space with the largest area is used as the outer contour of the house-type image.
The second way of determining the outer contour of the house type image specifically comprises the following steps:
step 1, establishing a corresponding relation between an end point of each wall center line and a wall center line connected with each end point based on the position information of all the wall center lines to obtain a plurality of corresponding relations.
After the position information of each wall centerline is determined, the corresponding relationship between each end point and the wall centerline connected to the end point can be established according to the end point information in the position information, for example, if all the wall centerlines numbered 1, 2, and 3 include the end point a, the corresponding relationship between the end points a includes the wall centerlines numbered 1, 2, and 3, and so on, the corresponding relationship between all the end points can be determined.
And 2, sequencing the wall center lines in each corresponding relation according to a preset sequence to obtain a plurality of target corresponding relations.
After the corresponding relations are obtained, the wall centerlines in each corresponding relation need to be sorted according to a preset sequence to obtain a plurality of target corresponding relations, and optionally, the preset sequence can be a reverse-time sorting or a clockwise sorting. For convenience of understanding, as illustrated below, if the correspondence relationship of the end points a includes the wall central lines numbered 1, 2, and 3, and an included angle between the wall central line numbered 1 and the X-axis direction vector is 40 degrees, an included angle between the wall central line numbered 2 and the X-axis direction vector is 100 degrees, and an included angle between the wall central line numbered 3 and the X-axis direction vector is 60 degrees, if the preset sequence is counterclockwise, the storage sequence of the wall central lines in the target correspondence relationship of the end points a is 1, 3, and 2.
And 3, randomly selecting an end point as a starting point, and performing bidirectional traversal on the wall center line in the house type image based on the corresponding relation of the multiple targets to obtain at least one closed space.
And 4, taking the closed space with the largest area in at least one closed space as the outer contour of the house type image.
After all the target corresponding relations are obtained, an end point is randomly selected as a starting point of bidirectional traversal, bidirectional traversal search is carried out on all the wall center lines according to the storage sequence of the wall center lines in the target corresponding relations of the end points, and end point information of any one closed space formed in the traversal process is recorded to obtain outline information of the closed space.
For convenience of understanding, the correspondence relationship of the endpoint a includes wall centerlines numbered 1, 2, and 3, and the storage order of the wall centerlines in the target correspondence relationship of the endpoint a is 1, 3, and 2, the other endpoint of the wall centerline numbered 1 is B, the other endpoint of the wall centerline numbered 2 is C, the other endpoint of the wall centerline numbered 3 is D, and the traversal from the endpoint a to the endpoint B is set as a forward traversal, the traversal from the endpoint B to the endpoint a is set as a reverse traversal, if the endpoint B is selected as the starting point of the bidirectional traversal, the process of starting from B, traversing the endpoint a, and finally returning to the endpoint B is performed.
In the bidirectional traversal process, if the endpoints B and a are taken as the starting two endpoints of the bidirectional traversal (wall centerline 1, reverse traversal), the selection of the next endpoint of the endpoint a is related to the target corresponding relationship of the endpoint a, because the storage sequence of the wall centerlines in the target corresponding relationship of the endpoint a is 1, 3, 2, therefore, the wall centerline of the number 3 should be selected after the wall centerline of the number 1, that is, the next endpoint corresponding to the sequential advancement of the endpoint a is the endpoint D of the wall centerline of the number 3, and the endpoint D is recorded as the third endpoint of the traversal path, and the wall centerline of the number 3 is simultaneously traversed once in the forward direction (a → D), when the path searched by the sequential advancement returns to the starting endpoint B, the closed polygon formed at this time is the outline of a certain closed space, and the position information of all the endpoints in the outline is recorded. In order to ensure that all closed spaces can be obtained, after the closed spaces return to the starting endpoint B, a wall central line which does not complete forward traversal and reverse traversal is selected, the traversal direction which is not yet performed by the wall central line is selected, the sequential forward search process is repeated until all the wall central lines are traversed forward and backward once, the bidirectional traversal is finished, at least one closed space is obtained, the closed space with the largest area is used as the outer contour of the house type image, the accurate outer contour of the house type image can be generated by using the method, and the method has higher practical value.
In summary, the method for identifying the door in the house type image provided by the embodiment of the invention fully considers the geometric features and the position features of each door in the house type image, thereby ensuring the accuracy of door identification.
Example two
The embodiment of the present invention further provides a device for identifying a door in a house type diagram, where the device for identifying a door in a house type diagram is mainly used for executing the method for identifying a door in a house type diagram provided in the first embodiment of the present invention, and the device for identifying a door in a house type diagram provided in the embodiment of the present invention is specifically described below.
Fig. 4 is a functional block diagram of an apparatus for identifying a door in a house type diagram according to an embodiment of the present invention, and as shown in fig. 4, the apparatus mainly includes: the device comprises an acquisition module 10, a processing module 20, a first determination module 30 and a second determination module 40, wherein:
and the acquisition module 10 is used for acquiring the house type image to be processed.
A processing module 20, configured to process the house type image by using a preset detection model to obtain structure information of the house type image, where the structure information includes: the position information of all wall central lines, the position information of all rectangular frames and the position information of all vertical hinged doors, and the rectangular frames are used for representing windows or sliding doors in the house type images.
And the first determining module 30 is used for determining the position information of all sliding doors in the house type image based on the position information of all wall central lines and the position information of all rectangular frames.
A second determining module 40, configured to determine door information in the house type image based on the position information of all the vertical hinged doors and the position information of all the sliding doors, where the door information includes: door type information and door position information.
The door identification method in the house type graph in the prior art has the problems of missing identification of the house type door or wrong identification of the type, and needs a professional to manually correct the identification result, so that the working efficiency is low. Compared with the prior art, the invention provides a device for identifying a door in a house type image, which comprises the following steps of firstly, obtaining a house type image to be processed, and then, processing the house type image by using a preset detection model to obtain the structure information of the house type image, wherein the structure information comprises: the method comprises the following steps of obtaining position information of all wall center lines, position information of all rectangular frames and position information of all vertical hinged doors, wherein the rectangular frames are used for representing windows or sliding doors in a house type image, determining the position information of all sliding doors in the house type image based on the position information of all wall center lines and the position information of all rectangular frames, and finally determining the door information in the house type image based on the position information of all vertical hinged doors and the position information of all sliding doors, wherein the door information comprises the following steps: door type information and door position information. The device utilizes the geometric characteristics of each door and the position characteristics of the door when identifying door information, so that the effect of accurate identification can be achieved, and the technical problem of low accuracy in the door identification method in the house type graph in the prior art is effectively solved.
Optionally, the preset detection model includes at least one of the following: the method comprises the steps of presetting a wall detection model, presetting a rectangular frame detection model and presetting a door detection model.
Optionally, the processing module 20 includes:
and the first processing unit is used for processing the house type image by utilizing a preset wall detection model to obtain the position information of all wall central lines in the house type image.
And the second processing unit is used for processing the house type image by utilizing the preset rectangular frame detection model to obtain the position information of all the rectangular frames in the house type image.
And the third processing unit is used for processing the house type image by utilizing the preset door detection model to obtain the position information of all the vertical hinged doors in the house type image.
Optionally, the first determining module 30 includes:
and the first determining unit is used for determining the outer contour of the house type image according to the position information of the central lines of all the walls.
And the judging unit is used for judging the position of each rectangular frame based on the outer contour.
And the second determining unit is used for representing the sliding door in the house type image if the target rectangular frame is completely positioned in the outer contour, wherein the target rectangular frame is any one of all rectangular frames.
And the third determining unit is used for determining the position information of all sliding doors in the house type image based on the position information of the target rectangular frame.
Optionally, the first determining unit is specifically configured to:
randomly selecting any end point of a wall central line as a starting point, and performing bidirectional traversal on the wall central line in the house type image based on the position information of all the wall central lines to obtain at least one closed space.
And taking the closed space with the largest area in at least one closed space as the outer contour of the house type image.
Optionally, the first determining unit is specifically configured to:
and establishing a corresponding relation between the end point of each wall center line and the wall center line connected with each end point based on the position information of all the wall center lines to obtain a plurality of corresponding relations.
And sequencing the wall center lines in each corresponding relation according to a preset sequence to obtain a plurality of target corresponding relations.
And randomly selecting an end point as a starting point, and performing bidirectional traversal on a wall center line in the house type image based on the corresponding relation of the multiple targets to obtain at least one closed space.
And taking the closed space with the largest area in at least one closed space as the outer contour of the house type image.
EXAMPLE III
Referring to fig. 5, an embodiment of the present invention provides an electronic device, including: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected through the bus 62; the processor 60 is arranged to execute executable modules, such as computer programs, stored in the memory 61.
The Memory 61 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 62 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The memory 61 is used for storing a program, the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 60, or implemented by the processor 60.
The processor 60 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 60. The Processor 60 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 61, and the processor 60 reads the information in the memory 61 and, in combination with its hardware, performs the steps of the above method.
The method, the apparatus, and the computer program product for identifying a door in a house type graph provided in the embodiments of the present invention include a computer-readable storage medium storing a non-volatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings or the orientations or positional relationships that the products of the present invention are conventionally placed in use, and are only used for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Furthermore, the terms "horizontal", "vertical", "overhang" and the like do not imply that the components are required to be absolutely horizontal or overhang, but may be slightly inclined. For example, "horizontal" merely means that the direction is more horizontal than "vertical" and does not mean that the structure must be perfectly horizontal, but may be slightly inclined.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for door identification in a house type graph, comprising:
acquiring a house type image to be processed;
processing the house type image by using a preset detection model to obtain the structure information of the house type image, wherein the structure information comprises: the method comprises the following steps that position information of central lines of all walls, position information of all rectangular frames and position information of all vertical hinged doors are obtained, and the rectangular frames are used for representing windows or sliding doors in the house type image;
determining the position information of all sliding doors in the house type image based on the position information of all wall central lines and the position information of all rectangular frames;
determining door information in the house type image based on the position information of all the vertical hinged doors and the position information of all the sliding doors, wherein the door information comprises: door type information and door position information.
2. The method of claim 1, wherein the predetermined detection model comprises at least one of: the method comprises the steps of presetting a wall detection model, presetting a rectangular frame detection model and presetting a door detection model.
3. The method of claim 2, wherein processing the house type image by using a preset detection model to obtain the structure information of the house type image comprises:
processing the house type image by using a preset wall detection model to obtain the position information of all wall central lines in the house type image;
processing the house type image by using a preset rectangular frame detection model to obtain the position information of all rectangular frames in the house type image;
and processing the house type image by using a preset door detection model to obtain the position information of all vertical hinged doors in the house type image.
4. The method of claim 1, wherein determining the position information of all sliding doors in the house type image based on the position information of all wall center lines and the position information of all rectangular frames comprises:
determining the outer contour of the house type image according to the position information of the central lines of all the walls;
judging the position of each rectangular frame based on the outer contour;
if the target rectangular frame is completely positioned in the outer contour, the target rectangular frame represents a sliding door in the house type image, wherein the target rectangular frame is any one of all the rectangular frames;
and determining the position information of all sliding doors in the house type image based on the position information of the target rectangular frame.
5. The method of claim 4, wherein determining the outer contour of the house type image according to the position information of the central lines in all the walls comprises:
randomly selecting any end point of a wall central line as a starting point, and performing bidirectional traversal on the wall central line in the house type image based on the position information of all the wall central lines to obtain at least one closed space;
and taking the closed space with the largest area in the at least one closed space as the outer contour of the house type image.
6. The method of claim 4, wherein determining the outer contour of the house type image according to the position information of the central lines in all the walls comprises:
establishing a corresponding relation between an end point of each wall center line and a wall center line connected with each end point based on the position information of all the wall center lines to obtain a plurality of corresponding relations;
sequencing the wall center lines in each corresponding relation according to a preset sequence to obtain a plurality of target corresponding relations;
randomly selecting an end point as a starting point, and performing bidirectional traversal on a wall center line in the house type image based on the plurality of target corresponding relations to obtain at least one closed space;
and taking the closed space with the largest area in the at least one closed space as the outer contour of the house type image.
7. An apparatus for door identification in a house type figure, comprising:
the acquisition module is used for acquiring a house type image to be processed;
a processing module, configured to process the house type image by using a preset detection model to obtain structure information of the house type image, where the structure information includes: the method comprises the following steps that position information of central lines of all walls, position information of all rectangular frames and position information of all vertical hinged doors are obtained, and the rectangular frames are used for representing windows or sliding doors in the house type image;
the first determining module is used for determining the position information of all sliding doors in the house type image based on the position information of all the wall central lines and the position information of all the rectangular frames;
a second determining module, configured to determine door information in the house type image based on the position information of all the vertical hinged doors and the position information of all the sliding doors, where the door information includes: door type information and door position information.
8. The apparatus of claim 7, wherein the preset detection model comprises at least one of: the method comprises the steps of presetting a wall detection model, presetting a rectangular frame detection model and presetting a door detection model.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any of claims 1 to 6 when executing the computer program.
10. A computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of claims 1 to 6.
CN202010101792.7A 2020-02-19 2020-02-19 Method and device for identifying door in house type graph and electronic equipment Pending CN111985291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010101792.7A CN111985291A (en) 2020-02-19 2020-02-19 Method and device for identifying door in house type graph and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010101792.7A CN111985291A (en) 2020-02-19 2020-02-19 Method and device for identifying door in house type graph and electronic equipment

Publications (1)

Publication Number Publication Date
CN111985291A true CN111985291A (en) 2020-11-24

Family

ID=73441761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010101792.7A Pending CN111985291A (en) 2020-02-19 2020-02-19 Method and device for identifying door in house type graph and electronic equipment

Country Status (1)

Country Link
CN (1) CN111985291A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114821627A (en) * 2022-06-29 2022-07-29 江西少科智能建造科技有限公司 Intelligent examination method and system for door installation drawing, storage medium and electronic equipment
CN116188480A (en) * 2023-04-23 2023-05-30 安徽同湃特机器人科技有限公司 Calculation method of AGV traveling path point during ceiling operation of spraying robot

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002297673A (en) * 2001-03-30 2002-10-11 Sekisui House Ltd System and method for computing room colored area
CN109615679A (en) * 2018-12-05 2019-04-12 江苏艾佳家居用品有限公司 A kind of recognition methods of house type component
CN109993797A (en) * 2019-04-04 2019-07-09 广东三维家信息科技有限公司 Door and window method for detecting position and device
CN110210377A (en) * 2019-05-30 2019-09-06 南京维狸家智能科技有限公司 A kind of wall and door and window information acquisition method rebuild for three-dimensional house type
CN110348368A (en) * 2019-07-08 2019-10-18 创新奇智(北京)科技有限公司 A kind of artificial intelligence analytic method, computer-readable medium and the system of floor plan

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002297673A (en) * 2001-03-30 2002-10-11 Sekisui House Ltd System and method for computing room colored area
CN109615679A (en) * 2018-12-05 2019-04-12 江苏艾佳家居用品有限公司 A kind of recognition methods of house type component
CN109993797A (en) * 2019-04-04 2019-07-09 广东三维家信息科技有限公司 Door and window method for detecting position and device
CN110210377A (en) * 2019-05-30 2019-09-06 南京维狸家智能科技有限公司 A kind of wall and door and window information acquisition method rebuild for three-dimensional house type
CN110348368A (en) * 2019-07-08 2019-10-18 创新奇智(北京)科技有限公司 A kind of artificial intelligence analytic method, computer-readable medium and the system of floor plan

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114821627A (en) * 2022-06-29 2022-07-29 江西少科智能建造科技有限公司 Intelligent examination method and system for door installation drawing, storage medium and electronic equipment
CN116188480A (en) * 2023-04-23 2023-05-30 安徽同湃特机器人科技有限公司 Calculation method of AGV traveling path point during ceiling operation of spraying robot
CN116188480B (en) * 2023-04-23 2023-07-18 安徽同湃特机器人科技有限公司 Calculation method of AGV traveling path point during ceiling operation of spraying robot

Similar Documents

Publication Publication Date Title
CN110414477B (en) Image scale detection method and device
CN110502985B (en) Form identification method and device and form identification equipment
US7340089B2 (en) Geometric pattern matching using dynamic feature combinations
Jiang et al. Seeing double without confusion: Structure-from-motion in highly ambiguous scenes
US8035687B2 (en) Image processing apparatus and program
CN108182383B (en) Vehicle window detection method and device
CN109658454B (en) Pose information determination method, related device and storage medium
CN111985291A (en) Method and device for identifying door in house type graph and electronic equipment
CN110472580B (en) Method, device and storage medium for detecting parking stall based on panoramic image
CN111199562A (en) System and method for rapid object detection while robotic picking
CN107403179B (en) Registration method and device for article packaging information
CN112883955A (en) Shelf layout detection method and device and computer readable storage medium
CN114511589A (en) Human body tracking method and system
CN112348035A (en) Vehicle key point detection method and device and electronic equipment
CN111783561A (en) Picture examination result correction method, electronic equipment and related products
CN111651674A (en) Bidirectional searching method and device and electronic equipment
CN111178405A (en) Similar object identification method fusing multiple neural networks
CN111291649B (en) Image recognition method and device and electronic equipment
CN114119695A (en) Image annotation method and device and electronic equipment
CN109840529A (en) A kind of image matching method based on local sensitivity confidence level estimation
CN110334560B (en) Two-dimensional code positioning method and device
CN111881171A (en) Drawing identification recommendation method and system based on data analysis
US20130259382A1 (en) Incremental contour-extraction scheme for binary image segments
CN115619791A (en) Article display detection method, device, equipment and readable storage medium
CN115019152A (en) Image shooting integrity judgment method and device

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