CN117253052A - Maximum closure area identification method and device, storage medium and computer equipment - Google Patents

Maximum closure area identification method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN117253052A
CN117253052A CN202311542738.6A CN202311542738A CN117253052A CN 117253052 A CN117253052 A CN 117253052A CN 202311542738 A CN202311542738 A CN 202311542738A CN 117253052 A CN117253052 A CN 117253052A
Authority
CN
China
Prior art keywords
graph
maximum
closed
identifying
searching
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.)
Granted
Application number
CN202311542738.6A
Other languages
Chinese (zh)
Other versions
CN117253052B (en
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.)
Zwcad Software Co ltd
Original Assignee
Zwcad Software 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 Zwcad Software Co ltd filed Critical Zwcad Software Co ltd
Priority to CN202311542738.6A priority Critical patent/CN117253052B/en
Publication of CN117253052A publication Critical patent/CN117253052A/en
Application granted granted Critical
Publication of CN117253052B publication Critical patent/CN117253052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a maximum closure area identification method, a maximum closure area identification device, a storage medium and computer equipment. The method comprises the following steps: obtaining a target graph; preprocessing a target graph to obtain a graph to be processed; identifying a connected graph in the graph to be processed; sequentially searching directed curves of the connected graph based on randomly selected searching directions, and identifying closed areas in the connected graph; if any adjacent edges of the searched closed region are not adjacent along the closing direction of the closed region, eliminating the closed region, and reselecting a searching starting point to identify the closed region in the connected graph based on the randomly selected searching direction until all adjacent edges of the searched closed region are adjacent along the closing direction of the closed region, and determining the closed region as the maximum closed region of the connected graph; and if the graph to be processed only comprises one connected graph, determining the maximum closed area of the connected graph as the maximum closed area of the target graph. The method and the device can improve the identification precision and efficiency of the maximum closed area.

Description

Maximum closure area identification method and device, storage medium and computer equipment
Technical Field
The present disclosure relates to the field of computer aided design technologies, and in particular, to a method and apparatus for identifying a maximum closed area, a storage medium, and a computer device.
Background
Computer aided design (Computer Aided Design, CAD) is a technique for assisting a designer in performing a design work by using a computer, and is widely used in the fields of building construction, interior design, mechanical drawing, and the like. When designing by CAD, it is necessary to identify the maximum closed area based on the pattern drawn by the user, and the design work is assisted.
However, the maximum closed region identification method adopted in the current CAD software has a limit on the type of the identified boundary line, and has the problem of low identification efficiency and accuracy.
Disclosure of Invention
The embodiment of the application provides a maximum closed region identification method, a device, a storage medium and computer equipment, which can improve the identification precision and efficiency of the maximum closed region.
In a first aspect, the present application provides a method for identifying a maximum occlusion region, the method comprising:
obtaining a target graph;
preprocessing the target graph to obtain a graph to be processed; the graph to be processed is a graph without an overlapping curve, an intersecting curve, a single-output-degree node and a single-output-degree node association curve;
identifying a connected graph in the graph to be processed;
for one connected graph, sequentially searching a directed curve of the connected graph based on a randomly selected searching direction, and identifying a closed region in the connected graph;
if any adjacent edges of the searched closed region are not adjacent along the closing direction of the closed region, eliminating the closed region, and reselecting a searching starting point to identify the closed region in the communication graph based on the randomly selected searching direction until all adjacent edges of the searched closed region are adjacent along the closing direction of the closed region, and determining the closed region as the maximum closed region of the communication graph; the searching direction is clockwise or anticlockwise;
and if the graph to be processed only comprises one communication graph, determining the maximum closed area of the communication graph as the maximum closed area of the target graph.
In one embodiment, the method further comprises:
if the graph to be processed contains a plurality of connected graphs, respectively identifying the maximum closed area of each connected graph;
identifying inclusion relationships between the maximally closed regions of the respective connectivity graphs;
and determining the maximum closed area of the connected graph which is not contained by the maximum closed area of any other connected graph as the maximum closed area of the target graph.
In one embodiment, the determining the maximum closed area of the connected graph that is not included by the maximum closed area of any other connected graph as the maximum closed area of the target graph includes:
constructing a relationship tree based on the inclusion relationship of the maximum closed area of each connected graph;
identifying and rejecting the maximum closed area of the contained connected graph based on the relation tree;
and determining the maximum closed area of the connected graph obtained after the elimination as the maximum closed area of the target graph.
In one embodiment, the preprocessing the target graph to obtain a graph to be processed includes:
identifying intersecting curves in the target graph, and disassembling the intersecting curves from the intersecting points into a plurality of non-intersecting curves to obtain a first graph;
identifying the overlapped curves in the first graph and performing de-duplication treatment to obtain a second graph;
identifying whether a single-degree node exists in the second graph;
if so, eliminating all single-degree nodes and the association curves of the single-degree nodes to obtain the graph to be processed;
and if the second graph does not exist, taking the second graph as the graph to be processed.
In one embodiment, for one connected graph, the sequentially searching the directional curves of the connected graph based on the randomly selected searching direction, and identifying the closed area in the connected graph includes:
and optionally selecting one of nodes of the connected graph as a searching starting point, taking any directional curve which belongs to the searching starting point as a starting edge, and rotating around the other node of the directional curve based on a randomly selected searching direction to search the next edge until a repeated directional curve is searched, and determining the area enclosed by all the directional curves searched this time as a closed area.
In one embodiment, the selecting one of the nodes of the connected graph as a searching starting point includes:
identifying the node with the smallest abscissa in the connected graph as a candidate node;
and if only one candidate node exists, taking the candidate node as the searching starting point.
In one embodiment, the selecting one of the nodes of the connected graph as a searching starting point includes:
identifying the node with the smallest abscissa in the connected graph as a candidate node;
and if a plurality of candidate nodes exist, taking one node with the smallest ordinate among the candidate nodes as the searching starting point.
In a second aspect, the present application provides a maximum occlusion region identification device, the device comprising:
the graph acquisition module is used for acquiring a target graph;
the preprocessing module is used for preprocessing the target graph to obtain a graph to be processed; the graph to be processed is a graph without an overlapping curve, an intersecting curve, a single-output-degree node and a single-output-degree node association curve;
the first identification module is used for identifying the connected graph in the graph to be processed;
the searching module is used for sequentially searching the directional curves of the connected graph based on randomly selected searching directions for one connected graph and identifying a closed area in the connected graph; removing the closed region when any adjacent edge of the searched closed region is not adjacent along the closing direction of the closed region, and reselecting a searching starting point to identify the closed region in the communication graph based on the randomly selected searching direction until all adjacent edges of the searched closed region are adjacent along the closing direction of the closed region, and determining the closed region as the maximum closed region of the communication graph; the searching direction is clockwise or anticlockwise;
and the first determining module is used for determining the maximum closed area of the communication graph as the maximum closed area of the target graph when the graph to be processed contains only one communication graph.
In a third aspect, the present application provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the maximum occlusion region identification method as set forth in any of the embodiments above.
In a fourth aspect, the present application provides a computer device comprising: one or more processors, and memory;
the memory has stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the maximum occlusion region identification method of any of the embodiments described above.
From the above technical solutions, the embodiments of the present application have the following advantages:
according to the maximum closed region identification method, device, storage medium and computer equipment, the target graph is preprocessed to obtain the graph to be processed, which is free of an overlapping curve, a crossing curve, a single-degree node and a single-degree node correlation curve, the connected graph in the graph to be processed is used as an object to search the maximum closed region of the connected graph, each time the directed curve of the connected graph is searched along a selected searching direction to obtain the closed region, whether each adjacent edge is adjacent along the closing direction of the closed region is judged to be met or not according to the identified closed region, so that the closed region which does not meet the characteristic of the maximum closed region is screened out, the end is reached when the closed region meeting the condition is searched, the number of searching and identifying the closed region is reduced, the identification efficiency is improved, and the closed region is identified through the searching of the directed curve, the limitation of the boundary line type and the bridge line interference connecting the two closed boundaries can be avoided, and the identification accuracy of the complex graph is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of a method for identifying a maximum occlusion region in one embodiment;
FIG. 2 is a schematic diagram of a "bridge" line in one embodiment;
FIG. 3 is a schematic diagram of a target graphic in one embodiment;
FIG. 4 is a schematic diagram of a target graphic in another embodiment;
FIG. 5 is a flow diagram of determining a maximum occlusion region of a connected graph that is not encompassed by a maximum occlusion region of any other connected graph as the maximum occlusion region of the target graph, in one embodiment;
FIG. 6 is a block diagram of a maximum occlusion region identification device in one embodiment;
FIG. 7 is an internal block diagram of a computer device, in one embodiment.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
As shown in fig. 1, the present application provides a maximum occlusion region identification method, which includes:
step S101, a target pattern is acquired.
The target graph is a graph input by a user or a graph selected by the user in the input graphs, and if the graph is not selected by the user, all graphs input by the user are defaulted as target graphs; and if the user selects the graph, taking the selected graph as a target graph.
Step S102, preprocessing the target graph to obtain a graph to be processed.
The graph to be processed is a graph without an overlapping curve, an intersecting curve, a single-output node and a single-output node association curve. The association curve of a certain node refers to a curve taking the node as one of the endpoints; the single-out degree node refers to a node whose association curve only has one, and whose association curve also has another end point.
In one embodiment, the preprocessing the target graph to obtain a graph to be processed includes: identifying intersecting curves in the target graph, and disassembling the intersecting curves into a plurality of non-intersecting curves from the intersecting points to obtain a first graph; identifying overlapped curves in the first graph and performing de-duplication treatment to obtain a second graph; identifying whether a single-degree node exists in the second graph; if so, eliminating all single-degree nodes and the association curves of the single-degree nodes to obtain a graph to be processed; and if the second graph does not exist, taking the second graph as the graph to be processed. In one embodiment, if the target graph is a graph of no overlapping curve, no intersecting curve, no single-degree node and no single-degree node association curve, the target graph is directly determined as the graph to be processed.
Step S103, identifying a connection diagram in the graph to be processed.
The connected graph is a graph formed by enclosing curves which can be communicated between any two vertexes. If a plurality of connected graphs exist in the graph to be processed, searching and screening of a closed area are needed to be carried out on each connected graph.
Step S104, for one connected graph, sequentially searching the directional curves of the connected graph based on the randomly selected searching direction, and identifying the closed area in the connected graph.
Wherein the search direction is clockwise or counterclockwise. If a plurality of connected graphs exist, searching and identifying the closed area of each connected graph are respectively carried out. The search direction is not changed after being selected in the process of searching a closed area, and the directional curve is always searched along the selected search direction until the search of the closed area is completed. The directional curves for searching the connected graph refer to directions to be considered in searching the searched curves, if the same curve is searched for each time along opposite directions in the searching process, the curves searched for in two directions are considered to be two directional curves respectively, in this way, a bridge (i.e. a curve connecting two closed boundaries in the undirected graph, such as L1 shown in fig. 2) can be disregarded, and various linearities such as straight line segments, spline curves, arcs and the like can be compatible.
In one embodiment, the method for identifying the closed region in the connectivity graph is: and optionally selecting one of nodes of the connected graph as a searching starting point, taking any directional curve which belongs to the searching starting point as a starting edge, and rotating around the other node of the directional curve based on a randomly selected searching direction to search the next edge until a repeated directional curve is searched, and determining the area enclosed by all the directional curves searched this time as a closed area.
Step S105, determining whether each adjacent edge of the searched closed area is adjacent along the closing direction of the closed area.
The closing direction is the direction of searching the node passing by the closing area. Referring to fig. 3, if the point a is used as the searching start point, the AB is used as the starting edge, the searching direction is anticlockwise, the searched boundaries are AB-BC-CD-DE-EF-FA in sequence, the nodes through which the searching process sequentially passes are a-B-C-D-E-F, so the closing direction is clockwise, the adjacent edges refer to edges in one closing area and found in any two adjacent searches in the searching process, for example, AB and BC are adjacent edges, it is determined whether the adjacent edges are adjacent along the closing direction of the closing area, that is, if the adjacent edges are rotated according to the closing direction with the joint common to the edge with the front edge of the searching sequence as the starting edge as the center, the closing directions of the closing areas are adjacent edges of the two adjacent edges if the next edge after the rotation is scanned is the adjacent edge of the starting edge. Illustratively, referring to FIG. 3, where AB is the starting edge, the edge swept clockwise around point B is BC, so that AB and BC are adjacent in the clockwise direction.
Referring to fig. 4, if the point a is taken as a search start point, the search direction is counterclockwise, one of the searched closed regions is AB-BC-CD-DN-NM-MJ-JI-IG-GH-HA, the closed direction is clockwise, and the adjacent edges CD and DN are not adjacent in the clockwise direction and are adjacent in the counterclockwise direction, for example, and therefore, the closed region does not satisfy the condition that each adjacent edge is adjacent in the closed direction of the closed region.
And step S106, if yes, determining the closed area as the maximum closed area of the communication graph.
Step S107, if not, the closed area is eliminated, and the step S104 is returned.
And re-selecting a searching starting point for the currently identified connected graph, and identifying a closed region in the connected graph based on a randomly selected searching direction until each adjacent edge of the searched closed region is adjacent along the closing direction of the closed region, and determining the closed region as the maximum closed region of the connected graph.
In step S108, if the graph to be processed includes only one connected graph, the maximum closed area of the connected graph is determined as the maximum closed area of the target graph.
Only one maximum closed area exists in one connected graph, so that when the graph to be processed only comprises one connected graph, the maximum closed area of the connected graph is the maximum closed area of the graph to be processed, namely the maximum closed area of the target graph.
Referring to the target graph in fig. 4, according to the maximum occlusion region identification method provided by the application, the maximum occlusion region can be identified as AB-BC-CD-DE-EF-FG-GH-HA.
According to the maximum closed region identification method, the target graph is preprocessed to obtain the graph to be processed, which has no overlapping curve, no intersecting curve, no single-degree node and no single-degree node association curve, the connected graph in the graph to be processed is used as an object to search the maximum closed region of the connected graph, each time the directed curve of the connected graph is searched along a selected searching direction to obtain the closed region, whether each adjacent edge is adjacent along the closing direction of the closed region is judged to be met or not by the identified closed region, the closed region which does not meet the characteristic of the maximum closed region is screened out, the closed region meeting the condition is searched, the number of searching and identifying the closed region is reduced, the identification efficiency is improved, the closed region is identified by searching the directed curve, and the identification accuracy of the complex graph is improved without being limited by the boundary line type and the bridge line interference connecting the two closed boundaries.
In one embodiment, if the graph to be processed includes a plurality of connected graphs, respectively identifying a maximum closed area of each connected graph; the maximum occlusion region identification method further comprises the following steps:
identifying inclusion relationships between the maximally closed regions of the respective connectivity graphs;
the maximum occlusion region of the connected graph that is not contained by the maximum occlusion region of any other connected graph is determined as the maximum occlusion region of the target graph.
For the case that a plurality of connected graphs are identified in the graph to be processed, it is necessary to identify the maximum closed area of each connected graph, that is, execute steps S104 to S107 to identify each connected graph, and identify a corresponding maximum closed area. When a plurality of connected graphs exist, the situation that the maximum closed area of the connected graph has an inclusion relationship is likely to exist, the included maximum closed area of the connected graph is not necessarily the maximum closed area of the graph to be processed, therefore secondary screening is needed to be conducted on the maximum closed area of each connected graph, the inclusion relationship among the maximum closed areas of each connected graph is identified, the maximum closed area of the connected graph included in the maximum closed area of any other connected graph is removed, and the remaining maximum closed area of the connected graph which is not included in the maximum closed area of any other connected graph is determined as the maximum closed area of the graph to be processed, namely the maximum closed area of the target graph. It should be noted that, when the graph to be processed includes a plurality of connected graphs, one or more maximum closed areas of the target graph may be included, and all the maximum closed areas of the connected graphs that are not included in the maximum closed areas of any other connected graph are the maximum closed areas of the target graph.
As shown in fig. 5, in one embodiment, the determining, as the maximum closed area of the target graph, the maximum closed area of the connected graph that is not included by the maximum closed area of any other connected graph includes:
step S501, a relationship tree is constructed based on the inclusion relationship of the maximum closed area of each connected graph.
And determining whether the maximum closed area of each communication graph is contained by the maximum closed area of the other communication graph or not by distribution, if the contained relation exists, determining the distribution in the relation tree as a father node and a child node, and traversing the contained relation among the maximum closed areas of all the communication graphs to construct the relation tree.
Step S502, identifying and rejecting the maximum closed area of the contained connected graph based on the relation tree.
The contained maximum closed area of the connected graph belongs to child nodes in the relation tree, the child nodes are eliminated, and only the maximum closed area of the connected graph of the parent node at the uppermost layer is reserved.
In step S503, the maximum closed area of the connected graph obtained after the culling is determined as the maximum closed area of the target graph.
And finally, the maximum closed area of the reserved communication graph is the maximum closed area of the graph to be processed, namely the maximum closed area of the target graph.
In this embodiment, whether the maximum closed areas of the connected graphs have the inclusion relationship is determined by traversing every two of the maximum closed areas of the connected graphs, and the parent-child nodes are determined in the relationship tree, so that a complete relationship tree is finally constructed, and the maximum closed areas of the connected graphs which are not included in other areas can be directly extracted through the relationship tree, thereby improving the processing efficiency.
In one embodiment, the selecting one of the nodes in the connected graph as the searching starting point includes:
identifying the node with the smallest abscissa in the connected graph as a candidate node;
if only one candidate node exists, the candidate node is used as the searching starting point;
and if a plurality of candidate nodes exist, taking one node with the smallest ordinate among the candidate nodes as the searching starting point.
In this embodiment, the node with the smallest abscissa in the connected graph is used as the searching start point, if one node with the smallest abscissa exists, the ordinate is introduced to select the searching start point, and the node with the smallest abscissa and the smallest ordinate is used as the searching start point, so that searching can be started with the node located at the outermost periphery as much as possible, the number of times that each connected graph searches the closed area of the connected graph required to search the largest closed area is reduced, and searching efficiency is improved.
It should be noted that, in this embodiment, various processes for the target graphics, including processes of rejection, disassembly, and the like, are only operation processes performed at the back end of the computer device, and do not actually perform related operations on the target graphics on the display interface, where the target graphics in the display interface are still graphics actually input by the user.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
The maximum occlusion region identification device provided in the embodiments of the present application will be described below, and the maximum occlusion region identification device described below and the maximum occlusion region identification method described above may be referred to correspondingly.
As shown in fig. 6, an embodiment of the present application provides a maximum occlusion region identification device 600, including:
a graph acquisition module 601, configured to acquire a target graph;
a preprocessing module 602, configured to preprocess the target graphic to obtain a graphic to be processed; the graph to be processed is a graph without an overlapping curve, an intersecting curve, a single-output-degree node and a single-output-degree node association curve;
a first identifying module 603, configured to identify a connected graph in the graph to be processed;
a searching module 604, configured to, for one connected graph, sequentially search the directional curves of the connected graph based on a randomly selected search direction, and identify a closed region in the connected graph; removing the closed region when any adjacent edge of the searched closed region is not adjacent along the closing direction of the closed region, and reselecting a searching starting point to identify the closed region in the communication graph based on the randomly selected searching direction until all adjacent edges of the searched closed region are adjacent along the closing direction of the closed region, and determining the closed region as the maximum closed region of the communication graph; the searching direction is clockwise or anticlockwise;
the first determining module 605 is configured to determine, when the graph to be processed includes only one connected graph, a maximum closed area of the connected graph as a maximum closed area of the target graph.
In one embodiment, the searching module is configured to identify a maximum closed area of each connected graph when the graph to be processed includes a plurality of connected graphs;
the apparatus further comprises:
the second identification module is used for identifying the inclusion relation between the maximum closed areas of the communication graphs;
and the second determining module is used for determining the maximum closed area of the communication graph which is not contained by the maximum closed area of any other communication graph as the maximum closed area of the target graph.
In one embodiment, the second determination module is configured to perform the steps of:
constructing a relationship tree based on the inclusion relationship of the maximum closed area of each connected graph;
identifying and rejecting the maximum closed area of the contained connected graph based on the relation tree;
and determining the maximum closed area of the connected graph obtained after the elimination as the maximum closed area of the target graph.
In one embodiment, the preprocessing module is configured to perform the steps of:
identifying intersecting curves in the target graph, and disassembling the intersecting curves from the intersecting points into a plurality of non-intersecting curves to obtain a first graph;
identifying the overlapped curves in the first graph and performing de-duplication treatment to obtain a second graph;
identifying whether a single-degree node exists in the second graph;
if so, eliminating all single-degree nodes and the association curves of the single-degree nodes to obtain the graph to be processed;
and if the second graph does not exist, taking the second graph as the graph to be processed.
In one embodiment, the search module is configured to perform the steps of:
and optionally selecting one of nodes of the connected graph as a searching starting point, taking any directional curve which belongs to the searching starting point as a starting edge, and rotating around the other node of the directional curve based on a randomly selected searching direction to search the next edge until a repeated directional curve is searched, and determining the area enclosed by all the directional curves searched this time as a closed area.
In one embodiment, the search module is configured to perform the steps of:
identifying the node with the smallest abscissa in the connected graph as a candidate node;
and if only one candidate node exists, taking the candidate node as the searching starting point.
In one embodiment, the search module is configured to perform the steps of:
identifying the node with the smallest abscissa in the connected graph as a candidate node;
and if a plurality of candidate nodes exist, taking one node with the smallest ordinate among the candidate nodes as the searching starting point.
The above-described division of the individual modules in the maximum occlusion area identification device is for illustration only, and in other embodiments, the maximum occlusion area identification device may be divided into different modules as needed to perform all or part of the above-described functions of the maximum occlusion area identification device. The above-described modules in the maximum occlusion region identification device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, the present application further provides a storage medium having stored therein computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the method of maximum occlusion region identification of any of the embodiments above.
In one embodiment, the present application further provides a computer device, where computer readable instructions are stored, and when the one or more processors execute the computer readable instructions, the method for identifying a maximum closed area according to any one of the foregoing embodiments is executed.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a maximum occlusion region identification method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
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 indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless explicitly defined otherwise.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of maximum occlusion region identification, the method comprising:
obtaining a target graph;
preprocessing the target graph to obtain a graph to be processed; the graph to be processed is a graph without an overlapping curve, an intersecting curve, a single-output-degree node and a single-output-degree node association curve;
identifying a connected graph in the graph to be processed;
for one connected graph, sequentially searching a directed curve of the connected graph based on a randomly selected searching direction, and identifying a closed region in the connected graph;
if any adjacent edges of the searched closed region are not adjacent along the closing direction of the closed region, eliminating the closed region, and reselecting a searching starting point to identify the closed region in the communication graph based on the randomly selected searching direction until all adjacent edges of the searched closed region are adjacent along the closing direction of the closed region, and determining the closed region as the maximum closed region of the communication graph; the searching direction is clockwise or anticlockwise;
and if the graph to be processed only comprises one communication graph, determining the maximum closed area of the communication graph as the maximum closed area of the target graph.
2. The maximum occlusion region identification method of claim 1, further comprising:
if the graph to be processed contains a plurality of connected graphs, respectively identifying the maximum closed area of each connected graph;
identifying inclusion relationships between the maximally closed regions of the respective connectivity graphs;
and determining the maximum closed area of the connected graph which is not contained by the maximum closed area of any other connected graph as the maximum closed area of the target graph.
3. The maximum occlusion region identification method according to claim 2, wherein determining the maximum occlusion region of the connected graph that is not included by the maximum occlusion region of any other connected graph as the maximum occlusion region of the target graph includes:
constructing a relationship tree based on the inclusion relationship of the maximum closed area of each connected graph;
identifying and rejecting the maximum closed area of the contained connected graph based on the relation tree;
and determining the maximum closed area of the connected graph obtained after the elimination as the maximum closed area of the target graph.
4. A method for identifying a maximum occlusion area according to any one of claims 1 to 3, wherein said preprocessing said target pattern to obtain a pattern to be processed comprises:
identifying intersecting curves in the target graph, and disassembling the intersecting curves from the intersecting points into a plurality of non-intersecting curves to obtain a first graph;
identifying the overlapped curves in the first graph and performing de-duplication treatment to obtain a second graph;
identifying whether a single-degree node exists in the second graph;
if so, eliminating all single-degree nodes and the association curves of the single-degree nodes to obtain the graph to be processed;
and if the second graph does not exist, taking the second graph as the graph to be processed.
5. The method for identifying a maximum occlusion region according to claim 4, wherein for one connected graph, the sequentially searching the directional curves of the connected graph based on the randomly selected search direction, and identifying the occlusion region in the connected graph comprises:
and optionally selecting one of nodes of the connected graph as a searching starting point, taking any directional curve which belongs to the searching starting point as a starting edge, and rotating around the other node of the directional curve based on a randomly selected searching direction to search the next edge until a repeated directional curve is searched, and determining the area enclosed by all the directional curves searched this time as a closed area.
6. The method for identifying a maximum closed area according to claim 5, wherein the selecting one of the nodes of the connected graph as a search start point comprises:
identifying the node with the smallest abscissa in the connected graph as a candidate node;
and if only one candidate node exists, taking the candidate node as the searching starting point.
7. The method for identifying a maximum closed area according to claim 5, wherein the selecting one of the nodes of the connected graph as a search start point comprises:
identifying the node with the smallest abscissa in the connected graph as a candidate node;
and if a plurality of candidate nodes exist, taking one node with the smallest ordinate among the candidate nodes as the searching starting point.
8. A maximum occlusion region identification device, the device comprising:
the graph acquisition module is used for acquiring a target graph;
the preprocessing module is used for preprocessing the target graph to obtain a graph to be processed; the graph to be processed is a graph without an overlapping curve, an intersecting curve, a single-output-degree node and a single-output-degree node association curve;
the first identification module is used for identifying the connected graph in the graph to be processed;
the searching module is used for sequentially searching the directional curves of the connected graph based on randomly selected searching directions for one connected graph and identifying a closed area in the connected graph; removing the closed region when any adjacent edge of the searched closed region is not adjacent along the closing direction of the closed region, and reselecting a searching starting point to identify the closed region in the communication graph based on the randomly selected searching direction until all adjacent edges of the searched closed region are adjacent along the closing direction of the closed region, and determining the closed region as the maximum closed region of the communication graph; the searching direction is clockwise or anticlockwise;
and the first determining module is used for determining the maximum closed area of the communication graph as the maximum closed area of the target graph when the graph to be processed contains only one communication graph.
9. A storage medium, characterized by: the storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the maximum occlusion region identification method of any of claims 1 to 7.
10. A computer device, comprising: one or more processors, and memory;
stored in the memory are computer readable instructions which, when executed by the one or more processors, perform the steps of the maximum occlusion region identification method of any of claims 1-7.
CN202311542738.6A 2023-11-20 2023-11-20 Maximum closure area identification method and device, storage medium and computer equipment Active CN117253052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311542738.6A CN117253052B (en) 2023-11-20 2023-11-20 Maximum closure area identification method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311542738.6A CN117253052B (en) 2023-11-20 2023-11-20 Maximum closure area identification method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN117253052A true CN117253052A (en) 2023-12-19
CN117253052B CN117253052B (en) 2024-01-23

Family

ID=89133621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311542738.6A Active CN117253052B (en) 2023-11-20 2023-11-20 Maximum closure area identification method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN117253052B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934842A (en) * 2017-03-10 2017-07-07 广州视源电子科技股份有限公司 Method and device for identifying closed area
CN107016714A (en) * 2017-03-14 2017-08-04 佛山科学技术学院 A kind of closed curve filling graph method
CN107644449A (en) * 2017-09-15 2018-01-30 江苏大学 A kind of planar graph autonomous closure area recognizing method
CN108520523A (en) * 2018-03-23 2018-09-11 浙江工业大学 A kind of line drawing figure framework extraction method retaining non-close curve
US20190332638A1 (en) * 2018-04-27 2019-10-31 Fujitsu Limited Device and method for area generation
CN110414420A (en) * 2019-07-25 2019-11-05 中国人民解放军国防科技大学 Mesoscale convection system identification and tracking method based on infrared cloud picture of stationary satellite
CN111986289A (en) * 2020-08-20 2020-11-24 广联达科技股份有限公司 Searching method and device for closed area and electronic equipment
CN116311338A (en) * 2023-03-27 2023-06-23 北京数码易知科技发展有限责任公司 Minimum closure zone identification method, device, equipment and computer readable medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934842A (en) * 2017-03-10 2017-07-07 广州视源电子科技股份有限公司 Method and device for identifying closed area
CN107016714A (en) * 2017-03-14 2017-08-04 佛山科学技术学院 A kind of closed curve filling graph method
CN107644449A (en) * 2017-09-15 2018-01-30 江苏大学 A kind of planar graph autonomous closure area recognizing method
CN108520523A (en) * 2018-03-23 2018-09-11 浙江工业大学 A kind of line drawing figure framework extraction method retaining non-close curve
US20190332638A1 (en) * 2018-04-27 2019-10-31 Fujitsu Limited Device and method for area generation
CN110414420A (en) * 2019-07-25 2019-11-05 中国人民解放军国防科技大学 Mesoscale convection system identification and tracking method based on infrared cloud picture of stationary satellite
CN111986289A (en) * 2020-08-20 2020-11-24 广联达科技股份有限公司 Searching method and device for closed area and electronic equipment
CN116311338A (en) * 2023-03-27 2023-06-23 北京数码易知科技发展有限责任公司 Minimum closure zone identification method, device, equipment and computer readable medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
覃斌 等: "基于转向法的大规模空间封闭图形高效识别", 计算机工程, vol. 34, no. 14, pages 184 - 186 *
郑汉翔 等: "基于区域的活动轮廓图像分割模型的变步长优化算法", 福州大学学报(自然科学版), vol. 44, no. 3, pages 419 - 423 *

Also Published As

Publication number Publication date
CN117253052B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
Lambourne et al. Brepnet: A topological message passing system for solid models
US20150339434A1 (en) Virtual hierarchical layer propagation
CN103914865B (en) Form the group in the face of geometrical pattern
Gong et al. A typification method for linear pattern in urban building generalisation
CN111651641B (en) Graph query method, device and storage medium
Ohori et al. Validation and automatic repair of planar partitions using a constrained triangulation
CN113158296A (en) Parking space arrangement method, device, equipment and storage medium
Wu et al. A maximal ordered ego-clique based approach for prevalent co-location pattern mining
CN117253052B (en) Maximum closure area identification method and device, storage medium and computer equipment
JP5153677B2 (en) Sequential clustering apparatus, method and program
Hossein-Abad et al. Fuzzy c-means clustering method with the fuzzy distance definition applied on symmetric triangular fuzzy numbers
Paiva Topological equivalence and similarity in multi-representation geographic databases
Brun et al. Contains and inside relationships within combinatorial pyramids
Orecchia et al. Practical almost-linear-time approximation algorithms for hybrid and overlapping graph clustering
Fugacci et al. Computing discrete Morse complexes from simplicial complexes
CN117351064B (en) Method and device for calculating filling cumulative area, storage medium and computer equipment
CN114442642B (en) Path planning method, path planning device, computer equipment and storage medium
CN102999542B (en) Multi-medium data high dimensional indexing and kNN search method
Jagtap et al. Multiomics data integration for gene regulatory network inference with exponential family embeddings
Tamassia On-line planar graph embedding
Cimikowski Finding Hamiltonian cycles in certain planar graphs
Lin et al. CD-graph: planar graph representation for spatial adjacency and neighbourhood relation with constraints
Ge et al. Bidirectional heuristic attribute reduction based on conflict region
KR101878844B1 (en) Subgraph listing method based on nested overlapping
Lee et al. Design and experience of generalization tools

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
GR01 Patent grant
GR01 Patent grant