Angle measurement method and device based on three-dimensional space and computer equipment

By performing ray collision detection on the three-dimensional model and constructing the connection lines between characteristic marking points, the problem of being unable to accurately calculate the angles between different markers on the three-dimensional model is solved, and more accurate preoperative planning is achieved.

CN119958464AActive Publication Date: 2025-05-09WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311499197.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-09
Publication Date
2025-05-09
Estimated Expiration
2043-11-09

AI Technical Summary

Technical Problem

The prior art cannot accurately calculate the angle between different markers on the three-dimensional model, resulting in inaccurate preoperative planning schemes.

Method used

By performing at least three ray collision detections on the target three-dimensional model, multiple feature marking points are obtained, including the start marking point, the center marking point and the end marking point. Then, a first connection line between the central marking point and the start marking point and a second connection line between the central marking point and the end marking point are constructed. Based on the coordinate information of these marking points, the number of clamping angles formed by the first connection line and the second connection line is determined.

Benefits of technology

The precise calculation of the angle between different markers on the three-dimensional model is achieved, and the accuracy and predictability of preoperative planning is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119958464A_ABST
    Figure CN119958464A_ABST
Patent Text Reader

Abstract

The invention relates to an angle measurement method and device based on a three-dimensional space and computer equipment, and the method comprises the steps: carrying out the at least three times of ray collision detection of a target three-dimensional model, and obtaining a plurality of feature mark points of the target three-dimensional model, the feature mark points comprise a start mark point, a center mark point and an end mark point; constructing a first connecting line between the center mark point and the starting mark point, and constructing a second connecting line between the center mark point and the ending mark point; furthermore, based on the coordinate information of each feature mark point, the degree of an included angle formed by the first connecting line and the second connecting line is determined. According to the method and the device, the problem that the angle between the different markers on the three-dimensional model cannot be accurately calculated is solved, and the angle between the different markers on the three-dimensional model is accurately calculated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional measurement technology, and in particular to a method, device and computer equipment for angle measurement based on three-dimensional space. Background Art

[0002] With the continuous advancement of modern science and technology and information technology in the medical field, digital medicine has emerged as a new medical working method, making clinical diagnosis and treatment more precise and minimally invasive, and is widely used in different medical fields such as orthopedics, hepatobiliary and plastic surgery. In particular, using digital technology for scientific planning before surgery can effectively improve the predictability of surgery.

[0003] In existing planning methods, a 3D model of the target site is usually constructed, and the target area of ​​the operation is determined based on the 3D model. At the same time, the distribution of each area on the target site is analyzed to further formulate a surgical plan. However, the above method cannot accurately calculate the angles between different markers on the 3D model, resulting in inaccurate preoperative planning.

[0004] With regard to the problem in related technologies that the angles between different markers on a three-dimensional model cannot be accurately calculated, no effective solution has been proposed so far. Summary of the invention

[0005] In this embodiment, a three-dimensional space-based angle measurement method, device and computer equipment are provided to solve the problem in the related art that the angles between different markers on the three-dimensional model cannot be accurately calculated.

[0006] In a first aspect, a method for measuring an angle based on three-dimensional space is provided in this embodiment, and the method includes:

[0007] Perform at least three ray collision tests on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model; the characteristic marking points include a start marking point, a center marking point and an end marking point;

[0008] Constructing a first connecting line between the center marking point and the starting marking point;

[0009] Constructing a second connecting line between the center marking point and the end marking point;

[0010] Based on the coordinate information of each of the characteristic marking points, the angle formed by the first connecting line and the second connecting line is determined.

[0011] In some embodiments, performing at least three ray collision detections on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model includes:

[0012] In each of the ray collision detections, projecting a corresponding camera ray toward the target three-dimensional model;

[0013] When it is detected that the camera ray collides with the target three-dimensional model, determining a collision point between the camera ray and the target three-dimensional model;

[0014] Converting the three-dimensional world coordinates of the collision point into corresponding three-dimensional local coordinates;

[0015] At the three-dimensional local coordinates, a marking sphere is generated as the characteristic marking point.

[0016] In some embodiments, determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points includes:

[0017] Obtaining the three-dimensional local coordinates of each of the feature marking points;

[0018] Calculate each of the three-dimensional local coordinates to obtain the angle formed by the first connecting line and the second connecting line.

[0019] In some embodiments, projecting a corresponding camera ray to the target three-dimensional model includes:

[0020] In response to a user operating the screen, generating a touch point corresponding to the user operation;

[0021] The camera ray is projected from the touch point perpendicular to the screen.

[0022] In some of the embodiments, after determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points, the method further includes:

[0023] Based on the user's real-time touch operation, the three-dimensional local coordinates of the feature marker point are adjusted;

[0024] The angle formed by the first connecting line and the second connecting line is updated according to the adjusted three-dimensional local coordinates.

[0025] In some of the embodiments, after determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points, the method further includes:

[0026] Generate a three-dimensional text component corresponding to the angle;

[0027] The three-dimensional text component is suspended above the central marking point.

[0028] In some of the embodiments, after determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points, the method further includes:

[0029] Based on the angle formed by the first connecting line and the second connecting line, corresponding preoperative planning information is generated.

[0030] In a second aspect, a three-dimensional space-based angle measurement device is provided in this embodiment, the device comprising: a projection module, a construction module and a calculation module;

[0031] The projection module is used to perform at least three ray collision detections on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model; the characteristic marking points include a start marking point, a center marking point and an end marking point;

[0032] The construction module is used to construct a first connecting line between the center marking point and the starting marking point;

[0033] The construction module is further used to construct a second connecting line between the center marking point and the end marking point;

[0034] The calculation module is used to determine the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points.

[0035] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the angle measurement method based on three-dimensional space described in the first aspect is implemented.

[0036] In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the angle measurement method based on three-dimensional space described in the first aspect above is implemented.

[0037] Compared with the related art, the angle measurement method, device and computer equipment based on three-dimensional space provided in this embodiment obtain multiple characteristic marking points of the target three-dimensional model by performing at least three ray collision detections on the target three-dimensional model, wherein the characteristic marking points include a start marking point, a center marking point and an end marking point; construct a first connecting line between the center marking point and the start marking point, and construct a second connecting line between the center marking point and the end marking point; further, based on the coordinate information of each characteristic marking point, determine the degree of the angle formed by the first connecting line and the second connecting line, thereby solving the problem of being unable to accurately calculate the angles between different markers on the three-dimensional model and realizing the accurate calculation of the angles between different markers on the three-dimensional model.

[0038] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0040] Figure 1 This is a hardware structure block diagram of a terminal device of a three-dimensional space angle measurement method provided by an embodiment of the present application;

[0041] Figure 2 is a flow chart of a three-dimensional space-based angle measurement method provided by an embodiment of the present application;

[0042] Figure 3 It is a flowchart of a three-dimensional space-based angle measurement method provided by an embodiment of the present application;

[0043] Figure 4 is a flow chart of a three-dimensional space-based angle measurement method provided by a preferred embodiment of the present application;

[0044] Figure 5 It is a structural block diagram of an angle measurement device based on three-dimensional space provided in one embodiment of the present application.

[0045] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, projection module; 20, construction module; 30, operation module. DETAILED DESCRIPTION

[0046] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0047] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0048] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the angle measurement method based on three-dimensional space in this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0049] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the angle measurement method based on three-dimensional space in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0050] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0051] In this embodiment, a method for measuring angles in three-dimensional space is provided. Figure 2 is a flow chart of the angle measurement method based on three-dimensional space of this embodiment. Figure 2 As shown, the process includes the following steps:

[0052] Step S210, performing at least three ray collision detections on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model; the characteristic marking points include a start marking point, a center marking point and an end marking point.

[0053] Specifically, in a three-dimensional space built based on the comprehensive development tool Unity, a three-dimensional model of the target object is established, and according to the measurement requirements of the target object, ray collision detection is performed on the target three-dimensional model to generate multiple feature marker points on the model.

[0054] It is important to know that when measuring angles on a target 3D model, at least three feature marking points must be present on the model to form the angle to be measured. Based on this, at least three ray collision tests are performed on the target 3D model to obtain the start marking point, center marking point, and end marking point of the target 3D model.

[0055] Among them, usually in the order of the feature marker points generated, the feature marker points generated in each ray collision detection process are recorded as the start marker point, the center marker point and the end marker point, and the center marker point represents the vertex of the angle to be measured. In addition, according to the actual measurement requirements, any feature marker point on the three-dimensional model can be used as the center marker point for angle measurement.

[0056] Step S220: construct a first connecting line between the center marking point and the start marking point.

[0057] Specifically, in each ray collision detection, a camera ray is projected toward the target three-dimensional model. If a collision between the camera ray and the target three-dimensional model is detected, the three-dimensional local coordinates of the collision point are obtained, and a marker sphere is generated at the three-dimensional local coordinates.

[0058] Furthermore, it is determined whether a feature mark point has been generated before this ray collision detection. If no feature mark point has been generated, the current mark sphere is used as the starting mark point, and ray collision detection is continued for the target three-dimensional model; if only the starting mark point exists, the current mark sphere is used as the center mark point, and the center mark point is connected with the starting mark point to obtain the first connecting line.

[0059] Step S230: construct a second connecting line between the center marking point and the end marking point.

[0060] Specifically, after the marking sphere is generated, if it is detected that a start marking point and a center marking point already exist, the current marking sphere is set as the end marking point, and the center marking point and the end marking point are connected to obtain a second connecting line.

[0061] Step S240: determining the angle between the first connecting line and the second connecting line based on the coordinate information of each characteristic mark point.

[0062] Specifically, the three-dimensional local coordinates of the start mark point, the center mark point and the end mark point on the target three-dimensional model are obtained, and each three-dimensional local coordinate is calculated to obtain the angle formed by the first connecting line and the second connecting line.

[0063] It should be noted that the angle measurement method on the target three-dimensional model of this embodiment supports application on various mobile terminal platforms.

[0064] In existing preoperative planning methods, a 3D model of the target site is usually constructed, and the target area of ​​the operation is determined based on the 3D model. At the same time, the distribution of each area on the target site is analyzed to further formulate a surgical plan. However, the above method cannot accurately calculate the angles between different markers on the 3D model, resulting in inaccurate preoperative planning.

[0065] Compared with the prior art, the present application performs at least three ray collision detections on the target three-dimensional model to obtain multiple characteristic marking points of the target three-dimensional model, wherein the characteristic marking points include a start marking point, a center marking point, and an end marking point; constructs a first connecting line between the center marking point and the start marking point, and constructs a second connecting line between the center marking point and the end marking point; further, based on the coordinate information of each characteristic marking point, determines the angle formed by the first connecting line and the second connecting line. Based on this, in the process of ray collision detection of the target three-dimensional model, the collision point between the camera ray and the target three-dimensional model is used to generate multiple characteristic marking points on the target three-dimensional model, and the target angle is calculated according to the coordinate information of each characteristic marking point, thereby solving the problem of being unable to accurately calculate the angle between different markers on the three-dimensional model, and realizing the accurate calculation of the angle between different markers on the three-dimensional model.

[0066] In some of the embodiments, performing at least three ray collision detections on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model includes the following steps:

[0067] Step S211, in each ray collision detection, projecting a corresponding camera ray to the target three-dimensional model;

[0068] Step S212, when it is detected that the camera ray collides with the target three-dimensional model, determining the collision point between the camera ray and the target three-dimensional model;

[0069] Step S213, converting the three-dimensional world coordinates of the collision point into corresponding three-dimensional local coordinates;

[0070] Step S214: Generate a marking sphere as a feature marking point at the three-dimensional local coordinate.

[0071] In this embodiment, it is necessary to ensure that there are at least three characteristic marking points on the target three-dimensional model, namely a start marking point, a center marking point and an end marking point, and the center marking point represents the vertex of the angle to be measured.

[0072] Specifically, at least three ray collision detections are performed on the target 3D model, and in each ray collision detection, a corresponding camera ray is projected to the target 3D model. If it is detected that the camera ray collides with the target 3D model, the collision point of the camera ray and the target 3D model is obtained.

[0073] Furthermore, the coordinate information of the collision point is spatially transformed, that is, transformed from the world coordinate system to the local coordinate system, to obtain the three-dimensional local coordinates of the collision point, and a marking sphere is generated at the three-dimensional local coordinates of the collision point.

[0074] After that, it is determined whether the start mark point has been generated before this ray collision detection. If the start mark point has not been generated before, the current marker sphere is set as the start mark point, and the ray collision detection of the target 3D model is continued; if the start mark point has been generated before, it is determined whether there is a center mark point.

[0075] When no center mark point is detected on the target 3D model, the current mark sphere is set as the center mark point, and the first connection line between the center mark point and the start mark point is constructed, and the next ray collision detection is initiated for the target 3D model. In addition, if it is detected that the target 3D model has a center mark point, the current mark sphere is set as the end mark point, and the second connection line between the center mark point and the end mark point is constructed.

[0076] Through this embodiment, in each ray collision detection, the corresponding camera ray is projected to the target three-dimensional model. If it is detected that the camera ray collides with the target three-dimensional model, a marking sphere is generated based on the collision point between the camera ray and the target three-dimensional model, and the marking sphere at that location is set as a feature marking point, so as to accurately obtain the three-dimensional coordinate information of the feature marking point.

[0077] In some of the embodiments, determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each characteristic mark point includes the following steps:

[0078] Step S241, obtaining the three-dimensional local coordinates of each feature mark point;

[0079] Step S242, calculating each three-dimensional local coordinate to obtain the angle formed by the first connecting line and the second connecting line.

[0080] It is important to know that each time a collision is detected between the camera ray and the target three-dimensional model, the collision point between the camera ray and the target three-dimensional model is obtained, the coordinates of the collision point are converted from the world coordinate system to the local coordinate system, and the converted three-dimensional local coordinates are recorded as the coordinate information of the feature marker point at that location.

[0081] Specifically, the three-dimensional local coordinates of the start mark point, the center mark point, and the end mark point are obtained respectively, and the three-dimensional local coordinates are calculated using the cosine value related algorithm to obtain the angle formed by the first connecting line and the second connecting line. The expression of the above calculation process is as follows:

[0082]

[0083] Where A represents the angle between the first connecting line and the second connecting line; acos() represents the calculation of the arc cosine value; a x is the distance between the start mark point and the center mark point in the X-axis direction; ay is the distance between the start mark point and the center mark point in the Y-axis direction; a z b is the distance between the start mark point and the center mark point in the Z-axis direction; x b is the distance between the start mark point and the center mark point in the X-axis direction; y b is the distance between the start mark point and the center mark point in the Y-axis direction; z It is the distance between the start mark point and the center mark point in the Z axis direction.

[0084] Through this embodiment, the three-dimensional local coordinates of each feature marking point are obtained, and each three-dimensional local coordinate is calculated to obtain the degree of the angle formed by the first connecting line and the second connecting line, so as to accurately calculate the degree of the target angle formed by each feature marking point, thereby realizing angle measurement on the target three-dimensional model.

[0085] In some of the embodiments, projecting a corresponding camera ray to a target three-dimensional model comprises the following steps:

[0086] In response to the user operating the screen, generating a touch point corresponding to the user operation;

[0087] Cast a camera ray from the touch point perpendicular to the screen.

[0088] Specifically, each time the user operates the device screen, the gesture detection solution based on the touch screen plug-in LeanTouch generates a touch point corresponding to the user operation, and projects a camera ray perpendicular to the device screen from the touch point. The camera ray will extend infinitely, and when it extends and collides with the target 3D model in the 3D space, that is, the camera ray collides with the target 3D model, indicating that this ray collision detection is effective and the corresponding feature marker point can be generated.

[0089] It should be noted that the above LeanTouch gesture detection solution is used to detect and recognize user gestures. This embodiment uses the gesture detection solution to capture the user's gestures when operating the screen. When the user's finger presses the screen and then leaves, the screen coordinates of the touch point are converted into camera rays for vertical projection, and the collision between the ray and the target three-dimensional model is detected.

[0090] Through this embodiment, a touch point corresponding to the user operation is generated in response to the user operating the screen, and a camera ray perpendicular to the device screen is projected from the touch point, thereby controlling the device to emit an accurate camera ray based on the user's touch operation on the screen.

[0091] In some of the embodiments, after determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each characteristic mark point, the following steps are also included:

[0092] Step S251, adjusting the three-dimensional local coordinates of the feature mark point based on the user's real-time touch operation;

[0093] Step S252: updating the angle formed by the first connecting line and the second connecting line according to the adjusted three-dimensional local coordinates.

[0094] Specifically, after completing the angle measurement operation on the target 3D model, the 3D local coordinates of each feature marker point are adjusted according to the real-time touch operation input by the user using the device screen. The real-time touch operation includes pressing any marker sphere on the target 3D model to activate the marker point modification function, and adjusting the position of the corresponding marker point by dragging the marker sphere with a finger.

[0095] Furthermore, the three-dimensional local coordinates of each characteristic mark point at the latest position are obtained, and the adjusted three-dimensional local coordinates are calculated to obtain a real-time measurement result of the angle formed by the first connecting line and the second connecting line.

[0096] Through this embodiment, based on the user's real-time touch operation, the three-dimensional local coordinates of the feature marker point are adjusted, and the angle formed by the first connecting line and the second connecting line is updated according to the adjusted three-dimensional local coordinates. Therefore, when the three-dimensional local coordinates of the feature marker point change, the associated angle degree can be synchronously updated, thereby improving the real-time and flexibility of angle measurement.

[0097] In some of the embodiments, after determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each characteristic mark point, the following steps are also included:

[0098] Generate a three-dimensional text component corresponding to the angle;

[0099] Float the 3D text component above the center mark point.

[0100] Specifically, after obtaining the degree of the angle formed by the first connecting line and the second connecting line, a three-dimensional text component corresponding to the degree of the angle is generated, and the three-dimensional text component is suspended above the center mark point to intuitively display the angle measurement result.

[0101] It is important to know that each time the angle formed by the first connecting line and the second connecting line is updated, the angle measurement result displayed by the corresponding three-dimensional text component is updated synchronously. In addition, after the angle measurement operation is completed, the user can rotate the current target three-dimensional model at will, and this embodiment will adjust the direction of the three-dimensional text component in real time, always keeping the front of the three-dimensional text component facing the user's viewing direction, ensuring that the user can accurately observe the specific angle value from any direction.

[0102] Through this embodiment, a three-dimensional text component corresponding to the angle is generated, and the three-dimensional text component is suspended above the center mark point, so as to display the angle measurement result of the target three-dimensional model in real time, allowing the user to obtain the measurement information more intuitively.

[0103] In some of the embodiments, after determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each characteristic mark point, the following steps are also included:

[0104] Based on the angle formed by the first connecting line and the second connecting line, corresponding preoperative planning information is generated.

[0105] Specifically, preoperative planning is performed based on the angle measurement results of the target three-dimensional model to obtain corresponding preoperative planning information, wherein the preoperative planning information includes surgical cutting angle, surgical incision position, and evaluation data of joint angle and range of motion.

[0106] For example, in orthopedic surgery, angle measurement results are used to evaluate the deviation, twisting or deformity of bones to determine the cutting angle and position of the operation. In addition, in related surgical operations on organs such as the heart, the angle measurement results on the three-dimensional model of the organ are used to provide the morphological and structural information of the organ to help determine the optimal surgical incision location and avoid unnecessary damage to surrounding tissues and blood vessels.

[0107] Through this embodiment, corresponding preoperative planning information is generated based on the angle formed by the first connecting line and the second connecting line, thereby improving the accuracy and predictability of preoperative planning.

[0108] Figure 3 is a flow chart of the angle measurement method based on three-dimensional space in this embodiment, such as Figure 3 As shown, the specific process of the method includes the following steps:

[0109] In response to the user operating the screen, a ray collision detection is initiated for the target three-dimensional model S301, the touch point corresponding to the user operation is determined, and a camera ray perpendicular to the device screen is projected from the touch point to determine whether the camera ray collides with the target three-dimensional model S302. If the camera ray does not collide with the target three-dimensional model, the ray collision detection is terminated; when it is detected that the camera ray collides with the target three-dimensional model, the collision point of the camera ray and the target three-dimensional model is determined, and the three-dimensional local coordinates of the collision point are obtained S303.

[0110] Afterwards, a marking sphere is generated at the three-dimensional local coordinates of the collision point S304, and it is determined whether a starting marking point has been generated before S305. If the starting marking point has not been generated, the current marking sphere is set as the starting marking point S306, and ray collision detection is continued for the target three-dimensional model; if the starting marking point has been generated before, it is further determined whether there is a center marking point S307.

[0111] When no center mark point is detected on the target three-dimensional model, the current mark sphere is set as the center mark point, and the first connecting line between the center mark point and the start mark point is constructed S308, and the next ray collision detection is initiated for the target three-dimensional model. In addition, if it is detected that the target three-dimensional model has a center mark point, the current mark sphere is set as the end mark point, and the second connecting line between the center mark point and the end mark point is constructed S309. On this basis, the three-dimensional local coordinates of each feature mark point are obtained, and each three-dimensional local coordinate is calculated to obtain the angle formed by the first connecting line and the second connecting line S310.

[0112] The present embodiment is described and illustrated below through preferred embodiments.

[0113] Figure 4 is a flow chart of the angle measurement method based on three-dimensional space of the preferred embodiment. Figure 4 As shown, the angle measurement method based on three-dimensional space includes the following steps:

[0114] Step S410, performing at least three ray collision tests on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model; the characteristic marking points include a start marking point, a center marking point, and an end marking point;

[0115] Step S420, constructing a first connecting line between the center marking point and the start marking point;

[0116] Step S430, constructing a second connecting line between the center marking point and the end marking point;

[0117] Step S440, obtaining the three-dimensional local coordinates of each feature mark point;

[0118] Step S450, calculating each three-dimensional local coordinate to obtain the angle formed by the first connecting line and the second connecting line;

[0119] Step S460, adjusting the three-dimensional local coordinates of the feature mark point based on the user's real-time touch operation;

[0120] Step S470: updating the angle formed by the first connecting line and the second connecting line according to the adjusted three-dimensional local coordinates.

[0121] Through this embodiment, at least three ray collision tests are performed on the target three-dimensional model to obtain multiple characteristic marking points of the target three-dimensional model, wherein the characteristic marking points include a start marking point, a center marking point, and an end marking point. On this basis, a first connecting line between the center marking point and the start marking point, and a second connecting line between the center marking point and the end marking point are constructed, and based on the coordinate information of each characteristic marking point, the angle formed by the first connecting line and the second connecting line is determined, thereby realizing the accurate calculation of the angles between different markers on the three-dimensional model.

[0122] Furthermore, based on the user's real-time touch operation, the three-dimensional local coordinates of the feature marker point are adjusted, and the angle formed by the first connecting line and the second connecting line is updated according to the adjusted three-dimensional local coordinates, so as to synchronously update the angle measurement result, thereby improving the real-time and flexibility of the angle measurement.

[0123] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0124] In this embodiment, a three-dimensional space-based angle measurement device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0125] Figure 5 is a structural block diagram of the angle measurement device based on three-dimensional space in this embodiment, as shown in Figure 5 As shown, the device includes: a projection module 10, a construction module 20 and a calculation module 30;

[0126] The projection module 10 is used to perform at least three ray collision detections on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model; the characteristic marking points include a start marking point, a center marking point and an end marking point;

[0127] A construction module 20, configured to construct a first connecting line between a center marking point and a start marking point;

[0128] The construction module 20 is further used to construct a second connecting line between the center marking point and the end marking point;

[0129] The calculation module 30 is used to determine the angle formed by the first connecting line and the second connecting line based on the coordinate information of each characteristic mark point.

[0130] Through the device provided by this embodiment, by performing at least three ray collision detections on the target three-dimensional model, multiple feature marking points of the target three-dimensional model are obtained, wherein the feature marking points include a start marking point, a center marking point and an end marking point; a first connecting line between the center marking point and the start marking point is constructed, and a second connecting line between the center marking point and the end marking point is constructed; further, based on the coordinate information of each feature marking point, the degree of the angle formed by the first connecting line and the second connecting line is determined, which solves the problem of being unable to accurately calculate the angles between different markers on the three-dimensional model and realizes the accurate calculation of the angles between different markers on the three-dimensional model.

[0131] In some of these embodiments, Figure 5 On the basis of, the device also includes a collision module, which is used to project a corresponding camera ray to the target three-dimensional model in each ray collision detection; when a collision between the camera ray and the target three-dimensional model is detected, the collision point between the camera ray and the target three-dimensional model is determined; the three-dimensional world coordinates of the collision point are converted into corresponding three-dimensional local coordinates; at the three-dimensional local coordinates, a marking sphere is generated as a feature marking point.

[0132] In some of these embodiments, Figure 5 On the basis of, the device also includes a calculation module, which is used to obtain the three-dimensional local coordinates of each feature mark point; and calculate each three-dimensional local coordinate to obtain the angle formed by the first connecting line and the second connecting line.

[0133] In some of these embodiments, Figure 5 On the basis of, the device also includes a transmitting module, which is used to generate a touch point corresponding to the user operation in response to the user operating the screen; and project a camera ray perpendicular to the screen from the touch point.

[0134] In some of these embodiments, Figure 5 On the basis of, the device also includes an updating module for adjusting the three-dimensional local coordinates of the feature marker point based on the user's real-time touch operation; and updating the angle formed by the first connecting line and the second connecting line according to the adjusted three-dimensional local coordinates.

[0135] In some of these embodiments, Figure 5 On the basis of, the device also includes a display module, which is used to generate a three-dimensional text component corresponding to the angle; and the three-dimensional text component is suspended above the center marking point.

[0136] In some of these embodiments, Figure 5On the basis of, the device also includes a generating module, which is used to generate corresponding preoperative planning information based on the angle formed by the first connecting line and the second connecting line.

[0137] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0138] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0139] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0140] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0141] In addition, in combination with the angle measurement method based on three-dimensional space provided in the above embodiments, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the angle measurement methods based on three-dimensional space in the above embodiments is implemented.

[0142] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0143] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0144] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0145] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for measuring angles in three-dimensional space, characterized in that: The method comprises: Perform at least three ray collision tests on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model; the characteristic marking points include a start marking point, a center marking point and an end marking point; Constructing a first connecting line between the center marking point and the starting marking point; Constructing a second connecting line between the center marking point and the end marking point; Based on the coordinate information of each of the characteristic marking points, the angle formed by the first connecting line and the second connecting line is determined.

2. The angle measurement method based on three-dimensional space according to claim 1, characterized in that: The step of performing at least three ray collision detections on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model includes: In each of the ray collision detections, projecting a corresponding camera ray toward the target three-dimensional model; When it is detected that the camera ray collides with the target three-dimensional model, determining a collision point between the camera ray and the target three-dimensional model; Converting the three-dimensional world coordinates of the collision point into corresponding three-dimensional local coordinates; At the three-dimensional local coordinates, a marking sphere is generated as the characteristic marking point.

3. The angle measurement method based on three-dimensional space according to claim 2, characterized in that: The determining, based on the coordinate information of each of the characteristic marking points, the angle formed by the first connecting line and the second connecting line comprises: Obtaining the three-dimensional local coordinates of each of the feature marking points; Calculate each of the three-dimensional local coordinates to obtain the angle formed by the first connecting line and the second connecting line.

4. The angle measurement method based on three-dimensional space according to claim 2, characterized in that: The projecting the corresponding camera ray to the target three-dimensional model includes: In response to a user operating the screen, generating a touch point corresponding to the user operation; The camera ray is projected from the touch point perpendicular to the screen.

5. The angle measurement method based on three-dimensional space according to claim 1, characterized in that: After determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points, the method further includes: Based on the user's real-time touch operation, the three-dimensional local coordinates of the feature marker point are adjusted; The angle formed by the first connecting line and the second connecting line is updated according to the adjusted three-dimensional local coordinates.

6. The angle measurement method based on three-dimensional space according to claim 1, characterized in that: After determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points, the method further includes: Generate a three-dimensional text component corresponding to the angle; The three-dimensional text component is suspended above the central marking point.

7. The three-dimensional space-based angle measurement method according to claim 1, characterized in that: After determining the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points, the method further includes: Based on the angle formed by the first connecting line and the second connecting line, corresponding preoperative planning information is generated.

8. An angle measuring device based on three-dimensional space, characterized in that: The device comprises: a projection module, a construction module and a calculation module; The projection module is used to perform at least three ray collision detections on the target three-dimensional model to obtain a plurality of characteristic marking points of the target three-dimensional model; the characteristic marking points include a start marking point, a center marking point and an end marking point; The construction module is used to construct a first connecting line between the center marking point and the starting marking point; The construction module is further used to construct a second connecting line between the center marking point and the end marking point; The calculation module is used to determine the angle formed by the first connecting line and the second connecting line based on the coordinate information of each of the characteristic marking points.

9. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the three-dimensional space-based angle measurement method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the three-dimensional space-based angle measurement method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data measuring method and device in virtual scene

    CN107145237A

  • Distance measurement method and device in three-dimensional space and storage medium

    CN113436346A

  • Height measuring method, height measuring device and terminal

    CN114022532A

  • Flexible rule model construction method and device, terminal equipment and storage medium

    CN115496860A

  • Virtual measurement tool for a wearable visualization device

    US20160147408A1