CN110262729A - A kind of object processing method and equipment - Google Patents

A kind of object processing method and equipment Download PDF

Info

Publication number
CN110262729A
CN110262729A CN201910420908.0A CN201910420908A CN110262729A CN 110262729 A CN110262729 A CN 110262729A CN 201910420908 A CN201910420908 A CN 201910420908A CN 110262729 A CN110262729 A CN 110262729A
Authority
CN
China
Prior art keywords
region
area
collision
display data
tested
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
CN201910420908.0A
Other languages
Chinese (zh)
Other versions
CN110262729B (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.)
Lenovo Shanghai Electronics Technology Co Ltd
Original Assignee
Lenovo Shanghai Electronics 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 Lenovo Shanghai Electronics Technology Co Ltd filed Critical Lenovo Shanghai Electronics Technology Co Ltd
Priority to CN201910420908.0A priority Critical patent/CN110262729B/en
Publication of CN110262729A publication Critical patent/CN110262729A/en
Application granted granted Critical
Publication of CN110262729B publication Critical patent/CN110262729B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the present application discloses a kind of object processing method and equipment.Method includes: to detect the colliding object that collides in display data, determines collision area belonging to impingement area and the colliding object that the colliding object collides;Determine area to be tested;The area to be tested is the region for not having incidence relation with the collision area;Determine a possibility that object and the impingement area in the area to be tested collide, the object for meeting collision determination condition to possibility carries out collision detection.

Description

A kind of object processing method and equipment
Technical field
This application involves the information processing technology more particularly to a kind of object processing method and equipment.
Background technique
The collision of object is recurrent in gaming, and how the collision of detection object, which is a very crucial technology, is asked Topic.Especially in flight shooting game, if not can be well solved this problem, the emerging of player can be greatly influenced Interest.Collision detection can detect the physical edge of each object in game, detect whether each object in game collides.When When two objects are hit together, this Collision Detection can prevent them from mutually passing through.For example, as the people in game When object bumps against the wall, Collision Detection can according to the characteristic between personage and wall determine both position and mutual work With relationship, thus guarantee the personage neither can through walls and mistake, wall will not be knocked down.
In the related technology, collision detection is carried out to simulate actual physical engine, can largely consumes central processing unit (Central Processing Unit, CPU) resource, to influence CPU runnability.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of object processing method and equipment.
The technical solution of the embodiment of the present application is achieved in that
Object processing method provided by the embodiments of the present application, comprising:
Detect the colliding object that collides in display data, determine the impingement area that the colliding object collides with And collision area belonging to the colliding object;
Determine area to be tested;The area to be tested is the region for not having incidence relation with the collision area;
It determines a possibility that object and the impingement area in the area to be tested collide, possibility satisfaction is touched The object for hitting decision condition carries out collision detection.
Object handles equipment provided by the embodiments of the present application, comprising: processor and for store can transport on a processor The memory of capable computer program;Wherein, the processor is for executing at above-mentioned object when running the computer program Reason method.
In the embodiment of the present application, when showing the colliding object for existing in data and having occurred and that collision, according to colliding object The region at place determines area to be tested, and only determines a possibility that object and impingement area in area to be tested collide, And only meet the object progress collision detection of collision determination condition to possibility, thus reduce the detection range of collision detection, Reduce cpu resource consumed by collision detection.
Detailed description of the invention
Fig. 1 is the flow diagram one of object processing method provided by the embodiments of the present application;
Fig. 2 is the picture drawing that the embodiment of the present application shows data;
Fig. 3 is the embodiment of the present application impingement area schematic diagram;
Fig. 4 is the flow diagram two of object processing method provided by the embodiments of the present application;
Fig. 5 is the embodiment of the present application region division schematic diagram one;
Fig. 6 is the flow diagram three of object processing method provided by the embodiments of the present application;
Fig. 7 is the embodiment of the present application associated region schematic diagram;
Fig. 8 A is the embodiment of the present application region division schematic diagram two;
Fig. 8 B is the embodiment of the present application quaternary tree region division schematic diagram;
Fig. 9 A is the flow diagram four of object processing method provided by the embodiments of the present application;
Fig. 9 B is the embodiment of the present application mobile object schematic diagram;
Figure 10 is the structural schematic diagram of the embodiment of the present application object handles device;
Figure 11 is the structural schematic diagram of the object handles equipment of the embodiment of the present application.
Specific embodiment
With reference to the accompanying drawings and embodiments, the application is further elaborated.It should be appreciated that mentioned herein Embodiment is only used to explain the application, is not used to limit the application.In addition, embodiment provided below is for implementing The section Example of the application, rather than the whole embodiments for implementing the application are provided, in the absence of conflict, the application is implemented Example record technical solution can mode in any combination implement.
In the various embodiments of the application: detecting the colliding object to collide in display data, touched described in determination Hit collision area belonging to the impingement area and the colliding object that object collides;Determine area to be tested;It is described to be checked Surveying region is the region for not having incidence relation with the collision area;Determine that the object in the area to be tested is touched with described A possibility that face of hitting collides, the object for meeting collision determination condition to possibility carry out collision detection.
The embodiment of the present application provides a kind of object processing method, and this method is applied to object handles equipment, and object handles are set Each functional module in standby can such as be located by the hardware resource of electronic equipment (such as terminal device, server or server cluster) The computing resources such as reason device, the communication resource (such as supporting to realize that optical cable, the various modes of honeycomb communicate) cooperative achievement.
Certainly, the embodiment of the present application is not limited to be provided as method and hardware, can also be there are many implementation, such as provides For storage medium (being stored with the instruction for executing object processing method provided by the embodiments of the present application).
The embodiment of the present application provides a kind of object processing method, as shown in Figure 1, the object processing method includes:
Step S101, it detects the colliding object to collide in display data, determines that the colliding object collides Impingement area and the colliding object belonging to collision area.
Object handles equipment can be any electronic equipment with information processing capability, in one embodiment, object Processing equipment can be intelligent terminal, such as can be mobile phone (mobile phone), iPad, notebook, AR glasses, AR projector etc. Mobile terminal with wireless communication ability.In another embodiment, object handles equipment can also be inconvenient mobile tool There are terminal device of computing function, such as desktop computer, desktop computer etc..
Image processing application program is installed in object handles equipment, such as: augmented reality (Augmented Reality, AR) application program, game application etc..Display data can be converted to image and exported aobvious by image processing application program On display screen curtain.Wherein, object in data is shown can include: the different object such as desk, chair, tree, people, different objects are not Same display elements, to constitute the picture in display data.
When image processing application program be AR application program, object handles equipment can based on AR application program on the screen The information of the practical object in virtual objects and actual environment in virtual environment is combined, and right in virtual objects and reality It is interacted as between.Wherein, display data include the corresponding display data of virtual environment and the corresponding display number of actual environment According to.Here, the corresponding display data of virtual environment can be known as virtual data, the corresponding display data of actual environment is known as field Scape data.It is corresponding, show that the object in data includes virtual objects and scenario objects, wherein virtual objects are virtual data In object, scenario objects be contextual data in object.Such as: as shown in Figure 2, include in the display data of electronic equipment Scenario objects 202 and virtual objects 203 in actual environment 201.
Settable collision detection application program, collision detection application program can be integrated in image procossing in object handles equipment In application program, it is independently of image processing application program, the third side plug as image processing application program.
Whether object handles equipment is collided by the object in collision detection application program detection display data.Work as inspection Any different object in display data is measured when colliding, is colliding object by the object identity.Wherein, at image When reason application program is AR application program, show that the collision occurred in data can touch between scenario objects and virtual objects It hits, it can also collision between virtual objects and virtual objects.
After object handles equipment detects colliding object by collision detection application program, collided according to colliding object Position determine impingement area, and determine collision area belonging to colliding object, here, region belonging to colliding object become and is touched Hit region.
Here, the interface to collide between the colliding object to collide is known as impingement area, impingement area can also claim To collide interface.As shown in figure 3, object 301 and object 302 collide, then object 301 and object 302 collide Interface 303 is impingement area when object 301 and object 302 collide.Here, impingement area can be by way of three-dimensional coordinate To indicate.
Object handles equipment is used to show that display interface, that is, eyes visible area of display data to be divided into multiple areas Domain, and each region is the corresponding region of display data, determines each object institute according to the display position of object in the display interface The region of category.
The embodiment of the present application, to region partitioning algorithm used in progress region division without any limitation.One In example, display interface is divided into the identical region of size of setting quantity by object handles equipment.Such as: display interface is equal It is even to be divided into 9 regions;For another example, display interface is evenly dividing as 16 regions.In another example, object handles equipment Display interface is divided into multiple regions according to quaternary tree.
In the embodiment of the present application, the mesh file storage that different objects can be different.
Step S102, area to be tested is determined;The area to be tested is not have incidence relation with the collision area Region;
In step s101, after determining collision area, in the region that display interface is divided, determining and collision area is not Region with incidence relation is area to be tested, that is, in the region that display interface is divided, is had with collision area The region of incidence relation is using exterior domain as area to be tested.
Such as: the region that display interface is divided includes: region 1, region 2 to region 16, collision belonging to colliding object Region be region 2, with collision area region 2 have incidence relation region be region 1, region 3, region 6 and region 10, then with The area to be tested that collision area region 2 does not have incidence relation includes: region 4, region 5, region 7, region 8, region 9, area Domain 11, region 12, region 13, region 14 and region 15.
Step S103, a possibility that object and the impingement area in the area to be tested collide is determined, to can The object that energy property meets collision determination condition carries out collision detection.
After determining area to be tested in step s 102, using the object in area to be tested as candidate target, obtain each The space characteristics of candidate target, and determine what each candidate target and impingement area collided according to the space characteristics of each candidate target Possibility.Here, a possibility that candidate target collides with impingement area can be indicated by probability, such as: candidate target object A A possibility that colliding with impingement area is 0.4.A possibility that candidate target and impingement area collide can also pass through possibility Grade indicates, such as: a possibility that a possibility that candidate target and impingement area collide grade include grade 1, grade 2 and Grade 3, the expression of middle grade 1 can not collide, and the expression of grade 2 may collide, and the expression of grade 3 is bound to touch It hits.
A possibility that colliding for candidate target with impingement area can indicate that user can be according to actual needs by probability It is configured.
A possibility that each candidate feature is collided with impingement area matches with collision determination condition, when a possibility It when matching with collision determination condition, determines that the possibility meets collision determination condition, the corresponding candidate target of the possibility is made For collision detection object, collision detection is carried out to collision test object.The candidate for being unsatisfactory for collision determination condition to possibility is right As then without collision detection.
Here, collision determination condition is corresponding with the representation of possibility.
In one example, it can also be indicated by possibility grade a possibility that candidate target collides with impingement area When, collision determination condition can be greater than the collision probability threshold value of setting for probability.
Such as: a possibility that collision probability threshold value is 0.6, and candidate target object A and impingement area collide is 0.4, is waited The possibility that a possibility that selecting object B and impingement area to collide collides for 0.7, candidate target object C and impingement area Property be 0.2, then to object B carry out collision detection.
It in another example, can also be by possibility grade come table when candidate target and impingement area collide a possibility that When showing, collision determination condition can be higher than the reference grade of setting for possibility grade.
Such as: grade includes grade 1, grade 2 and waits a possibility that a possibility that candidate target collides with impingement area Grade 3, the expression of middle grade 1 can not collide, and the expression of grade 2 may collide, and the expression of grade 3 is bound to touch It hits, the grade for a possibility that reference grade is grade 2, and candidate target object A and impingement area collide is grade 1, candidate right The grade for a possibility that colliding as object B and impingement area is what grade 2, candidate target object C and impingement area collided The grade of possibility is grade 3, then object B and object C carries out collision detection.
In one embodiment, determine that the object in the area to be tested collides with the impingement area in step S103 A possibility that, comprising:
According to the space between the space characteristics of the object in the area to be tested and the space characteristics of the impingement area Relationship determines a possibility that object and the impingement area in the area to be tested collide.
Here, the space characteristics of object can are as follows: the spatial informations such as location information, moving direction, object size.Impingement area Space characteristics can be the spatial informations such as location information, face size.
The space characteristics for obtaining the object i.e. space characteristics of candidate target and impingement area in region to be measured, according to candidate right The space characteristics of elephant and the space characteristics of impingement area determine a possibility that candidate target and impingement area collide.
Here, it is determined between candidate target and impingement area according to the space characteristics of the space characteristics of candidate target and impingement area Distance and relative displacement direction, distance can be multiplied to obtain with the quantized value in relative displacement direction possibility, or according to away from Possibility grade is determined from relative displacement direction.
The embodiment of the present application specifically limits the method for determination of possibility.
In the embodiment of the present application, when showing the colliding object for existing in data and having occurred and that collision, according to collision pair As the region at place determines area to be tested, and only determine the possibility that object and impingement area in area to be tested collide Property, and the object for only meeting collision determination condition to possibility carries out collision detection, to reduce the detection model of collision detection It encloses, reduces cpu resource consumed by collision detection
In one embodiment, as shown in figure 4, step S103 includes:
Step S1031a, the regional space relationship in the display data corresponding each region and the collision area is determined.
The regional space in region and collision area that the corresponding each region, that is, display interface of traversal display data is divided closes System.Spatial relationship includes: adjacent, non-conterminous.
If step S1032a, the described regional space relationship be it is adjacent, determine the corresponding region of the regional space relationship There is incidence relation with the collision area.
Step S1033a, determine in the corresponding region of the display data that there is incidence relation with the collision area Region other than region is the area to be tested.
When the corresponding region division of display data is as shown in figure 5, include region 501 to region 516, wherein collision area It then include: region 507, region 510, region 512 and area for adjacent region with the spatial relationship in region 511 for region 511 Domain 515.Then region 507, region 510, region 512 and region 515 are the region for having incidence relation with collision area, then area Region in domain 501 to region 516 in addition to region 507, region 510, region 511, region 512 and region 515 is to be checked Survey region.
It in practical applications, can be by region 506, region 507, region in the corresponding region of display data shown in Fig. 5 508, region 510, region 512, region 514, region 515 and region 516 are the region for having incidence relation with collision area, Then region 501, region 502, region 503, region 504, region 505, region 509, region 513 are area to be tested.
Here, when the corresponding region division of display data can also be as shown in Figure 8 A, including region 801 to region 819.When touching Hitting region is region 811, then includes: region 807, region 510, region 812 for adjacent region with the spatial relationship in region 511 And region 813.Region 807, region 810, region 811, region 812 and region 813 are then removed in region 801 to region 819 Region in addition is area to be tested.
In one embodiment, as shown in fig. 6, step S103 includes:
Step S1031b, it determines in the object to be assessed and the collision area in the corresponding each region of the display data References object positional relationship.
The region that the corresponding each region, that is, display interface of traversal display data is divided determines the object in each region and to be evaluated Estimate the positional relationship between the references object in object and collision area, here, references object can be any right in collision area As.Whether the position that positional relationship can embody object to be assessed is related to the position of references object, if by references object Position influences.
If step S1032b, the described positional relationship is the position of the object to be assessed with the position of the references object It sets variation and changes, determine that region belonging to object to be assessed and the collision area have incidence relation.
If the position of the object to be assessed in a region is influenced by the position of the references object in collision area, recognize It is the region that there is incidence relation with collision area for the region, otherwise it is assumed that the region is not have to be associated with collision area Relationship.
Here, an area can be judged by the statistics to the object in each region and the position of the object in other regions The position of the object to be assessed in domain whether by collision area references object position variation and change.
Step S1033b, determine in the corresponding region of the display data that there is incidence relation with the collision area Region other than region is the area to be tested.
The region with incidence relation is illustrated for showing the corresponding region of data shown in Fig. 7, wherein Fig. 7 In, the corresponding region of display data includes: region 701 to region 712, wherein region 701, region 702 and region 703 it Between the position of object influence each other, the position of the object between region 704, region 705 and region 706 influences each other, area The position of object between domain 707, region 708 and region 709 influences each other.Then when collision area is region 707, and touch Hitting region of the region with incidence relation includes region 708 and region 709, then region 707, region in region 701 to region 712 708 and region 709 except region be area to be tested.
In embodiments of the present invention, the spatial relationship between the region according to belonging to colliding object and other regions whether be Adjacent or positional relationship is whether position influences each other to determine area to be tested, thus will have occurred and that collision area, and The small region of the possibility that collides accurately is determined, the hit rate of collision detection is improved.
In one embodiment, it is determining belonging to impingement area and the colliding object that the colliding object collides Before collision area, the method also includes:
Display interface is divided into different regions based on quaternary tree;Object included by the display data is mapped to In the display interface, by object region belonging to the mapping position in the display interface in the display data, really It is set to region belonging to object in the display data.
It exports by the corresponding information flow of object to before display interface, can be divided into display interface not by quaternary tree With region, when the corresponding information flow of object is exported to display interface, show each display object in the display interface, and according to Position of each object in display interface determines region described in each object.
Quaternary tree is defined as the tree data structure that each father node has four child nodes.By quaternary tree to display When interface is divided, display interface is divided into four regions shown in Fig. 8 B: region 8a, region 8b, region 8c and region 8d, just right this four regions of expression of four nodes of quaternary tree.If object, that is, object in some region is more, continue by The regional split at four sub-regions, and so on, by multiple recurrence, obtain the division result of display interface.
The division result of quaternary tree can be as shown in Figure 8 A, and display area is based on recursive division three times, obtains region 801 To region 819.Here, recursive number can be determined according to collision detection permissible accuracy, can also be according to object handles equipment Power consumption determine, can also depend on needing the balance between collision detection permissible accuracy and power consumption.
In one embodiment, partial objects can be mapped in the region that display interface is divided, here, according to described aobvious The collision priority of different objects of the registration in, screening collision priority meet the object that region determines condition;Correspondingly, will In the display data, collision priority meets region and determines that the object of condition maps in the display interface, will collide excellent First grade meets object region belonging to the mapping position in the display interface that region determines condition, and it is preferential to be determined as collision Grade meets region and determines region belonging to the object of condition.
It, can be according to the combination of one or more of following priority Rule of judgment for object different in display data Judge whether object is easy to happen the collision priority of collision;
Condition 1, whether be model main body;
Whether condition 2 belongs to prominent or depressed section;
More whether condition 3, size and environment, which allow, penetrates.
It wherein, is collision priority of the collision priority higher than the main body for not being model of the main body of model in condition 1. In condition 2, the collision priority for belonging to protrusion is higher than the collision priority for belonging to depressed section.In condition 3, size and ring The collision priority that the collision priority that border does not allow to penetrate is higher than size and environment allows to penetrate.
It here, is the weight of settable a condition when the condition for determining collision priority includes multiple, really by each condition institute The quantized value of fixed collision priority weights, and obtains the final collision priority of the object.
Collision priority division can be configured according to actual needs, such as collision priority include: priority 1, it is excellent First grade 2, priority 3, and priority 1, priority 2, the priority of priority 3 successively reduce, and region determines that condition is preferential Grade is greater than or equal to priority 2, then the object for being greater than or equal to priority 2 to collision priority carries out collision detection, and determination is touched It hits priority and is greater than or equal to region of the object of priority 2 described in display interface.
At this point, in step s101, the colliding object detected is pair for colliding priority and being greater than or equal to priority 2 As.
In practical applications, meet region and determine item when being filtered out from the object in display data according to collision priority When the object of part, handled object is to select to meet the object that region determines condition in object processing method shown in FIG. 1.
In embodiments of the present invention, by colliding the setting of priority, acquisition collision priority meets region and determines condition Object, the screening of colliding object is carried out, to be further reduced the range of collision detection.
In one embodiment, object processing method provided in an embodiment of the present invention can be as shown in Figure 9 A, comprising:
Step S901, the mobile object of the scene planar object movement into the display data is determined.
Step S902, the motion track based on the mobile object determines the mobile object within the period of setting The probability to collide with the planar object.
Step S903, when the probability is greater than the probability threshold value of setting, to the mobile object and the planar object into Row monitoring, monitors whether the mobile object and the planar object are the colliding object.
Step S904, it detects the colliding object to collide in display data, determines that the colliding object collides Impingement area and the colliding object belonging to collision area.
Step S905, area to be tested is determined;
Step S906, a possibility that object and the impingement area in the area to be tested collide is determined, to can The object that energy property meets collision determination condition carries out collision detection.
Here, in AR scene, display data include virtual data and contextual data, wherein are determined in contextual data Planar object, the planar object in contextual data are the planar object in the corresponding display data of actual environment, alternatively referred to as field Scape planar object, such as: desk, chair etc. have the object of plane.
It determines to the mobile object that scene planar object is mobile in virtual data, and determines the motion track of mobile object, And the parameters such as movement speed, moving direction for determining motion track, determine that mobile object is being set according to the parameter of motion track Period in the probability that collides with planar object, and come according to the probability that planar object and mobile object collide true It is fixed.As shown in Figure 9 B, mobile object 9b is mobile to metope 9a with direction 9c, at this point, according between mobile object 9b and metope 9a Distance and direction 9c determine the probability to collide between mobile object 9b and metope 9a.
In one embodiment, motion track of the step S902 based on the mobile object determines that the mobile object is being set The probability to collide in the fixed time with the planar object, comprising: the motion track based on the mobile object, described Ray is drawn in mobile object;Based on the movement speed of the ray and the mobile object drawn, the mobile object is determined The probability to collide within the set time with the planar object.
Here, can the motion track based on mobile object a ray is drawn in mobile object, judge draw ray Whether intersect with planar object, and in the case where intersection, whether the movement speed based on mobile object exists with mobile object It collides in the period of setting.
Here, the probability of identified collision is only the probability estimated, is not used to embody mobile object and plane pair As if it no is bound to bump against.During mobile object is moved with motion track to planar object, there are motion track generations The case where variation.
In one embodiment, the mobile movement pair of the scene planar object into the display data is determined in step S901 As before, the method also includes: determine the normal vector of the scene planar object;It is flat to the scene according to the normal vector In face of as being smoothed.
Here, scene planar object subtract and a little subtract the smoothing processings such as face, so that after the face of scene planar object is reduced Point outstanding is reduced.Here, can by determine normal vector in scene planar object between each plane and each normal vector it Between pinch determine scene planar object with the presence or absence of face outstanding or point, and the sawtooth that face outstanding or point are formed is also It is that ladder-like lines carry out smoothly.The specific algorithm that scene planar object is smoothed in the embodiment of the present invention without Any restriction.
In embodiments of the present invention, it is smoothed by the planar object in contextual data, is moved in effective judgement While the probability that planar object in dynamic object and contextual data collides, number when planar object rendering can be reduced That is drawcall reduces the CPU overhead in display data output process.
In the following, being provided in conjunction with AR scene the embodiment of the present invention so that image processing application program is AR application program as an example Object processing method be further described.
Object processing method provided in an embodiment of the present invention can reduce the detection number of collision detection by following aspect:
First aspect reduces collision detection number by quaternary tree filtering algorithm.
Algorithm is that the specific aim done based on QuadTree algorithm is improved, and collision detection is done in AR scene and is not needed model All mesh and environment carry out collision calculation, illustrate:
By fov (visual) region of glasses, is divided by quaternary tree mode and (carry out the recursive quartering, recurrence time Number depends on needing the balance between collision detection permissible accuracy and power consumption).
When loading dummy model, model mesh can be marked and be belonged in which division region.
When detecting that the mesh in a certain region collides, then obtains by impingement area and collision interface, calculate other Mesh in region is screened again with the collision possibility of impingement area according to this possibility, what rejecting will not collide Mesh no longer does collision detection.On the other hand, or high relevant region adjacent to collision area is also no longer detected, only to having May the mesh of collision try again detection.
Second aspect reduces repetition or meaningless collision detection by doing pretreatment to actual environment.
By glasses to environmental scanning, each plane (for example, wall, desktop, ground etc.) under currently practical environment is found, And virtual scene is generated, and do to the plane mesh of these scenes and subtract face and subtract vertex processing, reduce collision calculation amount.
The third aspect, calculating sifting go out i.e. by the point of impingement, and shielding not will do it the detection of the point of collision.
In this way when model is moved, it is contemplated that calculate model to which plane in movement, from these planes to Whether model direction divergent-ray can collide to estimate.
For the mode of above-mentioned reduction collision detection, object handles equipment division with searching for the AR scene of current scene automatically Figure, and need to carry out the model mesh of collision detection, meter is added in the model mesh for needing to carry out collision detection searched out Calculate list.
Fourth aspect carries out priority division to the mesh file of model to control collision priority.
Here, user can also carry out precomputation and right by the calculative model mesh of manual setting before operation Model carries out priority division.
Object processing method provided by the embodiments of the present application, has following technical effect that
Reduce by 50% or more invalid collision detection;Reduce by 50% or more CPU overhead;And by dividing virtual AR Scape map, control need mesh to be shown, reduce GPU rendering consumption.
Method to realize the embodiment of the present application, the embodiment of the present application provide a kind of object handles device 1000, are applied to Object handles equipment, each module included by each unit and each unit included by the brightness controlling device, can be by right It is realized as the processor in processing equipment;Certainly it can also be realized by specific logic circuit;In the process of implementation, it handles Device can be central processing unit (CPU, Central Processing Unit), microprocessor (MPU, Micro Processor Unit), digital signal processor (DSP, Digital Signal Processor) or field programmable gate array (FPGA, Field-Programmable Gate Array) etc..
As shown in Figure 10, which includes: that the first determination unit 1001, the second determination unit 1002 and third determine Unit 1003, wherein
First determination unit 1001 determines the collision for detecting the colliding object to collide in display data Collision area belonging to impingement area that object collides and the colliding object;
Second determination unit 1002, for determining area to be tested;The area to be tested be with the collision area not Region with incidence relation;
Third determination unit 1003, for determining what the object in the area to be tested and the impingement area collided Possibility, the object for meeting collision determination condition to possibility carry out collision detection.
In one embodiment, the second determination unit 1002, is also used to:
Determine the regional space relationship in the display data corresponding each region and the collision area;
If the regional space relationship be it is adjacent, determine the corresponding region of the regional space relationship and the impact zone Domain has incidence relation;
Determine in the corresponding region of the display data that there is the area other than the region of incidence relation with the collision area Domain is the area to be tested.
In one embodiment, the second determination unit 1002, is also used to:
Determine the references object in the object to be assessed and the collision area in the corresponding each region of the display data Positional relationship;
If the positional relationship is that the position of the object to be assessed becomes with the change in location of the references object Change, determines that region belonging to object to be assessed and the collision area have incidence relation;
Determine in the corresponding region of the display data that there is the area other than the region of incidence relation with the collision area Domain is the area to be tested.
In one embodiment, third determination unit 1003, is also used to:
According to the space between the space characteristics of the object in the area to be tested and the space characteristics of the impingement area Relationship determines a possibility that object and the impingement area in the area to be tested collide.
In one embodiment, object handles device 1000 further include: area determination unit is used for:
Display interface is divided into different regions based on quaternary tree;
Object included by the display data is mapped in the display interface, by the object in the display data The region belonging to the mapping position in the display interface is determined as region belonging to object in the display data.
In one embodiment, object handles device 1000 further include: area determination unit is also used to:
According to the collision priority of the different objects in the display data, screening collision priority meets region and determines item The object of part;
By in the display data, collision priority meets region and determines that the object of condition maps to the display interface In, priority will be collided and meet object region belonging to the mapping position in the display interface that region determines condition, really It is set to collision priority to meet region and determine region belonging to the object of condition.
In one embodiment, object handles device 1000 further include: the 4th determination unit is used for:
Determine that the mobile object of the scene planar object movement into the display data, the scene planar object are real Planar object in the corresponding display data of border environment;
Based on the motion track of the mobile object, determine the mobile object within the period of setting with the plane The probability that object collides;
When probability threshold value of the probability greater than setting, the mobile object and the planar object are monitored, supervised Survey whether the mobile object and the planar object are the colliding object.
In one embodiment, the 4th determination unit is also used to:
Based on the motion track of the mobile object, ray is drawn in the mobile object;
Based on the movement speed of the ray and the mobile object drawn, the mobile object and the plane pair are determined As the probability to collide within the set time.
In one embodiment, the 4th determination unit is also used to:
Determine the normal vector of the scene planar object;
The scene planar object is smoothed according to the normal vector.
It should be noted that the description of Installation practice, be with the description of above method embodiment it is similar, there is Tongfang The similar beneficial effect of method embodiment.For undisclosed technical detail in the application Installation practice, the application side is please referred to The description of method embodiment and understand.
The embodiment of the present application provides a kind of object handles equipment, and electronic equipment can be used as lighting apparatus use, and Figure 11 is this Apply for the composed structure schematic diagram of embodiment object handles equipment, as shown in figure 11, object handles 1100 include: a processor 1101, at least one communication bus 1102, user interface 1103, at least one external communication interface 1104 and memory 1105. Wherein, communication bus 1102 is arranged for carrying out the connection communication between these components.Wherein, user interface 1103 may include with The interactive touch interface of user, key switch etc., external communication interface 1104 may include the wireline interface of standard and wirelessly connect Mouthful.Object handles equipment 1100, which may also include, the image acquisition devices such as camera.
Wherein, the processor 1101 is configured to execute the computer program stored in memory, to realize following step It is rapid:
Detect the colliding object that collides in display data, determine the impingement area that the colliding object collides with And collision area belonging to the colliding object;
Determine area to be tested;The area to be tested is the region for not having incidence relation with the collision area;
It determines a possibility that object and the impingement area in the area to be tested collide, possibility satisfaction is touched The object for hitting decision condition carries out collision detection.
Correspondingly, the embodiment of the present application provides a kind of storage medium, i.e. computer readable storage medium, the computer again Computer program is stored on readable storage medium storing program for executing, the computer program realizes above-mentioned object handles when being executed by processor The step of method.
The description of above object handles equipment and computer readable storage medium embodiment, with retouching for above method embodiment It is similar for stating, and has with embodiment of the method similar beneficial effect.For the application object handles equipment and computer-readable Undisclosed technical detail in storage medium embodiment, please refers to the description of the application embodiment of the method and understands.
In the embodiment of the present application, if realizing above-mentioned object processing method in the form of software function module, and conduct Independent product when selling or using, also can store in a computer readable storage medium.Based on this understanding, Substantially the part that contributes to existing technology can be with the shape of software product in other words for the technical solution of the embodiment of the present application Formula embodies, which is stored in a storage medium, including some instructions are used so that a calculating Machine equipment (can be personal computer, server or network equipment etc.) executes each embodiment the method for the application It is all or part of.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read Only Memory), the various media that can store program code such as magnetic or disk.In this way, the embodiment of the present application is not limited to appoint What specific hardware and software combines.
It should be understood that " one embodiment " or " embodiment " that specification is mentioned in the whole text mean it is related with embodiment A particular feature, structure, or characteristic includes at least one embodiment of the application.Therefore, occur everywhere in the whole instruction " in one embodiment " or " in one embodiment " not necessarily refer to identical embodiment.In addition, these specific features, knot Structure or characteristic can combine in any suitable manner in one or more embodiments.It should be understood that in the various implementations of the application In example, magnitude of the sequence numbers of the above procedures are not meant that the order of the execution order, the execution sequence Ying Yiqi function of each process It can be determined with internal logic, the implementation process without coping with the embodiment of the present application constitutes any restriction.Above-mentioned the embodiment of the present application Serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.Apparatus embodiments described above are merely indicative, for example, the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, such as: multiple units or components can combine, or It is desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed each composition portion Mutual coupling or direct-coupling or communication connection is divided to can be through some interfaces, the INDIRECT COUPLING of equipment or unit Or communication connection, it can be electrical, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member, which can be or may not be, to be physically separated, aobvious as unit The component shown can be or may not be physical unit;Both it can be located in one place, and may be distributed over multiple network lists In member;Some or all of units can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional unit in each embodiment of the application can be fully integrated in one processing unit, it can also To be each unit individually as a unit, can also be integrated in one unit with two or more units;It is above-mentioned Integrated unit both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, which exists When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: movable storage device, read-only deposits The various media that can store program code such as reservoir (Read Only Memory, ROM), magnetic or disk.
If alternatively, the above-mentioned integrated unit of the application is realized in the form of software function module and as independent product When selling or using, it also can store in a computer readable storage medium.Based on this understanding, the application is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product is stored in a storage medium, including some instructions are used so that computer equipment (can be with Personal computer, server or network equipment etc.) execute each embodiment the method for the application all or part. And storage medium above-mentioned includes: various Jie that can store program code such as movable storage device, ROM, magnetic or disk Matter.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain Lid is within the scope of protection of this application.Therefore, the protection scope of the application should be based on the protection scope of the described claims.

Claims (10)

1. a kind of object processing method, comprising:
It detects the colliding object to collide in display data, determines the impingement area and institute that the colliding object collides State collision area belonging to colliding object;
Determine area to be tested;The area to be tested is the region for not having incidence relation with the collision area;
It determines a possibility that object and the impingement area in the area to be tested collide, collision is met to possibility and is sentenced The object of fixed condition carries out collision detection.
2. according to the method described in claim 1, the determining area to be tested, comprising:
Determine the regional space relationship in the display data corresponding each region and the collision area;
If the regional space relationship be it is adjacent, determine that the corresponding region of the regional space relationship and the collision area have It is relevant;
It determines in the corresponding region of the display data, is with the region other than the region of incidence relation with the collision area The area to be tested.
3. according to the method described in claim 1, the determining area to be tested, comprising:
Determine the position of the references object in the object to be assessed and the collision area in the corresponding each region of the display data Set relationship;
If the positional relationship is that the position of the object to be assessed changes with the change in location of the references object, really Region belonging to fixed object to be assessed and the collision area have incidence relation;
It determines in the corresponding region of the display data, is with the region other than the region of incidence relation with the collision area The area to be tested.
4. according to the method described in claim 1, the object and the impingement area in the determination area to be tested occur A possibility that collision, comprising:
According to the spatial relationship between the space characteristics of the object in the area to be tested and the space characteristics of the impingement area, Determine a possibility that object and the impingement area in the area to be tested collide.
5. method according to any one of claims 1 to 4, determine impingement area that the colliding object collides and Before collision area belonging to the colliding object, the method also includes:
Display interface is divided into different regions based on quaternary tree;
Object included by the display data is mapped in the display interface, by the object in the display data in institute Region belonging to the mapping position in display interface is stated, region belonging to object in the display data is determined as.
6. according to the method described in claim 5, the method also includes:
According to the collision priority of the different objects in the display data, screening collision priority meets region and determines condition Object;
Correspondingly, by the display data, collision priority meets region and determines that the object of condition maps to display circle In face, priority will be collided and meet object region belonging to the mapping position in the display interface that region determines condition, It is determined as colliding priority and meets region and determine region belonging to the object of condition.
7. according to the method described in claim 1, in the impingement area and the collision that determine that the colliding object collides Before collision area belonging to object, the method also includes:
Determine that the mobile object of the scene planar object movement into the display data, the scene planar object are actual rings Planar object in the corresponding display data in border;
Based on the motion track of the mobile object, determine the mobile object within the period of setting with the planar object The probability to collide;
When probability threshold value of the probability greater than setting, the mobile object and the planar object are monitored, monitor institute State whether mobile object and the planar object are the colliding object.
8. according to the method described in claim 7, the motion track based on the mobile object, determines the mobile object The probability to collide within the set time with the planar object, comprising:
Based on the motion track of the mobile object, ray is drawn in the mobile object;
Based on the movement speed of the ray and the mobile object drawn, determine that the mobile object and the planar object exist The probability to collide in the time of setting.
9. according to the method described in claim 7, determining the mobile movement of the scene planar object into the display data Before object, the method also includes:
Determine the normal vector of the scene planar object;
The scene planar object is smoothed according to the normal vector.
10. a kind of object handles equipment, comprising: processor and for storing the computer program that can be run on a processor Memory;Wherein, the processor is for when running the computer program, perform claim to require 1 to 9 any one described right As processing method.
CN201910420908.0A 2019-05-20 2019-05-20 Object processing method and device Active CN110262729B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910420908.0A CN110262729B (en) 2019-05-20 2019-05-20 Object processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910420908.0A CN110262729B (en) 2019-05-20 2019-05-20 Object processing method and device

Publications (2)

Publication Number Publication Date
CN110262729A true CN110262729A (en) 2019-09-20
CN110262729B CN110262729B (en) 2021-11-16

Family

ID=67914871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910420908.0A Active CN110262729B (en) 2019-05-20 2019-05-20 Object processing method and device

Country Status (1)

Country Link
CN (1) CN110262729B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112827175A (en) * 2021-02-26 2021-05-25 腾讯科技(深圳)有限公司 Collision frame determination method and device and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100251185A1 (en) * 2009-03-31 2010-09-30 Codemasters Software Company Ltd. Virtual object appearance control
CN102509317A (en) * 2011-09-27 2012-06-20 北京像素软件科技股份有限公司 Implementation method of real-time collision detection system
CN104941180A (en) * 2014-03-31 2015-09-30 北京畅游天下网络技术有限公司 Collision detecting method and device for 2D games
CN105469406A (en) * 2015-11-30 2016-04-06 东北大学 Bounding box and space partitioning-based virtual object collision detection method
CN107145227A (en) * 2017-04-20 2017-09-08 腾讯科技(深圳)有限公司 The exchange method and device of virtual reality scenario
CN108714303A (en) * 2018-05-16 2018-10-30 深圳市腾讯网络信息技术有限公司 Collision checking method, equipment and computer readable storage medium
CN108885492A (en) * 2016-03-16 2018-11-23 微软技术许可有限责任公司 Virtual objects path clustering

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100251185A1 (en) * 2009-03-31 2010-09-30 Codemasters Software Company Ltd. Virtual object appearance control
CN102509317A (en) * 2011-09-27 2012-06-20 北京像素软件科技股份有限公司 Implementation method of real-time collision detection system
CN104941180A (en) * 2014-03-31 2015-09-30 北京畅游天下网络技术有限公司 Collision detecting method and device for 2D games
CN105469406A (en) * 2015-11-30 2016-04-06 东北大学 Bounding box and space partitioning-based virtual object collision detection method
CN108885492A (en) * 2016-03-16 2018-11-23 微软技术许可有限责任公司 Virtual objects path clustering
CN107145227A (en) * 2017-04-20 2017-09-08 腾讯科技(深圳)有限公司 The exchange method and device of virtual reality scenario
CN108714303A (en) * 2018-05-16 2018-10-30 深圳市腾讯网络信息技术有限公司 Collision checking method, equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112827175A (en) * 2021-02-26 2021-05-25 腾讯科技(深圳)有限公司 Collision frame determination method and device and computer-readable storage medium
CN112827175B (en) * 2021-02-26 2022-07-29 腾讯科技(深圳)有限公司 Collision frame determination method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN110262729B (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US11301954B2 (en) Method for detecting collision between cylindrical collider and convex body in real-time virtual scenario, terminal, and storage medium
US10235764B2 (en) Method, terminal, and storage medium for detecting collision between colliders in real-time virtual scene
US20190197750A1 (en) Ground plane detection for placement of augmented reality objects
CN110473293B (en) Virtual object processing method and device, storage medium and electronic equipment
CN110852942B (en) Model training method, and media information synthesis method and device
CN105335064A (en) Information processing method, terminal, and computer storage medium
CN105631923B (en) A kind of rendering intent and device
CN103886638A (en) Simulation Of The Physical Behavior Of An Object In A 3d Scene Divided Into A Plurality Of Zones
CN110865812B (en) User interface identification method and device
CN111870947B (en) Game interaction method, game interaction device, electronic equipment and storage medium
CN105027175A (en) Apparatus and method for editing symbol images, and recording medium in which program for executing same is recorded
US20110202318A1 (en) Interference determination device, interference determination method, and computer program product
US20230418799A1 (en) Volumetric vector node and object based multi-dimensional operating system
CN103679792B (en) The rendering intent and system of a kind of threedimensional model
CN107408115A (en) web site access control
RU2667720C1 (en) Method of imitation modeling and controlling virtual sphere in mobile device
CN105531756A (en) Information processing device, information processing method, and computer program
CN110472532A (en) A kind of the video object Activity recognition method and apparatus
JP6127564B2 (en) Touch determination device, touch determination method, and touch determination program
KR20220125353A (en) Systems, methods and media for automatically triggering real-time visualization of physical environments in artificial reality
Kasperi et al. Occlusion in outdoor augmented reality using geospatial building data
CN109509257A (en) Indoor floor rank components pattern forming method, terminal and storage medium
CN109345558A (en) Image processing method, device, medium and electronic equipment
CN106683152B (en) 3D visual effect analogy method and device
US7116341B2 (en) Information presentation apparatus and method in three-dimensional virtual space and computer program therefor

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