A kind of multimedia teaching control system and control method
Technical field
The present invention relates to multimedia teaching field, specifically, is related to a kind of multimedia teaching control system and controlling party
Method.
Background technology
Multimedia is information-based embodiment, and the trend of social development, information-based level have become measurement one
Modernization of the country is horizontal and the major criterion of overall national strength, multimedia education are an information-based parts, and make greater efforts to promote more matchmakers
Body education has turned into the trend of educational development.
Multimedia technology is used in teaching, is advantageous to improve the professional standards of teacher, is advantageous to teacher's integrated instruction resource.
Teaching Technology of Multimedia can overcome the disadvantages that the deficiency in conventional teaching, be new Scientific Teaching technology.At present, operation of teacher multimedia
Still traditional manual mode is used during equipment, the mode of class-teaching of teacher operation equipment is single, lacks interesting.This is existing skill
The weak point of art.
The content of the invention:
The technical program technical problems to be solved are to provide a kind of multimedia teaching control system and control method, improve
The interest in classroom, has innovated teaching pattern, has reached more preferable teaching efficiency.
The present invention realizes goal of the invention by following technological means:
A kind of multimedia teaching control system, including:
Data acquisition module:Gather video flowing;Characterized in that, also include:
Interactive control module:The video flowing collected is handled, the profile of personage is identified by image recognition technology
And calculate profile central point and convex closure point so that it is determined that the position of hand, then according to the residence time decision instruction of hand, so as to
Make corresponding response action.
A kind of multimedia teaching control method, including:
(1) open camera and obtain background, under nobody environment, the purer image of one amplitude ratio of extraction is as background;
(2) current frame image is obtained, extracts the gray level image of personage's prospect;
Concretely comprise the following steps:The grey scale pixel value that L (x, y) is current frame image is set, B (x, y) is the pixel of background image
Gray value, D (x, y) are that the grey scale pixel value of foreground image then has:
D (x, y)=| L (x, y)-B (x, y) |
(3) threshold calculations are carried out to gray level image, obtains bianry image;
Concretely comprise the following steps:Assuming that f (x, y) is the pixel value of certain point in gray level image, d (x, y) is certain in bianry image
The pixel value of a bit, T are threshold value, then have
(4) edge gradient calculates, and detects the profile of personage;
(5) position of hand is determined, is concretely comprised the following steps:
According to the character contour detected in step (4), the central point of profile and the convex closure point of profile are calculated, according to obtaining
Profile central point and convex closure point, on x directions and y directions convex closure point is calculated respectively to the distance of profile central point, if x side
To distance be more than y directions on distance, then the convex closure point position is taken as the position of finger;
(6) repeat step (2)-(5), the position data of real-time hand is obtained;
(7) response events are triggered and carries out event response, specifically included:
The triggering of g1 events, when the position of continuous 3 two field picture finger is all in certain a small range, then be considered as finger
Position within continuous 3 frame position do not become, just trigger click event;
G2 is changed according to the size of present image and the resolution ratio of desktop screen, and the position of finger in the picture is turned
The position of desktop mouse click is changed to, can thus realize conversion of the finger position to the click response position of mouse, position
Conversion formula is specially:
Assuming that picture size size is (PicWidth, PicHight), desktop screen resolutions for (ScreenX,
ScreenY), the position of finger in the picture is (PicX, PicY), and the click location of desktop mouse is (x, y), then has:
As the further restriction to the technical program, the step (5) comprises the following steps:
Calculate concretely comprising the following steps for profile convex closure point:
Assuming that the point set of composition profile is S, any two points p (x in set are taken1,y1) and p (x2,y2), then this 2 points group
Into straight line be:Ax+by=c (wherein, a=y2-y1, b=x2-x1, c=x1y2-y1x2), by other all points concentrated
Linear equation ax+by=c is brought into respectively, if the symbol of expression formula is identical, all>C or all<C, then it represents that above-mentioned 2 points are the wheel
Wide convex closure point, is not otherwise just convex closure point,
Every opposite vertexes of profile are detected, find all convex closure points;
Calculate concretely comprising the following steps for profile central point:
Point all on profile is traveled through, total number a little is obtained, extracts the coordinate value of each point;
N=∑sI1
The average value of all point coordinates is sought, obtains the central point of profile
Wherein, profile point total number is N, and each point coordinate value is mtx (x, y), and center point coordinate is M (x, y).
Compared with prior art, the advantages and positive effects of the present invention are:The interactive control module of the present invention and control method
So that class-teaching of teacher need not employ the hardware devices such as mouse-keyboard, as long as pointing to the object setting time to be operated with finger, just
Corresponding button is can trigger, accomplishes that the interaction to courseware controls, the mode of attending class will be more nimbly and freely;Whole invention improves
The interest in classroom, has innovated teaching pattern, has reached more preferable teaching efficiency.
Brief description of the drawings
Fig. 1 is the flow chart of the present invention.
Embodiment:
With reference to embodiment, the present invention is further illustrated.
Referring to Fig. 1, the present invention includes:
A kind of multimedia teaching control system, including:
Data acquisition module:Gather video flowing;Characterized in that, also include:
Interactive control module:The video flowing collected is handled, the profile of personage is identified by image recognition technology
And calculate profile central point and convex closure point so that it is determined that the position of hand, then according to the residence time decision instruction of hand, so as to
Make corresponding response action.
A kind of multimedia teaching control method, including:
(1) open camera and obtain background, under nobody environment, the purer image of one amplitude ratio of extraction is as background;
(2) current frame image is obtained, extracts the gray level image of personage's prospect;
Concretely comprise the following steps:The grey scale pixel value that L (x, y) is current frame image is set, B (x, y) is the pixel of background image
Gray value, D (x, y) are that the grey scale pixel value of foreground image then has:
D (x, y)=| L (x, y)-B (x, y) |
(3) threshold calculations are carried out to gray level image, obtains bianry image;
Concretely comprise the following steps:Assuming that f (x, y) is the pixel value of certain point in gray level image, d (x, y) is certain in bianry image
The pixel value of a bit, T are threshold value, then have
(4) edge gradient calculates, and detects the profile of personage;
(5) position of hand is determined, is concretely comprised the following steps:
According to the character contour detected in step (4), the central point of profile and the convex closure point of profile are calculated, according to obtaining
Profile central point and convex closure point, on x directions and y directions convex closure point is calculated respectively to the distance of profile central point, if x side
To distance be more than y directions on distance, then the convex closure point position is taken as the position of finger;
(6) repeat step (2)-(5), the position data of real-time hand is obtained;
(7) response events are triggered and carries out event response, specifically included:
The triggering of g1 events, when the position of continuous 3 two field picture finger is all in certain a small range, then be considered as finger
Position within continuous 3 frame position do not become, just trigger click event;
G2 is changed according to the size of present image and the resolution ratio of desktop screen, and the position of finger in the picture is turned
The position of desktop mouse click is changed to, can thus realize conversion of the finger position to the click response position of mouse, position
Conversion formula is specially:
Assuming that picture size size is (PicWidth, PicHight), desktop screen resolutions for (ScreenX,
ScreenY), the position of finger in the picture is (PicX, PicY), and the click location of desktop mouse is (x, y), then has:
The step (5) comprises the following steps:
Calculate concretely comprising the following steps for profile convex closure point:
Assuming that the point set of composition profile is S, any two points p (x in set are taken1,y1) and p (x2,y2), then this 2 points group
Into straight line be:Ax+by=c (wherein, a=y2-y1, b=x2-x1, c=x1y2-y1x2), by other all points concentrated
Linear equation ax+by=c is brought into respectively, if the symbol of expression formula is identical, all>C or all<C, then it represents that above-mentioned 2 points are the wheel
Wide convex closure point, is not otherwise just convex closure point,
Every opposite vertexes of profile are detected, find all convex closure points;
Calculate concretely comprising the following steps for profile central point:
Point all on profile is traveled through, total number a little is obtained, extracts the coordinate value of each point;
N=∑sI1
The average value of all point coordinates is sought, obtains the central point of profile
Wherein, profile point total number is N, and each point coordinate value is mtx (x, y), and center point coordinate is M (x, y).