intelligent glasses for games

文档序号:1571754 发布日期:2020-01-31 浏览:25次 中文

阅读说明:本技术 一种游戏用智能眼镜 (intelligent glasses for games ) 是由 马兴 于 2019-03-25 设计创作,主要内容包括:本发明提供了一种游戏用智能眼镜,包括:穿戴部件,用于将所述智能眼镜套在头部;重力传感器,用于感应用户的头部运动;MPU,与所述重力传感器相连,用于获取所述头部运动数据,并将所述头部运动数据转换为鼠标控制数据,其中,所述鼠标控制数据传送至主机用于对游戏进行控制。通过上述方式使得用户通过头部运动就可以实现游戏控制,而无需再借助鼠标,达到了简单高效实现游戏控制的技术效果。(The invention provides kinds of intelligent glasses for games, which comprise a wearing part, a gravity sensor and an MPU, wherein the wearing part is used for sleeving the intelligent glasses on the head, the gravity sensor is used for sensing head movement of a user, the MPU is connected with the gravity sensor and is used for acquiring head movement data and converting the head movement data into mouse control data, the mouse control data is transmitted to a host computer to control games, and the game control can be realized through the head movement of the user without the help of a mouse, so that the technical effect of simply and efficiently realizing the game control is achieved.)

1, kinds of intelligent glasses are used in recreation, characterized by, include:

the wearing component is used for sleeving the intelligent glasses on the head;

a gravity sensor for sensing head movement of a user;

and the MPU is connected with the gravity sensor and used for acquiring the head motion data and converting the head motion data into mouse control data, wherein the mouse control data is transmitted to a host computer and used for controlling a game.

2. The smart eyewear of claim 1, wherein the gravity sensor comprises: acceleration sensors and angular velocity sensors.

3. The smart eyewear of claim 1, further comprising: and the USB data line is connected with the MPU and is used for transmitting the mouse control data to the host.

4. The smart eyewear of claim 3, wherein the USB data line conforms to an HID protocol.

5. The smart eyewear of claim 4, further comprising: kernel, wherein the HID protocol is located in Kernel.

6. The smart eyewear of claim 1, wherein the host comprises at least of a mobile terminal, a desktop computer.

7. The smart eyewear of claim 1, further comprising: and the mouse function control switch is connected with the MPU and is used for controlling whether the intelligent glasses start the mouse function or not.

Technical Field

The invention relates to the technical field of control equipment, in particular to kinds of intelligent glasses for games.

Background

More people play shooting games at th perspective through mobile phones and computers, such as fire line Crossing (CF), CS, fire line assault, temple fleeing, etc. however, generally requires remote control through the swinging of the mobile phone up and down or left and right or through the control of the mobile phone, whether playing on an android phone or a desktop.

For example, when the game crosses a live wire, a keyboard at th people's view angle can control the characters to move left and right to move forward and backward, and a mouse clicks to control shooting at a gun, so that wearable glasses can be used for controlling the target stars in the game characters to move left and right through left shaking and right shaking of the head, for example, head raising is forward, head lowering is backward, and a touch pad is shooting, and only USB lines are required to be connected with a main device for realizing the technology.

However, no effective solution has been proposed at present for how to implement the conversion of specific control instructions.

Disclosure of Invention

The embodiment of the invention provides kinds of intelligent glasses for games, which are used for realizing the purpose of controlling the games through the intelligent glasses and comprise the following steps:

the wearing component is used for sleeving the intelligent glasses on the head;

a gravity sensor for sensing head movement of a user;

and the MPU is connected with the gravity sensor and used for acquiring the head motion data and converting the head motion data into mouse control data, wherein the mouse control data is transmitted to a host computer and used for controlling a game.

In embodiments, the gravity sensor includes an acceleration sensor and an angular velocity sensor.

In embodiments, the mouse control device further comprises a USB data line connected to the MPU for transmitting the mouse control data to the host.

In embodiments, the USB data line conforms to the HID protocol.

In embodiments, the method further comprises Kernel, wherein the HID protocol is located in Kernel.

In embodiments, the host includes at least of a mobile terminal, a desktop computer.

In embodiments, the glasses further comprise a mouse function control switch connected to the MPU for controlling whether the smart glasses turn on the mouse function.

In the embodiment of the invention, the gravity sensor is added in the wearable device (such as intelligent glasses) to sense the head movement of the user, and the head movement of the user is converted into a mouse instruction (such as front-back, left-right movement and the like), so that the game is controlled. By means of the method, the user can realize game control through head movement without a mouse, and the technical effect of simply and efficiently realizing game control is achieved.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and constitute a part of this application and not limiting of the invention, are illustrated in the accompanying drawings, in which:

fig. 1 is a schematic structural diagram of smart glasses according to an embodiment of the present invention;

fig. 2 is a workflow diagram of smart glasses according to an embodiment of the present invention.

Detailed Description

To make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further with reference to the following embodiments and accompanying drawings.

In this example, it is considered that in order to realize the control of the game based on the wearable device, the game can be driven by the MPU sensor in the wearable device, and a mouse connected with the host can be replaced by an HID mouse protocol inside the wearable device system; specifically, the acceleration data and the angle data generated by the MPU sensor may be converted into instructions in a mouse protocol through a protocol, and then transmitted to the host through the USB.

However, although the above-mentioned way can theoretically accomplish the control of the game by the wearable device, the following problems still need to be solved:

1) the interface needs to use the HID protocol code inside the mouse device itself, and the protocol code needs to be migrated and merged with the MPU driver.

2) The hardware interface of the mouse end needs to be maintained with the wearable device end, and the interface connected with the host needs to be a USB interface, which may cause incompatibility of circuits or increase of power consumption, and cannot guarantee complete simulation.

3) There is a problem of distance limitation, and when the person moves too hard, the USB connection cable may be torn.

The mouse used in the current game is mainly an optical machine type mouse, when the mouse moves, the mouse can drive a rubber ball to roll, the rolling of the rubber ball can rub a grid wheel rolling shaft in the horizontal and vertical directions of a branch pipe in the mouse, so as to drive a grid wheel to rotate, the wheel edge of the grid wheel is in a grid shape and is close to two sides of the grid, an infrared luminous tube is arranged on the side, and an infrared receiving component is arranged on the side, so that the movement of the mouse can be converted into the rotation of the horizontal and vertical grid wheels in different directions and rotating speeds.

For a mouse, there are several positioning methods as follows:

1) the operation principle of editing the track ball location by track ball location is similar to that of grating, only the movement mode of the roller is changed, the ball seat is fixed, the track ball is directly stirred by hand to control the movement of the arrow of the mouse, when the track ball is rubbed, the roller shafts at the left side, the right side, the upper side and the lower side of the track ball are driven, the roller shafts are provided with grating wheels, pulse signals are generated by the light emitting tube and the receiving component to carry out location, however, the track ball has large roller volume and long stroke, the location mode can carry out very accurate operation, and the track ball has the additional advantage of stability, the operation and the location are controlled by fingers, the location cannot be influenced by the movement of the hand.

2) light-emitting diodes are arranged in the optical mouse, the bottom surface of the optical mouse is illuminated by light emitted by the light-emitting diodes (which is the reason why the bottom of the optical mouse always emits light), part of light reflected by the bottom surface of the optical mouse is transmitted to light sensing devices (micro-imagers) for imaging through sets of optical lenses, so that the moving track of the optical mouse is recorded as sets of continuous images shot at high speed, and finally, special image analysis chips (DSP and digital microprocessor) in the optical mouse are used for analyzing the series images shot on the moving track, and the moving direction and the moving distance of the mouse are judged by analyzing the change of the positions of the characteristic points on the images, so that the positioning of the cursor is completed.

3) Laser positioning editing is also positioning modes of an optical mouse, and is characterized in that laser is used for replacing ordinary light emitted by a light emitting diode, the laser is light emitted by electronic excitation, and has extremely high monochromaticity and linearity compared with the ordinary light, the laser used for positioning is mainly invisible light, the reflectivity of the ordinary light on different color surfaces is not , so that the problem of color blindness caused by low light reflectivity on certain color surfaces of the optical mouse and incapability of being identified by a DSP (digital signal processor), in addition, the ordinary light cannot be used or jumps on the surfaces of transparent substances, and the surface condition can be better identified due to the fact that the wavelength of the laser is nearly single , the sensitivity is effectively improved, and the problems can be effectively solved by using the laser positioning mouse.

4) The blue positioning editing blue positioning is a latest accurate positioning mode developed by microsoft, a mouse utilizing the blue track blue technology uses blue visible light, but does not utilize a diffuse reflection principle, but utilizes a principle of mirror reflection point imaging of a laser engine, a blue light source penetrates through a high-angle collimating lens to be irradiated on the surface of any object, reflected light enters a converging lens to be transmitted into a CMOS chip to be subjected to blue positioning processing, and an optical sensor (CMOSDetector) is just like high-speed continuous shooting cameras , shoots thousands of photos per second and transmits the photos into an image processing chip, and the chip compares each picture to finally obtain a moving track of the mouse.

The above is the principle of several existing determining ways of the moving direction and the moving distance of the mouse.

Under the Linux system, most usb mouse drivers are roughly divided into three parts: the usb device driving part is used for acquiring coordinates and action events transmitted by the mouse device through a usb protocol; an input subsystem part; the report interruption part is described as follows:

1) the process of configuration, whether Windows or Linux kernel, is complex, in which the system establishes the device, configuration, interface, setup, endpoint description information for the device, establishes a channel for transmission with the USB device (these follow the USB protocol), after which the USB device driver matches these interfaces, and then initialization tasks are performed on the device, for example, allocation urb, where urb is mouse data, which is called to prepare for receiving data.

2) In the interrupt part, data are coming in, and the usb core layer triggers callback functions, which are submitted to hcd (usb controller) to schedule receiving and sending data after Api calls provided by Kernel after device driver registration.

3) The Input subsystem registers Input devices in the driver, when obtaining the coordinate data of the mouse, the coordinates and action events need to be reported to the udev node of the system, and the rest part is delivered to the system layer to finish-

Based on this, in this example it is considered that the distance and angle data, from which the mouse-generated events can be replaced, are calculated from the accelerations and angular velocities that can be generated by the movement of the wearable device. The mouse driving at the host system side is not concerned, and the game control can be realized through the wearable device only by doing replacement work.

For the mouse, the mouse interior generally includes two modules, part is a DSP chip and a grating mechanical sensor, which generate digital signals through physical movement and then calculate the coordinates and distance of each point in the movement, and part is a usb device part for transmitting data to the host through usb lines, following the usb device side protocol.

The wearable device (such as glasses) is considered as whole, 3 axes extend in three-dimensional direction, for example, the z axis is used as the received gravity value, the 3-axis accelerator is programmably controlled and programmably controlled within the range of +/-2 g, + -4 g, + -8 g and +/-16 g, mean value sampling operation can be carried out on the HAL layer through the accelerometer data, so as to obtain instantaneous acceleration data of artificial shaking, the instantaneous acceleration data is converted into the moving distance and the moving speed of the mouse, and then the moving distance and the moving speed are written back into the source code of the mouse through an ioctl character device interface.

Based on the consideration that the HID protocol code can be transplanted into a Kernel of the wearable device, the wearable device can become wearable mobile mice, accordingly, the transmitted data source is data generated by shaking the head of the MPU, the final result is classified through calculation, the moving speed, the moving distance, the angle and the moving direction are packaged in a structural form according to the HID protocol, and switch judgment can be made, so that the data of the head movement is converted into an event of moving the mouse up and down, namely, the event generated by the MPU needs to correspond to the event corresponding to the mouse, and the event generated by the MPU can be finally converted into the data of the original mouse to be sent to the host, because the system and the MPU protocol are supported by the mouse but not supported by the mouse.

Specifically, MPU produces acceleration data and angular velocity data at every moment, and the motion through each axis can produce the weight of the acceleration of different directions, can calculate instantaneous motion contained angle through the weight, through gathering acceleration data and change analysis in the time, can judge that wearable equipment is motion or static, whether move to some point and stop to and specific displacement, and obtain mouse motion data with these data simulation, then adopt the data format of mouse to pack.

For example, the MPU detects that the head moves 10cm to the left, the distance acceleration is 0.6g generated in the x-axis direction, and the angle is 0, and after calculating the data, the data can be manually mapped in a program to map the data to the movement distance event and the angle event in the mouse. For example: the event that the head moves 10cm to the right left is mapped to the host side, namely the 10cm of the left movement of the mouse, and for the host side, the command sent by the mouse is still considered to be reported to the host through the driver.

Through the mode, the mouse simulation can be realized by connecting the wearable device with the host computer.

As shown in fig. 1, in this example, kinds of smart glasses for games are provided, which may include:

1) the wearing part 101 is used for sleeving the intelligent glasses on the head;

2) a gravity sensor 102 for sensing head movement of a user;

3) and the MPU 103 is connected with the gravity sensor 102 and used for acquiring the head motion data and converting the head motion data into mouse control data, wherein the mouse control data is transmitted to a host computer to control a game.

That is, the gravity sensor is added in the wearable device (such as intelligent glasses) to sense the head movement of the user, and the head movement of the user is converted into a mouse instruction (such as front-back, left-right movement and the like), so that the game is controlled. By means of the method, the user can realize game control through head movement without a mouse, and the technical effect of simply and efficiently realizing game control is achieved.

The gravity sensor 102 may include an acceleration sensor and an angular velocity sensor, and through the arrangement of the acceleration sensor and the angular velocity sensor, the moving speed, the moving distance, the moving angle, the moving direction, and the like of the head movement of the user may be effectively obtained, so that may be converted into an event corresponding to the mouse, and thus may be packaged as a mouse event, thereby implementing the control of the game.

In order to realize the control of the game in the host, a USB data line 104 may be provided on the smart glasses as shown in fig. 1, and the USB data line may be connected to the MPU 103 for transmitting the mouse control data to the host.

The USB data line may transmit data to the host via an HID protocol, and the smart glasses of step may be provided with a Kernel module, wherein the HID protocol is located in the Kernel.

The host may be any device capable of carrying and playing games, for example, a mobile terminal, a desktop computer, etc.

, considering that the main effect of the intelligent glasses is to complete the watching or VR AR and other technologies of the intelligent glasses, the mouse function is not the most important effect of the intelligent glasses, therefore, mouse function control switches can be set, and through the control switches, whether the mouse function is opened or not can be controlled by the intelligent glasses, so that the mouse simulation function of the glasses can be started when the game control is needed, and if the game control is not needed, the mouse simulation function can be closed to adapt to different scene requirements.

Based on the smart glasses, the method steps as shown in fig. 2 can be adopted to realize control:

s1: triggering a glasses motion sensor through head motion to obtain acceleration data of three axes of x, y and z axes;

s2, reporting to HAL layer through android standard interface, simulating mouse motion track algorithm, sampling acceleration data according to fixed time to obtain average acceleration values, thereby calculating moving distance in each direction, then simulating mouse positioning photoelectric value by 3 acceleration values to obtain simulated coordinate.

S3: writing the group of data from the Hal layer to a mouse protocol code of a Driver layer, and then transmitting the data to a host by using a usb protocol in an interrupt transmission mode through the usb;

s4: after receiving the data, the Kernel of the host system considers that the data are data sent by the mouse and reports the data to the system through the driver so as to complete the simulation.

Through the intelligent glasses and the specific implementation mode provided by the above example, the sense of reality of the game can be enhanced, the aim of controlling the game by replacing a manual mouse with the th person named head visual angle is achieved, the interest of the game is increased, specifically, the gravity sensor in the glasses replaces the mouse on the host, the freshness of the game can be increased, and the aiming degree in the game is higher.

Because of the HID protocol, the driver involved in the device and the method can be based on a Linux platform or a Windows system, and the compatibility of various systems and devices can be realized.

It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.

The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:虚拟场景显示方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类