AR game interaction method based on image recognition

文档序号:386382 发布日期:2021-12-14 浏览:25次 中文

阅读说明:本技术 一种基于图像识别的ar游戏互动方法 (AR game interaction method based on image recognition ) 是由 潘永锋 于 2021-02-22 设计创作,主要内容包括:一种基于图像识别的AR游戏互动方法,采用AR枪、图像识别框、智能互联网设备作为游戏互动的硬件设备,还具有数据采集单元、数据识别单元、数据处理单元、控制单元、识别单元、触发单元;所述数据采集单元、数据识别单元、数据处理单元、控制单元、识别单元、触发单元是安装在智能互联网设备内的应用软件;图像识别框包括固定板、遮挡板,在固定板的前侧端左中部印制有一个红色矩形标记框,在固定板右中部的由上至下分别印制有一个红色五边形及三角形标记框;遮挡板有两只,两只遮挡板活动安装在固定板前。本发明基于AR人工智能识别技术,实现不使用蓝牙芯片作为信息传递的载体,节省了整体成本,并提升了玩家体验。本发明具有好的应用前景。(An AR game interaction method based on image recognition adopts an AR gun, an image recognition frame and intelligent Internet equipment as hardware equipment for game interaction, and is further provided with a data acquisition unit, a data recognition unit, a data processing unit, a control unit, a recognition unit and a trigger unit; the data acquisition unit, the data identification unit, the data processing unit, the control unit, the identification unit and the trigger unit are application software installed in the intelligent Internet equipment; the image recognition frame comprises a fixed plate and a shielding plate, a red rectangular mark frame is printed in the left middle of the front side end of the fixed plate, and a red pentagonal mark frame and a red triangular mark frame are respectively printed in the right middle of the fixed plate from top to bottom; the two baffle plates are movably arranged in front of the fixed plate. Based on the AR artificial intelligence recognition technology, the Bluetooth chip is not used as a carrier for information transmission, the overall cost is saved, and the player experience is improved. The invention has good application prospect.)

1. An AR game interaction method based on image recognition is characterized in that an AR gun, an image recognition frame and intelligent Internet equipment are used as hardware equipment for game interaction, and the AR game interaction method further comprises a data acquisition unit, a data recognition unit, a data processing unit, a control unit, a recognition unit and a triggering unit; the data acquisition unit, the data identification unit, the data processing unit, the control unit, the identification unit and the trigger unit are application software installed in the intelligent Internet equipment; the image recognition frame comprises a fixed plate and a shielding plate, a red rectangular mark frame is printed in the left middle of the front side end of the fixed plate, and a red pentagonal mark frame and a red triangular mark frame are respectively printed in the right middle of the fixed plate from top to bottom; the transverse length of the two shielding plates is smaller than that of the fixed plate, the middle parts of the right side ends of the two shielding plates are respectively connected with one end of a spring, the other ends of the two springs are respectively arranged at the upper end and the lower end of the right middle part of the fixed plate, the left ends of the two shielding plates are respectively provided with a pull rope, and the middle parts of the right ends of the two shielding plates are printed with another red rectangular marking frame; the front side end of the AR gun and the upper end of the gun handle are respectively and transversely provided with a clamping groove, the image recognition frame is transversely and fixedly clamped in the clamping groove at the front end of the AR gun, the intelligent equipment is transversely and fixedly clamped in the clamping groove at the upper end of the AR gun handle, and the other ends of the two pull cables are respectively connected with two triggers of the AR gun; the data acquisition unit can be used for acquiring red rectangle, pentagon and triangle mark frame data at the front end of an image identification frame acquired by a rear camera of the intelligent equipment; the data identification unit can start a camera of the intelligent device to work in application, then the data acquisition unit acquires corresponding data and outputs the corresponding data to the data identification unit, the data identification unit converts an image captured by the camera from an RGB color space into an HSV color space for color judgment, and the processed data are output to the data processing unit; in the application of the data processing unit, the red image is subjected to image transformation, and data are output to the control unit; in the application of the control unit, the main function is to position an image recognition frame; in the application of the identification unit, after the control unit positions the image identification frame, the image identification process of the identification unit only selects the image within the range including the image identification frame for identification, thereby reducing the calculated amount; in the application of the triggering unit, pictures in the range of the image recognition frame obtained by the data acquisition unit are obtained at the speed of 30 frames per second, RGB is converted into HSV, the number of vertexes of the pictures in the middle indication frame is obtained after the same graphic operation is carried out, if two continuous frames are the same result, the result is that the result is that the result is that the result is that the result is that 3 vertexes of the result is that the result is that the result is that the result is the result that the result is that the result is that the result is that the result is that the result is the result that the result is that the result is the result that the result is.

2. The method of claim 1, wherein when the two triggers of the AR gun are respectively actuated, the two shielding plates can respectively move leftwards to shield the pentagonal mark frame and the triangular mark frame, and when the trigger is not actuated, the two shielding plates respectively move rightwards under the elastic force of the spring to shield the pentagonal mark frame and the triangular mark frame.

3. The AR game interaction method based on image recognition as claimed in claim 1, wherein in practical application of the A data recognition unit, the image is filtered by taking the red value range [350-359] [0-10] of the H component in the HSV color space to obtain the image only including red.

4. The AR game interaction method based on image recognition as claimed in claim 1, wherein in practical application of the A data processing unit, firstly, corrosion operation is performed to remove red noise, then edge contour extraction is performed, then envelope fitting is performed, and finally, the number of vertexes is judged according to the envelope.

5. The image recognition-based AR game interaction method of claim 1, wherein the A control unit traverses all rectangular frames with a fixed point number of 4, and finds that the image recognition frame is found when the distance between the continuous 2 rectangular mark frames in the horizontal direction is smaller than a fixed value.

6. The AR game interaction method based on image recognition as claimed in claim 1, wherein in the application of the A trigger unit, the pictures within the range of the image recognition frame obtained in the data acquisition unit are obtained at a speed of 30 frames per second, and when the image recognition frame can not be detected any more within the range of the image, the first step of operation is restarted, and the process is circulated until the player stops the game and the algorithm exits.

Technical Field

The invention relates to the technical field of interactive games, in particular to an AR game interaction method based on image recognition.

Background

The intelligent internet device (such as a mobile phone or an iPad) has sensors such as a camera and a gyroscope with complete functions, so that the AR interactive game based on the intelligent device is more popular. In the field of AR (augmented reality) children games based on intelligent Internet equipment, children and the intelligent Internet equipment carry out AR interactive games (such as AR guns, AR bows and the like), and the playability of toys is greatly improved.

In the existing AR game based on intelligent Internet equipment, due to technical limitation, AR guns and the like need to be internally provided with Bluetooth chips and are connected with the intelligent Internet equipment through Bluetooth, and then interaction is realized. For example, in a firearm game, when a player pulls a trigger, the AR gun triggers to send an instruction to the Bluetooth chip, and the Bluetooth chip informs a game application interface in the intelligent Internet device to perform corresponding firing operation. The cost of AR toys is high due to the need for a built-in bluetooth chip, and in addition, the complexity and unreliability of bluetooth-based programming, results in complex and poorly experienced development of AR toys. Based on the above, it is very necessary to provide a method for realizing information interaction between an AR toy and an intelligent internet device without using bluetooth.

Disclosure of Invention

In order to overcome the defect that the existing AR game based on the intelligent Internet equipment needs a Bluetooth chip to realize information interaction between the intelligent Internet equipment and an AR toy (such as an AR gun) due to the technical limit, the invention provides an AR artificial intelligence recognition technology, an image recognition frame is arranged on the upper part of the front side end of the AR gun, when the AR toy generates physical operation (for example, a trigger is buckled) in the game, the trigger respectively pulls two movable plates at the front end of the recognition frame through a connecting rod or a connecting thin and soft steel cable so as to further change patterns in the recognition frame, after the intelligent Internet equipment recognizes the image change of the image recognition frame through a camera, the intelligent Internet equipment can control a game interface to correspondingly generate actions of opening a gun or launching a fire bullet and throwing a grenade and the like under the action of a corresponding software unit in the intelligent Internet equipment, thereby realizing that the Bluetooth chip is not used as a carrier for information transmission, and saving the whole cost, and the player experience is improved, and the AR game interaction method based on the image recognition is provided.

The technical scheme adopted by the invention for solving the technical problems is as follows:

an AR game interaction method based on image recognition is characterized in that an AR gun, an image recognition frame and intelligent Internet equipment are used as hardware equipment for game interaction, and the AR game interaction method further comprises a data acquisition unit, a data recognition unit, a data processing unit, a control unit, a recognition unit and a triggering unit; the data acquisition unit, the data identification unit, the data processing unit, the control unit, the identification unit and the trigger unit are application software installed in the intelligent Internet equipment; the image recognition frame comprises a fixed plate and a shielding plate, a red rectangular mark frame is printed in the left middle of the front side end of the fixed plate, and a red pentagonal mark frame and a red triangular mark frame are respectively printed in the right middle of the fixed plate from top to bottom; the transverse length of the two shielding plates is smaller than that of the fixed plate, the middle parts of the right side ends of the two shielding plates are respectively connected with one end of a spring, the other ends of the two springs are respectively arranged at the upper end and the lower end of the right middle part of the fixed plate, the left ends of the two shielding plates are respectively provided with a pull rope, and the middle parts of the right ends of the two shielding plates are printed with another red rectangular marking frame; the front side end of the AR gun and the upper end of the gun handle are respectively and transversely provided with a clamping groove, the image recognition frame is transversely and fixedly clamped in the clamping groove at the front end of the AR gun, the intelligent equipment is transversely and fixedly clamped in the clamping groove at the upper end of the AR gun handle, and the other ends of the two pull cables are respectively connected with two triggers of the AR gun; the data acquisition unit can be used for acquiring red rectangle, pentagon and triangle mark frame data at the front end of an image identification frame acquired by a rear camera of the intelligent equipment; the data identification unit can start a camera of the intelligent device to work in application, then the data acquisition unit acquires corresponding data and outputs the corresponding data to the data identification unit, the data identification unit converts an image captured by the camera from an RGB color space into an HSV color space for color judgment, and the processed data are output to the data processing unit; in the application of the data processing unit, the red image is subjected to image transformation, and data are output to the control unit; in the application of the control unit, the main function is to position an image recognition frame; in the application of the identification unit, after the control unit positions the image identification frame, the image identification process of the identification unit only selects the image within the range including the image identification frame for identification, thereby reducing the calculated amount; in the application of the triggering unit, pictures in the range of the image recognition frame obtained by the data acquisition unit are obtained at the speed of 30 frames per second, RGB is converted into HSV, the number of vertexes of the pictures in the middle indication frame is obtained after the same graphic operation is carried out, if two continuous frames are the same result, the result is that the result is that the result is that the result is that the result is that 3 vertexes of the result is that the result is that the result is that the result is the result that the result is that the result is that the result is that the result is that the result is the result that the result is that the result is the result that the result is.

Furthermore, when the two triggers of the AR gun are respectively pulled, the two shielding plates can respectively move leftwards to not shield the pentagonal mark frame and the triangular mark frame, and when the triggers are not pulled, the two shielding plates respectively move rightwards under the elastic acting force of the springs to shield the pentagonal mark frame and the triangular mark frame.

Furthermore, in the practical application of the data identification unit, the red value range [ 350-.

Further, in practical application of the data processing unit, firstly, corrosion operation is performed to remove red noise, then edge contour extraction is performed, then envelope fitting is performed, and finally the number of vertexes is judged according to the envelope.

Furthermore, the control unit traverses all the rectangular frames with the fixed point number of 4, and when the distance between every two continuous rectangular mark frames in the horizontal direction is smaller than a certain value, the image recognition frame can be found.

Further, in the application of the triggering unit, the pictures in the range of the image recognition frame obtained in the data acquisition unit are obtained at the speed of 30 frames per second, and when the image recognition frame can not be detected in the range of the image any more, the first step of operation is restarted, and the process is circulated until the player stops playing the game and the algorithm exits.

The invention has the beneficial effects that: based on the AR artificial intelligence recognition technology, the interactive game can be carried out after the intelligent Internet equipment (such as a mobile phone) and the image recognition frame are installed during the game. In the game, under the combined action of the data acquisition unit, the data identification unit, the data processing unit, the control unit, the identification unit, the trigger unit and the like, when the AR toy generates physical operation (for example, a trigger is buckled) in the game, the trigger respectively pulls the two movable plates at the front end of the identification frame through the connecting rod or the connecting thin and soft steel rope so as to further change the patterns in the identification frame, and after the intelligent internet equipment identifies the image change of the image identification frame through the camera, under the action of the corresponding software unit in the intelligent internet equipment, the game interface can be controlled to correspondingly generate actions of shooting a gun or launching a rocket and throwing a grenade and the like, so that a Bluetooth chip is not used as a carrier for information transmission, the overall cost is saved, and the experience of a player is improved. Based on the above, the invention has good application prospect.

Drawings

The invention is further illustrated below with reference to the figures and examples.

Fig. 1 and 2 are schematic diagrams of the external structure of the hardware device of the present invention.

FIG. 3 is a block diagram of the software architecture of the present invention.

Detailed Description

As shown in fig. 1, 2 and 3, an AR game interaction method based on image recognition adopts an AR gun 1, an image recognition frame 2 and an intelligent internet device 3 (mobile phone) as hardware devices for game interaction, and further includes a data acquisition unit, a data recognition unit, a data processing unit, a control unit, a recognition unit and a trigger unit; the data acquisition unit, the data identification unit, the data processing unit, the control unit, the identification unit and the trigger unit are application software installed in the intelligent Internet equipment; the image recognition frame comprises a fixed plate 21 and a shielding plate 22, a red rectangular mark frame 23 is printed in the left middle of the front side end of the fixed plate 21, and a red pentagonal mark frame 25 and a triangular mark frame 26 are respectively printed in the right middle of the fixed plate 21 from top to bottom; the transverse length of the two shielding plates 22 is smaller than that of the fixed plate 21, the middle parts of the right side ends of the two shielding plates 22 are respectively connected with one end of one spring 24, the other ends of the two springs 24 are respectively arranged at the upper end and the lower end of the right middle part of the fixed plate 21, the left ends of the two shielding plates 22 are respectively provided with one thin steel rope pull cable 28, and the front middle parts of the right ends of the two shielding plates 22 are printed with another red rectangular mark frame 27; the front end of the AR gun 1 and the upper end of the gun handle are respectively and transversely provided with a clamping groove, the image recognition frame 2 is transversely fixed in the clamping groove at the front end of the AR gun 1, the intelligent device 3 is transversely fixed in the clamping groove at the upper end of the AR gun 1, and the other ends of the two thin steel rope inhaul cables are respectively connected with two triggers 101 (two triggers of the AR gun) of the AR gun. When a player plays games and the two triggers 101 of the AR gun are respectively pulled by hands, the two shielding plates 22 can respectively move leftwards to not shield the pentagonal mark frames and the triangular mark frames, and when the trigger is not pulled, the two shielding plates 22 respectively move rightwards under the action force of the spring bullet 24 to shield the pentagonal mark frames 25 and the triangular mark frames 26.

As shown in fig. 1, 2 and 3, before the present invention is used, an interactive game can be performed after an intelligent internet device 3 (e.g., a mobile phone) and an image recognition frame 2 are installed. The specific application steps are as follows. The method comprises the following steps: the data acquisition unit acquires red rectangle, pentagon and triangle mark frame data at the front end of the image identification frame acquired by the rear camera of the intelligent device. Step two: the data identification unit is used for starting a camera of the intelligent equipment to work, then the data acquisition unit acquires corresponding data and outputs the corresponding data to the data identification unit, the data identification unit converts an image captured by the camera from an RGB color space into an HSV color space for color judgment, and the processed data are output to the data processing unit; in practical application of the data identification unit, the red value range [ 350-. Step three: the data processing unit carries out image transformation on the red image and outputs data to the control unit; in practical application of the data processing unit, firstly, corrosion operation is carried out to remove red noise, then edge contour extraction is carried out, envelope line fitting is carried out, and finally the number of vertexes is judged according to the envelope line. Step four: the control unit positions the image recognition frame; in practical application, the control unit traverses all the rectangular frames with the fixed point number of 4, and finds that the distance between the continuous 2 rectangular mark frames 23 and 27 (any half of the continuous 2 rectangular mark frames) in the horizontal direction is smaller than a certain value, namely the image recognition frame is found. Step five: after the control unit positions the image recognition frame, the recognition unit only selects the image within the range of the image recognition frame for recognition in the image recognition process, so that the calculated amount is reduced. Step six: the triggering unit acquires pictures in the range of the image recognition frame acquired by the data acquisition unit at the speed of 30 frames per second, converts RGB into HSV, performs the same graphical operation, acquires the number of vertexes of the patterns in the middle indication frame, and if two continuous frames have the same result, namely 3 vertexes (triangles), the triggering unit correspondingly controls the conventional operation of the game interface to start, and if the two continuous frames have 5 vertexes (pentagons), the triggering unit correspondingly controls the game interface to launch and throw the grenades by rockets; in the practical application of the triggering unit, the pictures in the range of the image recognition frame obtained by the data acquisition unit are obtained at the speed of 30 frames per second, and the first step of operation is restarted until the image recognition frame can not be detected in the range of the image any more, and the process is circulated until the game is stopped by the player and the algorithm exits.

As shown in fig. 1, 2 and 3, the present invention is based on the AR artificial intelligence recognition technology, and when playing games, interactive games can be played after an intelligent internet device (such as a mobile phone) and an image recognition frame are installed. In the game, under the combined action of the data acquisition unit, the data identification unit, the data processing unit, the control unit, the identification unit, the trigger unit and the like, when the AR toy generates physical operation (for example, a trigger is buckled) in the game, the trigger respectively pulls the two movable plates at the front end of the identification frame through the connecting rod or the connecting thin and soft steel rope so as to further change the patterns in the identification frame, and after the intelligent internet equipment identifies the image change of the image identification frame through the camera, under the action of the corresponding software unit in the intelligent internet equipment, the game interface can be controlled to correspondingly generate actions of opening a gun or launching a rocket bomb, throwing a grenade and the like, so that a Bluetooth chip is not used as a carrier for information transmission, the overall cost is saved, and the experience of a player is improved.

While there have been shown and described what are at present considered the fundamental principles and essential features of the invention and its advantages, it will be apparent to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, but is capable of other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Furthermore, it should be understood that although the present description refers to embodiments, the embodiments do not include only one independent technical solution, and such description is only for clarity, and those skilled in the art should take the description as a whole, and the technical solutions in the embodiments may be appropriately combined to form other embodiments that can be understood by those skilled in the art.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种密室的控制方法、装置、计算机设备及存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类