A kind of visual analysis method of pair of football match formation variation and flow of personnel
Technical field
The present invention relates to football match data analysing methods, in particular to a kind of pair of football match formation variation and personnel's stream
Dynamic visual analysis method.
Background technique
Computer vision technique was widely used in sports tournament in past 20 years, such as the hawkeye skill in tennis tournament
Art, can quickly rebuild the tennis drop point of high-speed motion, and be shown with three-dimensional animation.Similarly, many computer visions
The research of aspect expands discussion also for football match.And since football match has its particularity, scene background color is more dull,
Therefore traditional method can first be cut into the green background in court, then the detection of sportsman is carried out for remainder.And
Common video data all derives from live telecast, therefore has some researchs to lay particular emphasis on and detect the position of Player of live telecast
Come, then is projected in two-dimensional court by homography matrix.Wherein main problem is that live telecast is always paid close attention near ball
Sportsman, live streaming picture can lose a large amount of sportsman letter.The a large amount of work of computer vision all concentrates on depth in recent years
In habit, such as pedestrian detection.For the sportsman of football match, such detection method is feasible, but our data compared with
To be special, accounting of the sportsman in panoramic video is very small, and neural network can lose largely during carrying out down-sampling
Sportsman's feature, therefore cause detection effect bad.
Visualization technique be widely used one by one in the past few years sport analysis in, as table tennis, basketball,
Tennis, ice hockey etc..And in terms of football, visualization technique is also applied in all kinds of Visualized Analysis Systems.For example, having ball
The track of doing exercises of member is integrated into the visual work in match video, has and is watched in the different Competition Phases using novel view
The visualization system of football match also has the visual work etc. for ball or the suffered oppression value of sportsman.These work all from
Different aspect improves the effect and efficiency of football analysis.
However, few people pay close attention to most heavy in this team's tactics of troop's formation in the visual work of these footballs
The part wanted.
Summary of the invention
The present invention is to provide the visual analysis method of a kind of pair of football match formation variation and flow of personnel, provides data and adopts
The mode and preprocess method of collection, to football analysis associated specialist provide analysis data supporting, while to formation data into
It has gone visualization, can quickly find the feature of formation variation.
A kind of visual analysis method of pair of football match formation variation and flow of personnel, comprising the following steps:
(1) data are obtained, data include position of Player data, football position data, court generation event data and ball-handling
Information;
(2) two-dimentional ball field model is established, by the position of Player data projection in step (1) into court, and to positional number
According to being smoothed;
(3) the position of Player data in step (1) are clustered, obtains overall formation information;
(4) data obtained in step (1), (2), (3) are visualized, visual image include formation visualization,
Match Real-time Data Visualization and game event visualization.
Preferably, in step (1), the mode of human-computer interaction has been used to adopt both sides position of Player data on football pitch
Collection: using the method for particle filter color combining histogram, selecting field player, carries out automatic tracing to selected sportsman;
When several position of Player overlap, interlock, trace error is generated, the method manually corrected is combined at this time, again on field
The position of sportsman be acquired.
Preferably, in step (2), two-sphere field data is the size based on true court, is built as origin for one jiao using court
Vertical coordinate system establishes the mapping relations in panoramic video between court and two-dimentional ball field model, defines a series of passes on court
Key point p1..., pkAnd target point d1..., dk, x and y coordinates are X=(x1, x2..., xk) and Y=(y1, y2..., yk), it builds
Vertical homography matrix mapping is as follows:
In order to optimize effect of visualization, it is preferred that in step (2), smoothing processing has used efficient linear filter, right
The location information of timing carries out mean filter processing, removes the positional jitter generated between frame and frame because of random error.
Preferably, in step (3), obtaining overall formation information, detailed process is as follows:
Gauss hybrid models combination k-means algorithm can be used, the position of each sportsman on court is clustered,
Specific algorithm is as follows:
The position of Player information for defining each frame of a certain team is p0,1, p0,2..., p0,11, centralization processing is carried out to it, often
One location information subtracts the mean place of all sportsmen of the frame, and the player information for obtaining a certain each frame of team after centralization is
p1, p2..., p11;
Assuming that the formation of team has stability, even if other positions have been arrived in team member's activity, it will usually there is its teammate
Cover is carried out, therefore sportsman's scope of activities of a position meets Gaussian Profile in formation, specific algorithm is as follows:
3-1, initialization Gaussian Profile, using the position of Player of first frame as the mean value of initial distribution, the variance of distribution is adopted
Use random digit generation method;
3-2, traversal next frame, the cost for being assigned to j-th of position for calculating i-th bit sportsman is cI, j=-log (pI, j),
Wherein, pI, jIn the case where belonging to j-th of position for this sportsman, the size of i-th bit sportsman's probability density function;If that
One sportsman belongs to some position, then its probability density function in the distribution can be bigger, then the value of cost function is got over
It is small.Problem is converted into assignment problem at this time, distributes 11 sportsmen, so that total cost is minimum.It is used during calculating
Hungary Algorithm efficiently calculates result;
3-3, distributed intelligence is updated, the mean value and variance of the position of the sportsman belonged in some distribution is calculated, to table
The expectation and variance for showing distribution, the basis as next frame iteration;
3-4, each frame of traversal, the sportsman of each frame is sorted out respectively, obtains the distribution results of first round iteration, wherein often
One distribution all contains expectation and variance;
3-5, the initial value for taking turns iteration as second using the result of last round of iteration, traverse each frame, to obtain new one
The iteration result of wheel;
3-6, an iteration taken turns is carried out, until distribution is stablized, difference is less than threshold value.
Preferably, formation visualization indicates the variation of formation in the whole match and sportsman in the form of Sang Jitu
Flow of personnel information.
Preferably, formation visualizes: visualizing, and can be indicated to the variation of formation in normal play with stream view
Mobility status of the personnel in formation out.Timeline is further comprised in stream view, is indicated in normal play on timeline
Critical event, such as substitution, yellow card, red card, goal.
Preferably, match Real-time Data Visualization is shown along the data variation on the time field of line, including players'
It runs distance, formation area coverage, pass success rate, ball-handling time etc.;Competing Real-time Data Visualization can be by sportsman's formation
Structure triangulation is simultaneously covered on original video again in real time, is more favorable for coach and is analyzed video.
Preferably, game event visualizes, and shows critical event on the time line, and goal is shown in list of thing
Event clicks goal event, can play goal video;It is moved on the time line with mouse, video phase can be jumped in real time
Time point for answering simultaneously plays out.
Beneficial effects of the present invention:
Visual analysis method to the variation of football match formation and flow of personnel of the invention, provides for football data
Acquisition mode and preprocess method, the data supporting of analysis is provided to football analysis associated specialist, while to formation data
It is visualized, convenient for the feature of discovery formation variation.
Detailed description of the invention
Fig. 1 is the flow chart of the visual analysis method of the invention to the variation of football match formation and flow of personnel.
Fig. 2 is the format chart of original video before the processing of part A in Fig. 1.
Fig. 3 is the effect diagram of sportsman's tracing algorithm of part B in Fig. 1.
Fig. 4 is the schematic diagram that two-dimensional map is done to position of Player obtained by Fig. 3.
Fig. 5 is that the iteration convergence schematic diagram clustered is made to formation in the method for the present invention.
Fig. 6 is in the method for the present invention by the formation general view come detected by algorithm schematic diagram corresponding with true formation.
Specific embodiment
As shown in figs. 1 to 6, the visual analysis method to the variation of football match formation and flow of personnel of the present embodiment, needle
Visual analysis work to the especially formation variation of football match data provides the data branch of analysis to football analysis associated specialist
Support, while formation data are visualized, convenient for the feature of discovery formation variation.
The visual analysis method to the variation of football match formation and flow of personnel of the present embodiment, comprising the following steps:
(1) data are obtained, data include position of Player data, football position data, event data occurs for court, ball-handling is believed
Breath.Wherein position of Player data and football position data have x, V, t attribute, respectively indicate its two-dimensional coordinate in video
And temporal information.Information of controlling ball is the player information of each frame ball-handling, and sportsman starts to calculate after obtaining ball, until ball is another
Name sportsman obtains;
It has used the mode of human-computer interaction to be acquired the position data of 22 sportsmen of both sides on football pitch: having used particle
The method for filtering color combining histogram, selectes field player, and machine carries out automatic tracing to selected sportsman;In several balls
When member position overlaps, interlocks, machine generates trace error, the method manually corrected is combined at this time, again to the ball on field
The position of member is acquired.In addition, also having redesigned a data collector, ball can be weighed during competing real-time perfoming
It is acquired with court data, improves data acquisition efficiency;
(2) two-dimentional ball field model is established, sportsman's match position data is projected in court, and position data is carried out flat
Sliding processing;
Two-sphere field data is the size based on true court, establishes coordinate system as origin for one jiao using court, establishes panorama
Mapping relations in video between court and two-dimentional ball field model, define a series of key point p on court first1..., pkWith
And target point d1..., dk, x and y coordinates are X=(x1, x2..., xk) and Y=(y1, y2..., yk).Establish homography matrix mapping
It is as follows:
For resulting two-dimensional position information using smoothing processing, algorithm has used efficient linear filtering after mapping
Device carries out mean filter processing to the location information of timing, removes the position generated between frame and frame because of random error and tremble
It is dynamic, optimize effect of visualization.
(3) formation data generating algorithm clusters position of Player information using algorithm, obtains overall formation letter
Breath;
Formation data generating algorithm has used gauss hybrid models combination k-means algorithm, to each sportsman on court
Position clustered;
The position of Player information for defining each frame of a certain team first is p0,1, p0,2..., p0,11, it is carried out at centralization
Reason, each location information subtract the mean place of all sportsmen of the frame, obtain sportsman's letter of a certain each frame of team after centralization
Breath is p1, p2..., p11.Assuming that the formation of team has stability, even if other positions have been arrived in team member's activity, it will usually
There is its teammate to carry out cover, therefore sportsman's scope of activities of a position meets Gaussian Profile in formation, specific algorithm is as follows:
3-1, initialization Gaussian Profile, using the position of Player of first frame as the mean value of initial distribution, the variance of distribution is adopted
Use random digit generation method.
3-2, traversal next frame, the cost for being assigned to j-th of position for calculating i-th bit sportsman is cI, j=-log (PI, j),
Wherein pI, jIf belonging to j-th of position for this sportsman, the size of probability density function.If that a sportsman belongs to
Some position, then its probability density function in the distribution can be bigger, then the value of cost function is smaller.Problem turns at this time
Assignment problem is turned to, 11 sportsmen are distributed, so that total cost is minimum.Hungary Algorithm has been used during calculating, it is high
Calculate result to effect;
3-3, distributed intelligence is updated.The mean value and variance for calculating the position of the sportsman belonged in some distribution, to table
The expectation and variance for showing distribution, the basis as next frame iteration;
3-4, each frame of traversal, the sportsman of each frame is sorted out respectively, obtains the distribution results of first round iteration, wherein often
One distribution all contains expectation and variance;
3-5, the initial value for taking turns iteration as second using the result of last round of iteration, traverse each frame, to obtain new one
The iteration result of wheel;
3-6, an iteration taken turns is carried out, until distribution is stablized, difference is less than threshold value.
(4) data obtained in step (1), (2), (3) are visualized, visual image mainly includes that formation is visual
Change, match Real-time Data Visualization and game event visualize.The form that Sang Jitu is mainly utilized in formation visualization carrys out table
Show the flow of personnel information of the variation of formation and sportsman in the whole match.The design of visualization system includes three views:
Formation visualization: the variation of formation in normal play is visualized with stream view, and personnel can be represented
Mobility status in formation.Timeline is further comprised in stream view, the crucial thing in normal play is indicated on timeline
Part, such as substitution, yellow card, red card, goal.
Compete Real-time Data Visualization: show along the data variation on the time field of line, including players run away from
From, formation area coverage, pass success rate, ball-handling time etc.;
Game event visualization: showing critical event on the time line, and show goal event in list of thing, point
Goal event is hit, goal video can be played;It is moved on the time line with mouse, the video corresponding time can be jumped in real time
It puts and plays out;
Match Real-time Data Visualization can be covered on again by sportsman's pattern formation triangulation and in real time original
On video, it is more favorable for coach and video is analyzed.