CN114241507A - Area contour determination method and device, electronic equipment and medium - Google Patents

Area contour determination method and device, electronic equipment and medium Download PDF

Info

Publication number
CN114241507A
CN114241507A CN202111543430.4A CN202111543430A CN114241507A CN 114241507 A CN114241507 A CN 114241507A CN 202111543430 A CN202111543430 A CN 202111543430A CN 114241507 A CN114241507 A CN 114241507A
Authority
CN
China
Prior art keywords
area
objects
overlapping
updating
area object
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
CN202111543430.4A
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.)
Shenzhen Xumi Yuntu Space Technology Co Ltd
Original Assignee
Shenzhen Xumi Yuntu Space 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 Shenzhen Xumi Yuntu Space Technology Co Ltd filed Critical Shenzhen Xumi Yuntu Space Technology Co Ltd
Priority to CN202111543430.4A priority Critical patent/CN114241507A/en
Publication of CN114241507A publication Critical patent/CN114241507A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Landscapes

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

Abstract

The disclosure provides a method and a device for determining an area profile, electronic equipment and a medium, and belongs to the technical field of software. The method comprises the following steps: if the area outlines of at least two area objects have an overlapping region, acquiring the space types of the at least two area objects; judging the space priority relation of the at least two area objects according to the space type; updating the area contours of the at least two area objects based on the spatial priority relationship or based on the spatial priority relationship and the geometric information of the overlapping region. Based on the technical scheme provided by the embodiment of the disclosure, the problem that the area outline of the area object is not accurate enough can be solved.

Description

Area contour determination method and device, electronic equipment and medium
Technical Field
The disclosure belongs to the technical field of software, and particularly relates to a method and a device for determining an area profile, electronic equipment and a medium.
Background
With the development of software technology, more and more drawing processes can be processed based on software, for example, in the building field, a building information model can be created based on drawing tools such as CAD, Revit and the like.
Generally, when an area contour of an area object is manually drawn or automatically generated based on a drawing tool, there is a phenomenon that a large amount of overlap exists between the area object and the area object, but there is no overlap between the area object and the area object in business.
However, a building information model may generally include several layers of area planes, each area plane may also include a plurality of area objects, and a manual processing manner needs to repeat a large number of redundant operations, which is prone to situations such as omission and judgment errors, and thus causes an area outline of an area object in a final generated drawing to be inaccurate.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method, an apparatus, an electronic device, and a medium for determining an area profile, which can solve a problem that the area profile of an area object is not accurate enough.
In order to solve the technical problem, the present disclosure is implemented as follows:
in a first aspect, an embodiment of the present disclosure provides a method for determining an area profile, where the method includes: if the area outlines of at least two area objects have an overlapping region, acquiring the space types of the at least two area objects; judging the space priority relation of the at least two area objects according to the space type; updating the area contours of the at least two area objects based on the spatial priority relationship or based on the spatial priority relationship and the geometric information of the overlapping region.
In a second aspect, an embodiment of the present disclosure provides an area profile determining apparatus, including: the device comprises an acquisition module, a judgment module and an updating module; the acquisition module is used for acquiring the space types of the at least two area objects if the area outlines of the at least two area objects have an overlapping area; the judging module is used for judging the space priority relation of the at least two area objects according to the space type acquired by the acquiring module; the updating module is configured to update the area profiles of the at least two area objects based on the spatial priority relationship determined by the determining module or based on the spatial priority relationship determined by the determining module and the geometric information of the overlapping area.
In a third aspect, the disclosed embodiments provide an electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, which when executed by the processor implement the steps of the method according to the first aspect.
In a fourth aspect, the disclosed embodiments provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the method according to the first aspect.
In a fifth aspect, the embodiments of the present disclosure provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In a sixth aspect, the disclosed embodiments provide a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the method according to the first aspect.
In this disclosure, first, if there is an overlapping region in the area outlines of at least two area objects, the electronic device may obtain the spatial types of the at least two area objects, and then the electronic device obtains the spatial priority relationship of the at least two area objects based on the spatial types, and updates the outlines of the at least two area objects based on the spatial priority relationship, or based on the spatial priority relationship and the geometric information of the overlapping region. That is to say, the electronic device may determine which area object the overlap region belongs to according to the spatial priority order of each area object or in combination with the spatial priority order and the geometric information of the overlap region under the condition that it is determined that there is an area outline overlap of the area objects, and automatically determine the area outline of each area object, on one hand, the area outline that each area object should actually correspond to may be quickly generated, and the user is no longer required to manually judge and draw the outline of the area object, which reduces the probability of high error rate caused by manual drawing, on the other hand, when the user draws the space module based on the drawing software, the user may not be required to manually draw the irregular-shaped space module, and the required irregular-shaped area outline may be flexibly drawn according to the user's requirement through an overlapping manner based on a regular graph in combination with the determination method of area outline provided by the embodiment of the present disclosure, the efficiency and flexibility of creating the area object are improved.
Drawings
Fig. 1 is a schematic flow chart of a method for determining an area profile according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of area profile updating provided by an embodiment of the present disclosure;
FIG. 3 is one of the schematic diagrams of the overlapping area provided by the embodiments of the present disclosure;
FIG. 4 is a second schematic diagram of an overlap region provided in the present disclosure;
fig. 5 is a second schematic flow chart of a method for determining an area profile according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a possible structure of an apparatus for determining an area profile according to an embodiment of the present disclosure;
fig. 7 is a second schematic structural diagram of a possible area profile determining apparatus provided in the embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 9 is a hardware schematic diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present disclosure are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the disclosure may be practiced other than those illustrated or described herein, and that the objects identified as "first," "second," etc. are generally a class of objects and do not limit the number of objects, e.g., a first object may be one or more. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The area contour determination method provided by the embodiments of the present disclosure is described in detail below with reference to the accompanying drawings by specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flowchart of a method for determining an area profile according to an embodiment of the present disclosure, as shown in fig. 1, the method includes the following steps S101 to S103:
s101, if the area outlines of at least two area objects have an overlapping area, the electronic equipment acquires the space types of the at least two area objects.
Illustratively, one area object may indicate one room module, and one room module may indicate one room in one building.
Illustratively, the space type may be acquired based on the classification of the room module, the room number of the room module, the ID of the room module, and the like.
S102, the electronic equipment judges the space priority relation of the at least two area objects according to the space type.
Illustratively, the space types of an area object may include a primary space type and a secondary space type, the primary space type may correspond to a primary space priority, and the secondary space type may correspond to a secondary space priority.
In the embodiment of the present disclosure, the spatial priority relationships corresponding to at least two area objects, including a first-level priority relationship and a second-level priority relationship, are taken as an example for description. If the primary priorities corresponding to the primary space types of at least two area objects are different, determining the ownership of the overlapping area based on the primary priority relationship; if the primary priorities of the primary space types are the same, that is, the primary space types corresponding to the primary priorities are the same, determining a secondary priority relationship corresponding to the secondary space type under the primary space type, and determining the ownership of the overlapping area based on the secondary priority relationship.
Exemplarily, the following spatial types and corresponding priority orders are explained in the embodiments of the present disclosure, where the priority order corresponding to a primary spatial type may be: residential < commercial < underground < public < corollary. In the case that each primary space type is the same, the priority order corresponding to the secondary space type under each primary space type may be the priority order of the example in table 1.
TABLE 1
Figure BDA0003414975970000051
It should be noted that, the order of the first-level priority and the order of the second-level priorities are merely exemplary illustrations, and in practical applications, the space types may be added or deleted according to the requirements of the services, and the priority order between the space types may be adjusted, which is not specifically limited in this embodiment of the disclosure.
S103, the electronic device updates the area outlines of the at least two area objects based on the spatial priority relationship or based on the spatial priority relationship and the geometric information of the overlapping area.
The geometric information of the overlapping region may include information of an edge, a vertex, a center point, and the like of the overlapping region.
For example, in the process of determining the ownership of the overlap region, if the determination is made based on the spatial priority relationship, the overlap region may be determined as a region of the area objects with high spatial priority, among the at least two area objects associated with the overlap region. For example, when the priorities corresponding to the space types include a first-level priority and a second-level priority, if the first-level priorities of the at least two area objects are different, the overlapping region is determined as a region of an area object with a high first-level priority in the at least two area objects; and if the first-level priorities of the at least two area objects are the same, determining the overlapping area as the area of the area object with the higher second-level priority in the at least two area objects.
For example, if the first area object and the second area object have a first overlap region and the spatial priority of the first area object is higher than the spatial priority of the second area object, the updated area contour of the first area object is a contour formed by a region where the first area object and the second area object do not overlap and the first overlap region, and the updated area contour of the second area object is a contour formed by a region excluding the first overlap region from the original area contour of the second object.
Exemplarily, fig. 2 is a schematic diagram of area contour update provided by the embodiment of the present disclosure, as shown in fig. 2, the contour of the area object 1 is a dashed rectangle indicated by 21a, the contour of the area object 2 is a solid rectangle indicated by 22a, there is an overlapping region ABCD between 21a and 22a, if it is determined that the overlapping region ABCD belongs to the area object 2, the updated contour of the area object 1 is the contour indicated by 21b, and the updated contour of the area object 2 is the contour indicated by 22 b.
It is understood that after determining the attribution of the overlapping region, the area contour may be adjusted, and if the area object 1 has the attribution weight of the overlapping region, the contour of the area object 1 remains unchanged, and the area object 2 has no attribution weight of the overlapping contour, the contour of the overlapping region is subtracted by the contour of the area object 2.
It should be noted that, if it can be determined which area object the overlapping region belongs to according to the spatial priority relationship, the area outlines of at least two area objects are updated according to the spatial priority relationship; if it cannot be determined which area object the overlapping area belongs to based on the spatial priority relationship, it can be determined which area object the overlapping area belongs to based on the geometric information of the overlapping area.
First, if the area outlines of the at least two area objects have an overlapping region, the electronic device may obtain a space type of the at least two area objects, then the electronic device obtains a space priority relationship of the at least two area objects based on the space type, and updates the outlines of the at least two area objects based on the space priority relationship, or based on the space priority relationship and geometric information of the overlapping region. That is to say, the electronic device may determine which area object the overlap region belongs to according to the spatial priority order of each area object or in combination with the spatial priority order and the geometric information of the overlap region under the condition that it is determined that there is an area outline overlap of the area objects, and automatically determine the area outline of each area object, on one hand, the area outline that each area object should actually correspond to may be quickly generated, and the user is no longer required to manually judge and draw the outline of the area object, which reduces the probability of high error rate caused by manual drawing, on the other hand, when the user draws the space module based on the drawing software, the user may not be required to manually draw the irregular-shaped space module, and the required irregular-shaped area outline may be flexibly drawn according to the user's requirement through an overlapping manner based on a regular graph in combination with the determination method of area outline provided by the embodiment of the present disclosure, the efficiency and flexibility of creating the area object are improved.
Optionally, in the method for determining an area profile provided in the embodiment of the present disclosure, the step S103 may be specifically executed by the following step S131:
s131, if the at least two area objects do not have a spatial priority relationship or have the same spatial priority, the electronic device updates the area outlines of the at least two area objects based on the geometric information of the overlapping area.
It is understood that in the embodiment of the present disclosure, the ownership of the overlapping area may be determined according to the spatial priority relationship, and if the spatial priority relationship is not configured for two area objects, or the priorities are the same, the ownership of the overlapping area needs to be determined by combining the geometric information of the overlapping area.
Based on the scheme, the electronic device may determine, based on the space type, a space priority relationship of each overlapped area object, and if the ownership of the overlapped area cannot be determined based on the space priority relationship, for example, the space priority relationship does not exist, or the space priorities are the same, continue to acquire the geometric information of the overlapped area, and determine the ownership of the overlapped area by combining the geometric information of the overlapped area, so that the accuracy of determining the ownership of the overlapped area may be improved, and the probability of the undeterminable ownership may be reduced.
Optionally, in the method for determining an area contour, the "updating the area contours of the at least two area objects based on the geometric information of the overlapping region" in S131 may be specifically performed through S13 as follows:
s13, the electronic device updates the area contours of the at least two area objects based on at least one of an exclusive endpoint of the associated area object in the overlap region, an exclusive edge of the associated area object, or a geometric center of the overlap region.
It should be noted that, in the embodiment of the present disclosure, the end point of the overlap region belongs to a point on the boundary of an area object, where the end point of the overlap region is indicated by the end point of the area object. The side of the overlap region belongs to a portion where the side of the overlap region indicated by the side of one area object overlaps with the side of the area object.
It should be noted that the end points of the overlap region may include an exclusive end point of one area object, or may not include an exclusive end point of the area object.
Exemplarily, fig. 3 is a schematic diagram of an overlapping region provided by an embodiment of the present disclosure, as shown in (a) in fig. 3, assuming that an area contour of an area object 1 is a rectangular contour shown as 31, an area contour of an area object 2 is a hexagonal contour shown as 32, and an overlapping region 1 of the area object 1 and the area object 2 is an irregular polygon formed by abcde, where an end point belonging to the area object 1 in the overlapping region 1 includes: e. d, c, the edges include ed and dc, the end points belonging to the area object 2 in the overlap region 1 include: e. a, b, c, edges include ea, ab, and bc. Where d belongs to the exclusive endpoint of area object 1 and a, b belong to the exclusive endpoint of area object 2. In conjunction with (b) in fig. 3, it is assumed that the outline of the area object 3 is a solid-line rectangle shown by 33, the outline of the area object 4 is a dashed-line rectangle shown by 34, and the overlap region 2 is a rectangle formed by P1P2P3P4, wherein the end points belonging to the area object 3 in the overlap region 2 include P1, P2, P3, and P4, and the end points belonging to the area object 4 in the overlap region 2 include P1, P2, P3, and P4, that is, in the end points of the overlap region, neither the area object 3 nor the area object 4 has an exclusive point; the sides of the overlapping region 2 belonging to the area object 3 include sides P1P2, P2P3, and P3P4, and the sides of the overlapping region 2 belonging to the area object 3 include sides P3P4, P4P1, and P1P 2. That is, of the overlapping regions, the exclusive side of the area object 3 is P2P3, and the exclusive side of the area object 4 is P4P 1. The geometric center of the overlap region 2 is the position where the intersection of the diagonals of the quadrangle is located.
For ease of understanding, the geometric center of the regular overlap region 2 is described above, and in practical applications, the electronic device may determine the position of the geometric center of each shape based on the characteristics of the figure.
Optionally, the electronic device may determine the ownership right of the overlapping region according to any one, any two, or all of the exclusive endpoint of the associated area object, the exclusive edge of the associated area object, and the geometric center of the overlapping region in the overlapping region, respectively; under the condition that a plurality of determined parameters are included, the step-by-step judgment can be performed based on a certain sequence, or the sequence is not limited, under the condition that one of the determined parameters cannot be judged, the next parameter is adopted for judgment, and the judgment can be performed according to the actual requirements of the service.
Based on this scheme, when determining the ownership right of the overlapping region by using the geometric information of the overlapping region, the ownership right of the overlapping region may be determined based on at least one of the exclusive endpoint of the associated area object, the exclusive edge of the associated area object, or the geometric center of the overlapping region, for example, the ownership right of the overlapping region may be determined based on the exclusive endpoint first, when the exclusive endpoint does not exist or the exclusive endpoint cannot determine the ownership right, the ownership right of the overlapping region may be determined based on the exclusive edge of the associated area object continuously, and when the exclusive edge cannot determine the ownership right, the ownership right of the overlapping region may be determined based on the center position of the overlapping region continuously.
Optionally, in the method for determining an area profile provided in the embodiment of the present disclosure, the step S13 may be further specifically performed by at least one of the following steps S13a, S13b, and S13 c:
s13a, the electronic device updates the area contour of the at least two area objects based on the end point on the boundary of each of the at least two area objects among the end points of the overlap region.
In practical applications, the electronic device may determine the end points belonging to each area object among the end points of the overlapping area, and determine the ownership of the overlapping area according to the end points of each area object.
The electronic device may directly traverse the endpoints belonging to the same area object in the endpoints of the overlapping region, and then determine the ownership of the overlapping region based on the endpoints of at least two area objects associated with the overlapping region, so that the determination of the exclusive endpoint may not be performed any more, and the determination of the ownership may be performed quickly based on the endpoints belonging to the same area object.
S13b, the electronic device updates the area contour of the at least two area objects based on the edge of each of the at least two area objects belonging to the overlapping region.
In practical applications, the electronic device may determine the sides belonging to the respective area objects among the sides of the overlap region, and determine the ownership of the overlap region based on the sides of the respective area objects.
The electronic device may directly traverse edges belonging to the same area object among edges of the overlapping region, and then determine the ownership of the overlapping region based on the edges of at least two area objects associated with the overlapping region, so that the determination of the ownership may be performed quickly based on the edges belonging to the same area object without performing the determination of the exclusive edges.
S13c, the electronic device updates the area contour of the at least two area objects based on the position relationship between the geometric center of the overlap region and the geometric centers of the at least two area objects.
Specifically, the electronic device determines an area contour of the at least two area objects based on a positional relationship of a geometric center of the overlap region and a geometric center of the associated area object.
For example, a first distance between the geometric center of the first area object and the geometric center of the overlap region may be determined, a second distance between the geometric center of the second area object and the geometric center of the overlap region may be determined, and the overlap region may be assigned to an area object corresponding to a distance having a smaller value between the first distance and the second distance (or a larger value between the first distance and the second distance).
Illustratively, in conjunction with (b) in fig. 3, if the center point of the area object corresponding to the contour 33 is P5, the center point of the area object corresponding to the contour 34 is P7, and the center point of the overlapping region of the area objects of the contour 33 and the contour 34 is P6, the ownership of the overlapping region may be determined based on the positional relationship of P5, P6, and P7.
It should be noted that, the above-mentioned S13a, S13b and S13c may be executed exclusively or in a certain sequence, and the implementation of the present disclosure is not particularly limited thereto.
Based on the scheme, the electronic device can directly traverse the position relationship of all endpoints, all edges or geometric centers of related areas belonging to the same area object in the overlapping area to determine the ownership right of the overlapping area, so that the judgment of exclusive endpoints or exclusive edges can be omitted, and the judgment of the ownership right can be performed quickly.
Optionally, in the method for determining an area contour, before the "updating the area contours of at least two area objects based on the geometric information of the overlapping regions", the following S13d may be further included, and the following S13a1 and S13b1 may be further included in the above S13:
s13d, the electronic device determines whether there is a common edge of the first area object and the second area object among the edges of the overlapping region.
The first area object and the second area object are two area objects with an overlapping area.
Illustratively, as shown in (a) in fig. 2, there is no common side of 21a and 22a in the sides of the overlapping area ABCD, as shown in (a) in fig. 3, there is no common side of 31 and 32 in the sides of the overlapping area abcde, and as shown in (b) in fig. 3, P1P2 and P3P4 in the sides of the overlapping area P1P2P3P4 are common sides of 33 and 34.
S13a1, if there is no common edge, the electronic device updates the area outline of the at least two area objects based on the exclusive end point on the boundary of each of the at least two area objects among the end points of the overlap region.
Wherein the at least two area objects are a first area object and a second area object.
S13b1, if there is a common edge, the electronic device updates the area outline of the at least two area objects based on the exclusive edge of each of the at least two area objects among the edges of the overlap region.
Based on the scheme, the electronic device may, when determining the ownership right of the overlapping region based on the geometric information, determine whether there is an overlapping side on an area contour of the area object corresponding to the overlapping region, if there is an overlapping side, directly determine the ownership right by using the exclusive side, if there is no overlapping side, directly determine the ownership right by using the exclusive endpoint, and if one of the exclusive side or the exclusive endpoint cannot be determined, continue to determine by using the other of the exclusive side or the exclusive endpoint, thereby simplifying the determination process and improving the determination efficiency of the ownership right of the overlapping region.
Optionally, in a method for determining an area profile provided in an embodiment of the present disclosure, the step S13a may be specifically performed by the following steps a1 and a 2:
and A1, the electronic equipment acquires coordinate information of a first group of end points belonging to the boundary of the first area object and coordinate information of a second group of end points belonging to the boundary of the second area object from the end points of the overlapping area.
And A2, the electronic device determines the overlapping area as the area of the first target area object according to a first preset rule based on the coordinate information of the first group of endpoints and the coordinate information of the second group of endpoints.
Wherein the first target area object is one of the first area object and the second area object.
Alternatively, the first group of endpoints may be all endpoints belonging to the boundary of the first area object in the endpoints of the overlapping area, or may be exclusive endpoints belonging to the first area object in the endpoints of the overlapping area.
For example, in the case of determination by using coordinate information of an exclusive endpoint, the first rule may be to determine the overlapping region as an area object whose sum of coordinates of the exclusive endpoint is largest among at least two area objects associated with the overlapping region; in the case of the determination using the coordinate information of all the endpoints associated with the area object, the first rule may be that, of at least two area objects associated with the overlap region, the area object with the largest sum of the coordinates of the endpoints is determined as the overlap region.
The sum of the coordinates may be the sum of Y coordinates, may be the sum of X coordinates, and may be the sum of (X, Y).
Alternatively, the electronic device may determine the magnitude relationship of the sum of the X coordinates corresponding to each area object, and then determine the magnitude relationship of the sum of the Y coordinates corresponding to each area object if the sum of the X coordinates corresponding to each area object is the same. Or determining the magnitude relation of the sum of the Y coordinates corresponding to each area object, and if the sum of the Y coordinates corresponding to each area object is the same, determining the magnitude relation of the sum of the X coordinates corresponding to each area object. The embodiment of the present disclosure is not particularly limited to this, and may be flexibly selected based on the service requirement.
In the following description, referring to fig. 2 (a), the relationship of the magnitude of the sum of Y coordinates of the end points belonging to the area objects among the end points of the overlap region is determined first, and the magnitude of the sum of X coordinates is determinedThe small relationship is described as an example. The Y coordinate of the end points determining the overlapping area ABCD belonging to 21a is Y in turnB、YC、YDSUM of Y coordinates SUM 1 ═ YB+YC+YD(ii) a The Y coordinate of the end point determining the overlapping area ABCD belonging to 22a is in turn YB、YA、YDSUM of Y coordinates SUM 2 ═ YB+YA+YD. If SUM 1>SUM 2, the overlapping area ABCD is classified as the area object corresponding to 21 a; if SUM 1<SUM 2, the overlapping area ABCD is attributed to the area object corresponding to 22 a; if SUM 1 is SUM 2, the X coordinates of the end points that determine the overlap area ABCD as belonging to 21a are in turn XB、XC、XDSUM of X coordinates SUM 3 ═ XB+XC+XD(ii) a The X coordinate of the end point determining the overlapping area ABCD belonging to 22a is X in turnB、XA、XDSUM of X coordinates SUM 4 ═ XB+XA+XD. If SUM 3>SUM 4, the overlapping area ABCD is classified as the area object corresponding to 21 a; if SUM 3<SUM 4, then the overlap area ABCD is assigned to the area object corresponding to 22 a.
In this case, the ownership right of the overlapping region may be determined based on the magnitude relationship between the sum of the coordinates of the end points belonging to the boundary of each area object among the end points of the overlapping region, or based on the magnitude relationship between the sum of the coordinates of the exclusive end points belonging to each area object among the end points of the overlapping region and the corresponding first preset rule.
Optionally, in a method for determining an area profile provided in an embodiment of the present disclosure, the step S13B may be specifically performed by the following steps B1 and B2:
b1, the electronic device acquires a first side belonging to the first area object and a second side belonging to the second area object among the sides of the overlapping area.
Wherein the first edge does not overlap with an edge of the second area object and the second edge does not overlap with an edge of the first area object.
That is, the first edge includes an exclusive edge belonging to the first area object among the edges of the overlapping region, and the second edge includes an exclusive edge belonging to the second area object among the edges of the overlapping region.
B2, the electronic device determines the overlap region as a region of the second target area object according to a second preset rule based on the coordinate information of the center point of the first edge and the coordinate information of the center point of the second edge.
Wherein the second target area object is one of the first area object and the second area object.
Optionally, the coordinate information of the central point may be a coordinate value of an X coordinate, and may also be a coordinate value of a Y coordinate, which is not specifically limited in this disclosure.
For example, the second preset rule may be that the overlapping region is determined as an area object corresponding to a side with a large coordinate value of the first side and the second side, or the overlapping region is determined as an area object corresponding to a side with a small coordinate value of the first side and the second side, and the second preset rule may be flexibly set according to a business requirement, which is not specifically limited in this embodiment of the present disclosure.
Taking an area object corresponding to a side having a large X-coordinate value and defining an overlapping area as a center point of an exclusive side as an example, with reference to (b) in fig. 3, as shown in fig. 4, 33 corresponds to the exclusive side as P2P3, a center point of P2P3 is a position of a point M2, 34 corresponds to the exclusive side as P1P4, and a center point of P1P4 is a position of a point M2, if X and P are identical, the overlapping area is defined as a center point of the exclusive side, and the center point of the exclusive side is defined as a center point of the point M2, the overlapping area is defined as an area object corresponding to the sideM1<XM2If X is equal to X, the overlapped area belongs to the area object corresponding to 33M1>XM2Then the overlap region belongs to the area object corresponding to 33.
Based on this scheme, when the electronic device determines the ownership right of the overlap region based on the geometric information of the overlap region, the ownership right of the overlap region may be determined according to the coordinate information of the center point of the exclusive edge of each area object, and a corresponding determination rule may be preset as needed, which is not specifically limited in this embodiment of the disclosure.
Fig. 5 is a schematic method flow chart of a method for determining an area profile according to an embodiment of the present disclosure, and as shown in the diagram, the method for determining an area profile may be performed according to an execution flow described below.
S500, the electronic equipment determines that the first area object and the second area object have a target overlapping area.
The area objects in the overlapping area with the first area object are determined, and for each area object in the overlapping area with the first area object, the area objects are sequentially processed according to the attribution mode of the overlapping area of the first area object and the second area object.
The electronic device first determines a first spatial priority of the first area object and the second area object, and performs S501 described below.
S501, the electronic equipment judges the relation between the primary space priority of the first area object and the primary space priority of the second area object.
If the first-level spatial priority of the first area object is different from the second-level spatial priority of the second area object, S502 and S504 described below are performed. If the first-level spatial priority of the first area object is less than the second-level spatial priority of the second area object, S503 and S504 described below are performed.
S502, the electronic equipment determines the target overlapping area as an area of the first area object.
S503, the electronic equipment determines the target overlapping area as the area of the second area object.
S504, the electronic device updates the area region of the first area object and the area region of the second area object.
It will be appreciated that the updated area region profile is the area profile of each area object.
If the first-level spatial priority of the first area object is equal to the first-level spatial priority of the second area object, S505 described below is performed.
S505, the electronic equipment judges the secondary space priority relation of the first area object and the second area object.
If the secondary spatial priority of the first area object is greater than the secondary spatial priority of the second area object, the step S502 is executed; if the secondary spatial priority of the first area object is smaller than the secondary spatial priority of the second area object, the above S503 is executed; if the second spatial priority of the first area object is equal to the second spatial priority of the second area object, S504 described below is performed.
S506, the electronic equipment judges the magnitude relation between the sum of the Y coordinates of the end points belonging to the first area object in the end points of the target overlapping area and the sum of the Y coordinates of the end points belonging to the first area object of the second area object.
If the sum of the Y coordinates of the end points corresponding to the first area object is greater than the sum of the Y coordinates of the end points corresponding to the second area object, then the above S502 is executed; if the sum of the Y coordinates of the end points corresponding to the first area object is smaller than the sum of the Y coordinates of the end points corresponding to the second area object, the above-mentioned S503 is executed; if the sum of the Y coordinates of the end points corresponding to the first area object is equal to the sum of the Y coordinates of the end points corresponding to the second area object, S507 described below is executed.
S507, the electronic equipment judges the magnitude relation between the sum of the X coordinates of the end points belonging to the first area object in the end points of the target overlapping area and the sum of the X coordinates of the end points belonging to the first area object of the second area object.
If the sum of the X coordinates of the end points corresponding to the first area object is greater than the sum of the X coordinates of the end points corresponding to the second area object, then the above S502 is executed; if the sum of the X coordinates of the end points corresponding to the first area object is smaller than the sum of the X coordinates of the end points corresponding to the second area object, the above-mentioned S503 is executed; if the sum of the X coordinates of the end points corresponding to the first area object is equal to the sum of the X coordinates of the end points corresponding to the second area object, S508 described below is performed.
S508, the electronic device determines a magnitude relationship between the coordinates of the exclusive edge belonging to the first area object and the coordinates of the exclusive edge belonging to the second area object among the edges of the target overlapping area.
If the X coordinate of the exclusive edge corresponding to the first area object is greater than the X coordinate of the exclusive edge corresponding to the second area object, the foregoing S502 is executed; if the X coordinate of the exclusive edge corresponding to the first area object is smaller than the X coordinate of the exclusive edge corresponding to the second area object, the above-mentioned S503 is executed. Or if the Y coordinate of the exclusive edge corresponding to the first area object is greater than the Y coordinate of the exclusive edge corresponding to the second area object, the foregoing S502 is executed; if the Y coordinate of the exclusive edge corresponding to the first area object is smaller than the Y coordinate of the exclusive edge corresponding to the second area object, the above-mentioned S503 is executed.
It should be noted that fig. 5 is only an exemplary execution sequence provided by the embodiment of the present disclosure, and in practical applications, the execution sequence of each determination step may be adjusted according to a service requirement, which is not specifically limited by the embodiment of the present disclosure.
It should be noted that, according to the area contour determining method provided by the embodiment of the present disclosure, the execution subject may be an area contour determining device, or a control module of the area contour determining device for executing the area contour determining method. The method for determining the area profile performed by the area profile determining apparatus in the embodiment of the present disclosure is taken as an example, and the apparatus for determining the area profile provided by the embodiment of the present disclosure is explained.
Fig. 6 is a schematic structural diagram of an area profile determining apparatus according to an embodiment of the present disclosure, and as shown in fig. 6, the area profile determining apparatus 600 includes: an acquisition module 601, a judgment module 602 and an update module 603; an obtaining module 601, configured to obtain spatial types of at least two area objects if there is an overlapping region in the area outlines of the at least two area objects; a determining module 602, configured to determine a spatial priority relationship between the at least two area objects according to the spatial type obtained by the obtaining module 601; an updating module 603, configured to update the area profiles of the at least two area objects based on the spatial priority relationship determined by the determining module 602, or based on the spatial priority relationship determined by the determining module 602 and the geometric information of the overlapping area.
Optionally, the update module is specifically configured to: and if the at least two area objects do not have a spatial priority relationship or have the same spatial priority, updating the area outlines of the at least two area objects based on the geometric information of the overlapping region.
Optionally, the update module is specifically configured to: updating the area contours of the at least two area objects based on at least one of exclusive endpoints of the associated area objects in the overlap region, exclusive edges of the associated area objects, or geometric centers of the overlap region.
Optionally, the update module is specifically configured to perform at least one of the following: updating the area contour of the at least two area objects based on an end point on a boundary of each of the at least two area objects among the end points of the overlap region; updating the area contour of the at least two area objects based on edges of the overlapping region belonging to each of the at least two area objects; and updating the area outline of the at least two area objects based on the position relation between the geometric center of the overlapping area and the geometric centers of the at least two area objects.
Optionally, in conjunction with fig. 6, as shown in fig. 7, the area profile determining apparatus 600 includes: a determination module 604; a determining module 604, configured to determine whether there is a common edge of the first area object and the second area object in edges of the overlapping region before the updating module 603 updates the area outlines of the at least two area objects based on the geometric information of the overlapping region; optionally, the updating module 603 is specifically configured to update the area outlines of the at least two area objects based on an exclusive endpoint on the boundary of each of the at least two area objects in the endpoints of the overlapping region if the determining module 604 determines that the common edge does not exist; alternatively, if the determining module 604 determines that the common edge exists, the area contour of the at least two area objects is updated based on the exclusive edge of each of the area objects belonging to the at least two area objects among the edges of the overlapping region.
Optionally, the updating module is specifically configured to obtain, from the end points of the overlapping area, coordinate information of a first group of end points that belong to the boundary of the first area object, and coordinate information of a second group of end points that belong to the boundary of the second area object; determining the overlapping area to be the area of the first target area object according to a first preset rule based on the coordinate information of the first group of endpoints and the coordinate information of the second group of endpoints; wherein the first target area object is one of the first area object and the second area object.
The embodiment of the present disclosure provides an area contour determining apparatus, where first, if there is an overlapping region in the area contours of at least two area objects, the area contour determining apparatus may obtain spatial types of the at least two area objects, then, the area contour determining apparatus obtains a spatial priority relationship of the at least two area objects based on the spatial types, and updates the contours of the at least two area objects based on the spatial priority relationship, or based on the spatial priority relationship and geometric information of the overlapping region. That is to say, the determining device of the area contour may determine which area object the overlap region belongs to according to the spatial priority order of each area object or in combination with the spatial priority order and the geometric information of the overlap region under the condition that it is determined that the area contours of the area objects overlap, and automatically determine the area contour of each area object, on one hand, the area contour corresponding to each area object actually can be rapidly generated, and the user does not need to manually judge and draw the contour of the area object any more, so that the probability of high error rate caused by manual drawing is reduced, on the other hand, when the user draws the space module based on the drawing software, the user does not need to manually draw the irregular-shaped space module, and can flexibly draw the required irregular-shaped area contour according to the user requirement through an overlapping manner based on a regular graph in combination with the determining method of the area contour provided by the embodiment of the present disclosure, the efficiency and flexibility of creating the area object are improved.
The determination means of the area profile in the embodiments of the present disclosure may be a device, or may be a component in a terminal, an integrated circuit, or a chip. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, a UMPC (ultra-mobile personal computer), a netbook, a PDA (personal digital assistant), or the like, and the non-mobile electronic device may be a server, a NAS (Network Attached Storage), a PC (personal computer), a TV (television), a teller machine, a self-service machine, or the like, and the disclosed embodiments are not limited in particular.
The area profile determining apparatus provided in the embodiment of the present disclosure can implement each process implemented by the method embodiments of fig. 1 to fig. 5, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure is further provided, and includes a processor 801, a memory 802, and a program or an instruction stored in the memory 802 and executable on the processor 801, where the program or the instruction is executed by the processor 801 to implement each process of the above-mentioned method for determining an area contour, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present disclosure includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present disclosure.
The electronic device 900 includes, but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.
Those skilled in the art will appreciate that the electronic device 900 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 910 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.
The electronic device according to the embodiment of the present disclosure can implement each process of the above method for determining an area contour, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.
It is to be understood that, in the embodiment of the present disclosure, the input Unit 904 may include a GPU (Graphics Processing Unit) 941 and a microphone 942, and the Graphics processor 941 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 906 may include a display panel 961, and the display panel 961 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes a touch panel 971 and other input devices 972. A touch panel 971, also referred to as a touch screen. The touch panel 971 may include two portions of a touch detection device and a touch controller. Other input devices 972 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. Memory 909 can be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 910 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 910.
The embodiments of the present disclosure further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above method for determining an area contour, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiment of the present disclosure further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above method for determining an area profile, and the same technical effect can be achieved, and details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present disclosure may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
The embodiments of the present disclosure further provide a computer program product including instructions, which when run on a computer, enables the computer to execute the processes of the above embodiment of the area contour determining method, and achieve the same technical effects, and therefore, the details are not repeated herein to avoid repetition.
It should be noted that, in this document, 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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it is noted that the scope of the methods and apparatus in the embodiments of the present disclosure is not limited to performing functions in the order shown or discussed, but may include performing functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present disclosure.
While the present disclosure has been described with reference to the embodiments illustrated in the drawings, which are intended to be illustrative rather than restrictive, it will be apparent to those of ordinary skill in the art in light of the present disclosure that many more modifications may be made without departing from the spirit of the disclosure and the scope of the appended claims.

Claims (10)

1. A method for determining an area profile, the method comprising:
if the area outlines of at least two area objects have an overlapping region, acquiring the space types of the at least two area objects;
judging the space priority relation of the at least two area objects according to the space type;
updating the area contours of the at least two area objects based on the spatial priority relationship or based on the spatial priority relationship and geometric information of the overlap region.
2. The method of claim 1, wherein updating the area contours of the at least two area objects based on the spatial priority relationship and the geometric information of the overlap region comprises:
and if the at least two area objects do not have a spatial priority relationship or have the same spatial priority, updating the area outlines of the at least two area objects based on the geometric information of the overlapping area.
3. The method of claim 2, wherein updating the area contours of the at least two area objects based on the geometric information of the overlapping region comprises:
updating the area contours of the at least two area objects based on at least one of exclusive endpoints of associated area objects in the overlap region, exclusive edges of associated area objects, or geometric centers of the overlap region.
4. The method according to any of claims 1 to 3, wherein said updating the area contour of said at least two area objects based on the geometrical information of said overlapping region comprises at least one of:
updating the area contour of the at least two area objects based on an end point on a boundary of each of the area objects belonging to the at least two area objects among the end points of the overlap region;
updating the area contour of the at least two area objects based on an edge of each of the at least two area objects among the edges of the overlap region;
updating the area contour of the at least two area objects based on the position relationship of the geometric center of the overlap region and the geometric centers of the at least two area objects.
5. The method of claim 4, wherein prior to updating the area contours of the at least two area objects based on the geometric information of the overlapping regions, the method further comprises:
determining whether a common edge of the first area object and the second area object exists in edges of the overlapping region;
the updating of the area contours of the at least two area objects based on the geometric information of the overlapping regions comprises:
if the common edge does not exist, updating the area outlines of the at least two area objects based on an exclusive endpoint on the boundary of each of the at least two area objects in the endpoints of the overlapping region; or,
and if the common edge exists, updating the area outlines of the at least two area objects based on the exclusive edge of each area object belonging to the at least two area objects in the edges of the overlapped region.
6. The method of claim 4, wherein updating the area contour of the at least two area objects based on the end points on the boundary of each of the area objects belonging to the at least two area objects among the end points of the overlap region comprises:
acquiring coordinate information of a first group of end points belonging to the boundary of a first area object and coordinate information of a second group of end points belonging to the boundary of a second area object in the end points of the overlapping area;
determining the overlapping region to be a region of a first target area object according to a first preset rule based on the coordinate information of the first group of endpoints and the coordinate information of the second group of endpoints;
wherein the first target area object is one of the first area object and the second area object.
7. The method according to claim 4, wherein updating the area contour of the at least two area objects based on the edge of each of the at least two area objects among the edges of the overlap region comprises:
acquiring a first side belonging to a first area object and a second side belonging to a second area object from among sides of the overlapping region; the first edge does not overlap with an edge of the second area object, the second edge does not overlap with an edge of the first area object;
determining the overlapping region as a region of a second target area object according to a second preset rule based on the coordinate information of the center point of the first edge and the coordinate information of the center point of the second edge;
wherein the second target area object is one of the first area object and the second area object.
8. An area profile determination apparatus, characterized by comprising: the device comprises an acquisition module, a judgment module and an updating module;
the acquisition module is used for acquiring the space types of at least two area objects if the area outlines of the at least two area objects have an overlapping area;
the judging module is used for judging the space priority relation of the at least two area objects according to the space type acquired by the acquiring module;
the updating module is configured to update the area profiles of the at least two area objects based on the spatial priority relationship determined by the determining module or based on the spatial priority relationship determined by the determining module and the geometric information of the overlapping area.
9. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the area profile determination method according to any one of claims 1 to 7.
10. A readable storage medium, on which a program or instructions are stored which, when executed by a processor, carry out the steps of the area profile determination method according to any one of claims 1 to 7.
CN202111543430.4A 2021-12-16 2021-12-16 Area contour determination method and device, electronic equipment and medium Pending CN114241507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111543430.4A CN114241507A (en) 2021-12-16 2021-12-16 Area contour determination method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111543430.4A CN114241507A (en) 2021-12-16 2021-12-16 Area contour determination method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN114241507A true CN114241507A (en) 2022-03-25

Family

ID=80757307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111543430.4A Pending CN114241507A (en) 2021-12-16 2021-12-16 Area contour determination method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114241507A (en)

Similar Documents

Publication Publication Date Title
US9905043B2 (en) Techniques to generate digital maps
US9916291B2 (en) Method, apparatus, and terminal device for displaying multiple input boxes in a web page where display space is limited
CN116628123B (en) Dynamic slice generation method and system based on spatial database
EP2767897B1 (en) Method for generating writing data and an electronic device thereof
CN114626134B (en) BIM-based pipeline comprehensive optimization method and device, electronic equipment and storage medium
CN114241032A (en) Area analysis-based region division method, device, equipment and storage medium
CN110619018A (en) Map overlay rarefying method, device, equipment and computer storage medium
CN112085814B (en) Electronic map display method, device, equipment and readable storage medium
CN113837194A (en) Image processing method, image processing apparatus, electronic device, and storage medium
JP5563545B2 (en) Information processing apparatus and method
CN112333329A (en) Unread information reminding method and device and electronic equipment
CN114241507A (en) Area contour determination method and device, electronic equipment and medium
EP3410389A1 (en) Image processing method and device
CN112541240A (en) Part drawing method, computer device and storage medium
CN114723894B (en) Three-dimensional coordinate acquisition method and device and electronic equipment
CN113126866B (en) Object determination method, device, electronic equipment and storage medium
CN110991050B (en) CAD (computer-aided design) image stacking method and related product
CN115222867A (en) Overlap detection method, overlap detection device, electronic equipment and storage medium
CN111885614B (en) CORS base station networking method, device and storage medium
CN114299192A (en) Method, device, equipment and medium for positioning and mapping
CN113761381A (en) Method, device and equipment for recommending interest points and storage medium
CN114139268A (en) Method and device for determining area contour, electronic equipment and medium
CN108182656B (en) Image processing method and terminal
CN111881230A (en) Rendering method and device for map area and electronic equipment
CN111625693A (en) Data processing method, device, equipment and computer readable storage medium

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