Method and device for calculating point location at upper left corner of any graph

By calculating the upper left point of the irregular figure in the field of surveying and mapping, the problem of inconsistent calculation results and graph recognition habits in the prior art is solved, and the upper left point calculation that is more accurate and conforms to graph recognition habits is achieved.

CN119579682APending Publication Date: 2025-03-07QINGHAI INST OF GEOLOGICAL SURVEYING MAPPING & GEOINFORMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411566646.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the field of surveying and mapping, it is difficult to accurately calculate the upper left point of irregular figures, resulting in inconsistent with people's graph recognition habits.

Method used

By virtualizing a first coordinate system, using the center of the rectangular outer envelope as the origin, a second coordinate system is formed in each figure, and the points falling in the fourth quadrant are calculated in the second coordinate system, and the upper left corner point is determined based on the point with the smallest fold angle.

Benefits of technology

The upper left corner calculated in the field of surveying and mapping is realized that the graph recognition habit is closer to people, and the accuracy of the calculation results and the percentage that conforms to the graph recognition habit is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579682A_ABST
    Figure CN119579682A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for calculating a point position at the upper left corner of any graph. The method comprises the following steps of: virtualizing a first coordinate system in each graph by taking the center of an outer envelope line of a rectangle as an original point; according to the graphic characteristics, a unified offset is given, and a second coordinate system is formed; on the basis of the second coordinate system, calculating a point position falling in a fourth quadrant, and then calculating a point position with a minimum break angle, namely a left upper corner point; and adjusting the offset between the second coordinate system and the first coordinate system to control the coverage range of the fourth quadrant, and finding out the point with the minimum break angle from the fourth quadrant, thereby finding out the left upper corner point which most conforms to the drawing identification habit. According to the method and the device for calculating the left upper corner point of the arbitrary graph, the left upper corner point found during drawing in the surveying and mapping field is closer to the drawing recognition habit of people.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to surveying and mapping technology, and in particular to a method and device for calculating the position of the upper left corner of an arbitrary figure. Background Art

[0002] At present, in the field of surveying and mapping, there is a concept of "upper left corner". For example, the numbering of boundary points starts from the upper left corner. However, this is a vague concept. When the graphics are irregular, it is difficult to define the position of the "upper left corner". Existing studies are based on the maximum rectangle of the outer contour of the graphics (graphic envelope), and the point closest to the upper left corner of the rectangle is calculated as the upper left corner. However, the result of this treatment is that when the graphics are irregular, the upper left corner point obtained is often inconsistent with the upper left corner that people normally perceive. See Figure 1 In the figure, the pink line is the figure whose upper left corner needs to be calculated, the outer black rectangle is the envelope of the figure, and the red position of point 1 is the upper left corner point obtained by the existing method. However, under normal circumstances, the upper left corner point of this figure is more in line with people's image recognition habits at point 2, because the position of the point in the overall figure, the size of the angle, etc. must be comprehensively considered. Summary of the invention

[0003] The main purpose of the present invention is to provide a method and device for calculating the upper left corner point of any figure, so that the upper left corner point found when mapping in the surveying and mapping field is closer to people's map recognition habits.

[0004] According to one aspect of the present invention, a method for calculating the position of the upper left corner of an arbitrary graphic is provided, comprising: A first coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; According to the characteristics of the graphics, a uniform offset is given to form a second coordinate system; Calculate the point in the fourth quadrant based on the second coordinate system, and then calculate the point with the smallest angle, which is the upper left corner. Adjust the offset between the second coordinate system and the first coordinate system to control the coverage of the fourth quadrant, and then find the point with the smallest angle in the fourth quadrant, so as to find the upper left corner point that best conforms to the image recognition habit.

[0005] According to another aspect of the present invention, there is provided a device for calculating the position of the upper left corner of any graphic, comprising: A virtual coordinate system unit, which virtualizes a first coordinate system in each figure with the center of the outer envelope of the rectangle as the origin; The new coordinate system unit gives a uniform offset according to the characteristics of the graphics to form a second coordinate system; The point calculation unit calculates the point that falls in the fourth quadrant based on the second coordinate system, and then calculates the point with the smallest angle, which is the upper left corner point; The point determination unit adjusts the offset between the second coordinate system and the first coordinate system to control the coverage of the fourth quadrant, and then finds the point with the smallest angle from the fourth quadrant, thereby finding the upper left corner point that best conforms to the image recognition habit.

[0006] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described above.

[0007] According to another aspect of the present invention, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described is implemented.

[0008] Advantages of the present invention: The present invention provides a method and device for calculating the upper left corner point of an arbitrary figure, so that the upper left corner point found when making a map in the surveying and mapping field is closer to people's map recognition habits.

[0009] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0011] Figure 1 This is a schematic diagram of the point position of the point currently calculated to be closest to the upper left corner of the rectangle; Figure 2 It is a schematic diagram of plot a of the present invention, in which a coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; Figure 3 It is a schematic diagram of plot b of the present invention, in which a coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; Figure 4 It is a schematic diagram of plot c of the present invention, in which a coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; Figure 5 It is a schematic diagram of a plot of d in the present invention, in which a coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; Figure 6 It is a schematic diagram of the e plot of the present invention, in which a coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; Figure 7 It is a schematic diagram of a figure of the present invention that is biased in one direction as a whole and has a similar shape; Figure 8 It is a schematic diagram of the upper left corner points of 5 graphics found by the method of the present invention. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0013] refer to Figures 2 to 8 A method for calculating the upper left corner point of an arbitrary graphic, comprising: A first coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; According to the characteristics of the graphics, a uniform offset is given to form a second coordinate system; Calculate the point in the fourth quadrant based on the second coordinate system, and then calculate the point with the smallest angle, which is the upper left corner. Adjust the offset between the second coordinate system and the first coordinate system to control the coverage of the fourth quadrant, and then find the point with the smallest angle in the fourth quadrant, so as to find the upper left corner point that best conforms to the image recognition habit.

[0014] A device for calculating the position of the upper left corner of an arbitrary graphic, comprising: A virtual coordinate system unit, which virtualizes a first coordinate system in each figure with the center of the outer envelope of the rectangle as the origin; The new coordinate system unit gives a uniform offset according to the characteristics of the graphics to form a second coordinate system; The point calculation unit calculates the point that falls in the fourth quadrant based on the second coordinate system, and then calculates the point with the smallest angle, which is the upper left corner point; The point determination unit adjusts the offset between the second coordinate system and the first coordinate system to control the coverage of the fourth quadrant, and then finds the point with the smallest angle from the fourth quadrant, thereby finding the upper left corner point that best conforms to the image recognition habit.

[0015] A computer-readable storage medium stores a computer program, which, when executed in a computer, causes the computer to execute the method described.

[0016] A computing device includes a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method described is implemented.

[0017] The basic idea of ​​the present invention is: A virtual coordinate system is created in each figure with the center of the outer envelope of the rectangle as the origin (e.g. Figures 2 to 6Then, according to the characteristics of the graphics, a uniform offset is given (in the example, the vertical offset is +19, and the horizontal offset is +20) to form a new coordinate system (such as Figures 2 to 6 The coordinate system established by the green line in the middle is shown in the figure), and based on the green coordinate system, the point that falls in the fourth quadrant is calculated, and then the point with the smallest angle is calculated, which is the upper left corner.

[0018] In the maps of surveying and mapping, the buildings, plots and other graphics in each area have certain rules, such as overall leaning in one direction, similar shapes, etc. ( Figure 7 The blue lines indicate that the azimuth of each plot is basically the same, and the shape is also long from north to south and short from east to west). At this time, you can adjust the offset between the green coordinate system and the red coordinate system to control the coverage of the fourth quadrant, and then find the point with the smallest angle from the fourth quadrant, so as to find the upper left corner point that best conforms to the map recognition habit.

[0019] The upper left corners of the five figures found by this algorithm are as follows: Figure 8 As shown by the red dots in .

[0020] This method has been effectively applied in the data processing of forest plots in Qinghai. After processing the plots, as long as the coordinate system offset and the minimum angle size are selected according to the graphic features, 95% of the upper left corner points of the graphics found are in line with the image recognition habits.

[0021] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for calculating the upper left corner position of an arbitrary figure, characterized in that: include: A first coordinate system is virtualized in each figure with the center of the outer envelope of the rectangle as the origin; According to the characteristics of the graphics, a uniform offset is given to form a second coordinate system; Calculate the point in the fourth quadrant based on the second coordinate system, and then calculate the point with the smallest angle, which is the upper left corner. Adjust the offset between the second coordinate system and the first coordinate system to control the coverage of the fourth quadrant, and then find the point with the smallest angle in the fourth quadrant, so as to find the upper left corner point that best conforms to the image recognition habit.

2. A device for calculating the position of the upper left corner of any graphic, characterized in that: include: A virtual coordinate system unit, which virtualizes a first coordinate system in each figure with the center of the outer envelope of the rectangle as the origin; The new coordinate system unit gives a uniform offset according to the characteristics of the graphics to form a second coordinate system; The point calculation unit calculates the point that falls in the fourth quadrant based on the second coordinate system, and then calculates the point with the smallest angle, which is the upper left corner point; The point determination unit adjusts the offset between the second coordinate system and the first coordinate system to control the coverage of the fourth quadrant, and then finds the point with the smallest angle from the fourth quadrant, thereby finding the upper left corner point that best conforms to the image recognition habit.

3. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method described in claim 1.

4. A computing device, characterized in that The invention comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method described in claim 1 is implemented.