A kind of multimedia teaching control system and control method
Technical field
The present invention relates to multimedia teaching field, specifically, relate to a kind of multimedia teaching control system and control method.
Background technology
Multimedia is informationalized embodiment, also be the trend of social development, informationalized level has become the major criterion of measurement modernization of the country level and overall national strength, and multimedia education is an informationalized part, and multimedia education of making greater efforts to promote has become the trend of educational development.
Use multimedia technology in teaching, be conducive to the professional standards improving teacher, be conducive to teacher's integrated instruction resource.Teaching Technology of Multimedia can make up the deficiency in conventional teaching, is novel Scientific Teaching technology.At present, still adopt traditional manual mode during operation of teacher multimedia equipment, the mode of class-teaching of teacher operating equipment is single, lacks interesting.This is the deficiencies in the prior art part.
Summary of the invention:
The technical matters that the technical program will solve is to provide a kind of multimedia teaching control system and control method, improves the interest in classroom, has innovated teaching pattern, reaches better teaching efficiency.
The present invention realizes goal of the invention by following technological means:
A kind of multimedia teaching control system, comprising:
Data acquisition module: gather video flowing; It is characterized in that, also comprise:
Interactive control module: the video flowing collected is processed, calculate the central point of profile and convex closure point by the profile of image recognition technology identification personage thus determine the position of hand, then according to the residence time decision instruction of hand, thus make and respond action accordingly.
A kind of multimedia teaching control method, comprising:
(1) open camera background extraction, under unmanned environment, extract the purer image of an amplitude ratio as a setting;
(2) obtain current frame image, extract the gray level image of personage's prospect;
Concrete steps are: the grey scale pixel value that setting L (x, y) is current frame image, the grey scale pixel value that B (x, y) is background image, and the grey scale pixel value that D (x, y) is foreground image then has:
D(x,y)=|L(x,y)-B(x,y)|
(3) threshold calculations is carried out to gray level image, obtain bianry image;
Concrete steps are: suppose that f (x, y) is for certain any pixel value in gray level image, and d (x, y) is certain any pixel value in bianry image, and T is threshold value, then have
(4) edge gradient calculates, and the profile of personage detected;
(5) determine the position of hand, concrete steps are:
According to the character contour detected in step (4), calculate the central point of profile and the convex closure point of profile, according to the profile central point obtained and convex closure point, to calculate on x direction and y direction convex closure point respectively to the distance of profile central point, if the distance in x direction is greater than the distance on y direction, so the position of finger is just thought in this convex closure point position;
(6) repeat step (2)-(5), obtain the position data of real-time hand;
(7) trigger response events and carry out event response, specifically comprise:
The triggering of g1 event, when continuous 3 two field pictures fingers position all certain among a small circle in, so just think that position within continuous 3 frames, the position of finger does not become, just trigger click event;
G2 changes according to the size of present image and the resolution of desktop screen, finger position is in the picture converted to the position that desktop mouse is clicked, so just can realize the conversion of finger position to the click response position of mouse, position conversion formula is specially:
Suppose that picture size size is for (PicWidth, PicHight), desktop screen resolutions is (ScreenX, ScreenY), finger position is in the picture (PicX, PicY), the click location of desktop mouse is (x, y), then have:
As the further restriction to the technical program, described step (5) comprises the steps:
The concrete steps calculating profile convex closure point are:
Suppose that the point set forming profile is S, get any two points p (x in set
1, y
1) and p (x
2, y
2), then the straight line of these 2 compositions is: ax+by=c (wherein, a=y
2-y
1, b=x
2-x
1, c=x
1y
2-y
1x
2), bring other all points that point is concentrated into straight-line equation ax+by=c respectively, if the symbol of expression formula is identical, >c or <c, then represent that be the convex closure point of this profile at above-mentioned 2, otherwise be not just convex closure point,
Every opposite vertexes of profile is detected, finds all convex closure points;
The concrete steps calculating profile central point are:
Points all on traversal profile, total number of acquisition point, extracts the coordinate figure of each point;
N=∑
I1
Ask the mean value of all point coordinate, obtain the central point of profile
Wherein, the total number of point is N, and each point coordinate figure is mtx (x, y), and center point coordinate is M (x, y).
Compared with prior art, advantage of the present invention and good effect are: the interactive control module of the present invention and control method make class-teaching of teacher without the need to employing the hardware devices such as mouse-keyboard, as long as with Fingers to the object setting-up time that will operate, just corresponding button can be triggered, accomplish to control the interaction of courseware, the mode of attending class will be more nimbly and freely; Whole invention improves the interest in classroom, has innovated teaching pattern, reaches better teaching efficiency.
Accompanying drawing explanation
Fig. 1 is process flow diagram of the present invention.
Embodiment:
Below in conjunction with embodiment, further illustrate the present invention.
See Fig. 1, the present invention includes:
A kind of multimedia teaching control system, comprising:
Data acquisition module: gather video flowing; It is characterized in that, also comprise:
Interactive control module: the video flowing collected is processed, calculate the central point of profile and convex closure point by the profile of image recognition technology identification personage thus determine the position of hand, then according to the residence time decision instruction of hand, thus make and respond action accordingly.
A kind of multimedia teaching control method, comprising:
(1) open camera background extraction, under unmanned environment, extract the purer image of an amplitude ratio as a setting;
(2) obtain current frame image, extract the gray level image of personage's prospect;
Concrete steps are: the grey scale pixel value that setting L (x, y) is current frame image, the grey scale pixel value that B (x, y) is background image, and the grey scale pixel value that D (x, y) is foreground image then has:
D(x,y)=|L(x,y)-B(x,y)|
(3) threshold calculations is carried out to gray level image, obtain bianry image;
Concrete steps are: suppose that f (x, y) is for certain any pixel value in gray level image, and d (x, y) is certain any pixel value in bianry image, and T is threshold value, then have
(4) edge gradient calculates, and the profile of personage detected;
(5) determine the position of hand, concrete steps are:
According to the character contour detected in step (4), calculate the central point of profile and the convex closure point of profile, according to the profile central point obtained and convex closure point, to calculate on x direction and y direction convex closure point respectively to the distance of profile central point, if the distance in x direction is greater than the distance on y direction, so the position of finger is just thought in this convex closure point position;
(6) repeat step (2)-(5), obtain the position data of real-time hand;
(7) trigger response events and carry out event response, specifically comprise:
The triggering of g1 event, when continuous 3 two field pictures fingers position all certain among a small circle in, so just think that position within continuous 3 frames, the position of finger does not become, just trigger click event;
G2 changes according to the size of present image and the resolution of desktop screen, finger position is in the picture converted to the position that desktop mouse is clicked, so just can realize the conversion of finger position to the click response position of mouse, position conversion formula is specially:
Suppose that picture size size is for (PicWidth, PicHight), desktop screen resolutions is (ScreenX, ScreenY), finger position is in the picture (PicX, PicY), the click location of desktop mouse is (x, y), then have:
Described step (5) comprises the steps:
The concrete steps calculating profile convex closure point are:
Suppose that the point set forming profile is S, get any two points p (x in set
1, y
1) and p (x
2, y
2), then the straight line of these 2 compositions is: ax+by=c (wherein, a=y
2-y
1, b=x
2-x
1, c=x
1y
2-y
1x
2), bring other all points that point is concentrated into straight-line equation ax+by=c respectively, if the symbol of expression formula is identical, >c or <c, then represent that be the convex closure point of this profile at above-mentioned 2, otherwise be not just convex closure point,
Every opposite vertexes of profile is detected, finds all convex closure points;
The concrete steps calculating profile central point are:
Points all on traversal profile, total number of acquisition point, extracts the coordinate figure of each point;
N=∑
I1
Ask the mean value of all point coordinate, obtain the central point of profile
Wherein, the total number of point is N, and each point coordinate figure is mtx (x, y), and center point coordinate is M (x, y).