CN112848312A - Method and device for detecting three-dimensional model object, computer equipment and storage medium - Google Patents

Method and device for detecting three-dimensional model object, computer equipment and storage medium Download PDF

Info

Publication number
CN112848312A
CN112848312A CN202110139413.8A CN202110139413A CN112848312A CN 112848312 A CN112848312 A CN 112848312A CN 202110139413 A CN202110139413 A CN 202110139413A CN 112848312 A CN112848312 A CN 112848312A
Authority
CN
China
Prior art keywords
dimensional model
determining
model object
detecting
mapping relation
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.)
Granted
Application number
CN202110139413.8A
Other languages
Chinese (zh)
Other versions
CN112848312B (en
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.)
Shenzhen Chuangxiang 3D Technology Co Ltd
Original Assignee
Shenzhen Chuangxiang 3D 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 Shenzhen Chuangxiang 3D Technology Co Ltd filed Critical Shenzhen Chuangxiang 3D Technology Co Ltd
Priority to CN202110139413.8A priority Critical patent/CN112848312B/en
Publication of CN112848312A publication Critical patent/CN112848312A/en
Application granted granted Critical
Publication of CN112848312B publication Critical patent/CN112848312B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B29WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
    • B29CSHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
    • B29C64/00Additive manufacturing, i.e. manufacturing of three-dimensional [3D] objects by additive deposition, additive agglomeration or additive layering, e.g. by 3D printing, stereolithography or selective laser sintering
    • B29C64/30Auxiliary operations or equipment
    • B29C64/386Data acquisition or data processing for additive manufacturing
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B33ADDITIVE MANUFACTURING TECHNOLOGY
    • B33YADDITIVE MANUFACTURING, i.e. MANUFACTURING OF THREE-DIMENSIONAL [3-D] OBJECTS BY ADDITIVE DEPOSITION, ADDITIVE AGGLOMERATION OR ADDITIVE LAYERING, e.g. BY 3-D PRINTING, STEREOLITHOGRAPHY OR SELECTIVE LASER SINTERING
    • B33Y50/00Data acquisition or data processing for additive manufacturing

Landscapes

  • Chemical & Material Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Materials Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • Mechanical Engineering (AREA)
  • Optics & Photonics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a method and a device for detecting a three-dimensional model object, computer equipment and a storage medium. The method comprises the following steps: acquiring pixel points selected by a user in a current display picture; determining a target color identifier of a pixel point; determining a target triangular plate corresponding to the target color identifier according to the mapping relation between the triangular plate of the three-dimensional model in the scene and the color identifier; and determining the three-dimensional model object selected by the user according to the target triangular plate. According to the technical scheme provided by the embodiment of the invention, the mode of color coding the triangular plates is adopted, so that the currently selected object of the user can be directly determined, and the specific triangular plate in the selected object can be directly determined, the object detection process has high real-time performance, the efficiency of three-dimensional model object detection is greatly improved, less memory is occupied, and better support is provided for further scene interaction.

Description

Method and device for detecting three-dimensional model object, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of three-dimensional printing, in particular to a method and a device for detecting a three-dimensional model object, computer equipment and a storage medium.
Background
The 3D printing software is software for processing a 3D model, and management and interaction of scenes are the most basic requirements. In a scene containing a plurality of objects, how to quickly determine which object and even which part of the object is operated by a user is a basic technology. Objects in the scene are generally managed using a spatial data structure such as an octree, and interaction is generally generated by detecting a collision between a ray generated by a mouse and all objects in the scene.
However, under a large scene and a large model, the detection method sometimes has difficulty in achieving a real-time effect. And general detection is hierarchical, which object is selected by a user is confirmed by using an octree and a bounding box, and then the object is detected by using rays and a KD tree to further detect the collided triangular plate.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting a three-dimensional model object, computer equipment and a storage medium, which are used for improving the efficiency of detecting the three-dimensional model object and reducing the occupation of a memory.
In a first aspect, an embodiment of the present invention provides a method for detecting a three-dimensional model object, where the method includes:
acquiring pixel points selected by a user in a current display picture;
determining a target color identifier of the pixel point;
determining a target triangular plate corresponding to the target color identifier according to a mapping relation between triangular plates of a three-dimensional model in a scene and the color identifier;
and determining the three-dimensional model object selected by the user according to the target triangular plate.
Optionally, before the obtaining of the pixel point selected by the user in the current display image, the method further includes:
determining the mapping relation;
and rendering the current display picture in real time according to the mapping relation.
Optionally, the type of the color identifier is RGBA.
Optionally, the determining the mapping relationship includes:
coding all the triangular plates in the scene;
determining the mapping relation according to the encoding result and a mapping formula;
the mapping formula is as follows:
r=ti/(0x1000000)
g=(ti-r*0x1000000)/0x10000
b=(ti-r*0x1000000-g*0x10000)/0x100
a=ti-r*0x1000000-g*0x10000-b*0x100
wherein, tiAnd representing the encoding result, (r, g, b, a) represents the color identification, r, g, b and a are the values of the four channels of RGBA respectively, and 0x represents hexadecimal.
In a second aspect, an embodiment of the present invention further provides an apparatus for detecting a three-dimensional model object, where the apparatus includes:
the pixel point acquisition module is used for acquiring pixel points selected by a user in a current display picture;
the color identification determining module is used for determining the target color identification of the pixel point;
the triangular plate determining module is used for determining a target triangular plate corresponding to the target color identifier according to the mapping relation between the triangular plate of the three-dimensional model in the scene and the color identifier;
and the model object determining module is used for determining the three-dimensional model object selected by the user according to the target triangular plate.
Optionally, the apparatus further comprises:
the mapping relation determining module is used for determining the mapping relation before the pixel point selected by the user in the current display picture is obtained;
and the picture rendering module is used for rendering the current display picture in real time according to the mapping relation.
Optionally, the type of the color identifier is RGBA.
Optionally, the mapping relationship determining module includes:
the encoding unit is used for encoding all the triangular plates in the scene;
the mapping relation determining unit is used for determining the mapping relation according to the coding result and the mapping formula;
the mapping formula is as follows:
r=ti/(0x1000000)
g=(ti-r*0x1000000)/0x10000
b=(ti-r*0x1000000-g*0x10000)/0x100
a=ti-r*0x1000000-g*0x10000-b*0x100
wherein, tiAnd representing the encoding result, (r, g, b, a) represents the color identification, r, g, b and a are the values of the four channels of RGBA respectively, and 0x represents hexadecimal.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting a three-dimensional model object provided by any of the embodiments of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for detecting a three-dimensional model object provided in any embodiment of the present invention.
The embodiment of the invention provides a method for detecting a three-dimensional model object, which comprises the steps of firstly obtaining a pixel point selected by a user in a current display picture, then determining a target color identifier of the pixel point, and then determining a target triangular plate corresponding to the target color identifier according to a mapping relation between a triangular plate of a three-dimensional model in a scene and the color identifier, so that the three-dimensional model object selected by the user can be determined according to the target triangular plate. By adopting the mode of carrying out color coding on the triangular plates, the method can directly determine the object currently selected by the user and directly determine which specific triangular plate in the object is selected, the object detection process has high real-time performance, the efficiency of three-dimensional model object detection is greatly improved, smaller memory is occupied, and better support is provided for further scene interaction.
Furthermore, before the pixel points selected by the user are obtained, firstly, a required mapping relation can be determined in a certain mode, and the current display picture is rendered in real time according to the mapping relation, so that the color identifier of each pixel point in the current display picture is obtained, the corresponding target color identifier is determined according to the pixel points selected by the user, and then the target triangular plate is determined.
Furthermore, the type of the color identification can be RGBA, so that a large number of color identification combinations can be obtained to describe more triangular plates and three-dimensional model objects, and the current requirement of 3D printing is better met.
Further, a specific mapping relation obtaining method is provided, the triangular plate is coded, and the color identification corresponding to each coding result is directly obtained through a designed mapping formula, so that the one-to-one mapping relation between the triangular plate and the color identification is automatically and simply generated, and the subsequent process of determining the target triangular plate is conveniently realized.
Drawings
Fig. 1 is a flowchart of a method for detecting a three-dimensional model object according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a detection apparatus for a three-dimensional model object according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a method for detecting a three-dimensional model object according to an embodiment of the present invention. The embodiment is applicable to the situation that in the design process before the three-dimensional model is printed, the object selected by the user is determined according to the user behavior so as to realize scene interaction with the user, and the method can be executed by the detection device of the three-dimensional model object provided by the embodiment of the invention, and the device can be realized by hardware and/or software and can be generally integrated in computer equipment. As shown in fig. 1, the method specifically comprises the following steps:
and S11, acquiring the pixel points selected by the user in the current display picture.
Specifically, in the process of using some software for processing the three-dimensional model, the computer device may display the scene where the model is located at a certain time to the user through the screen as a current display picture. The current display picture is composed of a plurality of pixel points, and may include some pixel points of images other than scenes such as software functional areas and the like besides the scene where the model is located, so that after the pixel points selected by the user are obtained, whether the pixel points selected by the user belong to the scene can be firstly determined, if not, subsequent operations can be omitted, and the original functions can be realized in the original mode, for example, a certain function key in the software functional area is triggered, and corresponding functions are executed and the like. The obtaining of the pixel point selected by the user may be determined according to a specific coordinate clicked by the user using a mouse.
And S12, determining the target color identification of the pixel point.
Specifically, in general software for processing a 3D model, a display rendering pipeline of the GPU is provided, and pixels displayed after rendering all have corresponding color identifiers, which can indicate colors to be displayed by the corresponding pixels. After the pixel point selected by the user is determined, the target color identification of the pixel point can be returned through a glReadPixel function provided by the rendering application program interface, and the glReadPixel function can read the pixel at the drawn specified coordinate position into the memory, so that the information of the pixel is utilized.
And S13, determining a target triangular plate corresponding to the target color identification according to the mapping relation between the triangular plate of the three-dimensional model in the scene and the color identification.
Specifically, the mapping relationship between the triangular plate and the color identifier may be preset, and after the target color identifier of the pixel point selected by the user is determined, the corresponding target triangular plate may be determined according to the mapping relationship. The triangular plate is used to form the outer contour of the three-dimensional model, and can be obtained by triangulating the three-dimensional model by a method such as an ear cutting method.
And S14, determining the three-dimensional model object selected by the user according to the target triangular plate.
Specifically, each triangle in the scene only belongs to one three-dimensional model object, and after the target triangle selected by the user is determined, the three-dimensional model object to which the target triangle belongs, that is, the three-dimensional model object to be selected by the user, can be determined.
On the basis of the above technical solution, optionally, before obtaining the pixel point selected by the user in the current display picture, the method further includes: determining a mapping relation; and rendering the current display picture in real time according to the mapping relation. Specifically, a certain mode can be adopted to automatically generate the required mapping relation, so that the efficiency of detecting the three-dimensional model object is further improved, and the manual use is saved. And then rendering the current display picture in real time according to the determined mapping relation to ensure that each triangular plate correspondingly displays respective color, so that the triangular plates can be reversely mapped to the appointed triangular plates through color selection. With the operation of a user, images in a scene may change in real time, such as changes in the angle and size of a three-dimensional model, and the like, and a current display screen needs to be rendered in real time to constantly maintain the mapping relationship between the triangular plate and the display color.
Further optionally, the type of the color identifier is RGBA. Specifically, when a pixel is composed of RGBA, i.e., 4 characters of 8 bits, 2 can be expressed32In an extreme case, 400 objects may be described, and each object may include 5000000 triangular plates, so that more triangular plates and three-dimensional model objects may be described to better meet the current requirement of 3D printing.
Further optionally, determining the mapping relationship includes: coding all the triangular plates in the scene; determining a mapping relation according to the coding result and a mapping formula; the mapping formula is as follows:
r=ti/(0x1000000)
g=(ti-r*0x1000000)/0x10000
b=(ti-r*0x1000000-g*0x10000)/0x100
a=ti-r*0x1000000-g*0x10000-b*0x100
wherein, tiAnd (3) representing an encoding result, (r, g, b, a) represents color identification, r, g, b and a are values of four channels of RGBA respectively, and 0x represents hexadecimal.
Specifically, all the triangular plates in the scene may be encoded first, and assuming that the ith three-dimensional model object in the scene contains the number of triangular plates Ti, the basic encoding of the ith three-dimensional model object may be calculated in an accumulation manner as
Figure BDA0002928005590000081
Then, for the ith three-dimensional model, the jth triangle in the ith three-dimensional model is coded as
Figure BDA0002928005590000082
Therefore, the coding result corresponding to each triangular plate in the scene one by one is obtained, and the mapping relation is determined through the mapping formula in the following process. Then, according to the mapping formula and the determined encoding result, the color identifier corresponding to each encoded triangle can be calculated, so that the mapping relation between the triangles and the color identifiers is formed. After the mapping relation is obtained, each triangular plate can obtain a unique color identifier during rendering, and therefore the triangular plate which is reversely mapped to the model through color selection is better achieved. The triangular plate is coded, and the color identification corresponding to each coding result is directly obtained through the mapping formula, so that the mapping relation required by automatic and simple generation is realized, and the subsequent process of determining the target triangular plate is facilitated.
According to the technical scheme provided by the embodiment of the invention, the pixel point selected by the user in the current display picture is firstly obtained, then the target color identification of the pixel point is determined, and then the target triangular plate corresponding to the target color identification is determined according to the mapping relation between the triangular plate and the color identification of the three-dimensional model in the scene, so that the three-dimensional model object selected by the user can be determined according to the target triangular plate. By adopting the mode of carrying out color coding on the triangular plates, the method can directly determine the object currently selected by the user and directly determine which specific triangular plate in the object is selected, the object detection process has high real-time performance, the efficiency of three-dimensional model object detection is greatly improved, smaller memory is occupied, and better support is provided for further scene interaction.
Example two
Fig. 2 is a schematic structural diagram of a detection apparatus for a three-dimensional model object according to a second embodiment of the present invention, which may be implemented by hardware and/or software, and may be generally integrated in a computer device. As shown in fig. 2, the apparatus includes:
a pixel point obtaining module 21, configured to obtain a pixel point selected by a user in a current display image;
a color identifier determining module 22, configured to determine a target color identifier of a pixel point;
the triangular plate determining module 23 is configured to determine a target triangular plate corresponding to the target color identifier according to a mapping relationship between a triangular plate of the three-dimensional model in the scene and the color identifier;
and the model object determining module 24 is used for determining the three-dimensional model object selected by the user according to the target triangular plate.
According to the technical scheme provided by the embodiment of the invention, the pixel point selected by the user in the current display picture is firstly obtained, then the target color identification of the pixel point is determined, and then the target triangular plate corresponding to the target color identification is determined according to the mapping relation between the triangular plate and the color identification of the three-dimensional model in the scene, so that the three-dimensional model object selected by the user can be determined according to the target triangular plate. By adopting the mode of carrying out color coding on the triangular plates, the method can directly determine the object currently selected by the user and directly determine which specific triangular plate in the object is selected, the object detection process has high real-time performance, the efficiency of three-dimensional model object detection is greatly improved, smaller memory is occupied, and better support is provided for further scene interaction.
On the basis of the above technical solution, optionally, the apparatus for detecting a three-dimensional model object further includes:
the mapping relation determining module is used for determining the mapping relation before acquiring pixel points selected by a user in the current display picture;
and the picture rendering module is used for rendering the current display picture in real time according to the mapping relation.
On the basis of the above technical solution, optionally, the type of the color identifier is RGBA.
On the basis of the above technical solution, optionally, the mapping relationship determining module includes:
the encoding unit is used for encoding all the triangular plates in the scene;
the mapping relation determining unit is used for determining the mapping relation according to the coding result and the mapping formula;
the mapping formula is as follows:
r=ti/(0x1000000)
g=(ti-r*0x1000000)/0x10000
b=(ti-r*0x1000000-g*0x10000)/0x100
a=ti-r*0x1000000-g*0x10000-b*0x100
wherein, tiAnd (3) representing an encoding result, (r, g, b, a) represents color identification, r, g, b and a are values of four channels of RGBA respectively, and 0x represents hexadecimal.
The detection device for the three-dimensional model object provided by the embodiment of the invention can execute the detection method for the three-dimensional model object provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the detection apparatus for a three-dimensional model object, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a computer device provided in the third embodiment of the present invention, and shows a block diagram of an exemplary computer device suitable for implementing the embodiment of the present invention. The computer device shown in fig. 3 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present invention. As shown in fig. 3, the computer apparatus includes a processor 31, a memory 32, an input device 33, and an output device 34; the number of the processors 31 in the computer device may be one or more, one processor 31 is taken as an example in fig. 3, the processor 31, the memory 32, the input device 33 and the output device 34 in the computer device may be connected by a bus or in other ways, and the connection by the bus is taken as an example in fig. 3.
The memory 32 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the detection method of the three-dimensional model object in the embodiment of the present invention (for example, the pixel point obtaining module 21, the color identification determining module 22, the triangle piece determining module 23, and the model object determining module 24 in the detection device of the three-dimensional model object). The processor 31 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 32, that is, implements the above-described detection method of the three-dimensional model object.
The memory 32 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 32 may further include memory located remotely from the processor 31, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 33 is operable to acquire a pixel point selected by a user and to generate key signal inputs and the like relating to user settings and function control of the computer apparatus. The output device 34 may include a display screen or the like, and may be used for providing a display to a user, performing scene interaction, and the like.
Example four
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for detecting a three-dimensional model object, the method including:
acquiring pixel points selected by a user in a current display picture;
determining a target color identifier of a pixel point;
determining a target triangular plate corresponding to the target color identifier according to the mapping relation between the triangular plate of the three-dimensional model in the scene and the color identifier;
and determining the three-dimensional model object selected by the user according to the target triangular plate.
The storage medium may be any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system connected to the computer system through a network (such as the internet). The second computer system may provide the program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the method for detecting a three-dimensional model object provided by any embodiments of the present invention.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for detecting a three-dimensional model object, comprising:
acquiring pixel points selected by a user in a current display picture;
determining a target color identifier of the pixel point;
determining a target triangular plate corresponding to the target color identifier according to a mapping relation between triangular plates of a three-dimensional model in a scene and the color identifier;
and determining the three-dimensional model object selected by the user according to the target triangular plate.
2. The method for detecting a three-dimensional model object according to claim 1, further comprising, before the obtaining of the pixel point selected by the user in the current display screen:
determining the mapping relation;
and rendering the current display picture in real time according to the mapping relation.
3. The method for detecting a three-dimensional model object according to claim 2, wherein the type of the color marker is RGBA.
4. The method for detecting a three-dimensional model object according to claim 3, wherein said determining the mapping relationship comprises:
coding all the triangular plates in the scene;
determining the mapping relation according to the encoding result and a mapping formula;
the mapping formula is as follows:
r=ti/(0x1000000)
g=(ti-r*0x1000000)/0x10000
b=(ti-r*0x1000000-g*0x10000)/0x100
a=ti-r*0x1000000-g*0x10000-b*0x100
wherein, tiAnd representing the encoding result, (r, g, b, a) represents the color identification, r, g, b and a are the values of the four channels of RGBA respectively, and 0x represents hexadecimal.
5. An apparatus for detecting a three-dimensional model object, comprising:
the pixel point acquisition module is used for acquiring pixel points selected by a user in a current display picture;
the color identification determining module is used for determining the target color identification of the pixel point;
the triangular plate determining module is used for determining a target triangular plate corresponding to the target color identifier according to the mapping relation between the triangular plate of the three-dimensional model in the scene and the color identifier;
and the model object determining module is used for determining the three-dimensional model object selected by the user according to the target triangular plate.
6. The apparatus for detecting a three-dimensional model object according to claim 5, wherein said apparatus further comprises:
the mapping relation determining module is used for determining the mapping relation before the pixel point selected by the user in the current display picture is obtained;
and the picture rendering module is used for rendering the current display picture in real time according to the mapping relation.
7. The apparatus for detecting three-dimensional model object according to claim 6, wherein the type of the color indicator is RGBA.
8. The apparatus for detecting three-dimensional model objects according to claim 7, wherein the mapping relation determining module comprises:
the encoding unit is used for encoding all the triangular plates in the scene;
the mapping relation determining unit is used for determining the mapping relation according to the coding result and the mapping formula;
the mapping formula is as follows:
r=ti/(0x1000000)
g=(ti-r*0x1000000)/0x10000
b=(ti-r*0x1000000-g*0x10000)/0x100
a=ti-r*0x1000000-g*0x10000-b*0x100
wherein, tiAnd representing the encoding result, (r, g, b, a) represents the color identification, r, g, b and a are the values of the four channels of RGBA respectively, and 0x represents hexadecimal.
9. A computer device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method of detecting a three-dimensional model object as recited in any of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for detecting a three-dimensional model object according to any one of claims 1 to 4.
CN202110139413.8A 2021-02-01 2021-02-01 Method and device for detecting three-dimensional model object, computer equipment and storage medium Active CN112848312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110139413.8A CN112848312B (en) 2021-02-01 2021-02-01 Method and device for detecting three-dimensional model object, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110139413.8A CN112848312B (en) 2021-02-01 2021-02-01 Method and device for detecting three-dimensional model object, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112848312A true CN112848312A (en) 2021-05-28
CN112848312B CN112848312B (en) 2022-10-11

Family

ID=75986029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110139413.8A Active CN112848312B (en) 2021-02-01 2021-02-01 Method and device for detecting three-dimensional model object, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112848312B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609667A (en) * 2021-07-30 2021-11-05 深圳市创想三维科技股份有限公司 Model layout method, model layout device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5731814A (en) * 1995-12-27 1998-03-24 Oracle Corporation Method and apparatus for identifying an object selected on a computer output display
US20030098881A1 (en) * 2001-11-29 2003-05-29 Holger Nolte System and method for implementing a three-dimensional graphic user interface
CN1607550A (en) * 2003-10-15 2005-04-20 财团法人工业技术研究院 Method for constructing three-dimensional regularized color model
US20150138201A1 (en) * 2013-11-20 2015-05-21 Fovia, Inc. Volume rendering color mapping on polygonal objects for 3-d printing
US20160318259A1 (en) * 2015-05-03 2016-11-03 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
CN107199699A (en) * 2016-03-18 2017-09-26 三纬国际立体列印科技股份有限公司 Colorful three-dimensional model cuts a layer Method of printing
CN108437449A (en) * 2018-03-21 2018-08-24 北京印刷学院 3D printing color rendering method, apparatus and system
US20190355155A1 (en) * 2018-05-18 2019-11-21 The Governing Council Of The University Of Toronto Method and system for color representation generation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5731814A (en) * 1995-12-27 1998-03-24 Oracle Corporation Method and apparatus for identifying an object selected on a computer output display
US20030098881A1 (en) * 2001-11-29 2003-05-29 Holger Nolte System and method for implementing a three-dimensional graphic user interface
CN1607550A (en) * 2003-10-15 2005-04-20 财团法人工业技术研究院 Method for constructing three-dimensional regularized color model
US20150138201A1 (en) * 2013-11-20 2015-05-21 Fovia, Inc. Volume rendering color mapping on polygonal objects for 3-d printing
US20160318259A1 (en) * 2015-05-03 2016-11-03 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
CN107199699A (en) * 2016-03-18 2017-09-26 三纬国际立体列印科技股份有限公司 Colorful three-dimensional model cuts a layer Method of printing
CN108437449A (en) * 2018-03-21 2018-08-24 北京印刷学院 3D printing color rendering method, apparatus and system
US20190355155A1 (en) * 2018-05-18 2019-11-21 The Governing Council Of The University Of Toronto Method and system for color representation generation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609667A (en) * 2021-07-30 2021-11-05 深圳市创想三维科技股份有限公司 Model layout method, model layout device, computer equipment and storage medium
CN113609667B (en) * 2021-07-30 2024-03-15 深圳市创想三维科技股份有限公司 Model layout method, apparatus, computer device and storage medium

Also Published As

Publication number Publication date
CN112848312B (en) 2022-10-11

Similar Documents

Publication Publication Date Title
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
CN111640180B (en) Three-dimensional reconstruction method and device and terminal equipment
US20080129734A1 (en) Apparatus and method of ray-triangle collision detection for ray-tracing
CN111985036B (en) House type frame line drawing method and device, storage medium and electronic equipment
CN112258610B (en) Image labeling method and device, storage medium and electronic equipment
CN110163831B (en) Method and device for dynamically displaying object of three-dimensional virtual sand table and terminal equipment
CN111597628B (en) Model marking method and device, storage medium and electronic equipment
CN109284180A (en) A kind of method for scheduling task, device, electronic equipment and storage medium
CN112848312B (en) Method and device for detecting three-dimensional model object, computer equipment and storage medium
CN115170740A (en) Special effect processing method and device, electronic equipment and storage medium
CN114004972A (en) Image semantic segmentation method, device, equipment and storage medium
CN107452046B (en) Texture processing method, device and equipment of three-dimensional city model and readable medium
CN114387378A (en) Image generation method and device based on digital twin rendering engine and electronic equipment
CN114332203A (en) Method and device for determining light source information of virtual light source
CN113033426A (en) Dynamic object labeling method, device, equipment and storage medium
CN112465692A (en) Image processing method, device, equipment and storage medium
CN106375750B (en) A kind of image display method and display device
US10255717B2 (en) Geometry shadow maps with per-fragment atomics
EP4174781A2 (en) Method and apparatus for processing three dimensional graphic data, device, storage medium and product
CN116912431B (en) Data processing method, device, electronic equipment, storage medium and program product
WO2022121654A1 (en) Transparency determination method and apparatus, and electronic device and storage medium
CN111932450A (en) Traffic violation data management method and device
CN118053141A (en) Method, system, equipment and medium for detecting surrounding vehicles
CN115330917A (en) Data processing method, device and storage medium
CN117876989A (en) Feature projection method, device, equipment and readable medium based on bidirectional mapping

Legal Events

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

Address after: 1808, Jinxiu Hongdu building, Meilong Avenue, Xinniu community, Minzhi street, Longhua District, Shenzhen City, Guangdong Province (office address)

Applicant after: Shenzhen chuangxiang 3D Technology Co.,Ltd.

Address before: 518000 1808, Jinxiu Hongdu building, Meilong Avenue, Xinniu community, Minzhi street, Longhua District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Chuangxiang 3D Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant