CN110850969B - Data delay processing method and system based on linked list queue - Google Patents

Data delay processing method and system based on linked list queue Download PDF

Info

Publication number
CN110850969B
CN110850969B CN201911022726.4A CN201911022726A CN110850969B CN 110850969 B CN110850969 B CN 110850969B CN 201911022726 A CN201911022726 A CN 201911022726A CN 110850969 B CN110850969 B CN 110850969B
Authority
CN
China
Prior art keywords
rigid body
delay
body data
delay time
linked list
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
CN201911022726.4A
Other languages
Chinese (zh)
Other versions
CN110850969A (en
Inventor
罗威
许秋子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Realis Multimedia Technology Co Ltd
Original Assignee
Shenzhen Realis Multimedia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Realis Multimedia Technology Co Ltd filed Critical Shenzhen Realis Multimedia Technology Co Ltd
Priority to CN201911022726.4A priority Critical patent/CN110850969B/en
Publication of CN110850969A publication Critical patent/CN110850969A/en
Application granted granted Critical
Publication of CN110850969B publication Critical patent/CN110850969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

A data delay processing method and system based on a linked list queue, the data delay processing method includes: continuously acquiring rigid body data of a delay object, wherein the delay object is configured with maximum delay time; configuring class information associated with a delay object for the rigid body data, sequentially adding the rigid body data into a preset linked list queue according to the class information, and adding delay time of the linked list queue for the rigid body data in an accumulated manner; and comparing the delay time corresponding to each rigid body data in the link list queue one by utilizing the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the last rigid body data meeting the condition that the delay time is larger than or equal to the maximum delay time. Because the linked list queue is preset to continuously receive the rigid data of the delay object, the dynamic capture data of each frame of the capture object can not be lost, and the rigid data meeting the delay condition can be conveniently taken out from the linked list queue.

Description

Data delay processing method and system based on linked list queue
Technical Field
The invention relates to a motion capture technology, in particular to a data delay processing method and a data delay processing system based on a linked list queue.
Background
The motion capture technology is that a tracking component is arranged at a key part of a moving object, the position of the tracking component is captured by a motion capture system, and data of three-dimensional space coordinates are obtained after the data are processed by a computer. After the three-dimensional space coordinate data is identified by the computer, the method can be applied to the fields of animation production, gait analysis, biomechanics, human-machine engineering and the like. Especially in the field of movie special effects, real images captured by a plurality of cameras are converted into digital models, the actions of actors during performance are captured and recorded, and then the actions are synchronized to virtual characters in a computer, so that the actions of the virtual characters are not different from real people, and a vivid and natural effect is achieved.
The optical type motion capture system is widely applied in the fields of games and movies, the motion capture task is completed by monitoring and tracking a specific light spot (such as a capture ball or a fluorescent sticker) on a target, and as each light spot corresponds to a special part for capturing the target, the movement of the light spot can be mapped into the sectional displacement of the target, even the target with a very complex structure can construct the movement of each fine joint of the target object on the basis of high light spot quantity and high positioning precision. For example, in practical applications, a rigid body configured with a plurality of reflective mark points is usually disposed at an extremity of a moving object (such as a human body), a plurality of optical cameras are used to capture the motion of the moving object at a high speed to obtain the position information of the rigid body, and the rotation angles of joints between the upper extremities of the extremity are simulated by a solution method of a reverse motion method with the help of a biological human body model, so as to accurately simulate the continuous motion trajectory of the moving object within a capture time interval.
In the prior art, the data of the optical motion capture is transmitted to the application game in real time, for example, where the current rigid body position rotates, the data is transmitted to the application game in real time. However, in the practical application process, a scene that the motion capture data needs to be used in a delayed manner may be encountered, for example, when the test reaches a delay of how many milliseconds, a problem may occur in the game, which may lead to a poor experience, or the motion capture data needs to be used in a delayed manner in the game scene to slow down the sense, and a delay time may be optionally set to meet the difference requirement of the operator. For example, the blueprint interface in the illusion engine 4 has a delayed function Delay, but the problem of this function is that only a new Delay is allowed to start after the last Delay is over during the execution of Delay, thereby causing a situation of partial data loss. If the mobile capturing system transmits 120 groups of data per second, in the process of executing the delay function, if the delay time is 500ms, only 2 groups of data can be received within 1 second, and if the delay time is 50ms, only 20 groups of data can be received within 1 second, so that data loss in the receiving time interval can be caused, and the corresponding data cannot obtain the delay effect.
Disclosure of Invention
The invention mainly solves the technical problem of how to realize a high-requirement delay effect by using dynamic capture data and avoid the situation of loss of the dynamic capture data. In order to solve the above technical problem, the present application provides a data delay processing method and system based on a linked list queue.
According to a first aspect, an embodiment provides a method for processing data delay based on a linked list queue, including: continuously acquiring rigid body data of a delay object, wherein the delay object is configured with maximum delay time; configuring class information associated with the delay object for the rigid body data, sequentially adding the rigid body data into a preset linked list queue according to the class information, and adding delay time of the linked list queue for the rigid body data in an accumulated manner; and comparing the delay time corresponding to each rigid body data in the linked list queue one by using the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the last delay time which is more than or equal to the maximum delay time.
Configuring class information associated with the delay object for the rigid body data, and sequentially adding the rigid body data into a preset linked list queue according to the class information, wherein the method comprises the following steps of: creating class information associated with the delay object, forming members in the linked list queue and distributing addresses; the class information is used for recording the rigid body data, corresponding delay time and a delay pointer, the delay time is used for starting timing when the rigid body data is added into the linked list queue, and the delay pointer is used for pointing to the address of the next member; setting a head pointer corresponding to the class information, wherein the head pointer is used for pointing to the address of a head-end member in the linked list queue; judging whether the head pointer is empty, if so, pointing the head pointer to the address of the class information, and if not, configuring the class information; when the class information is configured, the rigid body data to be added into the linked list queue is stored into the class information, the delay pointer of a tail end member in the linked list queue is obtained and configured as the address of the class information, and the delay time in the class information is initialized; the delay pointer of the tail end member is the delay pointer of the member added in the linked list queue at last; and adding the rigid body data to the tail end of the linked list queue according to the configured class information.
Obtaining a delay pointer of a tail member in the linked list queue through the following processes: judging whether the head pointer is empty or not, if so, returning an empty pointer, and if not, starting to traverse the linked list queue according to the head pointer; when traversing the linked list queue according to the head pointer, checking whether the delay pointer of each member in the linked list queue is empty one by one, if so, taking the member as a tail end member and acquiring the delay pointer of the tail end member, and if not, moving to the member pointed by the delay pointer of the member and continuously checking the delay pointer of the pointed member.
After the rigid body data are sequentially added into a preset linked list queue according to the class information, the delay time of the rigid body data added into the linked list queue is accumulated, and the method comprises the following steps: setting a process pointer and a process time, wherein the process pointer is used for pointing to the class information, and the process time is used for representing interval time for adding the rigid body data into the linked list queue in sequence; and if the process pointer is not empty, accumulating the delay time in the class information pointed by the process pointer according to the process time until all members in the linked list queue are traversed and accumulation of the delay time is completed for each member.
The comparing the delay time corresponding to each rigid body data in the linked list queue one by using the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the last delay time which meets the condition that the delay time is greater than or equal to the maximum delay time, includes: setting a detection pointer and pointing to the class information; judging whether the detection pointer is empty or not, if so, outputting default preset rigid body data, and if not, judging whether the delay time in the class information is less than the maximum delay time or not; if the delay time is less than the maximum delay time, outputting the rigid body data recorded in the class information, otherwise, recursively searching the last rigid body data corresponding to the delay time meeting the requirement that the delay time is greater than or equal to the maximum delay time, and outputting.
The recursive searching for the last rigid body data corresponding to the delay time greater than or equal to the maximum delay time includes: when the delay time of one member in the linked list queue is greater than or equal to the maximum delay time, temporarily storing the delay pointer and rigid body data of the member, and replacing the head pointer with the temporarily stored delay pointer; if the delay time of other members is larger than or equal to the maximum delay time, updating the temporarily stored delay pointer and rigid body data, and replacing the head pointer with the updated delay pointer until the linked list queue is traversed; and when the linked list queue is traversed, taking the temporarily stored rigid body data as the rigid body data corresponding to the last rigid body data with the delay time meeting the requirement that the delay time is greater than or equal to the maximum delay time.
According to a second aspect, there is provided in one embodiment a data delay processing system comprising: the dynamic capturing device is used for capturing the motion postures of one or more target objects and forming rigid body data of a delay object corresponding to the target objects in a virtual scene; processing means, communicatively connected to the motion capture means, for continuously acquiring rigid body data of the delay target and outputting rigid body data satisfying a delay requirement according to the data delay processing method of the first aspect; and the display device is in communication connection with the processor and is used for driving the delay object to display the posture according to the rigid body data which is output by the processing device and meets the delay requirement.
The processing device comprises: a data acquisition unit configured to continuously acquire rigid body data of the delay object to which a maximum delay time is allocated; a linked list configuration unit, configured to configure class information associated with the delay object for the rigid body data, sequentially add the rigid body data to a preset linked list queue according to the class information, and add delay time of the linked list queue to the rigid body data in an accumulated manner; and the delay output unit is used for comparing the delay time corresponding to each rigid body data in the linked list queue one by using the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the delay time larger than or equal to the maximum delay time.
And the dynamic capturing device and the processing device are in data transmission, rigid body data of delay objects corresponding to one or more target objects respectively are formed into frame data, and the frame data are transmitted to the processing device frame by frame in real time.
According to a third aspect, an embodiment provides a computer-readable storage medium, which includes a program executable by a processor to implement the data delay processing method described in the first aspect.
The beneficial effect of this application is:
according to the above embodiment, a data delay processing method and system based on a linked list queue, the data delay processing method includes: continuously acquiring rigid body data of a delay object, wherein the delay object is configured with maximum delay time; configuring class information associated with a delay object for the rigid body data, sequentially adding the rigid body data into a preset linked list queue according to the class information, and adding delay time of the linked list queue for the rigid body data in an accumulated manner; and comparing the delay time corresponding to each rigid body data in the link list queue one by utilizing the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the last rigid body data with the delay time larger than or equal to the maximum delay time. On the first hand, because the linked list queue is preset to continuously receive the rigid body data of the delay object, the dynamic capture data of each frame of the capture object can not be lost, and the rigid body data meeting the delay condition can be conveniently taken out from the linked list queue; in the second aspect, because the class information associated with the delay object is created, each rigid body data can be represented by the configured class information when being added into the linked list queue, so that the added rigid body data can be conveniently managed, and the delay time corresponding to each rigid body data in the linked list queue can be easily compared one by utilizing the maximum delay time, thereby achieving the purpose of executing the delay condition; in the third aspect, since pointers such as a head pointer, a process pointer, a detection pointer and the like are arranged to assist in executing the judgment process of the delay condition, the process of traversing the linked list queue is more rapid, and rigid body data needing to be output is determined by using a comparison result between the delay time and the maximum delay time of each member; in the fourth aspect, when the delay function is realized through the linked list queue, the rigid body data corresponding to the delay time smaller than the maximum delay time is not delayed, and the corresponding rigid body data can be preferentially output in a recursive search mode under the condition that the delay time exceeds the maximum delay time, so that the optimal delay effect is realized; in a fifth aspect, according to the technical solution of the present application, a processing device is mainly used to implement a delay processing process of rigid body data, so that after a data delay processing system is formed by combining a motion capture device, a display device and a processing device, the acquired motion capture data can be delayed in real time, a delayed object is driven to perform posture display in real time, and a high-demand delay effect is experienced by a user, so that viewing experience in a virtual scene is enhanced.
Drawings
FIG. 1 is a flow chart of a data delay processing method based on a linked list queue according to the present application;
FIG. 2 is a flow chart of adding rigid body data to a linked list queue;
FIG. 3 is a flowchart of searching for tail member and configuration class information in a linked list queue;
FIG. 4 is a flow chart of accumulating rigid body data for delay time in a linked list queue;
FIG. 5 is a flow chart of outputting rigid body data satisfying a delay condition;
fig. 6 is a schematic structural diagram of a data delay processing system according to the present application.
Detailed Description
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings. Wherein like elements in different embodiments have been given like element numbers associated therewith. In the following description, numerous details are set forth in order to provide a better understanding of the present application. However, those skilled in the art will readily recognize that some of the features may be omitted or replaced with other elements, materials, methods in different instances. In some instances, certain operations related to the present application have not been shown or described in this specification in order not to obscure the core of the present application with unnecessary detail, and it is not necessary for those skilled in the art to describe these operations in detail, so that they may be fully understood from the description in the specification and the general knowledge in the art.
Furthermore, the features, operations, or characteristics described in the specification may be combined in any suitable manner to form various embodiments. Also, the various steps or actions in the method descriptions may be transposed or transposed in order, as will be apparent to one of ordinary skill in the art. Thus, the various sequences in the specification and drawings are for the purpose of describing certain embodiments only and are not intended to imply a required sequence unless otherwise indicated where such sequence must be followed.
The numbering of the components as such, e.g., "first", "second", etc., is used herein only to distinguish the objects as described, and does not have any sequential or technical meaning. The term "connected" and "coupled" when used in this application, unless otherwise indicated, includes both direct and indirect connections (couplings).
The first embodiment,
Referring to fig. 1, the present application discloses a data delay processing method based on a linked list queue, which includes steps S100-S400, which are described below.
In step S100, rigid body data of a delay target, where the delay target is configured with a maximum delay time, is continuously acquired.
In this embodiment, a motion capture device (e.g., an optical motion capture device) may be used to capture the motion pose of one or more target objects, so as to form rigid body data of a delay object corresponding to the target object in the virtual scene, where the delay object may be a display object in the virtual scene, such as a cartoon image like a person, an animal, a football, a torch, etc. The motion capture device completes the task of motion capture by monitoring and tracking a specific light spot (such as a capture ball or a fluorescent sticker) on a target object in a real scene, and each light spot corresponds to a special part of a capture target, so that the movement of the light spot can be mapped into the sectional displacement of the target, even the target with a very complex structure can construct the movement of each detailed joint of the target object on the basis of high light spot quantity and high positioning accuracy. For example, in the virtual reality technology, rigid body data collected by a motion capture device is transmitted to an application game in real time, for example, where the current rigid body position rotates, the position data is transmitted to the application game in real time, and the corresponding cartoon image in the game is guided to change the posture.
It should be noted that, when configuring the maximum delay time (MaxDelayTime) for the delay object, a default value may be adopted, or a preset value may be set manually, and this is not limited specifically here.
In the present embodiment, any delay object is taken as a study object, and the detailed procedure of the data delay processing is described for the rigid body data of the delay object by the data delay processing method, so that the data delay processing can be performed for the rigid body data of other delay objects according to the data delay processing method.
And step S200, configuring class information associated with the delay object for the rigid body data, and sequentially adding the rigid body data into a preset linked list queue according to the class information.
When the rigid body data is subjected to delay processing, in order to facilitate the learning of the relationship between each rigid body data and a delay object, a class (UdelayQueue) can be declared for the delay object, and the rigid body data and the related configuration content can be stored in the class information, so that the subsequent reading of each rigid body data under the same class information and the reading and resetting of the related configuration content are facilitated.
In this embodiment, the linked list queue is a temporary storage area of data, and has the characteristics of dynamic data storage, data output, and data clearing, and each data (for example, class information configured for rigid body data, members) in the linked list queue may be processed one by one according to the requirement of data delay processing.
And step S300, adding the delay time of the linked list queue for rigid body data accumulation.
Because the data delay processing is required to be carried out on the rigid body data, and individual rigid body data meeting the delay condition is output, when each rigid body data is added into a linked list queue, the delay time is accumulated aiming at the rigid body data, so that the delay time which is reached by each rigid body data till the current time is obtained through statistics.
Step S400, comparing the delay time corresponding to each rigid body data in the link list queue one by using the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the last rigid body data meeting the condition that the delay time is greater than or equal to the maximum delay time.
It should be noted that the maximum delay time is a reference standard for data delay processing, rigid body data which does not meet the reference standard is normally output, and a normal display function of a delay object is realized, and individual rigid body data which has already met the reference standard can also be output in time to realize a delay display function of the delay object.
In this embodiment, see FIG. 2, step S200 may include steps S210-S250, which are described below, respectively.
In step S210, class information associated with the delay object is created, and members in the linked list queue are formed and assigned with addresses (i.e., storage locations of data). This type of information (UDelayQueue) is used to record rigid body data (Vect) and corresponding delay time (DelayTime), delay pointer (NextDelay). The delay time is used for starting timing when rigid body data is added into a linked list queue, and the initial value of the delay time can be set to be 0ms, so that accumulated timing is carried out on the basis of 0 ms; the delay pointer is used to point to the address of the next member, which can be automatically addressed with the delay pointer after processing the current member of the delaying object.
In addition, a head pointer (Delayhead) should be set and corresponding to the class information, where the head pointer is used to point to the address of the head member in the linked list queue. Then, each time the whole linked list queue is traversed, the internal information (e.g., rigid body data, delay time, delay pointer) of each member associated with the delay object may be read or re-read one by one, starting with the head pointer.
For example, for a football-related delaying object, a class may be declared, the class name being defined as UDelayQueue, so that it inherits to the UObject base class of the ghost engine itself, and then there are three variables in UDelayQueue, one being of FTransform type (similar to the Transform type in the prior art) named Vect, which is used to store rigid body data sent from the capturing device; one variable is a float type DelayTime used for recording the time delay of the current rigid body data after adding into the linked list queue; another variable is the internal pointer NextDelay of UDelayQueue, which is used to point to the next member of the linked list queue.
In addition, a float variable, maxDelayTime, associated with UDelayQueue and a pointer, delayhead, associated with UDelayQueue may also be declared. The MaxDelayTime is used to record the maximum time required to be delayed, for example, if rigid body data is used with a maximum delay of 50ms, the MaxDelayTime is defined as 0.05; where Delayhead is the head pointer of the linked list queue, starting with this pointer each time the entire linked list queue is traversed.
In step S220, it is determined whether the head pointer is empty, if so, the process proceeds to step S250, otherwise, the process proceeds to step S230.
It should be noted that the head pointer (DelayHead) is the start address of the traversal linked list queue, and a null indicates that the head pointer is not a relevant member of the non-delayed object in the linked list queue.
Step S230, configuring class information. When the class information is configured, the rigid body data to be added into the linked list queue is stored into the class information, the delay pointer of the tail end member in the linked list queue is obtained and configured as the address of the class information, the delay pointer in the initialization setting class information is null, and the delay time in the initialization setting class information is 0ms. Wherein, the delay pointer of the tail end member is the address of the last member added in the linked list queue.
In one embodiment, the class information of any one rigid body data may be configured by the method provided in fig. 3, see steps S231-S237 below.
In step S231, it is determined whether the head pointer (DelayHead) is empty, and if so, the process proceeds to step S232, otherwise, the process proceeds to step S233.
In step S232, a null pointer is returned, since the head pointer is null, the linked list queue cannot be traversed.
In step S233, the linked list queue starts to be traversed according to the head pointer, and each member in the linked list queue is checked one by one.
It should be noted that the members in the linked list queue are data already added to the linked list queue, and are usually class information corresponding to the rigid body data, which is recorded by rigid body data, delay time, and delay pointer.
In step S234, when the linked list queue starts to be traversed according to the head pointer (DelayHead), whether the delay pointer (NextDelay) of each member in the linked list queue is empty is checked one by one, if yes, step S236 is performed, otherwise, step S235 is performed.
In step S235, the user moves to the member pointed by the delay pointer of the member, and returns to step S234 to continue checking the delay pointer (NextDelay) of the pointed member, and the process loops until the delay pointer of one member is empty, and then proceeds to step S236.
In step S236, the member is taken as the tail end member and the delay pointer of the tail end member is obtained. Since the delay pointer (NextDelay) of the member is empty, it indicates that all members related to the delay object in the linked list queue (i.e. class information of each rigid body data) have been traversed, and the member belongs to the last data added in the linked list queue, so that the member is the tail end member.
Step S237, configuring class information of the rigid body data by using the rigid body data to be added, the delay pointer of the tail end member, and the initialized delay time, which is specifically described as: storing rigid body data to be added into the linked list queue into class information, acquiring a delay pointer of a tail end member in the linked list queue, configuring the delay pointer of the tail end member into a delay pointer of the class information, initializing the delay pointer in the set class information to be null, and initializing the delay time in the set class information to be 0ms.
And step S240, adding the rigid body data to the tail end of the linked list queue according to the configured class information.
Those skilled in the art will appreciate that each member (i.e., class information corresponding to each rigid body data) in the linked list queue is stored according to an address, and the rigid body data is stored in the corresponding class information, i.e., the rigid body data is added to the linked list queue. According to the order of the searched addresses, the rigid body data to be added into the linked list queue should be located in the last member, so that the rigid body data is added into the tail end of the linked list queue.
In step S250, the class information is configured, and the head pointer is pointed to the address of the class information. When configuring the class information, the rigid body data to be added into the linked list queue is stored into the class information, the delay pointer in the initialization setting class information is null, and the delay time in the initialization setting class information is 0ms. That is, the member formed by the information is used as the head member of the linked list queue, and the operation is performed from the member when traversing the linked list queue.
In another embodiment, the function "configuring class information associated with a delay object for rigid body data and sequentially adding rigid body data to a preset linked list queue according to the class information" implemented in step S200 may be implemented by using a self-defined DelayPush function, where an ftrange type variable T is set to represent rigid body data, and the function is to add the input rigid body data to the tail end of the linked list queue
In another embodiment, the function "obtain tail end member" indicated in steps S231-S236 may be implemented by a GetLast function, the parameter is an object related to UdelayQueue, the function may be used to traverse the member related to UdelayQueue in the linked list queue, and finally output the tail end member of the linked list queue.
In this embodiment, referring to fig. 4, step S300 involves adding the delay time of the link list queue for the rigid body data accumulation after the rigid body data is added to the preset link list queue in sequence according to the class information, and the process may include steps S310 to S360, which are respectively described as follows.
Step S310, setting a procedure pointer (DelayD) and a procedure time (DelayT), wherein the procedure pointer is used for pointing to the class information so as to carry out accumulation operation on the delay time in the pointed class information; the process time is used for expressing the interval time of adding the rigid body data into the linked list queue successively, namely the time length between the adding time of the data of the current frame and the adding time of the data of the last frame.
In step S320, it is determined whether the process pointer is empty, if so, step S360 is performed, otherwise, step S330 is performed.
Step S330, accumulating the delay time in the class information pointed by the process pointer according to the process time. In the first operation, the process pointer (DelayD) may be set to the head pointer (DelayHead), i.e., the address of the head member in the linked list queue, and the linked list queue will be traversed from the head pointer to cumulatively clock the delay time of each member one by one.
Step S340, determining whether to traverse each member of the link list queue, if yes, entering step S360, otherwise, entering step S350.
Step S350, the process pointer points to the next member in the linked list queue until each member in the linked list queue is traversed and the accumulation of delay time is completed for each member.
And step S360, finishing the processing, thus performing cumulative timing on the delay time of each member in the linked list queue.
In another embodiment, the function "add delay time for linked list queue for rigid body data accumulation" represented by step S300 above may be implemented by an AddDelayTime function, and two input parameters DelayT, nextD of the function are set, where DelayT is the interval of input frame time (how much time has passed from the last frame to this frame), and NextD is the UDelayQueue object pointer to perform accumulated delay time. The function may be called in a loop while traversing the linked list queue, thereby cumulatively timing the delay time of each member.
In this embodiment, referring to fig. 5, step S400 involves comparing the delay times corresponding to the rigid body data in the link list queue one by using the maximum delay time, and the process may specifically include steps S410 to S490, which are respectively described below.
In step S410, a Detection Pointer (DP) is set and points to the class information. In the first operation, the detection pointer may be set as a head pointer (DelayHead), that is, an address of class information corresponding to a head member in a linked list queue
In step S420, it is determined whether the detection pointer is empty, if so, step S430 is performed, otherwise, step S440 is performed.
Step S430, outputting default preset rigid body data, which represents that the transmitted parameters are invalid and have no execution meaning, and directly returning to default values.
Step S440, if the Detection Pointer (DP) is not empty, determining whether the delay time in the class information pointed by the detection pointer is less than the maximum delay time (MaxDelayTime), if so, entering step S450, otherwise, entering step S460.
It should be noted that the maximum delay time (MaxDelayTime) is already configured in step S100, and is typically configured in advance by the user, for example, to be 50ms.
Step S450, rigid body data recorded in the class information is output. That is, the reference standard of delay is not yet reached, and the current rigid body data is directly output.
In step S460, when the delay time of a member in the linked list queue is greater than or equal to the maximum delay time, the delay pointer and the rigid body data of the member are temporarily stored, and the head pointer is replaced with the temporarily stored delay pointer, for example, a NextDP local variable is used to temporarily store the delay pointer (NextDelay) of the member (i.e., the class information pointed by the currently detected pointer DP), and a DPVect local variable is used to temporarily store the rigid body data of the member.
The skilled person will understand that a recursive method can then be used to search the rigid body data corresponding to the last delay time (MaxDelayTime) that is greater than or equal to the maximum delay time (MaxDelayTime) for output, and the following steps will be described in detail for the recursive search.
Step S470 is to determine whether the delay time of other members in the linked list queue is less than the maximum delay time, if yes, step S450 is performed, otherwise step S480 is performed.
Step S480, the delay pointers and the rigid body data of other members are used to update the temporarily stored delay pointers and rigid body data, and the head pointer is replaced with the updated delay pointer until the linked list queue is traversed and the last rigid body data corresponding to the delay time greater than or equal to the maximum delay time (MaxDelayTime) is found.
Step S490, when the linked list queue is completed by traversal, the temporarily stored rigid body data may be used as the rigid body data corresponding to the last delay time that satisfies that the delay time is greater than or equal to the maximum delay time, and the rigid body data is output. That is, the rigid body data corresponding to the last delay time greater than or equal to the maximum delay time is considered to meet the delay condition, and the rigid body data is output, so as to achieve the application effect of data delay processing.
In another embodiment, the function "maximum delay time compares delay times corresponding to rigid body data in the link list queue one by one" indicated in step S400 may be implemented by using a DelayPop function, where the parameter is a pointer DP associated with the UDelayQueue, and the function is used to output FTransform type variables, that is, rigid body data meeting the delay condition. When traversing the linked list queue, calling the function can compare the delay time of each member, outputting the rigid body data corresponding to the delay time less than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the delay time greater than or equal to the maximum delay time.
Those skilled in the art will appreciate that the following technical advantages may be achieved by the above-described claimed data delay processing method: (1) Setting a linked list queue in advance to continuously receive rigid body data of a delay object, so that the attitude data of each frame of a capture object cannot be lost, and the rigid body data meeting the delay condition can be conveniently taken out from the linked list queue; (2) The method creates the class information associated with the delay object, so that each rigid body data can be represented by the configured class information when being added into the linked list queue, thereby facilitating the management of each added rigid body data, and easily comparing the delay time corresponding to each rigid body data in the linked list queue one by utilizing the maximum delay time, thereby achieving the purpose of executing the delay condition; (3) Setting pointers such as a head pointer, a process pointer, a detection pointer and the like to assist in executing the judgment process of the delay condition, so that the process of traversing the linked list queue is quicker, and determining rigid body data to be output by using a comparison result between the delay time and the maximum delay time of each member; (4) When the delay function is realized through the linked list queue, the rigid body data corresponding to the delay time smaller than the maximum delay time is not delayed, and the corresponding rigid body data can be preferentially output through a recursive search mode under the condition that the delay time exceeds the maximum delay time, so that the optimal delay effect is realized.
Example II,
Referring to fig. 6, on the basis of the data delay processing method disclosed in the first embodiment, the present application also discloses a data delay processing system, which mainly includes a motion capture device 51, a processing device 52 and a display device 53, which are respectively described below.
The dynamic capture device 51 is used for capturing the motion postures of one or more target objects and forming rigid body data of a delay object corresponding to the target objects in a virtual scene. The delay object can be a display object in a virtual scene, such as a cartoon figure like a person, an animal, a football, a torch and the like.
In this embodiment, the motion capture device 51 (e.g., an optical motion capture device) performs a motion capture task by monitoring and tracking a specific light spot (e.g., a capture ball or a fluorescent sticker) on a target object in a real scene, and each light spot corresponds to a specific portion of a capture target, so that the movement of the light spot can be mapped as a segmental displacement of the target, and even a target with a very complex structure can construct the movement of each fine joint of the target object on the basis of a high light spot amount and high positioning accuracy. For example, in the virtual reality technology, rigid body data collected by a motion capture device is transmitted to an application game in real time, for example, where the current rigid body position rotates, the position data is transmitted to the application game in real time, and the corresponding cartoon image in the game is guided to change the posture.
The processing device 52 is connected to the moving capture device 51 in communication, and is used to continuously acquire rigid body data of a delay object and output rigid body data meeting a delay requirement according to the data delay processing method disclosed in the first embodiment. As can be seen from steps S100-S400, the processing device 52 can output the rigid body data corresponding to the delay time less than the maximum delay time among the rigid body data, and/or output the rigid body data corresponding to the last rigid body data satisfying the delay time greater than or equal to the maximum delay time.
The display device 53 is connected to the processing device 52 in communication, and is used for driving the delay object to display the posture according to the rigid body data meeting the delay requirement output by the processing device 53. When the processing device 52 outputs the rigid body data corresponding to the delay time less than the maximum delay time among the rigid body data, the delay object performs normal posture change and display, and when the processing device 52 outputs the rigid body data corresponding to the last delay time satisfying the condition that the delay time is greater than or equal to the maximum delay time, the delay object realizes posture change and display to a smaller extent, so that the picture of the delay effect is enhanced, and the viewing experience of the user is improved.
In one embodiment, referring to fig. 6, the processing device 52 includes a data obtaining unit 521, a linked list configuring unit 522, and a delay outputting unit 523, which are respectively described as follows.
The data acquisition unit 521 is used to continuously acquire rigid body data of a delay target, and the delay target is configured with a maximum delay time. As for the functions of the data obtaining unit 521, reference may be made to step S100 in the first embodiment, which is not described herein again.
The linked list configuration unit 522 is configured to configure class information associated with the delay object for the rigid body data, sequentially add the rigid body data to a preset linked list queue according to the class information, and add the delay time of the linked list queue for the rigid body data accumulation. As for the function of the linked list configuration unit 522, reference may be made to steps S200 and S300 in the first embodiment, which is not described herein again.
The delay output unit 523 is configured to compare delay times corresponding to the rigid body data in the link table queue one by using the maximum delay time, output the rigid body data corresponding to the delay time smaller than the maximum delay time among the rigid body data, and/or output the rigid body data corresponding to the last delay time that is greater than or equal to the maximum delay time. As for the function of the delay output unit 523, reference may be made to step S400 in the first embodiment, and details are not repeated here.
In this embodiment, data is transmitted between the dynamic capture device 51 and the processing device 52, and the dynamic capture device 51 forms rigid body data of delay objects corresponding to one or more target objects into frame data and transmits the frame data to the processing device 52 frame by frame in real time, so that the processing device 52 can delay each frame data in time, and a plurality of delay objects have delay performance at the same time, thereby improving multi-object processing capability in the data delay processing process.
As can be understood by those skilled in the art, in the technical solution of the present application, the processing device is mainly used to implement the delay processing process of the rigid body data, so that after the motion capture device, the display device and the processing device are combined to form the data delay processing system, the acquired motion capture data can be delayed in real time, and the delayed object is driven to perform gesture display in real time, so that the viewing experience in a virtual scene is enhanced by using a high-requirement delay effect experienced by a user.
Those skilled in the art will appreciate that all or part of the functions of the various methods in the above embodiments may be implemented by hardware, or may be implemented by computer programs. When all or part of the functions of the above embodiments are implemented by a computer program, the program may be stored in a computer-readable storage medium, and the storage medium may include: a read only memory, a random access memory, a magnetic disk, an optical disk, a hard disk, etc., and the program is executed by a computer to realize the above functions. For example, the program may be stored in a memory of the device, and when the program in the memory is executed by the processor, all or part of the functions described above may be implemented. In addition, when all or part of the functions in the above embodiments are implemented by a computer program, the program may be stored in a storage medium such as a server, another computer, a magnetic disk, an optical disk, a flash disk, or a portable hard disk, and may be downloaded or copied to a memory of a local device, or may be version-updated in a system of the local device, and when the program in the memory is executed by a processor, all or part of the functions in the above embodiments may be implemented.
The present invention has been described in terms of specific examples, which are provided to aid in understanding the invention and are not intended to be limiting. For a person skilled in the art to which the invention pertains, several simple deductions, modifications or substitutions may be made according to the idea of the invention.

Claims (10)

1. A data delay processing method based on a linked list queue is characterized by comprising the following steps:
continuously acquiring rigid body data of a delay object, wherein the delay object is configured with maximum delay time;
configuring class information associated with the delay object for the rigid body data, sequentially adding the rigid body data into a preset linked list queue according to the class information, and adding delay time of the linked list queue for the rigid body data in an accumulated manner;
and comparing the delay time corresponding to each rigid body data in the linked list queue one by using the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the last delay time which is more than or equal to the maximum delay time.
2. The data delay processing method of claim 1, wherein configuring class information associated with the delay object for the rigid body data, and sequentially adding the rigid body data to a preset linked list queue according to the class information comprises:
creating class information associated with the delay object, forming members in the linked list queue and distributing addresses; the class information is used for recording the rigid body data, corresponding delay time and a delay pointer, the delay time is used for starting timing when the rigid body data is added into the linked list queue, and the delay pointer is used for pointing to the address of the next member;
setting a head pointer corresponding to the class information, wherein the head pointer is used for pointing to the address of a head-end member in the linked list queue;
judging whether the head pointer is empty, if so, pointing the head pointer to the address of the class information, and if not, configuring the class information; when the class information is configured, the rigid body data to be added into the linked list queue is stored into the class information, the delay pointer of a tail end member in the linked list queue is obtained and configured as the address of the class information, and the delay time in the class information is initialized; the delay pointer of the tail end member is the address of the member added in the linked list queue;
and adding the rigid body data to the tail end of the linked list queue according to the configured class information.
3. The data delay processing method of claim 2, wherein the delay pointer of the tail end member in the linked list queue is obtained by:
judging whether the head pointer is empty or not, if so, returning an empty pointer, and if not, starting to traverse the linked list queue according to the head pointer;
when traversing the linked list queue according to the head pointer, checking whether the delay pointer of each member in the linked list queue is empty one by one, if so, taking the member as a tail end member and acquiring the delay pointer of the tail end member, and if not, moving to the member pointed by the delay pointer of the member and continuously checking the delay pointer of the pointed member.
4. The data delay processing method of claim 3, wherein accumulating delay time added to the linked list queue for the rigid body data after sequentially adding the rigid body data to a preset linked list queue according to the class information comprises:
setting a process pointer and a process time, wherein the process pointer is used for pointing to the class information, and the process time is used for representing interval time of adding the rigid body data into the linked list queue in sequence;
and if the process pointer is judged not to be empty, accumulating the delay time in the class information pointed by the process pointer according to the process time until all members in the linked list queue are traversed and accumulation of the delay time is completed for each member.
5. The data delay processing method according to claim 4, wherein the comparing the delay time corresponding to each rigid body data in the linked list queue one by one using the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the last delay time satisfying that the delay time is greater than or equal to the maximum delay time comprises:
setting a detection pointer and pointing to the class information;
judging whether the detection pointer is empty or not, if so, outputting default preset rigid body data, and if not, judging whether the delay time in the class information is less than the maximum delay time or not; if the delay time is less than the maximum delay time, outputting the rigid body data recorded in the class information, otherwise, recursively searching the last rigid body data corresponding to the delay time meeting the requirement that the delay time is greater than or equal to the maximum delay time, and outputting.
6. The data delay processing method of claim 5, wherein said recursively searching for the last rigid body data for which a delay time greater than or equal to the maximum delay time is satisfied comprises:
when the delay time of one member in the linked list queue is greater than or equal to the maximum delay time, temporarily storing the delay pointer and rigid body data of the member, and replacing the head pointer with the temporarily stored delay pointer;
if the delay time of other members is larger than or equal to the maximum delay time, updating the temporarily stored delay pointer and rigid body data, and replacing the head pointer with the updated delay pointer until the linked list queue is traversed;
and when the linked list queue is traversed, taking the temporarily stored rigid body data as the rigid body data corresponding to the last rigid body data with the delay time meeting the requirement that the delay time is greater than or equal to the maximum delay time.
7. A data delay processing system, comprising:
the dynamic capturing device is used for capturing the motion postures of one or more target objects and forming rigid body data of a delay object corresponding to the target objects in a virtual scene;
processing means, communicatively connected to the motion capture means, for continuously acquiring rigid body data of the delay object and outputting rigid body data satisfying a delay requirement according to the data delay processing method of any one of claims 1 to 6;
and the display device is in communication connection with the processor and is used for driving the delay object to display the posture according to the rigid body data which is output by the processing device and meets the delay requirement.
8. The data delay processing system of claim 7, wherein the processing means comprises:
a data acquisition unit configured to continuously acquire rigid body data of the delay object to which a maximum delay time is allocated;
a linked list configuration unit, configured to configure class information associated with the delay object for the rigid body data, sequentially add the rigid body data to a preset linked list queue according to the class information, and add delay time of the linked list queue to the rigid body data in an accumulated manner;
and the delay output unit is used for comparing the delay time corresponding to each rigid body data in the linked list queue one by using the maximum delay time, outputting the rigid body data corresponding to the delay time smaller than the maximum delay time in each rigid body data, and/or outputting the rigid body data corresponding to the delay time larger than or equal to the maximum delay time.
9. The data delay processing system according to claim 7, wherein the data transmission is performed between the dynamic capture device and the processing device, rigid body data of delay objects respectively corresponding to one or more target objects are formed into frame data, and are transmitted to the processing device frame by frame in real time.
10. A computer-readable storage medium characterized by comprising a program executable by a processor to implement the data delay processing method according to any one of claims 1 to 6.
CN201911022726.4A 2019-10-25 2019-10-25 Data delay processing method and system based on linked list queue Active CN110850969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911022726.4A CN110850969B (en) 2019-10-25 2019-10-25 Data delay processing method and system based on linked list queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911022726.4A CN110850969B (en) 2019-10-25 2019-10-25 Data delay processing method and system based on linked list queue

Publications (2)

Publication Number Publication Date
CN110850969A CN110850969A (en) 2020-02-28
CN110850969B true CN110850969B (en) 2023-04-18

Family

ID=69597900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911022726.4A Active CN110850969B (en) 2019-10-25 2019-10-25 Data delay processing method and system based on linked list queue

Country Status (1)

Country Link
CN (1) CN110850969B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102917466A (en) * 2007-09-17 2013-02-06 高通股份有限公司 Priority scheduling and admission control in a communication network
CN108415759A (en) * 2017-02-09 2018-08-17 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of message
CN109743137A (en) * 2019-01-10 2019-05-10 浙江小泰科技有限公司 A kind of Distributed Delay message queue processing system for supporting to update

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102917466A (en) * 2007-09-17 2013-02-06 高通股份有限公司 Priority scheduling and admission control in a communication network
CN108415759A (en) * 2017-02-09 2018-08-17 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of message
CN109743137A (en) * 2019-01-10 2019-05-10 浙江小泰科技有限公司 A kind of Distributed Delay message queue processing system for supporting to update

Also Published As

Publication number Publication date
CN110850969A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN110637323B (en) Method, device and system for part-based tracking
US11509819B2 (en) Providing contextual augmented reality photo pose guidance
JP6775776B2 (en) Free viewpoint movement display device
JP2020509506A (en) Method, apparatus, device, and storage medium for determining camera posture information
CN108958475B (en) Virtual object control method, device and equipment
US9925461B2 (en) Character model animation using stored recordings of player movement interface data
US11657085B1 (en) Optical devices and apparatuses for capturing, structuring, and using interlinked multi-directional still pictures and/or multi-directional motion pictures
US20160210761A1 (en) 3d reconstruction
CN111723769B (en) Method, apparatus, device and storage medium for processing image
CN110415174B (en) Map fusion method, electronic device and storage medium
CN110544278B (en) Rigid body motion capture method and device and AGV pose capture system
CN112348887A (en) Terminal pose determining method and related device
US20180061107A1 (en) Machine creation of program with frame analysis method and apparatus
US9870637B2 (en) Frame removal and replacement for stop-action animation
CN110544315B (en) Virtual object control method and related equipment
CN115265520A (en) Intelligent operation equipment and mapping method, device and storage medium thereof
CN110850969B (en) Data delay processing method and system based on linked list queue
CN112017304B (en) Method, apparatus, electronic device and medium for presenting augmented reality data
JP2019179481A (en) Computer program and portable terminal device
CN110531854A (en) A kind of action imitation display methods, action imitation display system and storage medium
US20120265516A1 (en) Peripheral device simulation
CN114998487A (en) Animation generation method, device, equipment and readable medium
CN116069157A (en) Virtual object display method, device, electronic equipment and readable medium
CN113705379A (en) Gesture estimation method and device, storage medium and equipment
CN108805043A (en) Target object method for tracing, device, terminal and storage medium

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