CN113345081A - Stereo model shielding elimination method, device, equipment and storage medium - Google Patents

Stereo model shielding elimination method, device, equipment and storage medium Download PDF

Info

Publication number
CN113345081A
CN113345081A CN202110704176.5A CN202110704176A CN113345081A CN 113345081 A CN113345081 A CN 113345081A CN 202110704176 A CN202110704176 A CN 202110704176A CN 113345081 A CN113345081 A CN 113345081A
Authority
CN
China
Prior art keywords
ridge
projection
occlusion
relative position
shielded
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
CN202110704176.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.)
Guangdong 3vjia Information Technology Co Ltd
Original Assignee
Guangdong 3vjia Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong 3vjia Information Technology Co Ltd filed Critical Guangdong 3vjia Information Technology Co Ltd
Priority to CN202110704176.5A priority Critical patent/CN113345081A/en
Publication of CN113345081A publication Critical patent/CN113345081A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2021Shape modification

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to a method, a device, equipment and a storage medium for eliminating occlusion of a three-dimensional model, and relates to the field of vector three-dimensional geometric visual effects. The stereo model shielding elimination method comprises the following steps: obtaining each surface and each ridge of a plurality of three-dimensional models; respectively obtaining the shielding relation between each ridge line and each surface of each three-dimensional model; if the shielding relation is that the ridge is completely shielded by the surface, the ridge is not displayed; if the shielding relation is that the ridge is partially shielded by the surface, displaying the part of the ridge which is not shielded by the surface, and not displaying the part of the ridge which is shielded by the surface; and if the blocking relation is that the ridge is not blocked by the surface, displaying the ridge. The method and the device are used for solving the problem that the algorithm for eliminating the occlusion of the existing multiple three-dimensional models is complex.

Description

Stereo model shielding elimination method, device, equipment and storage medium
Technical Field
The present application relates to the field of vector solid geometric visual effect, and in particular, to a method, an apparatus, a device, and a storage medium for eliminating occlusion of a solid model.
Background
The three-dimensional drawing software can draw a three-dimensional model, such as: a basic three-dimensional model such as a rectangular solid, a cylinder, a triangular prism and the like, and a combined three-dimensional model such as a wardrobe, a transformer and the like which is composed of a plurality of basic three-dimensional models. In real vision, however, all ridges and surfaces in the solid model may not be visible. For example, the cuboid is composed of 12 ridge lines, but in real vision, part of the ridge lines can be blocked, and the blocked ridge lines should not be displayed, so as to achieve a visual effect closer to reality.
At present, when a plurality of three-dimensional models are shielded mutually, shielded parts are calculated, the shielded parts are eliminated and are not displayed, an algorithm is complex, shielding calculation of each three-dimensional model can influence shielding calculation of another three-dimensional model, and the processing speed is low.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for eliminating occlusion of a three-dimensional model, which are used for solving the problem that the existing algorithm for eliminating occlusion of a plurality of three-dimensional models is complex.
In a first aspect, an embodiment of the present application provides a method for eliminating occlusion of a stereo model, including:
obtaining each surface and each ridge of a plurality of three-dimensional models;
respectively obtaining the shielding relation between each ridge line and each surface of each three-dimensional model for each ridge line;
if the shielding relation is that the ridge is completely shielded by the surface, the ridge is not displayed;
if the shielding relation is that the ridge is partially shielded by the surface, displaying the part of the ridge which is not shielded by the surface, and not displaying the part of the ridge which is shielded by the surface;
and if the shielding relation is that the ridge is not shielded by the surface, displaying the ridge.
Optionally, the obtaining, for each ridge, an occlusion relationship between each ridge and each surface of each stereoscopic model includes:
acquiring a projection of each ridge and a projection of each surface of each stereoscopic model;
judging whether the projection of each ridge is intersected with the projection of each surface of each three-dimensional model or not for each ridge respectively to obtain a judgment result;
and acquiring the shielding relation according to the judgment result.
Optionally, the obtaining the occlusion relationship according to the determination result includes:
if the judgment result is that the projection of the ridge line does not intersect with the projection of the surface, the shielding relationship is that the ridge line is not shielded by the surface;
and if the judgment result is that the projection of the ridge is intersected with the projection of the surface, acquiring the relative position relation between the ridge and the surface, and acquiring the shielding relation according to the relative position relation.
Optionally, the acquiring a relative positional relationship between the ridge line and the surface includes:
acquiring any point in the ridge;
acquiring any point in the surface;
acquiring a vector formed by any point in the ridge and any point in the surface;
acquiring a normal vector of the surface;
calculating an included angle between the vector and the normal vector;
if the included angle is in a first interval, the relative position relationship is a first relative position relationship, wherein the first relative position relationship is that the ridge is in front of the surface, and the front deviates from the projection direction;
and if the interval in which the included angle is located is a second interval, the relative position relationship is a second relative position relationship, wherein the second relative position relationship is that the ridge is behind the surface, and the rear direction points to the projection direction.
Optionally, the obtaining the occlusion relationship according to the relative position relationship includes:
if the relative position relationship is the first relative position relationship, the shielding relationship is that the ridge is not shielded by the surface;
if the relative position relationship is the second relative position relationship, acquiring the projection outline of the surface, and judging whether all the projections of the ridge are in the projection outline of the surface;
if the projection of the ridge is completely inside the contour of the projection of the surface, the occlusion relationship is that the ridge is completely occluded by the surface;
and if the projection part of the ridge is inside the projection outline of the surface, the occlusion relation is that the ridge is partially occluded by the surface.
Optionally, the displaying the portion of the ridge line that is not covered by the surface and not displaying the portion of the ridge line that is covered by the surface includes:
calculating an intersection of the projection of the ridge and the projection of the surface;
calculating a difference set of the projection of the ridge and the projection of the surface;
and displaying the difference set and not displaying the intersection set.
Optionally, the determining, for each ridge, whether a projection of each ridge intersects with a projection of each surface of each stereoscopic model, to obtain a determination result includes:
calculating an intersection of the projection of the ridge and the projection of the surface;
if the intersection is an empty set, the judgment result is that the projection of the ridge line does not intersect with the projection of the surface;
and if the intersection is not an empty set, the judgment result is that the projection of the ridge line is intersected with the projection of the surface.
In a second aspect, an embodiment of the present application provides a device for eliminating occlusion of a three-dimensional model, including:
the first acquisition module is used for acquiring each surface and each ridge of the plurality of three-dimensional models;
a second obtaining module, configured to obtain, for each ridge, a shielding relationship between each ridge and each surface of each stereoscopic model;
the first processing module is used for not displaying the ridge line if the shielding relation is that the ridge line is completely shielded by the surface;
a second processing module, configured to display a portion of the ridge that is not covered by the surface and not display a portion of the ridge that is covered by the surface if the covering relationship is that the ridge is covered by the surface;
and the third processing module is used for displaying the ridge line if the shielding relation is that the ridge line is not shielded by the surface.
In a third aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor is configured to execute the program stored in the memory to implement the steps of the method for eliminating occlusion in a stereoscopic model according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the stereo model occlusion elimination method according to the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: the method provided by the embodiment of the application obtains each surface and each ridge of a plurality of three-dimensional models, and respectively obtains the shielding relation between each ridge and each surface of each three-dimensional model for each ridge, if the shielding relation is that the ridge is completely shielded by the surface, the ridge is not displayed, if the shielding relation is that the ridge is partially shielded by the surface, the part of the ridge which is not shielded by the surface is displayed, the part of the ridge which is shielded by the surface is not displayed, and if the shielding relation is that the ridge is not shielded by the surface, the ridge is displayed. Compared with the prior art that when a plurality of three-dimensional models are shielded from each other, the shielded parts are calculated, the shielded parts are eliminated and are not displayed, the algorithm is complex, the shielding calculation of each three-dimensional model can affect the shielding calculation of another three-dimensional model, and the processing speed is low, the method provided by the embodiment of the application obtains the shielding relation between each edge line and each surface of each three-dimensional model, and determines how to display the edge line according to the shielding relation, the algorithm is simple, the processing speed is high, the shielding relation of each edge line in each three-dimensional model is obtained, the shielding relation of each edge line in another three-dimensional model is not affected, therefore, the shielding relation of each three-dimensional model is obtained, and how to display the edge line is determined according to the shielding relation, the processing can be carried out independently, and the shielding elimination of the plurality of three-dimensional models can be processed by a plurality of threads in parallel, further improving the processing speed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic flow chart of a method for eliminating occlusion of a three-dimensional model according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for obtaining an occlusion relationship in an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating a method for obtaining a relative positional relationship between a ridge and a surface according to an embodiment of the present disclosure;
FIG. 4 is a schematic view of the relative position of the ridges and surfaces in one embodiment of the present application;
FIG. 5 is a schematic structural diagram of a device for eliminating occlusion of a three-dimensional model according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the embodiment of the application, a method for eliminating occlusion of a stereoscopic model is provided, and the method can be applied to a server, and certainly can also be applied to other electronic devices, such as a terminal (a mobile phone, a tablet computer, etc.). In the embodiment of the present application, the method is described as being applied to a server.
In the embodiment of the application, as shown in fig. 1, the method for eliminating occlusion of the stereo model mainly includes:
step 101, obtaining each surface and each ridge of a plurality of three-dimensional models.
Wherein a plurality means at least two. The three-dimensional model refers to a geometric body drawn in three-dimensional drawing software, and can be a basic geometric body such as a cuboid, a cylinder, a triangular prism and the like, or a combined geometric body composed of a plurality of basic geometric bodies such as a wardrobe, a transformer and the like. The surface means a surface enclosing a solid model, for example, the solid model is a cuboid, and the surface is each of 6 surfaces of the cuboid. The ridge refers to the intersection line of different surfaces, for example, the three-dimensional model is a cuboid, and the cuboid has 6 surfaces and 12 ridges.
And 102, respectively obtaining the shielding relation between each ridge line and each surface of each three-dimensional model.
The shielding relations are three, namely that the ridge is completely shielded by the surface, the ridge is partially shielded by the surface and the ridge is not shielded by the surface.
In a specific embodiment, as shown in fig. 2, the method for obtaining the occlusion relationship between each edge line and each surface of each three-dimensional model, for each edge line, mainly includes:
step 201, a projection of each ridge and a projection of each surface of each stereo model are obtained.
The projection is a graph obtained by projecting a projection line through an object to a selected projection plane and on the projection plane. Generally, in three-dimensional drawing software, a solid model is rotated to a certain angle, and a front view of the solid model at the angle is seen. The projection plane is the interface of the three-dimensional drawing software, the projection direction is perpendicular to the projection plane, and the projection direction is consistent with the sight line direction of a person watching the three-dimensional model.
Step 202, judging whether the projection of each ridge line is intersected with the projection of each surface of each stereo model respectively for each ridge line, and obtaining a judgment result.
In one embodiment, the determining, for each edge line, whether the projection of each edge line intersects with the projection of each surface of each stereoscopic model, to obtain a determination result includes: calculating the intersection of the projection of the ridge and the projection of the surface; if the intersection is an empty set, judging that the projection of the ridge and the projection of the surface are not intersected; and if the intersection set is not the empty set, judging that the projection of the ridge line is intersected with the projection of the surface. The intersection of the projection of the ridge and the projection of the surface can be calculated by boolean operations.
And step 203, acquiring the shielding relation according to the judgment result.
Obtaining a shielding relation according to the judgment result, specifically: if the judgment result is that the projection of the ridge is not intersected with the projection of the surface, the occlusion relation is that the ridge is not occluded by the surface; and if the judgment result is that the projection of the ridge is intersected with the projection of the surface, acquiring the relative position relation between the ridge and the surface, and acquiring the shielding relation according to the relative position relation.
In a specific embodiment, as shown in fig. 3, the method for obtaining the relative position relationship between the ridge and the surface mainly includes:
step 301, any point in the ridge is obtained.
Any point in the ridge may be a midpoint of the ridge, or may be an end point of the ridge.
At step 302, any point in the surface is obtained.
Step 303, obtaining a vector composed of any point in the ridge line and any point in the surface.
Wherein the direction of the vector is from any point in the ridge to any point in the surface.
Step 304, a normal vector of the surface is obtained.
Wherein the direction of the normal vector is consistent with the projection direction.
Step 305, calculating an included angle between the vector and the normal vector.
Step 306, if the section in which the included angle is located is a first section, the relative position relationship is a first relative position relationship, where the first relative position relationship is that the ridge is in front of the surface, and the front is away from the projection direction.
Wherein, the first interval is (0, 90 °), i.e. greater than 0 and less than 90 degrees.
In one embodiment, as shown in fig. 4, the solid model is a rectangular solid ABCDEFGH, the ridge is a line segment BC, the surface is a plane EFGH, any point in the ridge is an end point B of the line segment BC, any point in the surface is a point F, and a vector formed by any point in the ridge and any point in the surface is a vector
Figure BDA0003131517110000071
Measuring vector quantity by normal quantity
Figure BDA0003131517110000072
Computing vectors
Figure BDA0003131517110000073
Sum normal vector
Figure BDA0003131517110000074
The included angle between the first and second edges is greater than 0 and less than 90 degrees, the included angle is a first interval, and the ridge line BC is in front of the surface EFGH.
Step 307, if the interval in which the included angle is located is a second interval, the relative position relationship is a second relative position relationship, where the second relative position relationship is that the ridge is behind the surface, and the rear direction is toward the projection direction.
Wherein the second interval is (90 °, 180 °), i.e. greater than 90 degrees and less than 180 degrees.
In one embodiment, as shown in fig. 4, the three-dimensional model is a rectangular parallelepiped ABCDEFGH, the edge line is a line segment EF, the surface is a plane ABCD, any point in the edge line is an end point F of the line segment EF, any point in the surface is a point B, and a vector formed by any point in the edge line and any point in the surface is a vector
Figure BDA0003131517110000081
Measuring vector quantity by normal quantity
Figure BDA0003131517110000082
Computing vectors
Figure BDA0003131517110000083
Sum normal vector
Figure BDA0003131517110000084
The included angle between the first and second edges is greater than 90 degrees and less than 180 degrees, the included angle is in the second interval, and the ridge line EF is behind the surface ABCD.
In a specific embodiment, the method for obtaining the occlusion relationship according to the relative position relationship mainly includes: if the relative position relationship is the first relative position relationship, the shielding relationship is that the ridge is not shielded by the surface; if the relative position relationship is the second relative position relationship, acquiring the contour of the projection of the surface, and judging whether all the projections of the ridge are in the contour of the projection of the surface; if the projection of the ridge is completely inside the contour of the projection of the surface, the shielding relation is that the ridge is completely shielded by the surface; if the projected portion of the ridge is inside the projected outline of the surface, the occlusion relationship is that the ridge is partially occluded by the surface.
And 103, if the blocking relation is that the ridge is completely blocked by the surface, not displaying the ridge.
And 104, if the blocking relation is that the ridge is blocked by the surface part, displaying the part of the ridge which is not blocked by the surface, and not displaying the part of the ridge which is blocked by the surface.
In one embodiment, the method for displaying the portion of the ridge line that is not covered by the surface and not displaying the portion of the ridge line that is covered by the surface mainly includes: calculating the intersection of the projection of the ridge and the projection of the surface; calculating a difference set of the projection of the ridge and the projection of the surface; and displaying the difference set and not displaying the intersection set. The intersection of the projection of the ridge with the projection of the surface, and the difference set of the projection of the ridge with the projection of the surface can be calculated by boolean operations.
And 105, if the blocking relation is that the ridge is not blocked by the surface, displaying the ridge.
To sum up, the method provided by the embodiment of the present application obtains each surface and each edge line of a plurality of three-dimensional models, and obtains the shielding relationship between each edge line and each surface of each three-dimensional model for each edge line respectively, if the shielding relationship is that the edge line is completely shielded by the surface, the edge line is not displayed, if the shielding relationship is that the edge line is partially shielded by the surface, the part of the edge line which is not shielded by the surface is displayed, the part of the edge line which is shielded by the surface is not displayed, and if the shielding relationship is that the edge line is not shielded by the surface, the edge line is displayed. Compared with the prior art that when a plurality of three-dimensional models are shielded from each other, the shielded parts are calculated, the shielded parts are eliminated and are not displayed, the algorithm is complex, the shielding calculation of each three-dimensional model can affect the shielding calculation of another three-dimensional model, and the processing speed is low, the method provided by the embodiment of the application obtains the shielding relation between each edge line and each surface of each three-dimensional model, and determines how to display the edge line according to the shielding relation, the algorithm is simple, the processing speed is high, the shielding relation of each edge line in each three-dimensional model is obtained, the shielding relation of each edge line in another three-dimensional model is not affected, therefore, the shielding relation of each three-dimensional model is obtained, and how to display the edge line is determined according to the shielding relation, the processing can be carried out independently, and the shielding elimination of the plurality of three-dimensional models can be processed by a plurality of threads in parallel, further improving the processing speed.
Based on the same concept, the embodiment of the present application provides a device for eliminating occlusion of a three-dimensional model, and the specific implementation of the device may refer to the description of the method embodiment, and repeated descriptions are omitted, as shown in fig. 5, the device mainly includes:
a first obtaining module 501, configured to obtain each surface and each ridge of a plurality of three-dimensional models;
a second obtaining module 502, configured to obtain, for each edge line, a blocking relationship between each edge line and each surface of each stereoscopic model;
a first processing module 503, configured to not display the ridge if the occlusion relationship is that the ridge is completely occluded by the surface;
a second processing module 504, configured to, if the occlusion relationship is that the edge line is partially occluded by the surface, display a portion of the edge line that is not occluded by the surface, and not display a portion of the edge line that is occluded by the surface;
a third processing module 505, configured to display the ridge if the occlusion relationship is that the ridge is not occluded by the surface.
Based on the same concept, an embodiment of the present application further provides an electronic device, as shown in fig. 6, the electronic device mainly includes: a processor 601, a memory 602, and a communication bus 603, wherein the processor 601 and the memory 602 communicate with each other via the communication bus 603. The memory 602 stores a program executable by the processor 601, and the processor 601 executes the program stored in the memory 602 to implement the following steps:
obtaining each surface and each ridge of a plurality of three-dimensional models; respectively obtaining the shielding relation between each ridge line and each surface of each three-dimensional model; if the shielding relation is that the ridge is completely shielded by the surface, the ridge is not displayed; if the shielding relation is that the ridge is partially shielded by the surface, displaying the part of the ridge which is not shielded by the surface, and not displaying the part of the ridge which is shielded by the surface; and if the blocking relation is that the ridge is not blocked by the surface, displaying the ridge.
The communication bus 603 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 603 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The Memory 602 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one storage device located remotely from the processor 601.
The Processor 601 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like, and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program, which, when run on a computer, causes the computer to execute the stereo model occlusion elimination method described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for eliminating occlusion of a three-dimensional model is characterized by comprising the following steps:
obtaining each surface and each ridge of a plurality of three-dimensional models;
respectively obtaining the shielding relation between each ridge line and each surface of each three-dimensional model for each ridge line;
if the shielding relation is that the ridge is completely shielded by the surface, the ridge is not displayed;
if the shielding relation is that the ridge is partially shielded by the surface, displaying the part of the ridge which is not shielded by the surface, and not displaying the part of the ridge which is shielded by the surface;
and if the shielding relation is that the ridge is not shielded by the surface, displaying the ridge.
2. The method for eliminating occlusion of a three-dimensional model according to claim 1, wherein the obtaining, for each ridge, an occlusion relationship between each ridge and each surface of each three-dimensional model comprises:
acquiring a projection of each ridge and a projection of each surface of each stereoscopic model;
judging whether the projection of each ridge is intersected with the projection of each surface of each three-dimensional model or not for each ridge respectively to obtain a judgment result;
and acquiring the shielding relation according to the judgment result.
3. The method for eliminating occlusion of a three-dimensional model according to claim 2, wherein the obtaining the occlusion relationship according to the determination result comprises:
if the judgment result is that the projection of the ridge line does not intersect with the projection of the surface, the shielding relationship is that the ridge line is not shielded by the surface;
and if the judgment result is that the projection of the ridge is intersected with the projection of the surface, acquiring the relative position relation between the ridge and the surface, and acquiring the shielding relation according to the relative position relation.
4. The method for eliminating occlusion of a stereoscopic model according to claim 3, wherein the obtaining of the relative positional relationship between the ridge line and the surface comprises:
acquiring any point in the ridge;
acquiring any point in the surface;
acquiring a vector formed by any point in the ridge and any point in the surface;
acquiring a normal vector of the surface;
calculating an included angle between the vector and the normal vector;
if the included angle is in a first interval, the relative position relationship is a first relative position relationship, wherein the first relative position relationship is that the ridge is in front of the surface, and the front deviates from the projection direction;
and if the interval in which the included angle is located is a second interval, the relative position relationship is a second relative position relationship, wherein the second relative position relationship is that the ridge is behind the surface, and the rear direction points to the projection direction.
5. The method for eliminating occlusion of a three-dimensional model according to claim 4, wherein the obtaining the occlusion relationship according to the relative position relationship comprises:
if the relative position relationship is the first relative position relationship, the shielding relationship is that the ridge is not shielded by the surface;
if the relative position relationship is the second relative position relationship, acquiring the projection outline of the surface, and judging whether all the projections of the ridge are in the projection outline of the surface;
if the projection of the ridge is completely inside the contour of the projection of the surface, the occlusion relationship is that the ridge is completely occluded by the surface;
and if the projection part of the ridge is inside the projection outline of the surface, the occlusion relation is that the ridge is partially occluded by the surface.
6. The method for eliminating occlusion of a stereoscopic model according to claim 5, wherein the displaying the portion of the ridge line that is not occluded by the surface and not displaying the portion of the ridge line that is occluded by the surface comprises:
calculating an intersection of the projection of the ridge and the projection of the surface;
calculating a difference set of the projection of the ridge and the projection of the surface;
and displaying the difference set and not displaying the intersection set.
7. The method for eliminating occlusion of a stereoscopic model according to claim 2, wherein the determining, for each ridge, whether the projection of each ridge intersects with the projection of each surface of each stereoscopic model, to obtain the determination result, comprises:
calculating an intersection of the projection of the ridge and the projection of the surface;
if the intersection is an empty set, the judgment result is that the projection of the ridge line does not intersect with the projection of the surface;
and if the intersection is not an empty set, the judgment result is that the projection of the ridge line is intersected with the projection of the surface.
8. A stereoscopic model occlusion elimination apparatus, comprising:
the first acquisition module is used for acquiring each surface and each ridge of the plurality of three-dimensional models;
a second obtaining module, configured to obtain, for each ridge, a shielding relationship between each ridge and each surface of each stereoscopic model;
the first processing module is used for not displaying the ridge line if the shielding relation is that the ridge line is completely shielded by the surface;
a second processing module, configured to display a portion of the ridge that is not covered by the surface and not display a portion of the ridge that is covered by the surface if the covering relationship is that the ridge is covered by the surface;
and the third processing module is used for displaying the ridge line if the shielding relation is that the ridge line is not shielded by the surface.
9. An electronic device, comprising: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor is configured to execute the program stored in the memory to implement the steps of the stereo model occlusion elimination method according to any one of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for stereo model occlusion elimination of any of claims 1 to 7.
CN202110704176.5A 2021-06-24 2021-06-24 Stereo model shielding elimination method, device, equipment and storage medium Pending CN113345081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110704176.5A CN113345081A (en) 2021-06-24 2021-06-24 Stereo model shielding elimination method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110704176.5A CN113345081A (en) 2021-06-24 2021-06-24 Stereo model shielding elimination method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113345081A true CN113345081A (en) 2021-09-03

Family

ID=77478428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110704176.5A Pending CN113345081A (en) 2021-06-24 2021-06-24 Stereo model shielding elimination method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113345081A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398707A (en) * 2022-01-15 2022-04-26 清华大学 Method, device and equipment for determining space shielding information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002042160A (en) * 2000-07-26 2002-02-08 Ricoh Co Ltd Device and method for processing three-dimensional shape and storage medium storing program for performing this method
CN107422952A (en) * 2017-05-04 2017-12-01 广州视源电子科技股份有限公司 Method, device and equipment for displaying three-dimensional graph
CN111080798A (en) * 2019-12-02 2020-04-28 网易(杭州)网络有限公司 Visibility data processing method of virtual scene and rendering method of virtual scene
CN112330536A (en) * 2021-01-04 2021-02-05 航天宏图信息技术股份有限公司 Sensor data processing method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002042160A (en) * 2000-07-26 2002-02-08 Ricoh Co Ltd Device and method for processing three-dimensional shape and storage medium storing program for performing this method
CN107422952A (en) * 2017-05-04 2017-12-01 广州视源电子科技股份有限公司 Method, device and equipment for displaying three-dimensional graph
CN111080798A (en) * 2019-12-02 2020-04-28 网易(杭州)网络有限公司 Visibility data processing method of virtual scene and rendering method of virtual scene
CN112330536A (en) * 2021-01-04 2021-02-05 航天宏图信息技术股份有限公司 Sensor data processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398707A (en) * 2022-01-15 2022-04-26 清华大学 Method, device and equipment for determining space shielding information

Similar Documents

Publication Publication Date Title
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
WO2018119794A1 (en) Display data processing method and apparatus
CN110853488B (en) POI (Point of interest) label display method, device and equipment
CN111695429A (en) Video image target association method and device and terminal equipment
CN109887062B (en) Rendering method, device, equipment and storage medium
CN111489290A (en) Face image super-resolution reconstruction method and device and terminal equipment
CN109685764B (en) Product positioning method and device and terminal equipment
CN108564645B (en) Rendering method of house model, terminal device and medium
CN110850961A (en) Calibration method of head-mounted display equipment and head-mounted display equipment
WO2021092771A1 (en) Target detection method and apparatus, and device and storage medium
CN113345081A (en) Stereo model shielding elimination method, device, equipment and storage medium
CN108564604B (en) Binocular vision stereo matching method and device based on plane constraint and triangulation
CN110032941B (en) Face image detection method, face image detection device and terminal equipment
US10437351B2 (en) Method for detecting input device and detection device
CN110287361A (en) A kind of personage's picture screening technique and device
CN111553962A (en) Chart display method, system and display equipment
CN111105440A (en) Method, device and equipment for tracking target object in video and storage medium
CN112785650A (en) Camera parameter calibration method and device
CN109388311A (en) A kind of image display method, device and equipment
US9501862B2 (en) Visibility silhouettes for masked spherical integration
CN113240720B (en) Three-dimensional surface reconstruction method and device, server and readable storage medium
CN115035188A (en) Target-based distance measurement method and device and terminal equipment
CN111754632B (en) Business service processing method, device, equipment and storage medium
CN114693780A (en) Image processing method, device, equipment, storage medium and program product
CN114463512A (en) Point cloud data processing method, vectorization method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination