CN106780693B - Method and system for selecting object in three-dimensional scene through drawing mode - Google Patents

Method and system for selecting object in three-dimensional scene through drawing mode Download PDF

Info

Publication number
CN106780693B
CN106780693B CN201611014074.6A CN201611014074A CN106780693B CN 106780693 B CN106780693 B CN 106780693B CN 201611014074 A CN201611014074 A CN 201611014074A CN 106780693 B CN106780693 B CN 106780693B
Authority
CN
China
Prior art keywords
dimensional scene
unique identifier
color
rgb color
expression image
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.)
Active
Application number
CN201611014074.6A
Other languages
Chinese (zh)
Other versions
CN106780693A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201611014074.6A priority Critical patent/CN106780693B/en
Publication of CN106780693A publication Critical patent/CN106780693A/en
Application granted granted Critical
Publication of CN106780693B publication Critical patent/CN106780693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/30Clipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data

Abstract

The invention relates to a method for selecting an object in a three-dimensional scene in a drawing mode, which comprises the steps of obtaining an image of the three-dimensional scene; assigning a different color value to each object in the three-dimensional scene; drawing all objects in the three-dimensional scene according to the distributed color values to obtain a color expression image of the three-dimensional scene; cutting the color expression image of the three-dimensional scene obtained by drawing according to the selected area; and the color value of each pixel in the cut color expression image corresponds to the object, so that the selected object is determined. The invention also provides a system for selecting the object in the three-dimensional scene through the drawing mode. The invention uses the display card to calculate, does not need to occupy the calculation resource of the CPU, can reduce the zoom ratio of viewport transformation, can cover more pixels when rasterizing, and reduces the possibility of selection omission.

Description

Method and system for selecting object in three-dimensional scene through drawing mode
Technical Field
The invention relates to an image processing technology, in particular to a method and a system for selecting an object in a three-dimensional scene in a drawing mode.
Background
Polygonal meshes are widely used in graphics and modeling to simulate the surface of complex objects such as buildings, vehicles, human bodies, etc., and are a list of polygons. The triangular mesh is a polygonal mesh composed entirely of triangles, and the triangular mesh is a triangular list. When a triangular mesh model is edited in three-dimensional CAD software, a large number of triangles exist, and a selection judgment method is usually adopted to obtain the selected triangles. Conventional selection determination methods often use intersection calculations to determine the relationship of points to geometric elements, such as ray methods to determine whether objects in a three-dimensional scene are selected. The basic judgment principle of the ray method is that a ray is led out from a selection point, the ray direction is a normal vector of an observation plane (the direction from the outside of a screen to the inside of the screen), intersection calculation is carried out on the ray and an object in a three-dimensional scene, if the ray is intersected with the object, the object is selected, otherwise, the object is not selected.
However, the way of determining whether an object is selected by using an intersection calculation method in a three-dimensional scene occupies a large amount of CPU calculation resources, and if a large amount of objects exist in the three-dimensional scene, the selection speed is seriously affected.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a system for selecting an object in a three-dimensional scene in a drawing mode.
The technical scheme provided by the invention is as follows.
A method for selecting objects in a three-dimensional scene by means of rendering, comprising the steps of:
step S10, acquiring an image of a three-dimensional scene;
step S11, assigning different color values to each object in the three-dimensional scene;
step S12, drawing all objects in the three-dimensional scene according to the color values distributed in the step S11 to obtain a color expression image of the three-dimensional scene;
step S13, cutting the color expression image of the three-dimensional scene drawn in the step S12 according to the selected area;
in step S14, the color value of each pixel in the clipped color representation image corresponds to the object, so as to determine the selected object.
Further, the step S11 includes: allocating a unique RGB color value for each object in the three-dimensional scene according to the unique identifier of the object, storing the unique RGB color value in a color buffer area, and storing the corresponding relation between the unique RGB color value and the unique identifier of the object in a memory in the form of a relation table;
the step S12 includes: extracting corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the three-dimensional scene to obtain a color expression image of the three-dimensional scene and storing the color expression image in a memory;
the step S13 includes: taking out the color expression image of the three-dimensional scene from the memory, and cutting the color expression image of the three-dimensional scene by a cutting window according to the selection area, wherein the position and the size of the cutting window are set to be consistent with those of the selection area;
the step S14 includes: and mapping the RGB color value of each pixel in the color expression image of the cut three-dimensional scene with the unique identifier according to the relation table, wherein the mapping of the unique identifier indicates that an object with the unique identifier is selected.
A system for selecting objects in a three-dimensional scene by rendering, comprising:
the acquisition module acquires an image of a three-dimensional scene;
the distribution module is used for distributing different color values to each object in the three-dimensional scene;
the drawing module is used for drawing all objects in the three-dimensional scene according to the color values distributed by the distribution module to obtain a color expression image of the three-dimensional scene;
the cutting module is used for cutting the color expression image of the three-dimensional scene obtained by drawing of the drawing module according to the selected area;
and the mapping module corresponds the color value of each pixel in the cut color expression image to the object so as to determine the selected object.
Further, the allocation module allocates a unique RGB color value to each object in the three-dimensional scene according to the unique identifier of the object and stores the unique RGB color value in the color buffer area, and the corresponding relation between the unique RGB color value and the unique identifier of the object is stored in the memory in the form of a relation table;
the drawing module extracts corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the three-dimensional scene, obtains a color expression image of the three-dimensional scene and stores the color expression image in a memory;
the cutting module takes out the color expression image of the three-dimensional scene from the memory, and a cutting window cuts the color expression image of the three-dimensional scene according to the selection area, wherein the position and the size of the cutting window are set to be consistent with those of the selection area;
and the mapping module maps the RGB color value of each pixel in the color expression image of the cut three-dimensional scene with the unique identifier according to the relation table, and if the unique identifier is mapped, the mapping module indicates that an object with the unique identifier is selected.
A method for selecting objects in a three-dimensional scene by means of rendering, comprising the steps of:
step S30, acquiring an image of a three-dimensional scene;
step S31, assigning different color values to each object in the three-dimensional scene;
step S32, dividing the selection area into N area blocks, wherein N is a natural number;
step S33, selecting one of the divided area blocks, and setting the position and the size of the cutting window to be consistent with the position and the size of the selected area block;
step S34, drawing all objects in the clipping window according to the color values distributed in the step S11;
step S35, the color value of each pixel in the clipping window corresponds to an object, so as to determine the selected object in the selected area block;
step S36, determining whether all the divided region blocks have been processed, if so, returning to step S33 to continue execution; if all the area blocks have been processed, continue to step S37;
in step S37, the objects selected in step S35 for each area block are combined to form all the objects selected in the selection area.
Further, the step S31 includes: allocating a unique RGB color value for each object in the three-dimensional scene according to the unique identifier of the object, storing the unique RGB color value in a color buffer area, and storing the corresponding relation between the unique RGB color value and the unique identifier of the object in a memory in the form of a relation table;
step S34 includes: extracting corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the cutting window, and obtaining a color expression image of the cutting window to be stored in a memory;
step S35 includes: and taking the color expression image of the clipping window out of the memory, mapping the RGB color value of each pixel in the color expression image of the clipping window with a unique identifier according to the relation table, wherein the mapping of the unique identifier indicates that an object with the unique identifier is selected.
A system for selecting objects in a three-dimensional scene by rendering, comprising:
the acquisition module acquires an image of a three-dimensional scene;
the distribution module is used for distributing color values to each object in the three-dimensional scene;
the block dividing module is used for dividing the selection area into N area blocks, wherein N is a natural number;
the setting module is used for selecting one of the divided area blocks and setting the position and the size of the cutting window to be consistent with the position and the size of the selected area block;
the drawing module is used for drawing all objects in the cutting window according to the color values distributed by the distribution module;
the mapping module corresponds the color value of each pixel in the drawn clipping window to an object, so that the selected object in the clipping window is determined;
the judging module is used for judging whether all the divided region blocks are processed or not, and if the region blocks are not processed, the setting module, the drawing module and the mapping module continue to perform corresponding processing until all the region blocks are processed;
and the merging module merges the objects selected by each area block in the mapping module to obtain all the objects selected by the selection area.
Further, the allocation module allocates a unique RGB color value to each object in the three-dimensional scene according to the unique identifier of the object and stores the unique RGB color value in the color buffer area, and the corresponding relation between the unique RGB color value and the unique identifier of the object is stored in the memory in the form of a relation table;
the drawing module extracts corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the cutting window, and obtains a color expression image of the cutting window to be stored in a memory;
and the mapping module takes the color expression image of the clipping window out of the memory, maps the RGB color value of each pixel in the color expression image of the clipping window with the unique identifier according to the relation table, and the mapping of the unique identifier indicates that the object with the unique identifier is selected.
The invention has the beneficial effects that:
1. the invention judges whether the object in the three-dimensional scene is selected by using the drawing mode, and the calculation is mainly finished by the display card
The performance of the display card can be fully utilized, the efficiency is higher, and the computing resources of the CPU are not excessively occupied.
2. According to the method and the device, the selected area is subjected to blocking processing, and the position and the size of the cropping window are set to be consistent with those of the area block before each drawing, so that the scaling of viewport (viewport) transformation can be reduced, more pixels can be covered by an object when rasterization is carried out, and the possibility of omission caused by the fact that all pixels are not covered is reduced.
Drawings
Fig. 1 is a flowchart of a first method for selecting an object in a three-dimensional scene by a drawing method according to an embodiment of the present invention;
fig. 2 is a block diagram of a first system for selecting an object in a three-dimensional scene by a rendering method according to an embodiment of the present invention;
fig. 3 is a flowchart of a second method for selecting an object in a three-dimensional scene by a drawing method according to an embodiment of the present invention;
fig. 4 is a block diagram of a second system for selecting an object in a three-dimensional scene through a rendering method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings. Those skilled in the art will appreciate that the present invention is not limited to the drawings and the following examples.
The invention provides a method for selecting an object in a three-dimensional scene in a drawing mode, which comprises the following steps of:
step S10, acquiring an image of a three-dimensional scene: each object in the three-dimensional scene is organized by a tree structure, a root node represents the whole scene, a sub-node represents an object in the scene, and the object can also have sub-objects, such as a cuboid object which comprises 6 surfaces; the object has a unique identifier; each object itself contains geometric information, such as the coordinates of a triangle containing three vertices, NURBS surfaces contain nodes, control vertices, etc. to describe its shape and position in the scene;
step S11, assigning a different color value to each object in the three-dimensional scene: assigning a unique RGB color value to each object in the three-dimensional scene according to its unique identifier, and storing all unique RGB color values in a color buffer, for example, an object with a unique identifier of 1, whose RGB color value may correspond to ox 000001; a unique RGB color value may also be assigned to the background color, and may also be stored in the color buffer, for example, the default background color is pure black, and its RGB color value may correspond to ox 000000; the correspondence of the unique RGB color value to the unique identifier of the object is stored in the memory in the form of a relational table, and if the unique RGB color value is assigned to the background color, the unique RGB color value may also be stored in the color buffer, but there is no unique identifier of the object corresponding thereto in the relational table. It should be noted that the RGB color value is different from the conventional color of the object for display, and the RGB color value is only used in the selection process and is not refreshed on the display, so it is not seen by the user;
step S12, rendering objects in the three-dimensional scene: extracting corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the three-dimensional scene, and obtaining a color expression image of the three-dimensional scene to be stored in a memory;
step S13, cropping a color representation image of the three-dimensional scene: taking out the color expression image of the three-dimensional scene from the memory, and cutting the color expression image of the three-dimensional scene by a cutting window according to the selection area, wherein the position and the size of the cutting window are set to be consistent with those of the selection area;
step S14, determining the selected object: according to the relation table, mapping the RGB color value of each pixel in the color expression image of the cut three-dimensional scene with a unique identifier, wherein if the unique identifier is mapped, the unique identifier indicates that an object with the unique identifier is selected; if the RGB color value of the pixel in the clipped color buffer area is the RGB color value corresponding to the background color, no object is selected for representing the position of the pixel because the relation table does not have the unique identifier of the object corresponding to the RGB color value.
According to the scheme, whether the object in the three-dimensional scene is selected is judged by using the drawing method, the calculation is mainly completed by the display card, the performance of the display card can be fully utilized, the efficiency is higher, and the calculation resource of a CPU is not required to be occupied too much.
The invention also provides a system for selecting an object in a three-dimensional scene in a drawing mode, as shown in fig. 2, comprising the following modules:
an acquisition module: acquiring an image of a three-dimensional scene: each object in the three-dimensional scene is organized by a tree structure, the root node represents the whole scene, the sub-nodes represent objects in the scene, and the objects themselves may also have sub-objects, such as a rectangular object comprising 6 sub-objects. The object has a unique identifier. Each object itself contains geometric information, such as the coordinates of a triangle containing three vertices, NURBS surfaces contain nodes, control vertices, etc. to describe its shape and position in the scene;
the distribution module distributes different color values for each object in the three-dimensional scene: assigning a unique RGB color value to each object in the three-dimensional scene according to its unique identifier, and storing all unique RGB color values in a color buffer, for example, an object with a unique identifier of 1, whose RGB color value may correspond to ox 000001; a unique RGB color value may also be assigned to the background color, and may also be stored in the color buffer, for example, the default background color is pure black, and its RGB color value may correspond to ox 000000; the correspondence of the unique RGB color value to the unique identifier of the object is stored in the memory in the form of a relational table, and if the unique RGB color value is assigned to the background color, the unique RGB color value may also be stored in the color buffer, but there is no unique identifier of the object corresponding thereto in the relational table. It should be noted that the RGB color value is different from the conventional color of the object for display, and the RGB color value is only used in the selection process and is not refreshed on the display, so it is not seen by the user;
a rendering module that renders objects in a three-dimensional scene: extracting corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the three-dimensional scene, and obtaining a color expression image of the three-dimensional scene to be stored in a memory;
a cropping module that crops a color representation image of the three-dimensional scene: taking out the color expression image of the three-dimensional scene from the memory, and cutting the color expression image of the three-dimensional scene by a cutting window according to the selection area, wherein the position and the size of the cutting window are set to be consistent with those of the selection area;
a mapping module that determines the selected object: according to the relation table, mapping the RGB color value of each pixel in the color expression image of the cut three-dimensional scene with a unique identifier, wherein if the unique identifier is mapped, the unique identifier indicates that an object with the unique identifier is selected; if the RGB color value of the pixel in the clipped color buffer area is the RGB color value corresponding to the background color, no object is selected for representing the position of the pixel because the relation table does not have the unique identifier of the object corresponding to the RGB color value.
In order to improve the judgment accuracy and avoid the selection omission, a preferred embodiment of the present invention further provides a method for selecting an object in a three-dimensional scene in a drawing manner, as shown in fig. 3, including the following steps:
step S30, acquiring an image of a three-dimensional scene: each object in the three-dimensional scene is organized by a tree structure, the root node represents the whole scene, the sub-nodes represent objects in the scene, and the objects themselves may also have sub-objects, such as a rectangular object comprising 6 sub-objects. The object has a unique identifier. Each object itself contains geometric information, such as the coordinates of a triangle containing three vertices, NURBS surfaces contain nodes, control vertices, etc. to describe its shape and position in the scene;
step S31, assigning a different color value to each object in the three-dimensional scene: assigning a unique RGB color value to each object in the three-dimensional scene according to its unique identifier, and storing all unique RGB color values in a color buffer, for example, an object with a unique identifier of 1, whose RGB color value may correspond to ox 000001; a unique RGB color value may also be assigned to the background color, and may also be stored in the color buffer, for example, the default background color is pure black, and its RGB color value may correspond to ox 000000; the correspondence of the unique RGB color value to the unique identifier of the object is stored in the memory in the form of a relational table, and if the unique RGB color value is assigned to the background color, the unique RGB color value may also be stored in the color buffer, but there is no unique identifier of the object corresponding thereto in the relational table. It should be noted that the RGB color value is different from the conventional color of the object for display, and the RGB color value is only used in the selection process and is not refreshed on the display, so it is not seen by the user;
step S32, divide area block: dividing the selection area into N area blocks, wherein N is a natural number;
step S33, setting a clipping window: selecting one of the divided region blocks, and setting the position and the size of the cutting window to be consistent with the position and the size of the selected region block;
step S34, drawing the object in the cutting window: extracting corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the cutting window, and obtaining a color expression image of the area block to be stored in a memory;
step S35, determining the selected object in the cropping window: the color expression image of the cutting window is taken out from the memory, the RGB color value of each pixel in the color expression image of the cutting window is mapped with the unique identifier according to the relation table, and if the unique identifier is mapped, the object with the unique identifier is selected; if the RGB color value of the pixel in the cut color buffer area is the RGB color value corresponding to the background color, no object is selected for representing the position of the pixel because the relation table does not have the unique identifier of the object corresponding to the RGB color value;
step S36, determine whether there is an unprocessed region block: judging whether all the divided area blocks have been processed, if so, returning to the step S33 to continue the execution; if all the area blocks have been processed, continue to step S37;
step S37, merging all the selected objects: combining the objects selected for each region block in step 35 is all the objects selected for the selected region.
In the above scheme, before drawing the selected region block, the position and size of the cropping window are set to be consistent with those of the selected region block, so that the scaling of viewport transformation can be reduced, an object can cover more pixels during rasterization, and the possibility of selection omission due to no pixel coverage is reduced.
The preferred embodiment of the present invention further provides a system for selecting an object in a three-dimensional scene by a rendering method, as shown in fig. 4, including the following modules:
an acquisition module that acquires an image of a three-dimensional scene: each object in the three-dimensional scene is organized by a tree structure, the root node represents the whole scene, the sub-nodes represent objects in the scene, and the objects themselves may also have sub-objects, such as a rectangular object comprising 6 sub-objects. The object has a unique identifier. Each object itself contains geometric information, such as the coordinates of a triangle containing three vertices, NURBS surfaces contain nodes, control vertices, etc. to describe its shape and position in the scene;
the distribution module distributes different color values for each object in the three-dimensional scene: assigning a unique RGB color value to each object in the three-dimensional scene according to its unique identifier, and storing all unique RGB color values in a color buffer, for example, an object with a unique identifier of 1, whose RGB color value may correspond to ox 000001; a unique RGB color value may also be assigned to the background color, and may also be stored in the color buffer, for example, the default background color is pure black, and its RGB color value may correspond to ox 000000; the correspondence of the unique RGB color value to the unique identifier of the object is stored in the memory in the form of a relational table, and if the unique RGB color value is assigned to the background color, the unique RGB color value may also be stored in the color buffer, but there is no unique identifier of the object corresponding thereto in the relational table. It should be noted that the RGB color value is different from the conventional color of the object for display, and the RGB color value is only used in the selection process and is not refreshed on the display, so it is not seen by the user;
a block module for dividing the region block: dividing the selection area into N area blocks, wherein N is a natural number;
the setting module sets a cutting window: selecting one of the divided region blocks, and setting the position and the size of the cutting window to be consistent with the position and the size of the selected region block;
the drawing module is used for drawing the objects in the cutting window: extracting corresponding RGB color values from the color buffer area according to the relation table to draw all objects in the selected area block, and obtaining a color expression image of the area block to be stored in a memory;
and the mapping module is used for determining the selected objects in the clipping window: the color expression image of the area block is taken out from the memory, the RGB color value of each pixel in the color expression image of the area block is mapped with the unique identifier according to the relation table, and the unique identifier is mapped to indicate that the object with the unique identifier is selected; if the RGB color value of the pixel in the cut color buffer area is the RGB color value corresponding to the background color, no object is selected for representing the position of the pixel because the relation table does not have the unique identifier of the object corresponding to the RGB color value;
the judgment module judges whether the unprocessed region blocks exist or not: judging whether all the divided area blocks are processed or not, if the area blocks are not processed, continuing to perform corresponding processing by the setting module, the drawing module and the mapping module until all the area blocks are processed;
a merging module for merging all selected objects: and combining the objects selected by each area block in the mapping module to obtain all the objects selected by the selection area.
The embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiment. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for selecting an object in a three-dimensional scene by a drawing mode is characterized in that: the method comprises the following steps:
step S10, acquiring an image of a three-dimensional scene, wherein each object in the three-dimensional scene has a unique identifier;
step S11, allocating a unique RGB color value for each object in the three-dimensional scene according to the unique identifier of the object, storing the RGB color values in a color buffer area, and storing the corresponding relation between the RGB color values and the unique identifier of the object in a memory;
step S12, extracting corresponding RGB color values from the color buffer area according to the corresponding relation, drawing all objects in the three-dimensional scene, obtaining a color expression image of the three-dimensional scene and storing the color expression image in a memory;
step S13, cutting the color expression image of the three-dimensional scene according to the selected area;
step S14, the RGB color value of each pixel in the clipped color expression image corresponds to the object, thereby determining the selected object.
2. The method of claim 1, wherein:
the step S13 includes: taking out the color expression image of the three-dimensional scene from the memory, and cutting the color expression image of the three-dimensional scene by a cutting window according to the selection area, wherein the position and the size of the cutting window are set to be consistent with those of the selection area;
the step S14 includes: and mapping the RGB color value of each pixel in the color expression image of the cut three-dimensional scene with the unique identifier according to the corresponding relation, wherein the mapping of the unique identifier indicates that the object with the unique identifier is selected.
3. A system for selecting objects in a three-dimensional scene by way of rendering, comprising: the system comprises the following modules:
an acquisition module that acquires an image of a three-dimensional scene, wherein each object in the three-dimensional scene has a unique identifier;
the distribution module distributes a unique RGB color value for each object in the three-dimensional scene according to the unique identifier of the object, stores the RGB color values in a color buffer area, and stores the corresponding relation between the RGB color values and the unique identifier of the object in a memory;
the drawing module is used for drawing all objects in the three-dimensional scene according to the corresponding relation by extracting corresponding RGB color values from the color buffer area to obtain a color expression image of the three-dimensional scene and storing the color expression image in a memory;
the cutting module is used for cutting the color expression image of the three-dimensional scene obtained by drawing of the drawing module according to the selected area;
and the mapping module corresponds the RGB color value of each pixel in the cut color expression image with the object, so that the selected object is determined.
4. The system of claim 3, wherein:
the cutting module takes out the color expression image of the three-dimensional scene from the memory, and a cutting window cuts the color expression image of the three-dimensional scene according to the selection area, wherein the position and the size of the cutting window are set to be consistent with those of the selection area;
and the mapping module maps the RGB color value of each pixel in the color expression image of the cut three-dimensional scene with the unique identifier according to the corresponding relation, and the mapping of the unique identifier indicates that an object with the unique identifier is selected.
5. A method for selecting an object in a three-dimensional scene by a drawing mode is characterized in that: the method comprises the following steps:
step S30, acquiring an image of a three-dimensional scene, wherein each object in the three-dimensional scene has a unique identifier;
step S31, allocating a unique RGB color value for each object in the three-dimensional scene according to the unique identifier of the object, storing the RGB color values in a color buffer area, and storing the corresponding relation between the RGB color values and the unique identifier of the object in a memory;
step S32, dividing the selection area into N area blocks, wherein N is a natural number;
step S33, selecting one of the divided area blocks, and setting the position and the size of the cutting window to be consistent with the position and the size of the selected area block;
step S34, extracting corresponding RGB color values from the color buffer area according to the corresponding relation, drawing all objects in the clipping window, obtaining a color expression image of the clipping window and storing the color expression image in a memory;
step S35, the RGB color value of each pixel in the clipping window corresponds to an object, so as to determine the selected object in the selected area block;
step S36, determining whether all the divided region blocks have been processed, if so, returning to step S33 to continue execution; if all the area blocks have been processed, continue to step S37;
in step S37, the objects selected in step S35 for each area block are combined to form all the objects selected in the selection area.
6. The method of claim 5, wherein:
step S35 includes: and taking out the color expression image of the clipping window from the memory, mapping the RGB color value of each pixel in the color expression image of the clipping window with the unique identifier according to the corresponding relation, wherein the mapping of the unique identifier indicates that the object with the unique identifier is selected.
7. A system for selecting objects in a three-dimensional scene by way of rendering, comprising: the system comprises the following modules:
an acquisition module that acquires an image of a three-dimensional scene, wherein each object in the three-dimensional scene has a unique identifier;
the distribution module distributes a unique RGB color value for each object in the three-dimensional scene according to the unique identifier of the object, stores the RGB color values in a color buffer area, and stores the corresponding relation between the RGB color values and the unique identifier of the object in a memory;
the block dividing module is used for dividing the selection area into N area blocks, wherein N is a natural number;
the setting module is used for selecting one of the divided area blocks and setting the position and the size of the cutting window to be consistent with the position and the size of the selected area block;
the drawing module extracts corresponding RGB color values from the color buffer area according to the corresponding relation to draw all objects in the cutting window, obtains a color expression image of the cutting window and stores the color expression image in a memory;
the mapping module corresponds the RGB color value of each pixel in the drawn clipping window to an object, so that the selected object in the clipping window is determined;
the judging module is used for judging whether all the divided region blocks are processed or not, and if the region blocks are not processed, the setting module, the drawing module and the mapping module continue to perform corresponding processing until all the region blocks are processed;
and the merging module merges the objects selected by each area block in the mapping module to obtain all the objects selected by the selection area.
8. The system of claim 7, wherein:
and the mapping module takes out the color expression image of the clipping window from the memory, maps the RGB color value of each pixel in the color expression image of the clipping window with the unique identifier according to the corresponding relation, and the mapping of the unique identifier indicates that the object with the unique identifier is selected.
CN201611014074.6A 2016-11-15 2016-11-15 Method and system for selecting object in three-dimensional scene through drawing mode Active CN106780693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611014074.6A CN106780693B (en) 2016-11-15 2016-11-15 Method and system for selecting object in three-dimensional scene through drawing mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611014074.6A CN106780693B (en) 2016-11-15 2016-11-15 Method and system for selecting object in three-dimensional scene through drawing mode

Publications (2)

Publication Number Publication Date
CN106780693A CN106780693A (en) 2017-05-31
CN106780693B true CN106780693B (en) 2020-03-10

Family

ID=58968907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611014074.6A Active CN106780693B (en) 2016-11-15 2016-11-15 Method and system for selecting object in three-dimensional scene through drawing mode

Country Status (1)

Country Link
CN (1) CN106780693B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615686B (en) * 2018-12-07 2022-11-29 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for determining potential visual set
CN115187713B (en) * 2022-09-08 2023-01-13 山东信通电子股份有限公司 Method, equipment and medium for accelerating point cloud point selection operation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9113734D0 (en) * 1990-10-30 1991-08-14 Sun Microsystems Inc Method and apparatus for rendering overlapping images on a graphics display device
CN102129709A (en) * 2009-11-12 2011-07-20 微软公司 Visualizing depth
CN102576463A (en) * 2009-10-07 2012-07-11 微软公司 Systems and methods for removing a background of an image
CN102880681A (en) * 2012-09-13 2013-01-16 烽火通信科技股份有限公司 Method for displaying and managing grid-based vector data with large data size
CN103019631A (en) * 2011-09-26 2013-04-03 富士施乐株式会社 Print data processing system, print data processing method, and non-transitory computer readable medium
CN103189899A (en) * 2010-11-08 2013-07-03 株式会社Ntt都科摩 Object display device and object display method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002025930A (en) * 2000-07-13 2002-01-25 Nec Corp Data table preparing method and recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9113734D0 (en) * 1990-10-30 1991-08-14 Sun Microsystems Inc Method and apparatus for rendering overlapping images on a graphics display device
CN102576463A (en) * 2009-10-07 2012-07-11 微软公司 Systems and methods for removing a background of an image
CN102129709A (en) * 2009-11-12 2011-07-20 微软公司 Visualizing depth
CN103189899A (en) * 2010-11-08 2013-07-03 株式会社Ntt都科摩 Object display device and object display method
CN103019631A (en) * 2011-09-26 2013-04-03 富士施乐株式会社 Print data processing system, print data processing method, and non-transitory computer readable medium
CN102880681A (en) * 2012-09-13 2013-01-16 烽火通信科技股份有限公司 Method for displaying and managing grid-based vector data with large data size

Also Published As

Publication number Publication date
CN106780693A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN111105491B (en) Scene rendering method and device, computer readable storage medium and computer equipment
US8725466B2 (en) System and method for hybrid solid and surface modeling for computer-aided design environments
CN112270756A (en) Data rendering method applied to BIM model file
CN103970518B (en) A kind of the 3D rendering method and device of window logic
CN113178014A (en) Scene model rendering method and device, electronic equipment and storage medium
KR101681056B1 (en) Method and Apparatus for Processing Vertex
CN108919954B (en) Dynamic change scene virtual and real object collision interaction method
CN103679627A (en) Tile based computer graphics
WO2021253642A1 (en) Image rendering method and apparatus, computer program and readable medium
US10198788B2 (en) Method and system of temporally asynchronous shading decoupled from rasterization
CN107705363B (en) Road three-dimensional visual modeling method and device
KR20080018404A (en) Computer readable recording medium having background making program for making game
RU2680355C1 (en) Method and system of removing invisible surfaces of a three-dimensional scene
CN113593027A (en) Three-dimensional avionics display control interface device
CN106780693B (en) Method and system for selecting object in three-dimensional scene through drawing mode
CN110428504B (en) Text image synthesis method, apparatus, computer device and storage medium
CN112843700B (en) Terrain image generation method and device, computer equipment and storage medium
CN111179414B (en) Terrain LOD generation method
CN111476872B (en) Image drawing method and image drawing device
WO2023239799A1 (en) Systems and methods for efficient rendering and processing of point clouds using textures
CN113674419B (en) Three-dimensional display method and device for meteorological cloud data, electronic equipment and storage medium
CN113593028A (en) Three-dimensional digital earth construction method for avionic display control
KR100624455B1 (en) Lightmap processing method in 3 dimensional graphics environment and apparatus therefor
CN110738719A (en) Web3D model rendering method based on visual range hierarchical optimization
CN115423917B (en) Real-time drawing method and system for global three-dimensional wind field

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
GR01 Patent grant
GR01 Patent grant