CN104121892B - Method, device and system for acquiring light gun shooting target position - Google Patents
Method, device and system for acquiring light gun shooting target position Download PDFInfo
- Publication number
- CN104121892B CN104121892B CN201410325348.8A CN201410325348A CN104121892B CN 104121892 B CN104121892 B CN 104121892B CN 201410325348 A CN201410325348 A CN 201410325348A CN 104121892 B CN104121892 B CN 104121892B
- Authority
- CN
- China
- Prior art keywords
- binocular camera
- coordinate system
- light source
- camera
- light gun
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 239000011159 matrix material Substances 0.000 claims abstract description 121
- 238000001514 detection method Methods 0.000 claims description 7
- 241000208340 Araliaceae Species 0.000 claims 4
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims 4
- 235000003140 Panax quinquefolius Nutrition 0.000 claims 4
- 235000008434 ginseng Nutrition 0.000 claims 4
- 238000004364 calculation method Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000686 essence Substances 0.000 description 1
- 238000010304 firing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Abstract
The invention is applicable to the field of electronic equipment, provides a method for acquiring a light gun shooting target position, the method includes the following steps: real-time acquisition of the position of a first light source of a light gun in an image generated by a binocular camera; based on the position of the first light source in the image generated by the binocular camera, calculation of a first attitude relationship matrix of the coordinate system of the light gun and the coordinate system of the binocular camera; based on the calculated first attitude relationship matrix and a pre-calibrated a second attitude relationship matrix of the coordinate system of the binocular camera and the coordinate system of a target screen, determination of the position of a second light source of the light gun in the target screen. Compared with the prior art, the method can acquire a determined position relationship of the light gun, the binocular camera and the target screen, so that the position information of the second light source of the light gun in the target screen can be more accurate.
Description
Technical field
The invention belongs to electronic device field, more particularly, to a kind of method of target location obtaining light gun shooting, device
And system.
Background technology
Light gun as important body-sensing shooting game stage property, because it emulates the shooting of bullet by light so that
Shooting game can be liberated from by key control, using the shooting of the straightline propagation gun-simulation class of light, provides more lively
Fire effect.
In order to accurately obtain target location on screen for the light gun shooting, need light gun is effectively positioned.Existing
The general practice having is by way of optical perception is combined with motion sensor, by being arranged on the visible ray at target screen end
Photographic head and be arranged at visible lamp ball on handheld terminal, judges handheld terminal by the size that photographic head obtains luminescent ball
Locus, meanwhile, controller be equipped with the sensor such as acceleration and gyroscope, for obtaining the motion angle of handheld terminal
Degree, thus obtain the corresponding control instruction of handheld terminal.
But, due to handheld terminal, photographic head, target screen spatial relationship inaccurate so that handheld terminal send control
System instruction, when such as handheld terminal instructs for light gun emission control, the degree of accuracy of the target location acquired in target screen is not high.
Content of the invention
The purpose of the embodiment of the present invention is to provide a kind of method of target location obtaining light gun shooting, device and is
System, with solve in prior art due to handheld terminal, photographic head, target screen spatial relationship inaccurate so that handheld terminal
When sending control instruction, the not high problem of the degree of accuracy of the target location acquired in target screen.
The embodiment of the present invention is achieved in that a kind of method of the target location obtaining light gun shooting, on described light gun
It is provided with the first light source and secondary light source, binocular camera is provided with target screen, methods described includes:
Position in the image that described binocular camera generates for first light source of the described light gun obtaining in real time;
According to position in the image that described binocular camera generates for described first light source, calculate the coordinate of described light gun
The first attitude relational matrix between system and the coordinate system of described binocular camera;
Coordinate system according to the first attitude relational matrix being calculated and the described binocular camera demarcated in advance and institute
State the second attitude relational matrix of the coordinate system of target screen, the secondary light source determining described light gun is in described target screen
Position.
The another aspect of the embodiment of the present invention also provides a kind of device of the target location obtaining light gun shooting, described light gun
On be provided with the first light source and secondary light source, binocular camera is provided with target screen, described device includes:
Real time position acquiring unit, the first light source for the real-time described light gun obtaining generates in described binocular camera
Image in position;
Attitude relational matrix computing unit, for according to described first light source in the image that described binocular camera generates
Position, calculate the first attitude relational matrix between the coordinate system of described light gun and the coordinate system of described binocular camera;
Position determination unit, for taking the photograph according to the first attitude relational matrix being calculated and the described binocular demarcated in advance
The coordinate system of camera and the second attitude relational matrix of the coordinate system of described target screen, determine that the secondary light source of described light gun exists
Position in described target screen.
The another aspect of the embodiment of the present invention additionally provides a kind of system of the target location obtaining light gun shooting, described system
System includes light gun, binocular camera, controller, and described light gun is provided with the first light source and secondary light source, described binocular camera shooting
Machine may be provided at for light gun shooting target screen, described controller respectively with target screen, light gun, binocular camera phase
Even, position in the image that described binocular camera generates for the first light source of the described light gun for real-time acquisition for the described controller
Put;According to position in the image that described binocular camera generates for described first light source, calculate the coordinate system of described light gun with
The first attitude relational matrix between the coordinate system of described binocular camera;According to the first attitude relational matrix being calculated and
The coordinate system of described binocular camera demarcated in advance and the second attitude relational matrix of the coordinate system of described target screen, determine
Position in described target screen for the secondary light source of described light gun.
In embodiments of the present invention, by the first light source of setting on light gun in the binocular camera shooting being arranged on target screen
Position in the image generating in machine is it may be determined that the first appearance of the spatial relation of described light gun and described binocular camera
State relational matrix, and the coordinate system by described first attitude relational matrix and the described binocular camera demarcated in advance with described
The second attitude relational matrix between the coordinate system of target screen, so that it is determined that the secondary light source of described light gun is in described target screen
Position in curtain.Scheme of the present invention compared with prior art, can be by the light gun determining, binocular camera and target screen
Position relationship between curtain is so that the positional information in target screen for the secondary light source of light gun is more accurate.
Brief description
Fig. 1 is the flowchart of the method for target location obtaining light gun shooting provided in an embodiment of the present invention;
Fig. 2 is the structural representation of the system of target location obtaining light gun shooting provided in an embodiment of the present invention;
Fig. 3 is the flowchart demarcated and generate the second attitude relational matrix provided in an embodiment of the present invention;
Fig. 4 is the structural representation of the device of target location obtaining light gun shooting provided in an embodiment of the present invention.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with drawings and Examples, right
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only in order to explain the present invention, and
It is not used in the restriction present invention.
The embodiment of the present invention can be applicable to various light be used as the interaction device of control terminal, including in such as game machine
Shooting game machine etc., described light gun can be understood as the various handheld terminals being controlled by optical signal, due in trip
In play kind equipment, how to be occurred with light gun form, therefore referred to collectively herein as light gun.Corresponding in target screen by light gun
So that corresponding control instruction acts at this position of screen, the present invention passes through to improve the target location of light gun for firing point
With the accuracy of response coordinate, improve the experience of user further.
Fig. 1 show provided in an embodiment of the present invention obtain light gun shooting the method for target location realize flow process, institute
State and the first light source and secondary light source are provided with light gun, binocular camera is provided with target screen, methods described describes in detail such as
Under:
In step s101, the first light source of the described light gun obtaining in real time is in the image that described binocular camera generates
Position.
Specifically, the first light source of setting and secondary light source on described light gun, is respectively used to demarcate and shooting is used.Described
First light source can be infrared light supply or visible light source.When described first light source is infrared light supply, for receiving
The binocular camera stating infrared light supply corresponds to thermal camera, and when described first light source is visible light source, described binocular is taken the photograph
Camera can be common video camera.
Described first light source, can be multiple infrared for three infrared light supplies or visible light source or more than three
Light source or visible light source, when multiple first light sources are used for positioning, can further improve the accuracy of positioning, typically can be selected for four
Infrared light supply.
Described secondary light source is used for shooting, that is, be used for from light gun to described target screen launching light signal, can be radium-shine
Light source, this is due to the laser of laser instrument transmitting, only projects in one direction, the divergence of light beam is minimum, only about 0.001
Radian, close to parallel, and laser is due to being directional lighting, and a large amount of photons concentrate in the spatial dimension of a very little and project,
Energy density is high, and therefore corresponding brightness is also very high.With respect to the mode of ordinary light source optically focused, can preferably adapt to shoot
Requirement.
Described target screen, can be for common television set or gaming machine screen naturally it is also possible to be other liquid crystal
Show device screen.Multiple fixed points can be preset on described screen, can be used for demarcating the posture position of current light gun, preferably
Embodiment be four fixed points of four corner location equipment in target screen, and arrange in the center of screen and demarcate
Point, so can preferably realize the effect demarcated.
Described binocular camera, its principle is the mode that simulation human vision processes scenery, relatively solid using two positions
Fixed video camera is imaged to same scenery (the first light source to light gun) simultaneously from different perspectives, by calculating wherein corresponding point
Parallax is obtaining the three-dimensional information of the spatial scene of scenery.
The image that described binocular camera generates, is two two-dimentional images, and in every two dimensional image, including institute
State the first light source of light gun position in the picture.
Wherein, position in two dimensional image for described first light source, first passes through synchronous exposure process and environment is filtered,
Specifically, during the first light source igniting, evaluator is sent to by infrared signal, evaluator carries out single exposure, when the first light source puts out
When going out, evaluator carries out second exposure, is subtracted each other by two field pictures and can obtain frame difference image, so ensures on frame difference image
Only first light source exists, and ambient light is then filtered out in subtraction, can detect by image recognition, acquisition described the
One light source position in the picture.
In step s102, according to position in the image that described binocular camera generates for described first light source, calculate
The first attitude relational matrix between the coordinate system of the coordinate system of described light gun and described binocular camera.
Because the first light source generates two images in binocular camera, and due to binocular camera position not
Identical, in two images obtained by two photographic head typically be arrangeding in parallel, the position of the first light source also has parallax, thus
Distance according to the distance between binocular camera be arrangeding in parallel, the first light source position of image in described binocular camera
Difference, can obtain the spatial attitude information of light gun.
Specifically optional, can according to equation below be calculated the coordinate system of light gun and binocular camera coordinate system it
Between the first attitude relational matrix:
p0=mc0*mt*pw
p1=mc1*mt*pw
Wherein, p0、p1For position in the image that described binocular camera generates for described first light source, described mc0=
k0*m0、mc1=k1*m1, wherein k0For the inner parameter matrix of the camera 0 in binocular camera, m0For camera 0 with respect to binocular
The attitude relational matrix of the coordinate system of video camera, k1For the inner parameter matrix of the camera 1 in binocular camera, m1For camera 1 phase
Attitude relational matrix for the coordinate system of binocular camera;The k0 when binocular evaluator dispatches from the factory, k1, m0 and m1 have determined.
Described mtThe first attitude relational matrix between coordinate system for described light gun and the coordinate system of described binocular camera, described pw
For three-dimensional coordinate in the coordinate system of described light gun for the first light source on described light gun.
As shown in Fig. 2 as infrared LED light source being provided with the light gun of localizer as the first light source, localizer light gun
Coordinate system be ow, perceptually the coordinate system of the binocular infrared camera of device is oc, and the coordinate system of target screen is os, as
The parameter matrix of the laser source divergent-ray of light gun secondary light source be l, light gun beat the 2d position of target screen be (pixx,
pixy).
Above-mentioned solution mtProcess be real-time process that is to say, that light gun in use, the position angle in space
To be continually changing it is therefore desirable to record the change of the position relationship in its space in real time, can according to the predetermined update cycle,
Calculate the first attitude relational matrix m between the coordinate system of described light gun and the coordinate system of described binocular camerat.
In step s103, according to the first attitude relational matrix being calculated and the described binocular camera demarcated in advance
The coordinate system of coordinate system and described target screen the second attitude relational matrix, the secondary light source determining described light gun is described
Position in target screen.
Specifically, described according to the first attitude relational matrix being calculated and the described binocular camera demarcated in advance
Second attitude relational matrix of the coordinate system of coordinate system and described target screen, the secondary light source determining described light gun is in described mesh
In position step in mark screen, calculate the secondary light source of described light gun in described target screen with specific reference to below equation
Position:
C=m*lc*mt*p
Pixx=c (1)/c (4)
Pixy=c (2)/c (4)
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0Inner parameter square for the camera 0 in binocular camera
Battle array, m0For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1For in the camera 1 in binocular camera
Portion's parameter matrix, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described pwFor on described light gun
The coordinate system in described light gun for first light source three-dimensional coordinate, described l is light gun ray parameter matrix, described mtFor described light
First attitude relational matrix of the coordinate system of the coordinate system of rifle and described binocular camera, described m is described binocular camera
The second attitude relational matrix between the coordinate system of coordinate system and target screen;DescribedFor mtTransposed matrix, described mt is
The transposed matrix of m, described p is the plane parameter vector of target screen, and described c (1), c (2), c (4) are respectively in vectorial c the
1 value, the 2nd value and the 4th value, (pixx, pixy) is the coordinate position of target screen.
Pass through the real-time coordinate system obtaining described light gun and the coordinate system of described binocular camera in the embodiment of the present invention
Between the first attitude relational matrix, and combine the coordinate of the coordinate system of described binocular camera that obtains in advance and target screen
The second attitude relational matrix between system is shot in the optional position of target screen such that it is able to effectively obtain described light gun
Coordinate, improves the degree of accuracy of aimed fire.
Because the second attitude relational matrix between the coordinate system of described binocular camera and the coordinate system of target screen is
Description binocular camera and the position relationship of target screen, after setting described binocular camera, typically can be by binocular camera shooting
Machine arranges top, lower section, left side or the right side of target screen, and after setting, position typically will not change, and therefore, it can lead to
Demarcate once after in advance, its calibration process is as shown in figure 3, comprise the following steps:
In step s301, by the coordinate of multiple fixed points of the secondary light source alignment target screen of light gun (pixx,
Pixy) it is shot at, and in each shooting, by position in the image that described binocular camera generates for described first light source
Put p0、p1, and formula
p0=mc0*mt*pw
p1=mc1*mt*pw
It is calculated the first attitude relational matrix m of the coordinate system of described light gun and the coordinate system of described binocular camerat;
In step s302, according to the first attitude relational matrix m being calculatedtAnd the coordinate of multiple fixed point, by public affairs
Formula
C=m*lc*mt*p
Pixx=c (1)/c (4)
Pixy=c (2)/c (4)
It is calculated the second attitude relation square between the coordinate system of described binocular camera and the coordinate system of target screen
Battle array m;
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0Inner parameter square for the camera 0 in binocular camera
Battle array, m0For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1For in the camera 1 in binocular camera
Portion's parameter matrix, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described pwFor on described light gun
The coordinate system in described light gun for first light source three-dimensional coordinate, described l is light gun ray parameter matrix, describedFor mt's
Transposed matrix, described mtTransposed matrix for m, described p is the plane parameter vector of target screen, described c (1), c (2), c (4)
The 1st value in respectively vectorial c, the 2nd value and the 4th value.
When solving described second attitude relational matrix, the fixed point on the telescreen shown in Fig. 2 is needed to enter rower
Fixed, the coordinate position of four fixed points as depicted is that pixy is it is known that passing through multiple marks it is known that i.e. pixx in formula
The punctuate of fixed point, obtains described second attitude relational matrix by computing formula iterative calculation, after once demarcating, you can
The second attitude relational matrix with demarcating in follow-up calculating process.
It is illustrated in figure 4 the structural representation of the device of target location obtaining light gun shooting provided in an embodiment of the present invention
Figure, described light gun is provided with the first light source and secondary light source, is provided with binocular camera, described device bag on target screen
Include:
Real time position acquiring unit 401, for the real-time described light gun obtaining the first light source in described binocular camera
Position in the image generating;
Attitude relational matrix computing unit 402, for the figure being generated in described binocular camera according to described first light source
Position in picture, calculates the first attitude relation square between the coordinate system of described light gun and the coordinate system of described binocular camera
Battle array;
Position determination unit 403, for according to the first attitude relational matrix being calculated and described pair demarcated in advance
The coordinate system of lens camera and the second attitude relational matrix of the coordinate system of described target screen, determine the second light of described light gun
Position in described target screen for the source.
Preferably, described attitude relational matrix computing unit 402 specifically for:
According to position p in the image that described binocular camera generates for described first light source0、p1, and formula
p0=mc0*mt*pw
p1=mc1*mt*pw
It is calculated the first attitude relation square between the coordinate system of described light gun and the coordinate system of described binocular camera
Battle array;
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0Inner parameter square for the camera 0 in binocular camera
Battle array, m0For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1For in the camera 1 in binocular camera
Portion's parameter matrix, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described mtFor described light gun
The first attitude relational matrix between the coordinate system of coordinate system and described binocular camera, described pwFor first on described light gun
Three-dimensional coordinate in the coordinate system of described light gun for the light source.
Further, described device also includes:
First attitude relational matrix computing unit, for the multiple demarcation by the secondary light source alignment target screen of light gun
The coordinate (pixx, pixy) of point is shot at, and in each shooting, is given birth in described binocular camera by described first light source
Position p in the image becoming0、p1, and formula
p0=mc0*mt*pw
p1=mc1*mt*pw
It is calculated the first attitude relational matrix m of the coordinate system of described light gun and the coordinate system of described binocular camerat;
Second attitude relational matrix computing unit, for according to the first attitude relational matrix m being calculatedtAnd multiple mark
The coordinate of fixed point, by formula
C=m*lc*mt*p
Pixx=c (1)/c (4)
Pixy=c (2)/c (4)
It is calculated the second attitude relation square between the coordinate system of described binocular camera and the coordinate system of target screen
Battle array m;
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0Inner parameter square for the camera 0 in binocular camera
Battle array, m0For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1For in the camera 1 in binocular camera
Portion's parameter matrix, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described pwFor on described light gun
The coordinate system in described light gun for first light source three-dimensional coordinate, described l is light gun ray parameter matrix, describedFor mt's
Transposed matrix, described mtTransposed matrix for m, described p is the plane parameter vector of target screen, described c (1), c (2), c (4)
The 1st value in respectively vectorial c, the 2nd value and the 4th value.
Preferably, described real time position acquiring unit includes:
First exposure subelement, during for binocular camera being sent to by infrared signal in the first light source igniting, double
Mesh photographic head carries out single exposure, obtains the first two field picture;
Second exposure subelement, for when the first light source extinguishes, binocular camera carries out second exposure, obtains second
Two field picture;
Recognition detection subelement, obtains frame difference image for subtracting each other the first two field picture and the second two field picture, by frame
Difference image recognition detection, obtains described first light source position in the picture.
Preferably, described first light source is infrared light supply or visible light source, and described secondary light source is laser source.
The mesh obtaining the device of target location of light gun shooting and the acquisition light gun shooting shown in Fig. 1 and Fig. 3 shown in Fig. 4
The method of cursor position corresponds to, and here is not repeated and repeats.
As shown in Fig. 2 the structural representation of the system of target location obtaining light gun shooting described in the embodiment of the present invention,
Described system includes light gun, binocular camera, controller, and described light gun is provided with the first light source and secondary light source, described double
Lens camera may be provided at for light gun shooting target screen, described controller respectively with target screen, light gun, binocular camera shooting
Machine is connected, and described controller is used for the first light source of the real-time described light gun obtaining in the image that described binocular camera generates
Position;According to position in the image that described binocular camera generates for described first light source, calculate the coordinate of described light gun
The first attitude relational matrix between system and the coordinate system of described binocular camera;According to the first attitude relational matrix being calculated
And the second attitude relational matrix of the coordinate system of described binocular camera demarcated and the coordinate system of described target screen in advance,
Determine the secondary light source of the described light gun position in described target screen.
Preferably, described controller is specifically for being sent to binocular camera in the first light source igniting by infrared signal
When, binocular camera carries out single exposure, obtains the first two field picture;When the first light source extinguishes, binocular camera carries out second
Secondary exposure, obtains the second two field picture;First two field picture and the second two field picture are subtracted each other and obtains frame difference image, by frame difference image
Recognition detection, obtains described first light source position in the picture.
The system of target location and the acquisition light gun described in Fig. 1 and Fig. 3 of light gun shooting is obtained described in the embodiment of the present invention
The method of the target location of shooting corresponds to.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.
Claims (10)
1. a kind of obtain light gun shooting target location method it is characterised in that be provided with described light gun the first light source and
Secondary light source, is provided with binocular camera on target screen, and methods described includes:
Position in the image that described binocular camera generates for first light source of the described light gun of acquisition in real time;
According to position in the image that described binocular camera generates for described first light source, calculate the coordinate system of described light gun with
The first attitude relational matrix between the coordinate system of described binocular camera;
Coordinate system according to the first attitude relational matrix being calculated and the described binocular camera demarcated in advance and described mesh
Second attitude relational matrix of the coordinate system of mark screen, determines the secondary light source of the described light gun position in described target screen
Put.
2. method according to claim 1 it is characterised in that described according to described first light source in described binocular camera
Position in the image generating, calculates the first attitude between the coordinate system of described light gun and the coordinate system of described binocular camera
Relational matrix step includes:
According to position p in the image that described binocular camera generates for described first light source0、p1, and formula
p0=mc0*mt*pw
p1=mc1*mt*pw
It is calculated the first attitude relational matrix between the coordinate system of described light gun and the coordinate system of described binocular camera;
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0For the inner parameter matrix of the camera 0 in binocular camera, m0
For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1Inside ginseng for the camera 1 in binocular camera
Matrix number, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described mtCoordinate for described light gun
The first attitude relational matrix between system and the coordinate system of described binocular camera, described pwFor the first light source on described light gun
Three-dimensional coordinate in the coordinate system of described light gun.
3. according to claim 1 method it is characterised in that described according to the first attitude relational matrix being calculated and
The coordinate system of described binocular camera demarcated in advance and the second attitude relational matrix of the coordinate system of described target screen, determine
Before the position step in described target screen, methods described also includes the secondary light source of described light gun:
It is shot at by the coordinate (pixx, pixy) of multiple fixed points of the secondary light source alignment target screen of light gun, and
When shooting every time, by position p in the image that described binocular camera generates for described first light source0、p1, and formula
p0=mc0*mt*pw
p1=mc1*mt*pw
It is calculated the first attitude relational matrix m of the coordinate system of described light gun and the coordinate system of described binocular camerat;
According to the first attitude relational matrix m being calculatedtAnd the coordinate of multiple fixed point, by formula
C=m*lc*mt*p
Pixx=c (1)/c (4)
Pixy=c (2)/c (4)
It is calculated the second attitude relational matrix m between the coordinate system of described binocular camera and the coordinate system of target screen;
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0For the inner parameter matrix of the camera 0 in binocular camera, m0
For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1Inside ginseng for the camera 1 in binocular camera
Matrix number, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described pwFor on described light gun
The three-dimensional coordinate of the coordinate system in described light gun for one light source, described l is light gun ray parameter matrix, describedFor mtTransposition
Matrix, described mtTransposed matrix for m, described p is the plane parameter vector of target screen, and described c (1), c (2), c (4) are respectively
For the 1st value in vectorial c, the 2nd value and the 4th value.
4. according to claim 1 method it is characterised in that described real-time the first light source obtaining described light gun is described double
Position step in the image that lens camera generates includes:
When being sent to binocular camera in the first light source igniting by infrared signal, binocular camera carries out single exposure, obtains
To the first two field picture;
When the first light source extinguishes, binocular camera carries out second exposure, obtains the second two field picture;
First two field picture and the second two field picture are subtracted each other and obtains frame difference image, described by frame difference image recognition detection, obtaining
First light source position in the picture.
5. a kind of obtain light gun shooting target location device it is characterised in that be provided with described light gun the first light source and
Secondary light source, is provided with binocular camera on target screen, and described device includes:
Real time position acquiring unit, the image generating in described binocular camera for real-time the first light source obtaining described light gun
In position;
Attitude relational matrix computing unit, for the position in the image that described binocular camera generates according to described first light source
Put, calculate the first attitude relational matrix between the coordinate system of described light gun and the coordinate system of described binocular camera;
Position determination unit, for according to the first attitude relational matrix being calculated and the described binocular camera demarcated in advance
The coordinate system of coordinate system and described target screen the second attitude relational matrix, the secondary light source determining described light gun is described
Position in target screen.
6. according to claim 5 device it is characterised in that described attitude relational matrix computing unit specifically for:
According to position p in the image that described binocular camera generates for described first light source0、p1, and formula
p0=mc0*mt*pw
p1=mc1*mt*pw
It is calculated the first attitude relational matrix between the coordinate system of described light gun and the coordinate system of described binocular camera;
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0For the inner parameter matrix of the camera 0 in binocular camera, m0
For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1Inside ginseng for the camera 1 in binocular camera
Matrix number, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described mtCoordinate for described light gun
The first attitude relational matrix between system and the coordinate system of described binocular camera, described pwFor the first light source on described light gun
Three-dimensional coordinate in the coordinate system of described light gun.
7. according to claim 5 device it is characterised in that described device also includes:
First attitude relational matrix computing unit, for the multiple fixed points by the secondary light source alignment target screen of light gun
Coordinate (pixx, pixy) is shot at, and in each shooting, is generated in described binocular camera by described first light source
Position p in image0、p1, and formula
p0=mc0*mt*pw
p1=mc1*mt*pw
It is calculated the first attitude relational matrix m of the coordinate system of described light gun and the coordinate system of described binocular camerat;
Second attitude relational matrix computing unit, for according to the first attitude relational matrix m being calculatedtAnd multiple fixed point
Coordinate, by formula
C=m*lc*mt*p
Pixx=c (1)/c (4)
Pixy=c (2)/c (4)
It is calculated the second attitude relational matrix m between the coordinate system of described binocular camera and the coordinate system of target screen;
Wherein, described mc0=k0*m0、mc1=k1*m1, wherein k0For the inner parameter matrix of the camera 0 in binocular camera, m0
For camera 0 with respect to the coordinate system of binocular camera attitude relational matrix, k1Inside ginseng for the camera 1 in binocular camera
Matrix number, m1For camera 1 with respect to the coordinate system of binocular camera attitude relational matrix;Described pwFor on described light gun
The three-dimensional coordinate of the coordinate system in described light gun for one light source, described l is light gun ray parameter matrix, describedFor mtTransposition
Matrix, described mtTransposed matrix for m, described p is the plane parameter vector of target screen, and described c (1), c (2), c (4) are respectively
For the 1st value in vectorial c, the 2nd value and the 4th value.
8. according to claim 5 device it is characterised in that described real time position acquiring unit includes:
First exposure subelement, during for being sent to binocular camera in the first light source igniting by infrared signal, binocular is taken the photograph
As head carries out single exposure, obtain the first two field picture;
Second exposure subelement, for when the first light source extinguishes, binocular camera carries out second exposure, obtains the second frame figure
Picture;
Recognition detection subelement, obtains frame difference image for subtracting each other the first two field picture and the second two field picture, by frame difference figure
As recognition detection, obtain described first light source position in the picture.
9. a kind of system of the target location obtaining light gun shooting is it is characterised in that described system includes light gun, binocular camera shooting
Machine, controller, described light gun is provided with the first light source and secondary light source, and described binocular camera is arranged on for light gun shooting
Target screen, described controller is connected with target screen, light gun, binocular camera respectively, and described controller is used for obtaining in real time
Take the first light source of described light gun position in the image that described binocular camera generates;According to described first light source described
Position in the image that binocular camera generates, calculates between coordinate system and the coordinate system of described binocular camera of described light gun
The first attitude relational matrix;According to the first attitude relational matrix being calculated and the described binocular camera demarcated in advance
Second attitude relational matrix of the coordinate system of coordinate system and described target screen, the secondary light source determining described light gun is in described mesh
Position in mark screen.
10. according to claim 9 system it is characterised in that described controller is specifically for logical in the first light source igniting
When crossing infrared signal and being sent to binocular camera, binocular camera carries out single exposure, obtains the first two field picture;When the first light source
During extinguishing, binocular camera carries out second exposure, obtains the second two field picture;First two field picture and the second two field picture are subtracted each other
To frame difference image, by frame difference image recognition detection, obtaining described first light source position in the picture.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410325348.8A CN104121892B (en) | 2014-07-09 | 2014-07-09 | Method, device and system for acquiring light gun shooting target position |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410325348.8A CN104121892B (en) | 2014-07-09 | 2014-07-09 | Method, device and system for acquiring light gun shooting target position |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104121892A CN104121892A (en) | 2014-10-29 |
CN104121892B true CN104121892B (en) | 2017-01-25 |
Family
ID=51767405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410325348.8A Active CN104121892B (en) | 2014-07-09 | 2014-07-09 | Method, device and system for acquiring light gun shooting target position |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104121892B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104436643B (en) * | 2014-11-17 | 2017-05-31 | 深圳市欢创科技有限公司 | Output light gun aims at method, the apparatus and system of the quasi- heart on a display screen |
CN105844199A (en) * | 2016-03-30 | 2016-08-10 | 乐视控股(北京)有限公司 | Method and device for determining aiming positions of game guns on display screen |
CN109173252A (en) * | 2018-09-19 | 2019-01-11 | 深圳华侨城文化旅游科技股份有限公司 | A kind of screen shooting game localization method, storage medium and device |
CN111698467B (en) * | 2020-05-08 | 2022-05-06 | 北京中广上洋科技股份有限公司 | Intelligent tracking method and system based on multiple cameras |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201241396A (en) * | 2011-04-06 | 2012-10-16 | Wei-Kai Liou | Leaser guide interactive electronic whiteboard technology apply to military firing training and the first person shooting (F.P.S) game system |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0739956B2 (en) * | 1988-10-20 | 1995-05-01 | 沖電気工業株式会社 | Method of detecting target position by camera |
JP4179162B2 (en) * | 2003-12-26 | 2008-11-12 | 株式会社セガ | Information processing device, game device, image generation method, and game image generation method |
CN1326096C (en) * | 2005-06-16 | 2007-07-11 | 上海交通大学 | Method for evaluating parameter of 3-D motion of human climbs based on model |
KR20070102942A (en) * | 2006-04-17 | 2007-10-22 | 이문기 | Sighting device using virtual camera |
CN101158883B (en) * | 2007-10-09 | 2010-07-28 | 深圳泰山网络技术有限公司 | Virtual gym system based on computer visual sense and realize method thereof |
JP4816789B2 (en) * | 2009-11-16 | 2011-11-16 | ソニー株式会社 | Information processing apparatus, information processing method, program, and information processing system |
KR20150103723A (en) * | 2013-01-03 | 2015-09-11 | 메타 컴퍼니 | Extramissive spatial imaging digital eye glass for virtual or augmediated vision |
-
2014
- 2014-07-09 CN CN201410325348.8A patent/CN104121892B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201241396A (en) * | 2011-04-06 | 2012-10-16 | Wei-Kai Liou | Leaser guide interactive electronic whiteboard technology apply to military firing training and the first person shooting (F.P.S) game system |
Also Published As
Publication number | Publication date |
---|---|
CN104121892A (en) | 2014-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102448284B1 (en) | head mounted display tracking system | |
CN105264436B (en) | System and method for controlling equipment related with picture catching | |
KR102010396B1 (en) | Image processing apparatus and method | |
US20160292924A1 (en) | System and method for augmented reality and virtual reality applications | |
US10504243B2 (en) | Calibration system for a head-mounted display tracking system | |
CN104121892B (en) | Method, device and system for acquiring light gun shooting target position | |
US11156843B2 (en) | End-to-end artificial reality calibration testing | |
KR20180061274A (en) | Method and apparatus for adjusting virtual reality images | |
WO2016108720A1 (en) | Method and device for displaying three-dimensional objects | |
CN109379578A (en) | Omnidirectional three-dimensional video-splicing method, apparatus, equipment and storage medium | |
JP2015154219A (en) | image generation system and program | |
WO2022141294A1 (en) | Simulation test method and system, simulator, storage medium, and program product | |
JP2007071403A (en) | Firing simulator | |
CN105991972B (en) | It takes photo by plane system | |
CN108981719A (en) | A kind of hypervelocity flight model pose measure of the change device and method | |
Fontana et al. | Closed–loop calibration for optical see-through near eye display with infinity focus | |
CN104190078B (en) | A kind of target identification method, the apparatus and system of light gun shooting | |
CN110458104B (en) | Human eye sight direction determining method and system of human eye sight detection system | |
TWI436270B (en) | Telescopic observation method for virtual and augmented reality and apparatus thereof | |
TWI486052B (en) | Three-dimensional image processing device and three-dimensional image processing method | |
JP2009122895A (en) | Method and equipment for displaying pseudo three-dimensional image of three-dimensional object corresponding to movement of viewer's point of view | |
US20140285484A1 (en) | System of providing stereoscopic image to multiple users and method thereof | |
CN110166653A (en) | The tracking system and method for camera position and posture | |
JP2010038847A (en) | Motion tracker system and coordinate system setting method therefor | |
KR101617358B1 (en) | Simulation system for utilizing panorama image and simulation method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 518000, Floor 1801, Block C, Minzhi Stock Commercial Center, North Station Community, Minzhi Street, Longhua District, Shenzhen City, Guangdong Province Patentee after: Shenzhen Huanchuang Technology Co.,Ltd. Address before: 3A, Maikelong Building, No. 6 Gaoxin South Sixth Road, Nanshan District, Shenzhen, Guangdong Province, 518000 Patentee before: SHENZHEN CAMSENSE TECHNOLOGIES Co.,Ltd. |