CN112200859A - Target area processing method and device, storage medium and electronic device - Google Patents

Target area processing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN112200859A
CN112200859A CN202011198167.5A CN202011198167A CN112200859A CN 112200859 A CN112200859 A CN 112200859A CN 202011198167 A CN202011198167 A CN 202011198167A CN 112200859 A CN112200859 A CN 112200859A
Authority
CN
China
Prior art keywords
target
area
triangle
vertex
target area
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
CN202011198167.5A
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.)
Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Original Assignee
Jiuling Jiangsu Digital Intelligent 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 Jiuling Jiangsu Digital Intelligent Technology Co Ltd filed Critical Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Priority to CN202011198167.5A priority Critical patent/CN112200859A/en
Publication of CN112200859A publication Critical patent/CN112200859A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles

Abstract

The invention provides a processing method and device of a target area, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring data information in a target area, wherein the data information comprises at least one of the following: coordinate information of the target area on the target display interface and size information of the target area on the target display interface; dividing the target area into a plurality of target triangles according to the data information; the method comprises the steps of determining a plurality of target areas corresponding to a plurality of target triangles according to a preset rule to obtain the size of a target area, namely, dividing the target area into a plurality of target triangles through data information to calculate the corresponding target areas, so as to accurately confirm the area of an irregular target area, thereby solving the problems that the area size of the target area cannot be accurately determined in the prior art and the like, and improving the efficiency of determining the size of the target area.

Description

Target area processing method and device, storage medium and electronic device
Technical Field
The invention relates to the technical field of building aided design, in particular to a target area processing method and device, a storage medium and an electronic device.
Background
When carrying out architectural design, often need mark the net area in indoor room, but because there is the irregularly shaped room, consequently, when carrying out room space net area mark, need carry out a large amount of data calculations, and the accuracy of calculation result is also not high, make holistic room net area when the mark, there is certain error, and when carrying out new house fitment, because the net area in room can't accurately be known, consequently, it is unclear how the actual effect of choosing furniture to arrange at home when going to furniture city and handling furniture, can't judge whether the space that leaves is too narrow, or space utilization is too low.
Aiming at the problems that the area size of a target region cannot be accurately determined and the like in the related technology, an effective technical scheme is not provided yet.
Disclosure of Invention
The embodiment of the invention provides a processing method and device of a target region, a storage medium and an electronic device, which are used for at least solving the problems that the area size of the target region cannot be accurately determined and the like in the related technology.
According to an embodiment of the present invention, there is provided a target area processing method including: acquiring data information in a target area, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface; dividing the target area into a plurality of target triangles according to the data information; and determining a plurality of target areas corresponding to the target triangles according to a preset rule so as to obtain the size of the target area.
In an exemplary embodiment, before dividing the target area into a plurality of target triangles according to the data information, the method further includes: acquiring an actual measurement unit of the target area; and determining target parameters of the data information according to the actual measurement units and the size information, wherein the target parameters are used for marking the data information.
In an exemplary embodiment, determining a plurality of target areas corresponding to the target triangles according to a preset rule to obtain the size of the target area includes: determining target areas corresponding to the plurality of target triangles by at least one of: determining a plurality of the target areas of the target triangle by means of directional areas; determining a plurality of target areas of the target triangle by means of cross products; and summing the plurality of target triangles in a concentrated manner to obtain the area of the target area.
In one exemplary embodiment, determining a plurality of the target areas of the target triangle by means of directional areas comprises: for any target triangle in the target triangles, acquiring coordinate information of a first vertex, a second vertex and a third vertex of the target triangle; wherein the coordinates of the first vertex are (x1, y1), the coordinates of the second vertex are (x2, y2), and the coordinates of the third vertex are (x3, y 3); the directed area of the target triangle is obtained by the following formula:
Figure BDA0002754585830000021
wherein the directional area is at least one of: when the first vertex, the second vertex and the third vertex of the target triangle are given in a counterclockwise mode in the target display interface, the directed area of the target triangle is a positive number; and when the first vertex, the second vertex and the third vertex of the target triangle are clockwise given in the target display interface, the directed area of the target triangle is a negative number.
In one exemplary embodiment, determining a plurality of the target areas of the target triangle by means of cross products comprises: and for any target triangle in the target triangles, circulating each edge of the target triangle to perform vector cross product operation with adjacent edges to obtain a first operation result, wherein one half of the first operation result is the target area of any target triangle.
According to another embodiment of the present invention, there is provided a processing apparatus of a target area, including: an obtaining module, configured to obtain data information in a target area, where the data information includes at least one of: coordinate information of the target area on a target display interface and size information of the target area on the target display interface; the dividing module is used for dividing the target area into a plurality of target triangles according to the data information; and the determining module is used for determining a plurality of target areas corresponding to the plurality of target triangles according to a preset rule so as to obtain the size of the target area.
In an exemplary embodiment, the apparatus further includes: the marking module is used for acquiring the actual measurement unit of the target area; and determining target parameters of the data information according to the actual measurement units and the size information, wherein the target parameters are used for marking the data information.
In an exemplary embodiment, the determining module is further configured to determine the target areas corresponding to the plurality of target triangles by at least one of: determining a plurality of the target areas of the target triangle by means of directional areas; determining a plurality of target areas of the target triangle by means of cross products; and summing the plurality of target triangles in a concentrated manner to obtain the area of the target area.
In an exemplary embodiment, the determining module is further configured to, for any target triangle in the plurality of target triangles, obtain coordinate information of a first vertex, a second vertex, and a third vertex of the any target triangle; wherein the coordinates of the first vertex are (x1, y1), the coordinates of the second vertex are (x2, y2), and the coordinates of the third vertex are (x3, y 3); the directed area of the target triangle is obtained by the following formula:
Figure BDA0002754585830000031
Figure BDA0002754585830000032
wherein the directional area is at least one of: when the first vertex of the target triangle isWhen the second vertex and the third vertex are given anticlockwise in the target display interface, the directed area of the target triangle is positive; and when the first vertex, the second vertex and the third vertex of the target triangle are clockwise given in the target display interface, the directed area of the target triangle is a negative number.
In an exemplary embodiment, the determining module is further configured to, for any target triangle in the plurality of target triangles, loop each edge of the target triangle and an adjacent edge to perform a cross product vector operation to obtain a first operation result, where one half of the first operation result is the target area of the any target triangle.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, data information in the target area is acquired, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface; dividing the target area into a plurality of target triangles according to the data information; the target areas corresponding to the target triangles are determined according to a preset rule to obtain the size of the target area, that is, the target area is divided into the target triangles through the data information to calculate the corresponding target areas, so that the areas of the irregular target areas can be accurately determined, the problems that the area size of the target area cannot be accurately determined in the prior art and the like can be solved, and the efficiency of determining the size of the target area is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a target area processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of processing a target area according to an embodiment of the invention;
FIG. 3 is a schematic view of a room-only design on a floor level according to an alternative embodiment of the present invention;
FIG. 4 is a schematic view of a design with only rooms on a floor level according to an alternative embodiment of the present invention (two);
FIG. 5 is a schematic diagram of a directed area calculation arbitrarily given a triangle, according to an alternative embodiment of the present invention;
FIG. 6 is a schematic illustration of a directed area calculation of the area of an arbitrary polygon in accordance with an alternative embodiment of the present invention;
FIG. 7 is a schematic illustration of a directed area calculation of a concave polygon in accordance with an alternative embodiment of the present invention;
fig. 8 is a block diagram of a processing apparatus of a target area according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the embodiment of the application can be executed in a computer terminal or a similar operation device of an equipment terminal. Taking the example of being operated on a computer terminal, fig. 1 is a hardware structure block diagram of a computer terminal of a processing method of a target area according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the processing method of the target area in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In the present embodiment, a method for processing a target area is provided, and fig. 2 is a flowchart of the method for processing the target area according to the embodiment of the present invention, where the flowchart includes the following steps:
step S202, acquiring data information in the target area, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface;
step S204, dividing the target area into a plurality of target triangles according to the data information;
step S206, determining a plurality of target areas corresponding to the plurality of target triangles according to a preset rule to obtain the size of the target area.
Through the steps, data information in the target area is obtained, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface; dividing the target area into a plurality of target triangles according to the data information; the target areas corresponding to the target triangles are determined according to a preset rule to obtain the size of the target area, that is, the target area is divided into the target triangles through the data information to calculate the corresponding target areas, so that the areas of the irregular target areas can be accurately determined, the problems that the area size of the target area cannot be accurately determined in the prior art and the like can be solved, and the efficiency of determining the size of the target area is improved.
The data information in the target area is the display of the whole structure of the target area on the target display interface; the target display interface can be any display interface of a computing terminal or equipment for displaying and presenting data information, and can also be an operation interface of related target application; in addition, when the target area is divided into a plurality of target triangles through the target data, the application files in the target library can be called, and the target area can be quickly divided according to the setting parameters in the relevant application files.
In an exemplary embodiment, before dividing the target area into a plurality of target triangles according to the data information, the method further includes: acquiring an actual measurement unit of the target area; and determining target parameters of the data information according to the actual measurement units and the size information, wherein the target parameters are used for marking the data information.
In order to enable the area of the obtained target region to be more fit with the actual situation and provide an accurate reference value for the actual target region, when the target region is processed, the actual measurement of the target region is acquired, and then the data information in the target region is labeled according with the actual situation by combining with the size information on the target display interface.
In an exemplary embodiment, determining a plurality of target areas corresponding to the target triangles according to a preset rule to obtain the size of the target area includes: determining target areas corresponding to the plurality of target triangles by at least one of: determining a plurality of the target areas of the target triangle by means of directional areas; determining a plurality of target areas of the target triangle by means of cross products; and summing the plurality of target triangles in a concentrated manner to obtain the area of the target area.
That is to say, after the target region is divided into target triangles, in order to ensure that the calculation result of the target region is obtained quickly, a preset target triangle calculation rule is called to realize quick summation confirmation of the target region, and according to different calculation modes, the embodiment of the invention provides two calculation modes of the target triangle, wherein the calculation modes are calculated through directed area calculation or through a mode of solving the cross product of the adjacent edges of the triangle.
It should be noted that the calculation method in the embodiment of the present invention is only a preferable method, and there may be other methods of calculating the target triangle.
In one exemplary embodiment, the target three is determined by means of a directional areaAn angular plurality of said target areas, comprising: for any target triangle in the target triangles, acquiring coordinate information of a first vertex, a second vertex and a third vertex of the target triangle; wherein the coordinates of the first vertex are (x1, y1), the coordinates of the second vertex are (x2, y2), and the coordinates of the third vertex are (x3, y 3); the directed area of the target triangle is obtained by the following formula:
Figure BDA0002754585830000081
wherein the directional area is at least one of: when the first vertex, the second vertex and the third vertex of the target triangle are given in a counterclockwise mode in the target display interface, the directed area of the target triangle is a positive number; and when the first vertex, the second vertex and the third vertex of the target triangle are clockwise given in the target display interface, the directed area of the target triangle is a negative number.
In short, when the area of the target triangle is determined in the directed area mode, the positive and negative of the directed area of the target triangle which needs to be subjected to target calculation can be determined according to the coordinate information of the target area on the target display interface, so that the less calculation and the wrong calculation of the area of the target area are avoided, and the more accurate area of the target area is obtained.
In one exemplary embodiment, determining a plurality of the target areas of the target triangle by means of cross products comprises: and for any target triangle in the target triangles, circulating each edge of the target triangle to perform vector cross product operation with adjacent edges to obtain a first operation result, wherein one half of the first operation result is the target area of any target triangle.
In the two-dimensional space, the value of the determinant formed by the two-dimensional vectors is equal to the area of the parallelogram formed by the two vectors, namely in the two-dimensional space, the value of the determinant formed by the two-dimensional vectors is equal to the cross product of the two-dimensional vectors, therefore, a first operation result representing the area of the parallelogram comprising two adjacent sides of the triangle is obtained by circulating each side of the target triangle and performing vector cross product operation on the adjacent sides, half of the area of the parallelogram is the area of the target triangle, and the area of a target area comprising all the target triangles can be accurately and effectively determined through multi-vector cross product operation.
In order to better understand the process of the processing method of the target area, the following describes a flow of the processing method of the target area with reference to an alternative embodiment.
In an optional embodiment of the present invention, a method for processing a target region is mainly provided, where a developed related algorithm for calculating a polygonal area is encapsulated, and when a target object performs calculation on a target area of a target region, the encapsulated related algorithm is called from a database file, and an area result of the target region is quickly obtained according to corresponding parameters transmitted from a related function interface, that is, by calling an encapsulated function.
Optionally, the processing method of the target area may be applied to labeling of each room area on the design drawing.
For example, fig. 3 is a schematic design diagram of only rooms on a floor plane, at this time, a designer needs to mark an area schematic diagram of each room on each floor on a design drawing, determine a bounding region (polygon) of a room by calling a polygon area algorithm and calculate an area of the region to obtain a room area, and call an encapsulated correlation algorithm in a database file to calculate a schematic design diagram of only rooms on the floor plane, as shown in fig. 4.
It should be noted that the specific flow of algorithm calculation is as follows:
given arbitrarily a triangle Δ ABC with its vertex coordinates a (x1, y1), B (x2, y2), C (x3, y3), then the directional area of Δ ABC can be expressed as:
Figure BDA0002754585830000091
where Δ ABC apex A, B, C is positive for a clockwise given area and negative for a clockwise given area. As shown in FIG. 5Shows, S Δ ABC>0、SΔABD<0。
Any polygon can be divided into a plurality of triangles, and the area of any polygon can be obtained according to the triangle area formula. The hexagonal vertex coordinates shown in fig. 6 are O (x0, y0), a (x1, y1), B (x2, y2), C (x3, y3), D (x4, y4), E (x5, y5), respectively, and the area thereof can be expressed as the sum of the areas of four triangles:
S=SΔOAB+SΔOBC+SΔOCD+SΔODE。
optionally, the above calculation method is not only applicable to convex polygons but also applicable to concave polygons, as shown in fig. 7: in the above idea, the concave polygon area is expressed as S Δ OAB + S Δ OBC + S Δ OCD, and S Δ OAB — S Δ OBA <0 is known from the directional area, and the above equation is true, that is, the equation is also applicable to the concave polygon.
Further, the area of the triangle may be calculated by using a cross product, and the geometric concept of the two-dimensional cross product is a vector whose modulo is used to represent the area of the parallelogram formed by a and B, where a x1 y2-x2 y1, and the area of the two triangles may be obtained.
Through the above analysis, given any polygon, its area can be expressed as: (the sum of cross products of each edge of the loop and the adjacent edge)/2.
In summary, according to the optional embodiment of the present invention, by providing the relevant algorithm for completing the area calculation of the polygon, the algorithm is directly invoked during use, and the function is not required to be designed and implemented by the developer, so that the development time of the developer is reduced, the development efficiency is improved, the user experience is improved, and the unnecessary calculation time is reduced.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention 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 device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a processing apparatus for a target area is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of a processing apparatus of a target area according to an embodiment of the present invention, as shown in fig. 8, the apparatus including:
(1) an obtaining module 82, configured to obtain data information in a target area, where the data information includes at least one of: coordinate information of the target area on a target display interface and size information of the target area on the target display interface;
(2) a dividing module 84, configured to divide the target area into a plurality of target triangles according to the data information;
(3) the determining module 86 is configured to determine a plurality of target areas corresponding to the plurality of target triangles according to a preset rule, so as to obtain the size of the target area.
By the device, data information in the target area is acquired, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface; dividing the target area into a plurality of target triangles according to the data information; the target areas corresponding to the target triangles are determined according to a preset rule to obtain the size of the target area, that is, the target area is divided into the target triangles through the data information to calculate the corresponding target areas, so that the areas of the irregular target areas can be accurately determined, the problems that the area size of the target area cannot be accurately determined in the prior art and the like can be solved, and the efficiency of determining the size of the target area is improved.
The data information in the target area is the display of the whole structure of the target area on the target display interface; the target display interface can be any display interface of a computing terminal or equipment for displaying and presenting data information, and can also be an operation interface of related target application; in addition, when the target area is divided into a plurality of target triangles through the target data, the application files in the target library can be called, and the target area can be quickly divided according to the setting parameters in the relevant application files.
In an exemplary embodiment, the apparatus further includes: the marking module is used for acquiring the actual measurement unit of the target area; and determining target parameters of the data information according to the actual measurement units and the size information, wherein the target parameters are used for marking the data information.
In order to enable the area of the obtained target region to be more fit with the actual situation and provide an accurate reference value for the actual target region, when the target region is processed, the actual measurement of the target region is acquired, and then the data information in the target region is labeled according with the actual situation by combining with the size information on the target display interface.
In an exemplary embodiment, the determining module is further configured to determine the target areas corresponding to the plurality of target triangles by at least one of: determining a plurality of the target areas of the target triangle by means of directional areas; determining a plurality of target areas of the target triangle by means of cross products; and summing the plurality of target triangles in a concentrated manner to obtain the area of the target area.
That is to say, after the target region is divided into target triangles, in order to ensure that the calculation result of the target region is obtained quickly, a preset target triangle calculation rule is called to realize quick summation confirmation of the target region, and according to different calculation modes, the embodiment of the invention provides two calculation modes of the target triangle, wherein the calculation modes are calculated through directed area calculation or through a mode of solving the cross product of the adjacent edges of the triangle.
It should be noted that the calculation method in the embodiment of the present invention is only a preferable method, and there may be other methods of calculating the target triangle.
In an exemplary embodiment, the determining module is further configured to, for any target triangle in the plurality of target triangles, obtain coordinate information of a first vertex, a second vertex, and a third vertex of the any target triangle; wherein the coordinates of the first vertex are (x1, y1), the coordinates of the second vertex are (x2, y2), and the coordinates of the third vertex are (x3, y 3); the directed area of the target triangle is obtained by the following formula:
Figure BDA0002754585830000121
Figure BDA0002754585830000122
wherein the directional area is at least one of: when the first vertex, the second vertex and the third vertex of the target triangle are given in a counterclockwise mode in the target display interface, the directed area of the target triangle is a positive number; and when the first vertex, the second vertex and the third vertex of the target triangle are clockwise given in the target display interface, the directed area of the target triangle is a negative number.
In short, when the area of the target triangle is determined in the directed area mode, the positive and negative of the directed area of the target triangle which needs to be subjected to target calculation can be determined according to the coordinate information of the target area on the target display interface, so that the less calculation and the wrong calculation of the area of the target area are avoided, and the more accurate area of the target area is obtained.
In an exemplary embodiment, the determining module is further configured to, for any target triangle in the plurality of target triangles, loop each edge of the target triangle and an adjacent edge to perform a cross product vector operation to obtain a first operation result, where one half of the first operation result is the target area of the any target triangle.
In the two-dimensional space, the value of the determinant formed by the two-dimensional vectors is equal to the area of the parallelogram formed by the two vectors, namely in the two-dimensional space, the value of the determinant formed by the two-dimensional vectors is equal to the cross product of the two-dimensional vectors, therefore, a first operation result representing the area of the parallelogram comprising two adjacent sides of the triangle is obtained by circulating each side of the target triangle and performing vector cross product operation on the adjacent sides, half of the area of the parallelogram is the area of the target triangle, and the area of a target area comprising all the target triangles can be accurately and effectively determined through multi-vector cross product operation.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
In an exemplary embodiment, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring data information in the target area, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface;
s2, dividing the target area into a plurality of target triangles according to the data information;
s3, determining a plurality of target areas corresponding to the target triangles according to a preset rule to obtain the size of the target area.
In an exemplary embodiment, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an exemplary embodiment, in the present embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring data information in the target area, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface;
s2, dividing the target area into a plurality of target triangles according to the data information;
s3, determining a plurality of target areas corresponding to the target triangles according to a preset rule to obtain the size of the target area.
In an exemplary embodiment, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details of this embodiment are not described herein again.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, which may be centralized on a single computing device or distributed across a network of computing devices, and in one exemplary embodiment may be implemented using program code executable by a computing device, such that the steps shown and described may be executed by a computing device stored in a memory device and, in some cases, executed in a sequence different from that shown and described herein, or separately fabricated into individual integrated circuit modules, or multiple ones of them fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of processing a target area, comprising:
acquiring data information in a target area, wherein the data information comprises at least one of the following: coordinate information of the target area on a target display interface and size information of the target area on the target display interface;
dividing the target area into a plurality of target triangles according to the data information;
and determining a plurality of target areas corresponding to the target triangles according to a preset rule so as to obtain the size of the target area.
2. The method of claim 1, wherein before dividing the target area into a plurality of target triangles based on the data information, the method further comprises:
acquiring an actual measurement unit of the target area;
and determining target parameters of the data information according to the actual measurement units and the size information, wherein the target parameters are used for marking the data information.
3. The method of claim 1, wherein determining a plurality of target areas corresponding to the plurality of target triangles according to a preset rule to obtain the size of the target area comprises:
determining target areas corresponding to the plurality of target triangles by at least one of: determining a plurality of the target areas of the target triangle by means of directional areas; determining a plurality of target areas of the target triangle by means of cross products;
and summing the plurality of target triangles in a concentrated manner to obtain the area of the target area.
4. The method of claim 3, wherein determining a plurality of the target areas of the target triangle by directional area comprises:
for any target triangle in the target triangles, acquiring coordinate information of a first vertex, a second vertex and a third vertex of the target triangle; wherein the coordinates of the first vertex are (x1, y1), the coordinates of the second vertex are (x2, y2), and the coordinates of the third vertex are (x3, y 3);
the directed area of the target triangle is obtained by the following formula:
Figure FDA0002754585820000021
wherein the directional area is at least one of: when the first vertex, the second vertex and the third vertex of the target triangle are given in a counterclockwise mode in the target display interface, the directed area of the target triangle is a positive number; and when the first vertex, the second vertex and the third vertex of the target triangle are clockwise given in the target display interface, the directed area of the target triangle is a negative number.
5. The method of claim 3, wherein determining a plurality of the target areas of the target triangle by means of cross products comprises:
and for any target triangle in the target triangles, circulating each edge of the target triangle to perform vector cross product operation with adjacent edges to obtain a first operation result, wherein one half of the first operation result is the target area of any target triangle.
6. An apparatus for processing a target area, comprising:
an obtaining module, configured to obtain data information in a target area, where the data information includes at least one of: coordinate information of the target area on a target display interface and size information of the target area on the target display interface;
the dividing module is used for dividing the target area into a plurality of target triangles according to the data information;
and the determining module is used for determining a plurality of target areas corresponding to the plurality of target triangles according to a preset rule so as to obtain the size of the target area.
7. The apparatus of claim 6, further comprising: the marking module is used for acquiring the actual measurement unit of the target area; and determining target parameters of the data information according to the actual measurement units and the size information, wherein the target parameters are used for marking the data information.
8. The apparatus of claim 6, wherein the determining module is further configured to determine the target areas corresponding to the plurality of target triangles by at least one of: determining a plurality of the target areas of the target triangle by means of directional areas; determining a plurality of target areas of the target triangle by means of cross products; and summing the plurality of target triangles in a concentrated manner to obtain the area of the target area.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 5 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 5.
CN202011198167.5A 2020-10-30 2020-10-30 Target area processing method and device, storage medium and electronic device Pending CN112200859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011198167.5A CN112200859A (en) 2020-10-30 2020-10-30 Target area processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011198167.5A CN112200859A (en) 2020-10-30 2020-10-30 Target area processing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN112200859A true CN112200859A (en) 2021-01-08

Family

ID=74010680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011198167.5A Pending CN112200859A (en) 2020-10-30 2020-10-30 Target area processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112200859A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104361228A (en) * 2014-11-06 2015-02-18 中国科学院广州能源研究所 New method for calculating terrestrial heat resource quantity of dry heat rock
CN106127820A (en) * 2016-06-30 2016-11-16 北京合众思壮科技股份有限公司 The area of a kind of irregular terrain profiles determines method and device
CN108320241A (en) * 2018-01-10 2018-07-24 厦门天海图汇信息科技有限公司 The area of house property point family figure determines method and system
CN109671116A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 House Property Area Surveying calculation method and relevant device based on image recognition
CN110189311A (en) * 2019-05-24 2019-08-30 中国南方电网有限责任公司超高压输电公司检修试验中心 A kind of calculation method of transmission line of electricity screen of trees hidden danger region trees felling area

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104361228A (en) * 2014-11-06 2015-02-18 中国科学院广州能源研究所 New method for calculating terrestrial heat resource quantity of dry heat rock
CN106127820A (en) * 2016-06-30 2016-11-16 北京合众思壮科技股份有限公司 The area of a kind of irregular terrain profiles determines method and device
CN108320241A (en) * 2018-01-10 2018-07-24 厦门天海图汇信息科技有限公司 The area of house property point family figure determines method and system
CN109671116A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 House Property Area Surveying calculation method and relevant device based on image recognition
CN110189311A (en) * 2019-05-24 2019-08-30 中国南方电网有限责任公司超高压输电公司检修试验中心 A kind of calculation method of transmission line of electricity screen of trees hidden danger region trees felling area

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
史宇宏: "《中文版AutoCAD 2012从入门到精通》", 30 November 2011, 兵器工业出版社北京希望电子出版社 *
平艳茹等: "《高等数学习题指导书》", 30 April 2016, 北京工业大学出版社 *
杨之: "《数学 统计学系统 一般折线几何学》", 31 August 2015, 哈尔滨工业大学出版社 *

Similar Documents

Publication Publication Date Title
CN105338537B (en) A kind of method and terminal of the shared analysis of newly-increased base station site
CN109918205A (en) A kind of edge device dispatching method, system, device and computer storage medium
CN115017859B (en) Layout generation method and device, computer readable storage medium and computer equipment
CN111127612A (en) Game scene node updating method and device, storage medium and electronic equipment
CN116050338A (en) Non-through-flow copper sheet identification method and device, storage medium and electronic device
CN110082713A (en) Localization method, terminal device and storage medium
CN113034688B (en) Three-dimensional map model generation method and device
CN112785676B (en) Image rendering method, device, equipment and storage medium
CN112200859A (en) Target area processing method and device, storage medium and electronic device
EP3410389A1 (en) Image processing method and device
CN107393019B (en) Particle-based cloth simulation method and device
CN109756970B (en) Proximity relation wireless signal positioning method, device, equipment and storage medium
CN112200860B (en) Object position relation determining method and device, storage medium and electronic device
CN110544159A (en) map information processing method and device, readable storage medium and electronic equipment
CN112200861B (en) Method and device for determining column type, storage medium and electronic equipment
CN109362027B (en) Positioning method, device, equipment and storage medium
CN113313809A (en) Rendering method and device
CN112231819B (en) Method and device for determining coplanarity of line segments, storage medium and electronic device
CN117115383B (en) Lighting lamp arrangement method, computer device and readable storage medium
CN110730503B (en) Positioning method and device
CN110580248A (en) Data management method and device based on rule base expansion
CN111611782B (en) Connection point generation method and device
CN109801332A (en) Determine the method and apparatus of Minkowski dimension
US11579929B2 (en) Cross platform application flow orchestration by transmitting the application flow including a transition rule to a plurality of computation layers
CN111915640B (en) Method and device for determining candidate frame scale, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 701, East Building, innovation and Research Center, 8 Yanzheng West Avenue, Wujin District, Changzhou City, Jiangsu Province, 213100

Applicant after: Jiuling (Jiangsu) Digital Intelligent Technology Co.,Ltd.

Address before: Room d1-9999, 58 Fumin Branch Road, Hengsha Township, Chongming District, Shanghai, 201914 (Shanghai Hengtai Economic Development Zone)

Applicant before: Jiuling (Jiangsu) Digital Intelligent Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210108