The content of the invention
The present invention provides a kind of localization method and system of virtual reality interactive component, can reduce virtual reality interaction portion
The cost of implementation of part, also enter when the location hardware of virtual reality interactive component breaks down without prejudice to virtual reality interactive component
The use function of row man-machine interaction, therefore the hardware cost of user can be reduced.
The present invention provides a kind of localization method of virtual reality interactive component, including:
Monitor that the position of virtual reality interactive component mark in three dimensions is converted, obtain virtual reality and hand over
The evolution information of mutual part mark in three dimensions, the virtual reality interactive component are identified as virtual reality device pair
What the picture in virtual reality interactive component obtained after being trained, the picture includes User Defined to identify void
Intend any picture of real interactive component;
According to the evolution information of virtual reality interactive component mark in three dimensions, virtual reality interaction portion is determined
Part identifies the evolution information in virtual reality.
Alternatively, monitor that there occurs also wrapped before conversion for the position of virtual reality interactive component mark in three dimensions
Include:
Virtual reality interactive component identification database is established, the virtual reality interactive component identification database includes adopting
With mark recognizer to picture be identified training after obtain virtual reality interactive component mark with it is corresponding between picture
Relation, the virtual reality interactive component mark obtained after the recognition training have rotational invariance and metric space consistency;
Obtain the picture in virtual reality interactive component;
The picture of the acquisition is matched with the picture in virtual reality interactive component identification database, described in identification
Virtual reality interactive component corresponding to picture identifies.
Alternatively, monitor that the position of virtual reality interactive component mark in three dimensions is converted, obtain empty
Intend the evolution information of real interactive component mark in three dimensions, including:
The change in location of picture in three dimensions in virtual reality interactive component is monitored, obtains the picture three
Evolution information in dimension space;
Corresponding relation between picture is identified according to virtual reality interactive component, by the picture in three dimensions
Evolution information is defined as the evolution information of virtual reality interactive component mark in three dimensions.
Alternatively, obtaining virtual reality interactive component mark, evolution information also includes afterwards in three dimensions:
According to default error threshold, to virtual reality interactive component mark, evolution information is carried out in three dimensions
Exceptional value judges, if exceptional value then removes the evolution information.
Alternatively, evolution information in three dimensions is identified according to virtual reality interactive component, determines virtual reality
Interactive component identifies the evolution information in virtual reality, including:
According to the virtual reality interactive component of foundation mark position in three dimensions and virtual reality interactive component mark
Know the mapping relations between the position in virtual reality, evolution in three dimensions is identified to virtual reality interactive component
Information carries out matrix coordinate conversion, obtains virtual reality interactive component and identifies the evolution information in virtual reality.
The present invention also provides a kind of positioner of virtual reality interactive component, positioned at virtual reality device side, including:
Monitoring modular, for monitoring that the position of virtual reality interactive component mark in three dimensions is converted,
The evolution information of virtual reality interactive component mark in three dimensions is obtained, the virtual reality interactive component is identified as
What the picture that virtual reality device is pointed in virtual reality interactive component obtained after being trained, the picture includes user certainly
Define to identify any picture of virtual reality interactive component;
Mapping block, for the evolution information according to virtual reality interactive component mark in three dimensions, it is determined that
Virtual reality interactive component identifies the evolution information in virtual reality.
Alternatively, described device also includes:
Training module, for establishing virtual reality interactive component identification database, the virtual reality interactive component mark
Database include using mark recognizer to picture be identified training after obtain virtual reality interactive component mark with
Corresponding relation between picture, the virtual reality interactive component mark obtained after the recognition training have rotational invariance and chi
Spend space-invariance;
Acquisition module, for obtaining the picture in virtual reality interactive component;
Matching module, for the picture in the picture of the acquisition and virtual reality interactive component identification database to be carried out
Matching, identify that virtual reality interactive component corresponding to the picture identifies.
Alternatively, the monitoring modular, specifically for monitoring the picture in virtual reality interactive component in three dimensions
In change in location, obtain the evolution information of the picture in three dimensions;Identified according to virtual reality interactive component
Corresponding relation between picture, the evolution information of the picture in three dimensions is defined as virtual reality interaction portion
The evolution information of part mark in three dimensions.
Alternatively, described device also includes:
Abnormal judge module, for according to default error threshold, identifying virtual reality interactive component in three dimensions
Middle position information converting carries out exceptional value judgement, if exceptional value then removes the evolution information.
Alternatively, the mapping block is specifically used for:Identified according to the virtual reality interactive component of foundation in three dimensions
In position and virtual reality interactive component identify mapping relations between position in virtual reality, virtual reality is interacted
Evolution information carries out matrix coordinate conversion to part mark in three dimensions, obtains virtual reality interactive component mark in void
Intend the evolution information in reality.
The embodiment of the present invention identifies virtual reality interactive component mark by being arranged on the part of taking pictures of virtual reality device side
Know and follow the trail of virtual reality interactive component mark evolution information in three dimensions, and by virtual reality interactive component mark
The processor that the evolution information known in three dimensions is sent to virtual reality device side carries out virtual reality interactive component
The mapping of the evolution information in Virtual Space is identified, so as to realize mobile rotation in three dimensions (real world)
During virtual reality interactive component with virtual reality interactive component mark, the virtual reality interactive component in Virtual Space also can
Carry out corresponding mobile rotation.Therefore, as long as the object for posting picture can be man-machine as the progress of virtual reality interactive component
Interaction, the hardware cost that user buys virtual reality interactive component is saved, reduce the cost of implementation of man-machine interaction.Further,
The embodiment of the present invention also provides a picture recognition template, and user can be by picture recognition training with self-defined picture identification
It can be used customized picture as virtual reality interactive component mark, substantially increase user experience.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, rather than whole embodiments.Embodiment in the present invention, those of ordinary skill in the art are not having
There is the every other embodiment made and obtained under the premise of creative work, belong to the scope of protection of the invention.
The term used in embodiments of the present invention is only merely for the purpose of description specific embodiment, and is not intended to be limiting
The present invention." one kind ", " described " and "the" of singulative used in the embodiment of the present invention and appended claims
It is also intended to including most forms, unless context clearly shows that other implications, " a variety of " generally comprise at least two, but not
Exclusion includes at least one situation.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, represent
There may be three kinds of relations, for example, A and/or B, can be represented:Individualism A, while A and B be present, individualism B these three
Situation.In addition, character "/" herein, it is a kind of relation of "or" to typically represent forward-backward correlation object.
It will be appreciated that though XXX may be described using term first, second, third, etc. in embodiments of the present invention, but
These XXX should not necessarily be limited by these terms.These terms are only used for XXX being distinguished from each other out.For example, implementation of the present invention is not being departed from
In the case of example scope, the first XXX can also be referred to as the 2nd XXX, and similarly, the 2nd XXX can also be referred to as the first XXX.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising, so that commodity or system including a series of elements not only include those key elements, but also including without clear and definite
The other element listed, or also include for this commodity or the intrinsic key element of system.In the feelings not limited more
Under condition, the key element that is limited by sentence "including a ...", it is not excluded that in the commodity including the key element or system also
Other identical element be present.
The present invention invention thought be:Identify that virtual reality interacts by the part of taking pictures for being arranged on virtual reality device side
Part is identified and follows the trail of the evolution information of virtual reality interactive component mark in three dimensions, and virtual reality is interacted
The processor that the evolution information of part mark in three dimensions is sent to virtual reality device side carries out virtual reality friendship
The mapping of evolution information of the mutual part mark in Virtual Space, is moved so as to realize in three dimensions (real world)
During the virtual reality interactive component that dynamic rotation identifies with virtual reality interactive component, the virtual reality interaction portion in Virtual Space
Part can also carry out corresponding mobile rotation.
Because the present invention is that the evolution information of virtual reality interactive component is obtained by virtual reality device side, only
To be added with any object of virtual reality interactive component mark can turn into virtual reality interactive component, such as hand in user
On post virtual reality interactive component mark, the hand of user can turn into virtual reality interactive component to be carried out with virtual reality device
Man-machine interaction, the hardware cost that user buys virtual reality interactive component is saved, greatly reduce the cost of implementation of man-machine interaction.
Fig. 1 is the localization method schematic flow sheet for the virtual reality interactive component that one embodiment of the invention provides, such as Fig. 1 institutes
Show, including:
101st, monitor that the position of virtual reality interactive component mark in three dimensions is converted, obtain virtual existing
The evolution information of real interactive component mark in three dimensions;
Wherein, the virtual reality interactive component is identified as virtual reality device and is pointed in virtual reality interactive component
What picture obtained after being trained, the picture includes User Defined to identify any figure of virtual reality interactive component
Piece.
In a kind of optional implementation, the position hair of virtual reality interactive component mark in three dimensions is monitored
Also include before having given birth to conversion:
Obtain the picture in virtual reality interactive component;By the picture of the acquisition and virtual reality interactive component mark number
Matched according to the picture in storehouse, identify that virtual reality interactive component corresponding to the picture identifies.
In a kind of optional implementation, by the picture of the acquisition and virtual reality interactive component identification database
Picture matched before also include:
Virtual reality interactive component mark is carried out to the picture in virtual reality interactive component using mark recognizer
Recognition training, establish virtual reality interactive component identification database so that in the virtual reality interactive component identification database
Virtual reality interactive component mark there is rotational invariance and metric space consistency, the virtual reality interactive component identifies
Database includes the corresponding relation between virtual reality interactive component mark and picture.
Therefore, when monitoring the change in location of the picture in virtual reality interactive component in three dimensions, institute is obtained
State the evolution information of picture in three dimensions;Then according to virtual reality interactive component obtained above mark and picture
Between corresponding relation, by the evolution information of the picture in three dimensions be defined as virtual reality interactive component mark
Evolution information in three dimensions.For example, when monitor the posture in three dimensions of the picture on handle or
Change in location.Picture posture in three dimensions or change in location include picture and turned in three dimensions towards some direction
Dynamic shift transformation information and angle rotation information.Such as it is axially left centered on handle longitudinal axis or transverse axis, to the right, forward, to
After overturn, or centered on the Z axis perpendicular to handle operating surface axle carry out left-right rotation.
The embodiment of the present invention can also be provided with part of taking pictures (camera) use in specific implementation on virtual reality device
In obtaining the picture in virtual reality interactive component, and it is implanted with the processor of virtual reality device realizing implementation of the present invention
The program of the localization method for realizing virtual reality interactive component described in example.
Fig. 2 is that a kind of position of the part in virtual reality device of taking pictures sets schematic diagram, as shown in Fig. 2 will can clap
Centre position before virtual reality device is arranged on according to part (Camera), can so make Camera direction and virtual reality
The direction of equipment moving is always consistent.I.e. when user is observed using virtual reality device, Camera is always
Can detect user towards region carry out picture shooting.
Picture in part of taking pictures tracking (being continuously shot) virtual reality interactive component, when the picture of tracking (being continuously shot)
Changed in three dimensions, such as the size of picture or posture are it is believed that virtual reality interaction portion there occurs change
The position of part mark in three dimensions is converted, and now processor can be according to part tracking (being continuously shot) of taking pictures
Picture calculates the evolution information of virtual reality interactive component mark in three dimensions.
It should be noted that in the embodiment of the present invention, user can with the picture of self-defined virtual reality interactive component because
The embodiment of the present invention can use mark recognizer (such as recognizer of connected domain recognizer or physical feature class) to void
Intend the recognition training that the picture in real interactive component carries out virtual reality interactive component mark so that the virtual reality after training
Interactive component identifies rotational invariance and metric space consistency, then establishes the virtual reality interactive component mark that training obtains
Corresponding relation between picture, and corresponding relation is saved in virtual reality interactive component identification database.
Fig. 3 is a kind of picture schematic diagram of self-defined virtual reality interactive component of the embodiment of the present invention, as shown in figure 3,
Picture is that have a small square of white among the big square of a black, has an alphabetical K in the small square lower right corner of white.
Picture shown in Fig. 2 is subjected to various modifications (such as size variation or rotationally-varying), Fig. 4 is one after picture shown in Fig. 2 diminishes
Kind deformation schematic diagram, Fig. 5 are another deformation schematic diagram after picture rotation shown in Fig. 2, then use and identify recognizer pair
Various far and near size variations and it is rotationally-varying after picture template training is identified, establish picture recognition template so that picture
In mark (alphabetical K) there is rotational invariance and metric space consistency.That is, there are Fig. 2 institutes in picture recognition template
Picture after the picture various modifications (such as size variation or rotationally-varying) shown, the various pictures in picture recognition template are equal
It can recognize that and corresponding be identified as alphabetical K.Now, the corresponding relation between picture recognition template and the corresponding alphabetical K of mark is protected
It is stored in virtual reality interactive component identification database.
When the picture of user-defined virtual reality interactive component by training and is saved in virtual reality interactive component
After in identification database, user can paste the picture user on hand, and the hand of such user can be used as man-machine friendship
Mutual handle.As long as the hand of user not remove virtual reality device take pictures part shooting the visual field, when the hand of user is in space bit
When putting change, part of taking pictures is tracked shooting to the picture on hand of user, and the picture for following the trail of shooting is sent into processor,
Processor is identified to the picture of tracking shooting using mark recognizer and determines the locus information converting of hand.For
This, when part of taking pictures tracks picture, the posture of the location of the picture and rotation can all have a corresponding position
Information converting, the evolution information include shift transformation information and angle rotation information.Wherein, shift transformation information is to clap
According to the translation information carried out between part and the position of picture, angle rotation information is the rotation status information of picture itself.
It should be noted that in actual applications, it is possible that the situation of misrecognition, if the virtual reality obtained is handed over
Mutual part mark is if evolution information is mistake in three dimensions, it is possible that corresponding to virtual reality interactive component
The mistake of the evolution information of dummy object.Therefore, be preset with error threshold in the embodiment of the present invention, the error threshold can be with
Set based on experience value, according to default error threshold, evolution in three dimensions is identified to virtual reality interactive component
Information carries out exceptional value judgement, if exceptional value then removes the evolution information.Such as when virtual reality interactive component mark
Know when evolution information is more than error threshold in three dimensions, carry out filtering exclusion, when virtual reality interactive component mark
Evolution information is then considered as virtual value less than or equal to error threshold in three dimensions.It is very big can so gap to be excluded
Improper value, the reasonability of the position data of virtual reality interactive component can be ensured while ensure that experience when user uses is smooth
Property.
102nd, evolution information in three dimensions is identified according to virtual reality interactive component, determines that virtual reality interacts
Part identifies the evolution information in virtual reality.
Alternatively, also include before step 102:
Establish virtual reality interactive component mark evolution information and virtual reality interactive component mark in three dimensions
Know the mapping relations between the evolution information in virtual reality.
The position of virtual reality interactive component mark in three dimensions based on above-mentioned foundation is handed over virtual reality afterwards
Mapping relations between position of the mutual part mark in virtual reality, to virtual reality interactive component mark in three dimensions
Evolution information carries out matrix coordinate conversion, obtains evolution letter of the virtual reality interactive component mark in virtual reality
Breath.
It is below that matrix coordinate conversion is illustrated exemplified by handle does translation by virtual reality interactive component:
When handle moves to from the coordinate system (1,2,3) in three dimensions the position of coordinate system (2,5,8), handle is in three-dimensional
Origin coordinates in space is in co-ordinate system location (1,2,3).When handle moves to co-ordinate system location (2,5,8), handle is in void
Intending the coordinate center of the threedimensional model (virtual handle) in reality needs by (2-1,5-2,8-3) to be trivector (1,3,5)
Mathematic(al) manipulation, i.e., move 1 along positive direction in X-direction, Y direction moves 3 along positive direction, and Z-direction moves along positive direction
5.Concrete operations are first to mathematic(al) manipulation of the matrixing Jing Guo trivector (1,3,5), i.e., are moved in X-direction along positive direction
Dynamic 1, Y direction moves 3 along positive direction, and Z-direction moves 5 along positive direction, that is, the transformation matrix vector carried out is three-dimensional
Vector (1,3,5), by handle from three dimensions on all coordinate points coordinate value and the transformation matrix multiplication of vectors, obtain
The coordinate value of virtual handle all coordinate points on the threedimensional model in Virtual Realization after matrixing, so as to realize Virtual Realization
In virtual handle threedimensional model matrixing.
Fig. 6 is that position mapping of the virtual reality interactive component in three dimensions and Virtual Space is closed in the embodiment of the present invention
It is schematic diagram, as shown in fig. 6, left figure is the handle (virtual reality interactive component) that was photographed by part of taking pictures in three dimensions
Position in (real world), right figure are handle (virtual reality interactive component) in the virtual world constructed by virtual reality device
In para postion, the handle position observed in the part that will take pictures maps to position corresponding in current virtual world visual angle
Put.
The embodiment of the present invention identifies virtual reality interactive component mark by being arranged on the part of taking pictures of virtual reality device side
Know and follow the trail of virtual reality interactive component mark evolution information in three dimensions, and by virtual reality interactive component mark
The processor that the evolution information known in three dimensions is sent to virtual reality device side carries out virtual reality interactive component
The mapping of the evolution information in Virtual Space is identified, so as to realize mobile rotation in three dimensions (real world)
During virtual reality interactive component with virtual reality interactive component mark, the virtual reality interactive component in Virtual Space also can
Carry out corresponding mobile rotation.Therefore, as long as the object for posting picture can be man-machine as the progress of virtual reality interactive component
Interaction, the hardware cost that user buys virtual reality interactive component is saved, reduce the cost of implementation of man-machine interaction.Further,
The embodiment of the present invention also provides a picture recognition template, and user can be by picture recognition training with self-defined picture identification
It can be used customized picture as virtual reality interactive component mark, substantially increase user experience.
Fig. 7 is the positioning device structure schematic diagram for the virtual reality interactive component that one embodiment of the invention provides, such as Fig. 7 institutes
Show including:
Monitoring modular 71, for monitoring that the position of virtual reality interactive component mark in three dimensions is become
Change, obtain the evolution information of virtual reality interactive component mark in three dimensions, the virtual reality interactive component mark
Know what is obtained after being trained for virtual reality device to the picture in virtual reality interactive component, the picture includes user certainly
Define to identify the picture of virtual reality interactive component;
Mapping block 72, for according to virtual reality interactive component mark evolution information in three dimensions, really
Determine virtual reality interactive component and identify the evolution information in virtual reality.
Alternatively, described device also includes:
Training module 73, for establishing virtual reality interactive component identification database, the virtual reality interactive component mark
Knowing database includes picture being identified using mark recognizer the virtual reality interactive component mark obtained after training
Corresponding relation between picture, the virtual reality interactive component mark obtained after the recognition training have rotational invariance and
Metric space consistency;
Acquisition module 74, for obtaining the picture in virtual reality interactive component;
Matching module 75, for the picture of the acquisition and the picture in virtual reality interactive component identification database to be entered
Row matching, identify that virtual reality interactive component corresponding to the picture identifies.
Alternatively, the monitoring modular 71, specifically for monitoring the picture in virtual reality interactive component in three-dimensional space
Between in change in location, obtain the evolution information of the picture in three dimensions;According to virtual reality interactive component mark
Know the corresponding relation between picture, the evolution information of the picture in three dimensions is defined as virtual reality interaction
The evolution information of part mark in three dimensions.
Alternatively, described device also includes:
Abnormal judge module 76, for according to default error threshold, identifying virtual reality interactive component in three-dimensional space
Between middle position information converting carry out exceptional value judgement, if exceptional value then removes the evolution information.
Alternatively, the mapping block 72 is specifically used for:
According to the virtual reality interactive component of foundation mark position in three dimensions and virtual reality interactive component mark
Know the mapping relations between the position in virtual reality, evolution in three dimensions is identified to virtual reality interactive component
Information carries out matrix coordinate conversion, obtains virtual reality interactive component and identifies the evolution information in virtual reality.
Fig. 7 shown devices can perform method shown in Fig. 1, and its implementing principle and technical effect repeats no more.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and
Scope.