Intelligent finger-guessing entertainment system with voice broadcasting function
Technical Field
The invention belongs to the technical field of entertainment systems, color comparison and basic camera technologies, and particularly relates to an intelligent finger-guessing entertainment system with a voice broadcasting function.
Background
Guessing a fist, a simple game, and having three gestures of scissors, stones and cloth. Two persons can simultaneously take corresponding shapes by hands, and the win-win judgment rules are that the scissors win cloth, cloth wins stones and stones win the scissors.
In the prior art CN105034006A, a mechanical device is needed to realize a finger guessing function, the cost is higher, the system is complex, and the problems can be effectively avoided by using language input and output.
In the above-mentioned publication, a fist making gesture is determined based on three-dimensional position coordinate information of each finger joint bone space of a boxer, and a fist guessing process is achieved, in order to achieve the first making gesture, image acquisition equipment is required to have higher resolution, otherwise, the three-dimensional position coordinate information is inaccurate, and a determination result is affected. The method identifies the gestures based on template matching, firstly collects three boxing gesture images of a boxer, and then matches the templates in the subsequent judgment process, and the resolution of the image acquisition equipment is not high as the templates are from the boxer.
Disclosure of Invention
The invention aims to provide an intelligent finger-guessing entertainment system with a voice broadcasting function, which can utilize a voice broadcasting judgment result and a template matching algorithm to judge a finger-making gesture, and can greatly reduce the complexity of the system so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: an intelligent finger-guessing entertainment system with a voice broadcasting function comprises a visual system, a controller module and a voice recognition module;
the vision system comprises a camera, a control circuit, an interface circuit and an embedded processor;
the controller module comprises an embedded processor and an interface circuit;
the voice recognition module comprises a sound pickup, a language processing module and an interface circuit;
the vision system is connected with the controller module through an RS232 serial port, the voice recognition module is connected with the controller module through a UART serial port, and the vision system can judge the current gesture.
Preferably, the voice recognition unit is connected with the controller through a UART serial port, and the vision system can judge the current gesture.
Preferably, the UART serial port may be replaced by a GPIO or RS485 serial port.
Preferably, the image color blocks extracted in step S8 are automatically focused by opening the camera to capture an image G, which includes the projected color blocks.
Preferably, the voice broadcast is realized through the following processes:
s1, a voice recognition module awakens words, and the whole system is in a preparation starting working stage;
s2, the voice recognition module waits for a start command;
s3, the voice recognition module box controller sends out a handshake signal;
s4, the controller acquires the current vision system identification result;
s5, the controller generates the results of 'stone', 'scissors' and 'cloth';
s6, the controller judges whether the randomly generated result and the recognition result are successful or negative;
s7, the controller sends the result of the win or loss judgment, the result of the visual system identification and the result generated immediately to the voice identification module;
and S8, the voice recognition module broadcasts the result.
Preferably, the visual system determining the gesture comprises the following steps: a. acquiring a picture; b. processing an image; c. collecting data; d. and (6) analyzing the data.
Preferably, the step a includes background removal, where the background removal is implemented by using a frame difference method
Preferably, the step b acquires data from the contour by color block.
Preferably, in the step c, the ROI image of the gesture is obtained by a monochrome gray-scale patch tracking method.
Preferably, in the step d, the current gesture information is recognized through analyzing two features of the area of the gesture ROI image and the aspect ratio of the bounding box.
The invention has the beneficial effects that: the method realizes the recognition of three gestures, namely stone, scissors and cloth, based on a single camera, has a simpler and more efficient recognition algorithm, and can greatly reduce the complexity of the system by using a voice broadcast judgment result and a template matching algorithm to judge the boxing gesture.
Drawings
FIG. 1 is a block diagram of an intelligent finger-guessing entertainment system with voice broadcasting function according to the present invention;
FIG. 2 is a schematic flow chart of the steps of an intelligent finger-guessing entertainment system with a voice broadcasting function according to the present invention;
FIG. 3 is a flowchart of an algorithm for determining a current gesture by a vision system of the intelligent finger-guessing entertainment system with a voice broadcasting function according to the present invention;
FIG. 4 is a schematic diagram of image transformation of an intelligent finger-guessing entertainment system with voice broadcasting function according to the present invention;
fig. 5 is a schematic data acquisition diagram of the intelligent finger-guessing entertainment system with the voice broadcasting function provided by the invention.
Detailed Description
In order to further understand the contents, features and effects of the present invention, the following embodiments are illustrated and described in detail with reference to the accompanying drawings.
Referring to fig. 1 to 5, an intelligent finger-guessing entertainment system with a voice broadcasting function according to an embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
In fig. 1, the intelligent finger-guessing entertainment system with voice broadcasting function comprises a vision system, a controller module and a voice recognition module;
the vision system comprises a camera, a control circuit, an interface circuit and an embedded processor;
the controller module comprises an embedded processor and an interface circuit;
the voice recognition module comprises a sound pickup, a language processing module and an interface circuit;
the vision system is connected with the controller module through an RS232 serial port, the voice recognition module is connected with the controller module through a UART serial port, and the vision system can judge the current gesture.
Further, the RS232 serial port can be replaced by a GPIO or RS485 serial port.
Further, the UART serial port can be replaced by a GPIO or RS485 serial port.
As shown in fig. 2, the voice broadcast in the intelligent finger guessing entertainment system with the voice broadcast function is realized through the following processes:
s1, a voice recognition module awakens words, and the whole system is in a preparation starting working stage;
s2, the voice recognition module waits for a start command;
s3, the voice recognition module box controller sends out a handshake signal;
s4, the controller acquires the current vision system identification result;
s5, the controller generates the results of 'stone', 'scissors' and 'cloth';
s6, the controller judges whether the randomly generated result and the recognition result are successful or negative;
s7, the controller sends the result of the win or loss judgment, the result of the visual system identification and the result generated immediately to the voice identification module;
and S8, the voice recognition module broadcasts the result.
As shown in fig. 3, the vision system determining the gesture includes the following steps: a. acquiring a picture; b. processing an image; c. collecting data; d. and (6) analyzing the data.
Further, the step a comprises background removal, wherein the background removal is realized by adopting a frame difference mode; the background removal is realized by adopting a frame difference mode, firstly, a frame of picture without a gesture is shot and stored, then, the shot frame of picture with the gesture is subtracted from the picture, and the background removal picture can be obtained. Alternatively, background removal may also be achieved in other ways in a similar manner.
Further, step b obtains data from the outline through the color blocks; the image transformation is mainly realized in an edge detection mode, and the image is further processed by an edge detection method.
Further, in the step c, an ROI image of the gesture is obtained in a monochrome gray color block tracking mode;
further, in the step d, current gesture information is recognized through two characteristics of the area of the gesture ROI image and the length-width ratio of the boundary box; analyzing two characteristics of the area of the gesture ROI image and the length-width ratio of a bounding box, identifying current gesture information through the two characteristics, as shown in the following table, judging thresholds of three gesture characteristics of stone, scissors and cloth, wherein when judging is carried out, gestures meeting the threshold value of 0.9-1.1 can be identified as specific gestures, and when not meeting the threshold value, the gestures are judged to be invalid gestures
|
height/width
|
area
|
pixels
|
Stone (W.E.)
|
1.172
|
4373.916
|
467.088
|
Cloth
|
0.776
|
4967.906
|
232.304
|
Scissors
|
0.590
|
5535.613
|
529.949 |
The working principle of the invention is as follows: activating a voice recognition module by providing a wake-up word, sending a handshake signal to a controller module by the voice recognition module when the voice recognition module recognizes that the wake-up word is 'start', and simultaneously acquiring a recognition result of a current visual system by the controller module;
in the visual system, the method for identifying the result comprises the steps of obtaining a picture, removing the background of the obtained picture to obtain an image after image processing, detecting the edge of a gesture by color block tracking, collecting data, analyzing the area of a gesture ROI image and the length-width ratio of a boundary frame by data recombination, contrasting the judgment thresholds of three gesture characteristics of stone, scissors and cloth, carrying out data analysis, comparing 2 gesture data of a user with a summarized result if the gesture is a specific gesture to obtain three gestures of stone, scissors and cloth, printing the image to detect the edge of the gesture by color block tracking again if the gesture is not the specific gesture, and collecting the data;
the controller generates a stone result, a scissors result and a cloth result immediately after the controller acquires the current visual system identification result, the controller judges whether the generated result and the identification result are successful or not immediately, after the success or failure judgment result is obtained, the success or failure judgment result, the visual system identification result and the immediately generated result are sent to the voice identification module through the controller, and the result is broadcasted through the voice identification module.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.