Disclosure of Invention
The invention aims to provide a gesture interaction system and method applied to an intelligent classroom, which can realize real-time authorization.
In order to solve the technical problems, the technical scheme of the invention is as follows:
a gesture interaction system applied to a smart classroom, comprising:
the camera module is used for collecting face images, hand images and posture images of the user and uploading the collected images;
the storage module is used for storing the acquired images; the storage module is also prestored with a face recognition algorithm, a gesture recognition model, a gesture sample library, a white list face library and a temporary authorized face library; different gesture samples in the gesture sample library correspond to different operations;
the processing module is used for calling the images, the face recognition algorithm, the posture recognition model, the gesture sample library and the white list face library in the storage module; identifying the face in the collected image based on a face identification algorithm, matching the identified face with a white list face library, and judging whether the user belongs to a white list user; if yes, identifying the hand gesture of the white list user in the acquired image, and matching the hand gesture with a pre-stored gesture sample library; judging whether the white list user gesture accords with a pre-stored gesture sample, if so, executing the operation corresponding to the conformed gesture sample;
the gesture sample library comprises authorization gestures, if a white list user uses the authorization gestures to any user alpha, the processing module identifies the gesture of the user alpha in the acquired image based on the gesture identification model, and then judges whether the identified gesture belongs to a standing gesture or not; if yes, the face of the user alpha is added into a temporary authorized face library in the storage module, and the gesture of the user alpha is recognized.
The basic scheme principle and the beneficial effects are as follows:
1. and a white list face library is set, in actual use, after the face of the teacher is input into the white list face library, the face of the teacher can be directly interactively operated after being successfully matched with the white list face library, extra authorization is not needed, and the use is convenient. The white list face library only authorizes teachers, so that the gestures of students are prevented from being recognized by mistake when the action amplitude of the students in a classroom is large, wrong operation is executed, interference is avoided, and meanwhile, the safety is good;
2. authorizing any user alpha by a white list user through an authorization gesture to enable the user alpha to become a temporary authorization user; in actual use, a teacher can authorize any student through an authorization gesture, so that the student becomes a temporary authorization user, a teacher and a student can both become operators of an intelligent classroom, and more teaching needs can be met compared with the case that only the teacher is identified; compared with the method that the students and teachers do not need to be authorized and do not have different identification, the unauthorized operation of the students can be avoided;
3. when the authorized gesture is actually set, unless the teacher makes physical contact with the students through the gesture, the non-contact directional gesture points to the students in a certain range, and when the teacher specifically authorizes the students, the error is large; through double confirmation of authorized gestures and standing gestures, the recognition error can be reduced, and the recognition accuracy is improved; moreover, in practical teaching, students usually listen and speak while sitting; when any student stands, the student usually has an interactive state with the teacher, for example, the student stands up to answer the question of the teacher, and the student usually needs to operate at the moment.
4. Compared with the situation that the user alpha directly obtains the authority through gestures, the user alpha is granted through the white list user, in the actual teaching, the operation of the student after randomly obtaining the authority is avoided, and the safety can be improved.
5. The basic scheme can meet the control requirements of multiple users, particularly meet the control authority distribution requirements when the multiple users control, so that the interactive control range of gesture recognition is expanded, and the method is simple, real-time and easy for engineering application.
Further, when the processing module identifies gestures in the acquired images, the acquired images are converted into image frames, hands are positioned from the image frames through background modeling, moving object modeling and an HSV skin color detection model, then the movement tracks of the hands are obtained through a particle filtering algorithm of an HSV histogram, and the movement tracks of the hands are used as the gestures.
The particle filter algorithm has strong modeling capability on the nonlinear characteristic of the human hand motion track in the scheme, and can accurately predict the human hand motion track.
Further, if the pose of the user α becomes sitting, the processing module removes the face of the user α from the temporary authorized faces library.
In practical teaching, when a student changes from a standing posture to a sitting posture, the interaction with a teacher is usually finished, for example, the answer to a question is finished; at the moment, the student enters the listening and speaking state again, and operation is not needed any more; the authority is withdrawn in time, so that the condition that the student can operate without permission of the teacher due to long-term authorization can be avoided.
Further, the gesture sample library also comprises an authorization confirmation gesture, after the white list user uses the authorization gesture to any user alpha, the processing module also judges whether the user alpha uses the authorization confirmation gesture, and if so, the face of the user alpha is added to the temporary authorized face library.
The accuracy of the alpha judgment of the user can be further improved by the triple verification of the authorization gesture, the standing gesture and the confirmation gesture.
Further, the identified hand portion includes an arm and a finger.
Compared with the fingers which can recognize the human hand independently, the hand gesture made by combining the arm and the finger is more, and the operation which can be realized is more.
Further, the camera module comprises a depth camera.
The depth camera has three-dimensional sensing and three-dimensional modeling capabilities, and compared with a common camera which can only shoot plane images, the depth camera can also obtain depth information of shot objects, namely three-dimensional position and size information, and is beneficial to subsequent recognition of human faces, human hands and postures.
A gesture interaction method applied to a smart classroom comprises the following steps:
s1, collecting the face, hand and posture images of the user;
s2, recognizing the face in the collected image, matching the recognized face with a white list face library, and judging whether the user belongs to a white list user;
s3, if the user belongs to the white list user, recognizing the hand gesture of the white list user in the collected image, and matching the hand gesture with a gesture sample library; judging whether the white list user gestures accord with pre-stored gesture samples or not;
s4, if the gesture sample accords with the pre-stored gesture sample, executing the operation corresponding to the accordant gesture sample;
s5, if the white list user uses an authorization gesture to any user alpha, recognizing the gesture of the user alpha in the acquired image, and judging whether the recognized gesture belongs to a standing gesture;
and S6, if the user alpha belongs to the standing posture, judging whether the user alpha uses the gesture for confirming the authorization, and if so, adding the face of the user alpha to a temporary authorized face library.
Authorizing any user alpha by a white list user through an authorization gesture to enable the user alpha to become a temporary authorization user; in actual use, a teacher can authorize any student through an authorization gesture, so that the student becomes a temporary authorization user, a teacher and a student can both become operators of an intelligent classroom, and more teaching needs can be met compared with the case that only the teacher is identified; compared with the method that the students and teachers do not need to be authorized and identified indiscriminately, the unauthorized operation of the students can be avoided.
Further, the S6 further includes: if the pose of the user alpha changes to a sitting position, the face of the user alpha is removed from the temporary authorized face library.
The authority is withdrawn in time, so that the operation of students without permission by teachers due to long-term authorization can be avoided. If the authority is not recovered, the condition that most students have the authority inevitably occurs after a period of time, and the condition that the gestures of the teacher and the students are mutually interfered occurs at the moment; after the student sits down, the authority is automatically withdrawn, no additional operation is needed, and the use is convenient.
Further, in S3, when the gesture of the human hand of the white list user in the acquired image is recognized, the acquired image is converted into an image frame, the human hand is positioned from the image frame through background modeling, moving object modeling and HSV skin color detection models, the movement trajectory of the human hand is obtained by using a particle filtering algorithm of an HSV histogram, and the movement trajectory of the human hand is used as the gesture.
The motion trail of the human hand can be accurately predicted by using a particle filter algorithm.
Further, in S3, the hand part to be recognized includes an arm and a finger.
Compared with the method of only recognizing fingers, the moving range of the arm is large, and formed gestures are easier to recognize.
Detailed Description
The following is further detailed by way of specific embodiments:
example one
A gesture interaction system applied to an intelligent classroom comprises a camera module, a storage module and a processing module.
The camera module comprises a depth camera which is used for collecting human faces, human hands and posture images of users and uploading the collected images to the storage module. The identified parts of the human hand include arms and fingers. In this embodiment, the 3D sensor of smart mark science and technology is adopted to dark camera, and this 3D sensor can effectively avoid the interference such as light change, curtain swing, glass reflection, back row personnel walk among the acquisition process.
The storage module is used for storing the acquired image; the storage module is also prestored with a gesture sample library, a white list face library, a temporary authorization face library, a face recognition algorithm based on a deep neural algorithm and a posture recognition model based on the deep neural algorithm; different gesture samples in the gesture sample library correspond to different operations, and the gesture sample library also comprises an authorization gesture and an authorization confirmation gesture; in the embodiment, the input of the white list face library can be uniformly input by an administrator, and can also be automatically input by a teacher through a mobile phone APP. In this embodiment, the storage module adopts western data HUS726T4TALA6L 44T enterprise hard disk.
The processing module is used for calling the images, the face recognition algorithm, the posture recognition model, the gesture sample library and the white list face library in the storage module; the processing module identifies the face in the acquired image based on a face identification algorithm of a deep neural algorithm, matches the identified face with a white list face library, and judges whether the user belongs to a white list user; if yes, recognizing the gestures of the white list user hands in the acquired image: the collected images are converted into image frames, the human hand is positioned from the image frames through background modeling, moving object modeling and an HSV skin color detection model, the moving track of the human hand is obtained through a particle filtering algorithm of an HSV histogram, and the moving track of the human hand is used as a gesture. Matching the obtained gesture with a gesture sample in a pre-stored gesture sample library; and judging whether the white list user gesture accords with a pre-stored gesture sample, and if so, executing the operation corresponding to the accorded gesture sample.
If the white list user uses the authorization gesture to any user α, in this embodiment, the authorization gesture is that the elbow joint of the white list user is straight, the index finger is straight, and the other fingers are bent, pointing to the user α with the index finger. The processing module identifies the postures of the users in the area pointed by the white list users based on a posture identification model of a deep neural algorithm, and judges whether the identified postures belong to standing postures. Regarding the identification method of the white list user pointing area, the patent document CN101344816B has been disclosed in detail, belongs to the prior art, and is not described here again. If the user belongs to the standing posture, the user is determined to be a user alpha, whether the user alpha uses the authorization determination gesture is judged, and if the user alpha uses the authorization determination gesture, the face of the user alpha is added into a temporary authorization face library; in this embodiment, the confirmation gesture is a general "OK" gesture; if the posture of the user alpha is changed from the standing posture to the sitting posture, the processing module removes the face of the user alpha from the temporary authorized face library. In this embodiment, the processing module is an intel I78700K processor.
For example, when a teacher A elbow joint of a white list user is straightened, an index finger is straightened, other fingers are bent, and the index finger points to a standing student B, the processing module matches the obtained gesture of the teacher A with the gesture samples in the gesture sample library in the storage module, the matching result is an authorized gesture, the processing module identifies the gesture of the user in the pointing area of the teacher A based on a gesture identification model of a deep neural algorithm, and at the moment, the processing module identifies the gesture of the student B and judges the gesture of the student B as a standing gesture; at the moment, the student B makes an 'OK' gesture, the depth camera collects the hand image of the student B, the collected image is uploaded to the storage module, the processing module calls a gesture sample library in the storage module, the processing module identifies the hand gesture of the student B, the identified 'OK' gesture is matched with the gesture sample in the gesture sample library, and after the 'OK' gesture is matched to be a confirmed authorization gesture, the face of the student B is added into the temporary authorized face library; and the processing module executes the operation corresponding to the gesture of the gesture sample conformed by the student B. When the processing module recognizes that the posture of the student B becomes the sitting posture, the processing module removes the student B from the temporary authorized face library.
Example two
As shown in fig. 1, a gesture interaction method applied to a smart classroom based on a gesture interaction system applied to the smart classroom includes the following steps:
s1, collecting the face, hand and posture images of the user;
s2, recognizing the face in the collected image, matching the recognized face with a white list face library, and judging whether the user belongs to a white list user;
s3, if the user belongs to the white list user, recognizing the gesture of the hand of the white list user in the collected image: converting the collected image into an image frame, positioning an arm and a finger of a hand from the image frame through background modeling, moving object modeling and an HSV skin color detection model, obtaining a motion track of the arm and the finger by using a particle filtering algorithm of an HSV histogram, and taking the motion track of the arm and the finger as a gesture; matching the gesture with a gesture sample library; judging whether the white list user gestures accord with pre-stored gesture samples or not;
s4, if the gesture sample accords with the pre-stored gesture sample, executing the operation corresponding to the accordant gesture sample;
as shown in fig. 2, S5, if the white list user uses an authorization gesture to any user α, recognizing the gesture of the user α in the acquired image, and determining whether the recognized gesture belongs to a standing gesture; in the embodiment, if the standing posture is not detected, the identification is performed again after 5S, and if the standing posture is still not detected, the identification is finished;
s6, if the user alpha belongs to the standing posture, whether the user alpha uses the authorization confirmation gesture is judged, and if the user alpha uses the authorization confirmation gesture, the face of the user alpha is added into a temporary authorization face library; if the posture of the user alpha is changed from the standing posture to the sitting posture, the face of the user alpha is removed from the temporary authorized face library. In this embodiment, if the confirmation gesture is not detected, the recognition is performed again after 5S, and if the confirmation gesture is still not detected, the recognition is ended.
The foregoing is merely an example of the present invention and common general knowledge of known specific structures and features of the embodiments is not described herein in any greater detail. It should be noted that, for those skilled in the art, without departing from the structure of the present invention, several changes and modifications can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicability of the patent. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.