CN117109459A - Distance measurement method, device, equipment and medium based on virtual measurement scale - Google Patents

Distance measurement method, device, equipment and medium based on virtual measurement scale Download PDF

Info

Publication number
CN117109459A
CN117109459A CN202310911549.5A CN202310911549A CN117109459A CN 117109459 A CN117109459 A CN 117109459A CN 202310911549 A CN202310911549 A CN 202310911549A CN 117109459 A CN117109459 A CN 117109459A
Authority
CN
China
Prior art keywords
scale
line segment
point
measured point
length
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
CN202310911549.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.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center 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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202310911549.5A priority Critical patent/CN117109459A/en
Publication of CN117109459A publication Critical patent/CN117109459A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/14Measuring arrangements characterised by the use of optical techniques for measuring distance or clearance between spaced objects or spaced apertures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/002Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B5/00Measuring arrangements characterised by the use of mechanical techniques
    • G01B5/14Measuring arrangements characterised by the use of mechanical techniques for measuring distance or clearance between spaced objects or spaced apertures

Abstract

The invention relates to the technical field of integrated circuits, and discloses a distance measurement method, a device, equipment and a storage medium based on a virtual measurement scale, which comprise the following steps: acquiring pixel coordinates of a first to-be-measured point and a second to-be-measured point; drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point; drawing a second line segment on the first line segment according to a first step length based on the length and the azimuth angle of the first line segment to obtain a scale mark; based on the length of the first line segment, marking the scale marks according to the second step length to obtain a virtual measurement scale; determining the distance between a first to-be-measured point and a second to-be-measured point based on the virtual measurement scale; the invention can improve the accuracy and efficiency of the dimension measurement of each component and among components in the quantum chip design, and provides guarantee for the normal operation, smooth manufacture, cost saving and system stability of the quantum chip.

Description

Distance measurement method, device, equipment and medium based on virtual measurement scale
Technical Field
The invention relates to the technical field of integrated circuits, in particular to a distance measurement method, device and equipment based on a virtual measurement scale and a storage medium.
Background
In the electronic design automation process of quantum chip design, chip designers need to know precisely the width and height of each component, and the spacing distance between components. At this time, a designer is required to perform approximate reading according to a fixed scale, and no third party component which can be directly used is available, so that the workload of calculating the distance between components in the design process of the designer is increased, and the problem of lower calculation accuracy is solved.
Disclosure of Invention
In view of the above, the invention provides a distance measurement method, device, equipment and storage medium based on a virtual measurement scale, so as to solve the problems that in the existing quantum chip design process, a designer is required to perform approximate reading according to a fixed scale, and no third party component can be directly used, thereby increasing the workload of component distance calculation in the designer design process and having lower calculation accuracy.
In a first aspect, the present invention provides a distance measurement method based on a virtual measurement scale, the method comprising: acquiring pixel coordinates of a first to-be-measured point and a second to-be-measured point; the first to-be-measured point and the second to-be-measured point are two points on the same component graph or two points on different component graphs; drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point; drawing a second line segment on the first line segment according to a first step length based on the length and the azimuth angle of the first line segment to obtain a scale mark; based on the length of the first line segment, marking the scale marks according to the second step length to obtain a virtual measurement scale; and determining the distance between the first to-be-measured point and the second to-be-measured point based on the virtual measurement scale. Through the process, the accuracy and the efficiency of size measurement among components in the quantum chip design can be improved, and guarantees are provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip.
In an alternative embodiment, based on the length and azimuth of the first line segment, drawing the second line segment on the first line segment according to the first step length to obtain the scale line, including:
calculating the length and azimuth angle of the first line segment;
determining an indication direction and a measurement length of the first line segment based on the length and the azimuth angle of the first line segment;
determining a first step length based on the indication direction and the measurement length, and circularly solving a starting point coordinate and an end point coordinate of each second line segment based on the first step length;
and searching the starting point coordinates and the end point coordinates of the second line segment every first step length based on the set height of the second line segment, and drawing the second line segment to obtain the scale mark.
In an alternative embodiment, based on the length of the first line segment, the graduation marks are marked according to the second step length, so as to obtain a virtual measurement graduation ruler, which comprises:
calculating the scale value of each scale mark according to the measured length;
marking the scale values at intervals of preset number of scale lines based on the scale values of the scale lines; the virtual measurement graduated scale has zero starting point graduated value and zero ending point graduated value in the indicating direction as measurement length.
In an alternative embodiment, the method further comprises:
Establishing an association relation between a virtual measurement graduated scale and a corresponding point to be measured;
when the position of the to-be-measured point is changed, redrawing the virtual measurement scale according to the position change information of the to-be-measured point.
In an alternative embodiment, the method further comprises:
creating a scale acquisition control on the virtual measurement scale; when the scale acquisition control slides on the virtual measurement scale, the measurement data of the sliding position can be acquired;
when a plurality of measuring points exist between the first to-be-measured point and the second to-be-measured point, sliding the scale acquisition control to the measuring points, and acquiring scale values;
and according to the scale values of the scale acquisition control at each measuring point, calculating the distance between each measuring point.
In an alternative embodiment, sliding the scale acquisition control to the measurement point and performing the acquisition of the scale value includes:
acquiring a pixel value of sliding of the scale acquisition control and a scale value indicated by the scale acquisition control before sliding;
determining a scale change value of a scale value indicated by the scale acquisition control before sliding based on a corresponding relation between the pixel value and the first step length;
and determining the scale value of the measuring point currently indicated by the scale acquisition control based on the scale change value and the scale value indicated by the scale acquisition control before sliding.
In an alternative embodiment, the method further comprises:
when the graduated scale component or the virtual measurement measuring scale is not used in the first preset time, hiding the graduated scale component or the virtual measurement measuring scale in a target area;
when the graduated scale component or the virtual measurement measuring ruler is not used in the second preset time, deleting the graduated scale component or the virtual measurement measuring ruler from the target area; wherein the second preset time is longer than the first preset time.
In a second aspect, the present invention provides a distance measuring device based on a virtual measurement scale, the device mainly comprising: the system comprises a coordinate acquisition module, a line segment drawing module, a scale drawing module and a scale generating module; the coordinate acquisition module is used for acquiring pixel coordinates of the first to-be-measured point and the second to-be-measured point; the first to-be-measured point and the second to-be-measured point are two points on the same component graph or two points on different component graphs; the line segment drawing module is used for drawing a first line segment based on pixel coordinates of the first to-be-measured point and the second to-be-measured point; the scale drawing module is used for drawing a second line segment on the first line segment according to a first step length based on the length and the azimuth angle of the first line segment to obtain a scale mark; the scale generation module is used for marking the scale marks according to the second step length based on the length of the first line section to obtain a virtual measurement scale; the distance measurement module is used for determining the distance between the first to-be-measured point and the second to-be-measured point based on the virtual measurement scale. Through the process, the accuracy and the efficiency of size measurement among components in the quantum chip design can be improved, and guarantees are provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip.
In a third aspect, the present invention provides a computer device comprising: the distance measuring device comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the distance measuring method based on the virtual measuring scale according to the first aspect or any corresponding embodiment of the first aspect is executed.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to perform the virtual measurement scale-based distance measurement method of the first aspect or any of its corresponding embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an application environment of an embodiment of the present invention;
FIG. 2 is a flow chart of a virtual measurement scale-based distance measurement method according to an embodiment of the present invention;
FIG. 3 is a schematic view of a virtual measurement scale based distance measurement according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of a virtual measurement scale measurement according to an embodiment of the present invention;
FIG. 5 is a flow chart of another virtual measurement scale-based distance measurement method according to an embodiment of the present invention;
FIG. 6 is a flow chart of a distance measurement method based on a virtual measurement scale according to an embodiment of the present invention;
FIG. 7 is a flow chart of a distance measuring method based on a virtual measuring scale according to an embodiment of the present invention;
FIG. 8 is a block diagram of a virtual measurement scale based distance measurement device according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first and second in the description and claims of the invention and in the above-mentioned figures are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The term "plurality" in the present invention may mean at least two, for example, two, three or more, and embodiments of the present invention are not limited.
Referring to fig. 1, fig. 1 is a schematic diagram of an application environment according to an embodiment of the present invention, where the application environment includes a client 100 that may include a display 101, a processor 102, and a memory 103. The client 100 may be communicatively coupled to the server 200 via a network 300, the server 200 may be configured to provide services (e.g., application services, etc.) to clients installed on the server, and a database 201 may be provided on the server 200 or independent of the server 200 for providing data storage services to the server 200. In addition, a processing engine 202 may be run in the server 200, which processing engine 202 may be used to perform the steps performed by the server 200.
Alternatively, the client 100 may be, but is not limited to, a terminal capable of calculating data, such as a mobile terminal (e.g., a mobile phone, a tablet computer), a notebook computer, a PC (Personal Computer, a personal computer) or the like, and the network may include, but is not limited to, a wireless network or a wired network. Wherein the wireless network comprises: bluetooth, WIFI (Wireless Fidelity ) and other networks that enable wireless communications. The wired network may include, but is not limited to: wide area network, metropolitan area network, server cluster. The server 200 may include, but is not limited to, any hardware device that may perform calculations.
In addition, in this embodiment, the distance measurement method based on the virtual measurement scale may be applied to, but not limited to, a stand-alone processing device with a relatively high processing capability, without data interaction. For example, the processing device may be, but is not limited to, a more processing-capable terminal device, i.e. the individual operations of the above-described virtual measurement scale based distance measurement method may be integrated in a single processing device. The above is merely an example, and is not limited in any way in the present embodiment.
Alternatively, in the present embodiment, the distance measurement method based on the virtual measurement scale may be performed by the server 200, may be performed by the client 100, or may be performed by both the server 200 and the client 100. The distance measuring method based on the virtual measuring scale, which is performed by the client 100 according to the embodiment of the present invention, may also be performed by the client installed thereon.
According to an embodiment of the present invention there is provided an embodiment of a method of measuring distance based on a virtual measurement scale, it being noted that the steps shown in the flow chart of the drawings may be performed in a computer system such as a set of computer executable instructions and, although a logical sequence is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than here.
In this embodiment, a distance measuring method based on a virtual measurement scale is provided, which may be used for the client, and fig. 2 is a flowchart of a distance measuring method based on a virtual measurement scale according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S201, obtaining pixel coordinates of the first to-be-measured point and the second to-be-measured point.
In this embodiment, the first to-be-measured point and the second to-be-measured point are two points on the same component pattern or two points on two component patterns. And the pixel coordinates of the first to-be-measured point and the second to-be-measured point are acquired, so that the distance between two points on the same component graph or two points on different component graphs can be measured based on the first to-be-measured point and the second to-be-measured point.
In an alternative embodiment, within the target area, such as within a canvas; the first to-be-measured point and the second point measurement belong to the same two points on the component graph, such as two points on the edge of the contour, two points in the contour, or two points on the contour and in the contour. At this time, by acquiring two points on the edge of the outline, for example, acquiring points to be measured on the left and right sides of the outline of the rectangular component pattern along the horizontal direction, the length measurement of the outline of the rectangular component pattern can be realized, and the positions of other components in the outline can be confirmed. It will be appreciated that in other embodiments, the directions of the two points to be measured may be vertical directions or directions having an included angle with the horizontal direction, which is not limited herein.
In an alternative embodiment, within the target area, such as within a canvas; the first to-be-measured point and the second point measurement belong to two points which are identical to the two component patterns, for example, in the horizontal direction, one to-be-measured point can be selected on the leftmost or rightmost outline of the first component pattern, and the other to-be-measured point can be selected on the leftmost or rightmost outline of the second component pattern; or selecting a to-be-measured point from the outline of the first component pattern, and selecting another to-be-measured point from the leftmost or rightmost outline of the second component pattern; or selecting a to-be-measured point on the leftmost or rightmost outline of the first component graph, and selecting another to-be-measured point in the outline of the second component graph; and a to-be-measured point can be selected from the outline of the first component pattern, and another to-be-measured point can be selected from the outline of the second component pattern, so that the measurement of the distance between two points is realized, and the measurement of the distance between two component patterns and the determination of the distance between related components in the two component patterns are realized. The measurement of the distance between any two points on the two component graphs and the determination of the distance between related components can be realized. For example, when a to-be-measured point is selected on the leftmost or rightmost outline of the first component pattern and another to-be-measured point is selected on the leftmost or rightmost outline of the second component pattern along the horizontal direction, at least the measurement of the first component pattern length, the second component pattern length, and the distance between the first component pattern and the second component pattern may be realized.
Optionally, the pixel coordinates of the first to-be-measured point, the middle pixel coordinates and the pixel coordinates of the second to-be-measured point of the display system longitudinal and transverse position indicator in the target area in the selected operation can be obtained, so that necessary conditions are provided for the creation of a virtual measurement scale capable of measuring the positions of the key points.
In an alternative embodiment, first, pointer position information of a display system crossbar position indicator is detected, when the pointer of the display system crossbar position indicator is in a target area, an operation state of the pointer of the display system crossbar position indicator is obtained, and when the pointer of the display system crossbar position indicator is in a selected operation, pixel coordinates, middle pixel coordinates of a first to-be-measured point and pixel coordinates of a second to-be-measured point of the display system crossbar position indicator in the selected operation in the target area are obtained. The middle pixel coordinates are pixel coordinates of key points existing between the pixel coordinates of the first to-be-measured point and the pixel coordinates of the second to-be-measured point, and the number of the key points is greater than or equal to zero.
Taking electronic design automation of quantum chip design as an example, when a distance between two bonding pads (such as a first bonding pad and a second bonding pad) along a horizontal direction needs to be measured, a point can be selected from edges of one side, which are close to each other, of the first bonding pad and the second bonding pad. If the longitudinal and transverse position indicators of the display system are arranged in the left-to-right sequence, a point is selected on the right side edge of the first bonding pad to start the selection operation, and the selection operation is ended after a point is selected on the left side edge of the second bonding pad along the horizontal direction. Then, the pixel coordinates of the first to-be-measured point (selected operation start position) and the pixel coordinates of the second to-be-measured point (selected operation end position) in the selected operation are acquired. Similarly, when it is desired to measure the distance between two pads (e.g., the third pad and the fourth pad) in the vertical direction, a point may be selected at the edge of the third pad and the fourth pad on the side where they are close to each other. The selection operation is started by selecting a point on the upper side edge of the third bonding pad in the order from bottom to top through the display system vertical and horizontal position indicator, and then the selection operation is ended after selecting a point on the lower side edge of the second bonding pad in the vertical direction. Then, the pixel coordinates of the first to-be-measured point (selected operation start position) and the pixel coordinates of the second to-be-measured point (selected operation end position) in the selected operation are acquired.
Alternatively, when the length of an edge of a component along the horizontal direction and the positions of several key points (such as notches, trunking, welding spots) on the edge need to be measured, one point can be selected from the edges on the left and right sides of the component. If the longitudinal and transverse position indicators of the display system are arranged in the left-to-right sequence, firstly, selecting a point at the left side edge of the component to start the selection operation, then, carrying out the selection operation again at the key point along the horizontal direction, and finally, finishing the selection operation after selecting a point at the right side edge along the horizontal direction. Then, the pixel coordinates of the first to-be-measured point (selected operation start position), the intermediate pixel coordinates at the key point, and the pixel coordinates of the second to-be-measured point (selected operation end position) in the selected operation are acquired. Similarly, when the length of an edge of a component along the vertical direction and the positions of several key points (such as notches, trunking, welding spots) on the edge need to be measured, one point can be selected from the edges on the upper side and the lower side of the component. If the vertical and horizontal position indicators of the display system are used, a point is selected at the lower side edge of the component to start the selection operation, then the selection operation is performed at the key point again along the vertical direction, and finally the selection operation is finished after a point is selected at the upper side edge along the vertical direction. Then, the pixel coordinates of the first to-be-measured point (selected operation start position), the intermediate pixel coordinates at the key point, and the pixel coordinates of the second to-be-measured point (selected operation end position) in the selected operation are acquired.
Step S202, drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point.
In this embodiment, the first line segment is drawn based on the pixel coordinates of the first to-be-measured point and the second to-be-measured point, so as to provide a basic condition for drawing the virtual measurement scale.
Step S203, drawing a second line segment on the first line segment according to a first step length based on the length and the azimuth angle of the first line segment, and obtaining a scale line.
In this embodiment, the scale mark is obtained by drawing the second line segment on the first line segment according to the first step length based on the length and the azimuth angle of the first line segment, so as to provide a necessary condition for creating the virtual measurement scale.
In an alternative embodiment, the position and the length of the scale are determined based on the pixel coordinates of the first to-be-measured point and the pixel coordinates of the second to-be-measured point, and the scale line drawing of the first to-be-measured point and the second to-be-measured point and the scale line drawing of the key point are performed on the scale.
In an alternative implementation manner, first, a first line segment length and an azimuth angle between pixel coordinates of a first to-be-measured point and pixel coordinates of a second to-be-measured point are calculated, an indication direction and a measurement length of the first line segment are determined based on the first line segment length and the azimuth angle, then a first step length is determined based on the indication direction and the measurement length, starting point coordinates and end point coordinates of each second line segment are circularly calculated based on the first step length, starting point coordinates and end point coordinates of each second line segment are searched once every first step length based on the set height of the second line segment, and second line segment line drawing is carried out, so that a scale mark of the scale is obtained. The scale may have a linear structure or a scale-like structure.
Referring to fig. 3, for example, when calculating a first line segment length between a first to-be-measured point pixel coordinate (start coordinate) a (X1, Y1) and a second to-be-measured point pixel coordinate (end coordinate) B (X2, Y2), i.e., a distance s_ab between A, B, s_ab=math.sqrt ((X2-X1) ×2-X1) + (Y2-Y1) ×y 2-Y1). Since the scale is required to mark the scale value at a fixed distance in addition to displaying the total length. Therefore, the azimuth f_ab is also calculated, and the two-point coordinates of a (X1, Y1), B (X2, Y2) are known, and the azimuth f_ab of ab=math.
Further, knowing the pixel coordinates a (X1, Y1) of the first to-be-measured point, the azimuth of the first line segment AB, setting the small scale interval value to be 30px, and then circularly calculating the start coordinate and the end coordinate of each scale line. The pixel coordinates a (X1, Y1) of the first measurement point, the azimuth f_ab of AB, the distance s_ab between AB are known. The C point coordinates (X0, Y0) and the D point coordinates (X00, Y00) are obtained.
Setting the height step=10px of the small scale, performing scale line drawing every 30PX, that is, finding the coordinates of the line segment CD of 10px on the first line segment AB at the beginning of every 30PX of the length, and performing anticlockwise 90 ° rotation line drawing.
X0=X1+step*Math.cos(F_AB);
Y0=Y1+step*Math.sin(F_AB);
X00=X1+step*Math.cos(F_AB);
Y00=Y1+step*Math.sin(F_AB);
If X2< X1 (drawn from right to left), the pixel coordinates of the first point to be measured and the pixel coordinates of the second point to be measured are interchanged:
X0=X2+step*Math.cos(F_AB);
Y0=Y2+step*Math.sin(F_AB);
X00=X2+step*Math.cos(F_AB);
Y00=Y2+step*Math.sin(F_AB);
The small scale coordinate is vertical to the AB, the line segment CD is parallel to the AB, and a 90-degree rotation operation of the graph is needed when the scale line is drawn, for example, the selection operation based on fabric. Js only needs to set the value of the angle attribute to be-90, and the angle attribute is rotated around the upper left corner coordinate of the graph.
var line0=new fabric.Line([X0,Y0,X00,Y00],{stroke:'black',angle:-90,});
I.e. the graduation marks can be drawn vertically, and then the operation as the CD searching is performed once every 30px distance on the first line segment AB is circulated until the last point on the first line segment AB meets the condition.
In an alternative implementation manner, firstly, calculating the length and azimuth angle of a line segment between the pixel coordinates of a first to-be-measured point and the middle pixel coordinates, determining the indication direction and the measurement length of a graduated scale based on the length and the azimuth angle of the line segment, determining a first step length based on the indication direction and the measurement length, circularly solving the starting point coordinates and the end point coordinates of each second line segment based on the first step length, searching the starting point coordinates and the end point coordinates of each second line segment once every first step length based on the set height of each second line segment, and drawing the second line segment. Then, determining the indication direction and the measurement length of the graduated scale based on the length and the azimuth angle of a line segment between the middle pixel coordinates of the key point and the pixel coordinates of a second point to be measured of the second point, circularly solving the starting point coordinates and the end point coordinates of each second line segment based on the indication direction, the measurement length and the first step length, searching the starting point coordinates and the end point coordinates of each second line segment once every first step length based on the set height of the second line segment, drawing the second line segment lines to obtain graduated lines, and further obtaining the graduated scale to be marked.
And step S204, based on the length of the first line segment, marking the scale marks according to the second step length to obtain the virtual measurement scale.
In this embodiment, the scale marks are marked according to the second step length based on the length of the first line segment, so as to obtain a virtual measurement scale, so as to realize the distance measurement between two components as shown in fig. 4.
In an alternative embodiment, the positions of the scale marks are used for scaling the scale marks according to a second step length to obtain a virtual measurement scale for measuring the distances between the first to-be-measured point and the key point and between the first to-be-measured point and the second to-be-measured point, so that the distance measurement between two sides of an image of a component and between the key point and two sides of the current side is realized.
In an alternative embodiment, the scale value of each second line segment is calculated according to the measured length, and scale value marking is performed once every preset number of scale lines based on the scale value of each scale line. The virtual measurement graduated scale has zero starting point graduated value and zero ending point graduated value in the indicating direction as measurement length.
In an alternative embodiment, the scale value of each scale line is calculated based on the distance between the pixel coordinate of the first to-be-measured point and the middle pixel coordinate, and then scale value marking is performed once every preset number of scale lines. And then calculating the scale value of each scale line between the middle pixel coordinate and the pixel coordinate of the second to-be-measured point based on the distance between the pixel coordinate of the first to-be-measured point and the pixel coordinate of the second to-be-measured point, and then marking the scale value every other preset number of scale lines.
For example, based on step S202, the scale measurement length is marked at the B position according to the value of s_ab, and a value is marked every 5 scale marks, that is, every 150 px. The marked position is based on solving C point coordinates to draw numerical characters.
Step S205, determining a distance between the first point to be measured and the second point to be measured based on the virtual measurement scale.
In this embodiment, the distance between the first to-be-measured point and the second to-be-measured point is determined by the virtual measurement scale, so that accuracy and efficiency of measurement of each component and dimensions among components in the quantum chip design can be improved, and guarantee is provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip.
Based on step S201, because the pixel coordinates of the first to-be-measured point (the selected operation start position), the middle pixel coordinates of the key point and the pixel coordinates of the second to-be-measured point (the selected operation end position) are obtained in the process of creating the virtual measurement scale, and scales of the positions are marked in the scale marking, the measurement distance and the scales of the corresponding key points can be directly read, and the situation that the scales are inaccurate in reading when the positions of the scale lines do not completely correspond to the key points due to the fixed interval drawing of the scale lines in the process of creating the scales is avoided.
In an optional implementation manner, an association relationship between the virtual measurement graduated scale and the corresponding point to be measured can be created, and when the position of the point to be measured is changed, redrawing is performed on the virtual measurement graduated scale according to the position change information of the point to be measured, so as to realize dynamic measurement of the distance between the two points to be measured; the complexity of the operation that the measurement needs to be carried out again after the user adjusts the distance between the two points to be measured by feeling is avoided, and the accuracy of the position adjustment is low. In the enlarged and reduced view of the canvas, the scale mark interval of the virtual measurement scale is dynamically adjusted according to the current scaling factor multiplied by the interval value of the original scale.
According to the distance measurement method based on the virtual measurement graduated scale, pixel coordinates of a first to-be-measured point and a second to-be-measured point are obtained, so that measurement of distances between two points on the same component graph or between two points on two component graphs is conveniently performed based on the first to-be-measured point and the second to-be-measured point; drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point, drawing a second line segment on the first line segment according to a first step length based on the length and azimuth angle of the first line segment to obtain a scale mark, providing necessary conditions for drawing a virtual measurement scale, and marking the scale mark according to the second step length based on the length of the first line segment to obtain the virtual measurement scale; the distance between the first to-be-measured point and the second to-be-measured point is determined through the virtual measurement scale, so that accuracy and efficiency of measurement of each component and the size between components in quantum chip design can be improved, and guarantee is provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip.
In this embodiment, a distance measuring method based on a virtual measurement scale is provided, which may be used for the client, and fig. 5 is a flowchart of a distance measuring method based on a virtual measurement scale according to an embodiment of the present invention, as shown in fig. 5, where the flowchart includes the following steps:
in step S501, the pixel coordinates of the first to-be-measured point and the second to-be-measured point are obtained.
In this embodiment, the first to-be-measured point and the second to-be-measured point are two points on the same component pattern or two points on two component patterns. And the pixel coordinates of the first to-be-measured point and the second to-be-measured point are acquired, so that the measurement of the distance between two points on the same component graph or between two points on two component graphs is conveniently carried out based on the first to-be-measured point and the second to-be-measured point.
Please refer to step S201 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S502, drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point.
In this embodiment, the first line segment is drawn based on the pixel coordinates of the first to-be-measured point and the second to-be-measured point, so as to provide a basic condition for drawing the virtual measurement scale.
Please refer to step S202 in the embodiment shown in fig. 2, which is not described herein.
Step S503, based on the length and azimuth of the first line segment, drawing a second line segment on the first line segment according to the first step length, and obtaining a scale line.
In this embodiment, the scale mark is obtained by drawing the second line segment on the first line segment according to the first step length based on the length and the azimuth angle of the first line segment, so as to provide a necessary condition for creating the virtual measurement scale.
Please refer to step S203 in the embodiment shown in fig. 2 in detail, which is not described herein.
And step S504, based on the length of the first line segment, marking the scale marks according to the second step length to obtain the virtual measurement scale.
The scale marks are marked according to the second step length based on the length of the first line segment, so that a virtual measurement scale is obtained, and the distance measurement between the two components is realized as shown in fig. 4.
Please refer to step S204 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S505, determining a distance between the first point to be measured and the second point to be measured based on the virtual measurement scale.
In this embodiment, the distance between the first to-be-measured point and the second to-be-measured point is determined by the virtual measurement scale, so that accuracy and efficiency of measurement of each component and dimensions among components in the quantum chip design can be improved, and guarantee is provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip.
Please refer to step S205 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S506, creating a scale acquisition control on the virtual measurement scale.
In this embodiment, the scale obtaining control is created on the virtual measurement scale, so that when the scale obtaining control slides on the virtual measurement scale, the measurement data of the sliding position is obtained.
In an alternative embodiment, the position information of the scale obtaining control may be determined according to the scale information of the virtual measurement scale, and the scale information of the virtual measurement scale is associated with the position of the scale obtaining control, so as to obtain the measurement data of the sliding position.
Step S507, when a plurality of measurement points exist between the first to-be-measured point and the second to-be-measured point, sliding the scale obtaining control to the measurement points, and obtaining the scale values.
In this embodiment, when a plurality of measurement points exist between the first to-be-measured point and the second to-be-measured point, the scale obtaining control is slid to the measurement points, and scale values are obtained, so that the distance between the measurement points is measured.
In an alternative embodiment, when there are multiple points to be measured after the distance measurement based on the virtual measurement scale between the first point to be measured and the second point to be measured, the scale obtaining control may be slid to the measurement point, so that the scale obtaining control obtains the corresponding scale value according to the position of the measurement point. When the scale obtaining control is slid to the measuring point to obtain the scale value, the residence time of the scale obtaining control at the current point can be determined according to the scale obtaining control.
Step S508, according to the scale values of the scale acquisition control at the measuring points, calculating the distances among the measuring points.
In this embodiment, the distance between the measurement points is calculated according to the scale value of the scale acquisition control at each measurement point, thereby providing convenience for the layout design of the chip in the quantum chip design process.
In an alternative embodiment, the scale value of the control at the current measurement point and the scale value of the control at the next measurement point are obtained according to the scales, so that the distance between the two measurement points is calculated.
According to the distance measurement method based on the virtual measurement graduated scale, pixel coordinates of a first to-be-measured point and a second to-be-measured point are obtained, so that measurement of distances between two points on the same component graph or between two points on two component graphs is conveniently performed based on the first to-be-measured point and the second to-be-measured point; drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point, drawing a second line segment on the first line segment according to a first step length based on the length and azimuth angle of the first line segment to obtain a scale mark, providing necessary conditions for drawing a virtual measurement scale, and marking the scale mark according to the second step length based on the length of the first line segment to obtain the virtual measurement scale; the distance between the first to-be-measured point and the second to-be-measured point is determined through the virtual measurement scale, so that the accuracy and the efficiency of size measurement among components in the quantum chip design can be improved, and the guarantee is provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip; the scale acquisition control is established on the virtual measurement scale, so that when the scale acquisition control slides on the virtual measurement scale, the measurement data of the sliding position is acquired; when a plurality of measuring points exist between the first to-be-measured point and the second to-be-measured point, sliding the scale acquisition control to the measuring points, and acquiring scale values so as to measure the distance between the measuring points; and according to the scale value of the scale acquisition control at each measuring point, calculating the distance between each measuring point, and providing convenience for the layout design of the chip in the quantum chip design process.
In this embodiment, a distance measuring method based on a virtual measurement scale is provided, which may be used for the client, and fig. 6 is a flowchart of a distance measuring method based on a virtual measurement scale according to an embodiment of the present invention, as shown in fig. 6, where the flowchart includes the following steps:
step S601, obtaining pixel coordinates of the first to-be-measured point and the second to-be-measured point.
In this embodiment, the first to-be-measured point and the second to-be-measured point are two points on the same component pattern or two points on two component patterns. And the pixel coordinates of the first to-be-measured point and the second to-be-measured point are acquired, so that the measurement of the distance between two points on the same component graph or between two points on two component graphs is conveniently carried out based on the first to-be-measured point and the second to-be-measured point.
Please refer to step S201 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S602, drawing a first line segment based on pixel coordinates of the first to-be-measured point and the second to-be-measured point.
In this embodiment, the first line segment is drawn based on the pixel coordinates of the first to-be-measured point and the second to-be-measured point, so as to provide a basic condition for drawing the virtual measurement scale.
Please refer to step S202 in the embodiment shown in fig. 2, which is not described herein.
Step S603, drawing a second line segment on the first line segment according to a first step length based on the length and the azimuth angle of the first line segment, and obtaining a scale mark.
In this embodiment, the scale mark is obtained by drawing the second line segment on the first line segment according to the first step length based on the length and the azimuth angle of the first line segment, so as to provide a necessary condition for creating the virtual measurement scale.
Please refer to step S203 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S604, based on the length of the first line segment, scale marks are marked on the scale marks according to the second step length, and a virtual measuring scale is obtained.
Please refer to step S204 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S605, determining a distance between the first point to be measured and the second point to be measured based on the virtual measurement scale.
Please refer to step S205 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S606, a scale acquisition control is created on the virtual measurement scale.
Please refer to step S506 in the embodiment shown in fig. 5, which is not described herein.
In step S607, when there are multiple measurement points between the first to-be-measured point and the second to-be-measured point, the scale obtaining control is slid to the measurement point, and the scale value is obtained.
Specifically, the step S607 includes:
in step S6071, the pixel value of the scale acquisition control is acquired, and the scale value indicated by the scale acquisition control before sliding.
In this embodiment, by acquiring the pixel value of the sliding of the scale acquisition control and the scale value indicated by the scale acquisition control before sliding, a necessary condition is provided for calculating the sliding scale change value.
Step S6072, determining a scale change value of the scale value indicated by the scale acquisition control before sliding based on the correspondence between the pixel value and the first step size.
In this embodiment, a scale change value of a scale value indicated by the scale acquisition control before sliding is determined based on a correspondence between a pixel value and a first step length, so as to provide a data base for calculating a current scale value.
Step S6073, determining the scale value of the measurement point currently indicated by the scale acquisition control based on the scale change value and the scale value indicated by the scale acquisition control before sliding.
In this embodiment, the scale value of the measurement point currently indicated by the scale obtaining control is determined based on the scale change value and the scale value indicated by the scale obtaining control before sliding, so as to provide convenience for the layout design of the chip in the quantum chip design process.
For example, when the correspondence between the pixel value and the first step size is: the first step length corresponds to 5 pixel points, if the pixel value corresponding to the scale obtaining control before sliding is 15, the pixel value corresponding to the scale obtaining control after sliding is 12, and the difference between the pixel value and the pixel point before sliding is 3, the scale changing value is 3; then the scale value of the measurement point currently indicated by the scale acquisition control is determined to be 27 based on the scale change value and the scale value indicated by the scale acquisition control before sliding, such as 30.
Step S608, calculating the distance between the measuring points according to the scale values of the scale acquisition control at the measuring points.
Please refer to step S508 in the embodiment shown in fig. 5 in detail, which is not described herein.
According to the distance measurement method based on the virtual measurement graduated scale, pixel coordinates of a first to-be-measured point and a second to-be-measured point are obtained, so that measurement of distances between two points on the same component graph or between two points on two component graphs is conveniently performed based on the first to-be-measured point and the second to-be-measured point; drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point, drawing a second line segment on the first line segment according to a first step length based on the length and azimuth angle of the first line segment to obtain a scale mark, providing necessary conditions for drawing a virtual measurement scale, and marking the scale mark according to the second step length based on the length of the first line segment to obtain the virtual measurement scale; the distance between the first to-be-measured point and the second to-be-measured point is determined through the virtual measurement scale, so that the accuracy and the efficiency of size measurement among components in the quantum chip design can be improved, and the guarantee is provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip; the scale acquisition control is established on the virtual measurement scale, so that when the scale acquisition control slides on the virtual measurement scale, the measurement data of the sliding position is acquired; when a plurality of measuring points exist between the first to-be-measured point and the second to-be-measured point, sliding the scale acquisition control to the measuring points, and acquiring scale values so as to measure the distance between the measuring points; and according to the scale value of the scale acquisition control at each measuring point, calculating the distance between each measuring point, and providing convenience for the layout design of the chip in the quantum chip design process.
In this embodiment, a distance measuring method based on a virtual measurement scale is provided, which may be used for the client, and fig. 7 is a flowchart of a distance measuring method based on a virtual measurement scale according to an embodiment of the present invention, as shown in fig. 7, where the flowchart includes the following steps:
step S701, obtaining pixel coordinates of the first to-be-measured point and the second to-be-measured point.
Please refer to step S201 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S702, drawing a first line segment based on pixel coordinates of the first to-be-measured point and the second to-be-measured point.
Please refer to step S202 in the embodiment shown in fig. 2, which is not described herein.
In step S703, drawing a second line segment on the first line segment according to the first step length based on the length and the azimuth of the first line segment, thereby obtaining a scale mark.
Please refer to step S203 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S704, scale marks are marked on the scale marks according to the second step length based on the length of the first line segment, and a virtual measuring scale is obtained.
Please refer to step S204 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S705, determining the distance between the first point to be measured and the second point to be measured based on the virtual measurement scale.
Please refer to step S205 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S706, a scale acquisition control is created on the virtual measurement scale.
Please refer to step S506 in the embodiment shown in fig. 5, which is not described herein.
In step S707, when there are multiple measurement points between the first to-be-measured point and the second to-be-measured point, the scale obtaining control is slid to the measurement point, and the scale value is obtained.
Please refer to step S607 in the embodiment shown in fig. 6 in detail, which is not described herein.
Step S708, calculating the distance between the measuring points according to the scale values of the scale acquisition control at the measuring points.
Please refer to step S508 in the embodiment shown in fig. 5 in detail, which is not described herein.
In step S709, when the scale assembly or the virtual measurement scale is not used within the first preset time, the scale assembly or the virtual measurement scale is hidden in the target area.
In this embodiment, the scale assembly or the virtual measurement scale that is not used in the first preset time is hidden in the target area, so as to ensure the cleanliness of the target area, and the scale can be adjusted when needed. The first preset time may be 3 seconds, and in other embodiments, the first preset time may be adjusted according to actual requirements.
In step S710, when the scale assembly or the virtual measurement scale is not used for the second preset time, the scale assembly or the virtual measurement scale is deleted from the target area.
In this embodiment, the scale assembly or the virtual measurement scale that is not used in the second preset time is deleted in the target area, so as to avoid that the ineffective or unnecessary scale is still in the target area, thereby influencing the creation of other virtual measurement scales. The second preset time may be 5 minutes, and in other embodiments, the second preset time may be adjusted according to actual requirements.
According to the distance measurement method based on the virtual measurement graduated scale, pixel coordinates of a first to-be-measured point and a second to-be-measured point are obtained, so that measurement of distances between two points on the same component graph or between two points on two component graphs is conveniently performed based on the first to-be-measured point and the second to-be-measured point; drawing a first line segment based on pixel coordinates of a first to-be-measured point and a second to-be-measured point, drawing a second line segment on the first line segment according to a first step length based on the length and azimuth angle of the first line segment to obtain a scale mark, providing necessary conditions for drawing a virtual measurement scale, and marking the scale mark according to the second step length based on the length of the first line segment to obtain the virtual measurement scale; the distance between the first to-be-measured point and the second to-be-measured point is determined through the virtual measurement scale, so that the accuracy and the efficiency of size measurement among components in the quantum chip design can be improved, and the guarantee is provided for normal operation, smooth manufacturing, cost saving and system stability of the quantum chip; the scale acquisition control is established on the virtual measurement scale, so that when the scale acquisition control slides on the virtual measurement scale, the measurement data of the sliding position is acquired; when a plurality of measuring points exist between the first to-be-measured point and the second to-be-measured point, sliding the scale acquisition control to the measuring points, and acquiring scale values so as to measure the distance between the measuring points; according to the scale value of the scale obtaining control at each measuring point, the distance between each measuring point is calculated, and convenience is provided for the layout design of the chip in the quantum chip design process; hiding the unused virtual measurement graduated scale within the first preset time to ensure the neatness of the target area, and adjusting the graduated scale when needed; and deleting the unused virtual measurement graduated scale within the second preset time to avoid that the invalid or unnecessary graduated scale is still in the target area, thereby influencing the creation of other virtual measurement graduated scales.
In this embodiment, a distance measuring device based on a virtual measurement scale is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a distance measuring device based on a virtual measurement scale, as shown in fig. 8, including:
the coordinate obtaining module 801 is configured to obtain pixel coordinates of the first to-be-measured point and the second to-be-measured point.
The first to-be-measured point and the second to-be-measured point are two points on the same component graph or two points on different component graphs.
The line segment drawing module 802 is configured to draw a first line segment based on pixel coordinates of the first to-be-measured point and the second to-be-measured point.
The scale drawing module 803 is configured to draw a second line segment on the first line segment according to a first step length based on the length and the azimuth of the first line segment, so as to obtain a scale line.
In some alternative embodiments, the scale drawing module 803 includes:
the first calculating unit is used for calculating the length and the azimuth angle of the first line segment.
And the determining unit is used for determining the indication direction and the measurement length of the first line segment based on the length and the azimuth angle of the first line segment.
And the calculating unit is used for determining a first step length based on the indication direction and the measurement length and circularly calculating the starting point coordinate and the end point coordinate of each second line segment based on the first step length.
And the drawing unit is used for searching the starting point coordinates and the end point coordinates of the second line segment every first step length based on the set height of the second line segment and drawing the second line segment to obtain the scale line.
The scale generating module 804 is configured to scale the scale mark according to the second step length based on the length of the first line segment, so as to obtain a virtual measurement scale.
In some alternative embodiments, scale generation module 804 includes:
the second calculation unit is used for calculating the scale value of each scale line according to the measured length;
the marking unit is used for marking the scale values at intervals of a preset number of scale lines based on the scale values of the scale lines. The virtual measurement graduated scale has zero starting point graduated value and zero ending point graduated value in the indicating direction as measurement length.
The distance measurement module 805 is configured to determine a distance between the first point to be measured and the second point to be measured based on the virtual measurement scale.
In some alternative embodiments, the apparatus further comprises:
the scale redrawing module is used for creating an association relation between the virtual measurement scale and the corresponding point to be measured; when the position of the to-be-measured point is changed, redrawing the virtual measurement scale according to the position change information of the to-be-measured point.
The control creation module is used for creating a scale acquisition control on the virtual measurement scale; when the scale acquisition control slides on the virtual measurement scale, the measurement data of the sliding position can be acquired.
And the scale value acquisition module is used for sliding the scale acquisition control to the measuring point and acquiring the scale value when a plurality of measuring points exist between the first to-be-measured point and the second to-be-measured point.
Optionally, firstly, acquiring a pixel value of sliding of the scale acquisition control and a scale value indicated by the scale acquisition control before sliding; determining a scale change value of a scale value indicated by the scale acquisition control before sliding based on a corresponding relation between the pixel value and the first step length; and determining the scale value of the measuring point currently indicated by the scale acquisition control based on the scale change value and the scale value indicated by the scale acquisition control before sliding.
And the distance calculation module is used for obtaining the scale value of the control at each measuring point according to the scale and calculating the distance between each measuring point.
And the graduated scale hiding module is used for hiding the graduated scale component or the virtual measurement ruler in the target area when the graduated scale component or the virtual measurement ruler is not used in the first preset time.
The graduated scale deleting module is used for deleting the graduated scale component or the virtual measurement ruler from the target area when the graduated scale component or the virtual measurement ruler is not used in the second preset time; wherein the second preset time is longer than the first preset time.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The virtual measurement scale based distance measuring device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (application specific integrated circuit) circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices that may provide the above-mentioned functions.
The embodiment of the invention also provides a computer device, which is provided with the distance measuring device based on the virtual measuring scale shown in the figure 9.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 9, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 9.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, server clusters, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. A distance measurement method based on a virtual measurement scale, the method comprising:
acquiring pixel coordinates of a first to-be-measured point and a second to-be-measured point; the first to-be-measured point and the second to-be-measured point are two points on the same component graph or two points on different component graphs;
drawing a first line segment based on pixel coordinates of the first to-be-measured point and the second to-be-measured point;
drawing a second line segment on the first line segment according to a first step length based on the length and the azimuth angle of the first line segment to obtain a scale mark;
based on the length of the first line segment, marking the scale marks according to a second step length to obtain a virtual measurement scale;
and determining the distance between the first to-be-measured point and the second to-be-measured point based on the virtual measurement scale.
2. The method of claim 1, wherein drawing a second line segment on the first line segment according to a first step size based on the length and the azimuth of the first line segment, to obtain a tick mark, comprises:
Calculating the length and azimuth angle of the first line segment;
determining an indication direction and a measurement length of the first line segment based on the length and the azimuth of the first line segment;
determining the first step length based on the indication direction and the measurement length, and circularly solving a starting point coordinate and an end point coordinate of each second line segment based on the first step length;
and searching a starting point coordinate and an end point coordinate of the second line segment every first step length based on the set height of the second line segment, and drawing the second line segment to obtain a scale line.
3. The method of claim 2, wherein scaling the tick mark by a second step based on the length of the first line segment to obtain a virtual measurement tick mark, comprising:
calculating the scale value of each scale mark according to the measured length;
marking the scale values at intervals of preset number of scale lines based on the scale values of the scale lines; and the starting point scale value of the virtual measurement scale along the indication direction is zero, and the ending point scale value is the measurement length.
4. The method according to claim 1, wherein the method further comprises:
Establishing an association relation between the virtual measurement scale and a corresponding point to be measured;
when the position of the to-be-measured point is changed, redrawing the virtual measurement scale according to the position change information of the to-be-measured point.
5. The method according to claim 1, wherein the method further comprises:
creating a scale acquisition control on the virtual measurement scale; the scale acquisition control can acquire the measurement data of the sliding position when sliding on the virtual measurement scale;
when a plurality of measuring points exist between the first to-be-measured point and the second to-be-measured point, sliding the scale obtaining control to the measuring points, and obtaining scale values;
and according to the scale values of the scale acquisition control at each measuring point, calculating the distance between each measuring point.
6. The method of claim 5, wherein sliding the scale acquisition control to the measurement point and performing the acquisition of scale values comprises:
acquiring a pixel value of the sliding of the scale acquisition control and a scale value indicated by the scale acquisition control before sliding;
based on the corresponding relation between the pixel value and the first step length, determining a scale change value of a scale value indicated by the scale acquisition control before sliding;
And determining the scale value of the measuring point indicated by the scale acquisition control currently based on the scale change value and the scale value indicated by the scale acquisition control before sliding.
7. The method according to any one of claims 1 to 6, further comprising:
when the graduated scale component or the virtual measurement measuring scale is not used in a first preset time, hiding the graduated scale component or the virtual measurement measuring scale in a target area;
when the graduated scale component or the virtual measurement measuring ruler is not used in a second preset time, deleting the graduated scale component or the virtual measurement measuring ruler from the target area; wherein the second preset time is longer than the first preset time.
8. A distance measuring device based on a virtual measurement scale, the device comprising:
the coordinate acquisition module is used for acquiring pixel coordinates of the first to-be-measured point and the second to-be-measured point; the first to-be-measured point and the second to-be-measured point are two points on the same component graph or two points on different component graphs;
the line segment drawing module is used for drawing a first line segment based on pixel coordinates of the first to-be-measured point and the second to-be-measured point;
The scale drawing module is used for drawing a second line segment on the first line segment according to a first step length based on the length and the azimuth angle of the first line segment to obtain a scale mark;
the scale generating module is used for marking the scale marks according to a second step length based on the length of the first line segment to obtain a virtual measurement scale;
and the distance measurement module is used for determining the distance between the first to-be-measured point and the second to-be-measured point based on the virtual measurement graduated scale.
9. A computer device, comprising:
a memory and a processor in communication with each other, the memory having stored therein computer instructions which, upon execution, cause the processor to perform the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202310911549.5A 2023-07-24 2023-07-24 Distance measurement method, device, equipment and medium based on virtual measurement scale Pending CN117109459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310911549.5A CN117109459A (en) 2023-07-24 2023-07-24 Distance measurement method, device, equipment and medium based on virtual measurement scale

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310911549.5A CN117109459A (en) 2023-07-24 2023-07-24 Distance measurement method, device, equipment and medium based on virtual measurement scale

Publications (1)

Publication Number Publication Date
CN117109459A true CN117109459A (en) 2023-11-24

Family

ID=88793771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310911549.5A Pending CN117109459A (en) 2023-07-24 2023-07-24 Distance measurement method, device, equipment and medium based on virtual measurement scale

Country Status (1)

Country Link
CN (1) CN117109459A (en)

Similar Documents

Publication Publication Date Title
US8411107B2 (en) Adaptive snapping
US20070165034A1 (en) Snap To Element Analytical Tool
CN110232707B (en) Distance measuring method and device
CN103697820A (en) Method for measuring sizes based on terminal and terminal equipment
US20170124223A1 (en) Modeling processing system, method of executing modeling processing, and non-transitory recording medium
CN109901123A (en) Transducer calibration method, device, computer equipment and storage medium
JPH0277601A (en) Drawing computer
US20080284800A1 (en) Method and/or apparatus for displaying scaled design drawings permitting measurement directly from the display
CN1231744C (en) Method and apparatus for calibrating analog sensor measurement
CN111143500B (en) Visual area calculation method, terminal, control device and storage medium
CN117109459A (en) Distance measurement method, device, equipment and medium based on virtual measurement scale
CN110865785B (en) Pixel size acquisition method and device and electronic equipment
CN102680012B (en) System and method for automatic output of measuring information
JP7424440B2 (en) Computer programs, information processing methods and computers
CN114036721A (en) Method and device for constructing three-dimensional temperature cloud field of micro-module
CN110487194B (en) Three-dimensional deformation optical measurement method and device based on single camera
CN111681277A (en) Method and device for measuring geometric attributes in image, electronic equipment and storage medium
CN109544661B (en) Area map drawing method, apparatus, computer device and storage medium
JP4054048B2 (en) Ratio division scale
US8022953B2 (en) Dimensions and computer aided modeling
Minetola et al. Contactless inspection of castings: analysis of alignment procedures
CN111680251A (en) Browser element measuring method and device, electronic equipment and storage medium
CN104634292A (en) Electronic measurement method and terminal
JP7396574B2 (en) Drawing scale estimation device, drawing scale estimation method, and program
CN113597535B (en) Image-based ranging method, apparatus and 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