CN109030854A - A kind of walking speed measurement method based on RGB image - Google Patents
A kind of walking speed measurement method based on RGB image Download PDFInfo
- Publication number
- CN109030854A CN109030854A CN201810589119.5A CN201810589119A CN109030854A CN 109030854 A CN109030854 A CN 109030854A CN 201810589119 A CN201810589119 A CN 201810589119A CN 109030854 A CN109030854 A CN 109030854A
- Authority
- CN
- China
- Prior art keywords
- marker
- indicate
- sportsman
- image
- picture
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000691 measurement method Methods 0.000 title claims abstract description 22
- 239000003550 marker Substances 0.000 claims abstract description 105
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 17
- 238000004364 calculation method Methods 0.000 claims description 34
- 230000033001 locomotion Effects 0.000 claims description 15
- 238000000605 extraction Methods 0.000 claims description 11
- 238000001514 detection method Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 claims description 4
- 230000011218 segmentation Effects 0.000 claims description 4
- 238000002372 labelling Methods 0.000 claims description 3
- 230000001629 suppression Effects 0.000 claims description 3
- 238000005259 measurement Methods 0.000 abstract description 17
- 230000000694 effects Effects 0.000 abstract description 3
- 238000000034 method Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 2
- 238000003909 pattern recognition Methods 0.000 description 2
- 230000002123 temporal effect Effects 0.000 description 2
- WUBBRNOQWQTFEX-UHFFFAOYSA-N 4-aminosalicylic acid Chemical compound NC1=CC=C(C(O)=O)C(O)=C1 WUBBRNOQWQTFEX-UHFFFAOYSA-N 0.000 description 1
- 241000208340 Araliaceae Species 0.000 description 1
- 241000212384 Bifora Species 0.000 description 1
- 208000010086 Hypertelorism Diseases 0.000 description 1
- 206010020771 Hypertelorism of orbit Diseases 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000007794 visualization technique Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01P—MEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
- G01P3/00—Measuring linear or angular speed; Measuring differences of linear or angular speeds
- G01P3/64—Devices characterised by the determination of the time taken to traverse a fixed distance
- G01P3/68—Devices characterised by the determination of the time taken to traverse a fixed distance using optical means, i.e. using infrared, visible, or ultraviolet light
Abstract
The walking speed measurement method based on RGB image that the invention discloses a kind of, is related to walking speed measurement method field;It includes the following steps 1: acquisition, pretreatment image;Step 2: being detected by HOG feature and obtain the position of sportsman in the picture, the position of marker in the picture is obtained by Grabcut algorithm;Step 3: whether starting mark object and post object are passed through according to the threshold decision sportsman of berth, marker position and setting, if, it then calculates sportsman to pass through the duration of starting mark object and post object and skip to step 4, if it is not, then repeating the step;Step 4: the distance of zequin marker and post object solves sportsman's leg speed by the duration of starting mark object and post object in conjunction with sportsman;The present invention realizes the accurate positioning of marker, solves the problems, such as larger because lacking the measurement error caused by the object of reference in the existing walking speed measurement method based on image, achievees the effect that precise measurement sportsman's leg speed.
Description
Technical field
The present invention relates to walking speed measurement method field, especially a kind of walking speed measurement method based on RGB image.
Background technique
Pedestrian's tachometric survey has great significance in real life, and the walking speed measurement in sport track and field contest matter is for inspection
The index for surveying sportsman is particularly significant;Walking speed measurement method can be divided into: one, sensor-based walking speed measurement, two, be based on image
Walking speed measurement;Sensor-based walking speed measurement device can measure user by the speed detector with user
Speed;Method based on sensor measurement leg speed has very much, and Bishop is mounted on the accelerator meter at shank position using two
Leg speed is calculated, the posture of inverted pendulum independent is striden the period as one;Park estimates leg speed using handheld device, it is required that ginseng
A three axis accelerators, which are held, with person carries out tachometric survey;Gomez using a kind of wearable visual sensor device, with
Test point is installed on the glasses of family, the leg speed of user is calculated using the equipment;Road is eternally happy et al. propose it is a kind of based on MEMS inertia
The human body multi-pattern recognition algorithm of sensor chooses the temporal signatures of MEMS acceleration transducer as pattern-recognition feature
Amount, the temporal signatures for extracting MEMS angular-rate sensor realize leg speed detection as the characteristic quantity of secondary identification;Based on sensor
Method in, on the one hand due to tester's carry sensors, lead to not normally play, so influence test result;Another party
Face leads to not real time speed measuring since sensor device transmission needs the time.Method measurement leg speed based on image also has very much,
For example Gu et al. uses a kind of visualization method, estimates leg speed using single RGB camera tracking 2D node coordinate with this;Zhang Jia
It is good et al. competing using Qualisys three-dimensional motion capture system i.e. 8 camera and 2 pieces of Kistler ergograph synchronous acquisition body-building
It walks, common body-building is walked, the kinematics run and dynamics index;Qin Jian outstanding person et al. uses three camera methods, uses Liang Tai Sony
HXR-NX100 type video camera, to last eight sportsman proceed to the 19th circle when, the technical movements at finishing line 1km into
Row fixed point shooting;Wang Peng et al. parses video using APAS and Dartfish4.5, and it is used to control human body using Japanese Matsui show
Property parameter model, and choose 19 artis, one of Digital Study object multiple step, using the low pass number of cut frequency 8Hz
The smooth 3D of word filter method handles match image with Dartfish software.
Although having been achieved for the experimental results in terms of walking speed measurement, do not have in image in the method based on image
Have apart from object of reference, the practical distance passed through of people is calculated by the position of people in RGB image, obtained distance can camera subject itself
The factors such as parameter, picture quality influence, and cause walking speed measurement resultant error big.Therefore it needs a kind of high-precision based on image
Walking speed measurement method.
Summary of the invention
It is an object of the invention to: the walking speed measurement method based on RGB image that the present invention provides a kind of solves existing
Lack in image in walking speed measurement method based on image apart from object of reference to cause measurement result to be missed by many factors influence
The big problem of difference.
The technical solution adopted by the invention is as follows:
A kind of walking speed measurement method based on RGB image, includes the following steps:
Step 1: acquisition, pretreatment image;
Step 2: being detected by HOG feature and obtain the position of sportsman in the picture, indicated by Grabcut algorithm
The position of object in the picture;
Step 3: whether starting point is passed through according to the threshold decision sportsman of berth, marker position and setting
Marker and post object pass through the duration of starting mark object and post object and skip to step if so, calculating sportsman
Rapid 4, if it is not, then repeating the step;
Step 4: the distance based on step 2 zequin marker and post object passes through starting point mark in conjunction with sportsman
The duration of will object and post object solves sportsman's leg speed.
Preferably, the step 1 includes the following steps:
Step 1.1: camera and marker are determined according to marker image height h in the height H of marker and camera
Vertical range D, calculation formula is as follows:
Wherein, f indicates the focal length of camera;
Step 1.2: fixing camera being installed according to the vertical range of camera and marker and carries out Image Acquisition;
Step 1.3: the image of acquisition being subjected to the operations such as change of scale, gray processing and obtains pretreated image.
Preferably, it includes following step that being detected in the step 2 by HOG feature, which obtains the position of sportsman in the picture,
It is rapid:
Step S2.1.1: forming sliding window using HOG feature, and according to horizontal (direction x), (direction y) is upward to the right and vertically
Direction, after determining its step-length according to filling size, feature extraction is carried out to pretreated image, calculation formula is as follows:
G(xi,yi)=dx(xi,yi)+dy(xi,yi)
dx(xi,yi)=I (xi+1,yi)-I(xi,yi)
dy(xi,yi)=I (xi,yi+1)-I(xi,yi)
Wherein, I (xi,yi) indicate i-th point of input picture of pixel value, G (xi,yi) indicate input picture gradient, dx
(xi,yi) indicate input picture horizontal gradient, dy(xi,yi) indicate input picture vertical gradient;
Step S2.1.2: the feature of extraction is input in the model SVM trained, and obtaining sportsman in the image may
Multiple rectangle frames in the region at place;
Step S2.1.3: the optimal frame in multiple rectangle frames is obtained by non-maximum suppression NMS and calculates multiple rectangle frames
Friendship and than IOU, select to hand over and rectangle frame more the smallest than IOU be as optimal frame;
Step S2.1.4: sportsman's detection: by the coordinate of optimal frame, the center for calculating berth obtains sportsman
Position in the picture, calculation formula are as follows:
Wherein, (xi,yi) indicate that optimal frame apex coordinate, N indicate number of vertices, xciIndicate the horizontal seat of berth
Mark, yciIndicate the ordinate of berth.
Preferably, the position of marker in the picture is obtained including walking as follows by Grabcut algorithm in the step 2
It is rapid:
Step S2.2.1: to pretreated image labeling area-of-interest, that is, ROI;
Step S2.2.2: being split ROI using Grabcut algorithm, obtains source node, that is, prospect mark, sink
Node, that is, background indicia and foreground image pixel establish the new figure comprising all ROI foreground image pixels, wherein prospect
Refer to marker;
Step S2.2.3: it by successive ignition using the pixel being connect with source node as prospect, will be saved with sink
The pixel of point connection completes the segmentation of display foreground and background as background, and the upper left of foreground image is obtained by formula
Angular coordinate, width and height, calculation formula are as follows:
Pick (x, y, w, h)
Wherein, x indicates the upper left corner abscissa of foreground image, and y indicates the upper left corner ordinate of foreground image, before w expression
The width of scape image, h indicate the height of foreground image;
Step S2.2.4: the abscissa of marker is calculated by the abscissa in the foreground image upper left corner and its width, is calculated
Formula is as follows:
xbi=x+w/2
Wherein, xbiIndicate the abscissa of marker.
Preferably, the step 3 includes the following steps:
Step 3.1: comparing, analyze the relative position of sportsman and marker in the picture, according to the abscissa of sportsman
xciWith the abscissa x of markerbiThe difference for calculating the two, difference is compared with the threshold value σ of setting, sportsman is advanced
After the corresponding position of difference of first, the direction less than threshold value is as timing point, determine that sportsman is risen by first marker
Point marker and second marker, that is, post object, and the time for passing through starting mark object and post object is recorded, meter
It is as follows to calculate formula:
Wherein, tiIndicate the time by marker, tsIndicate the time by starting mark object, teExpression passes through terminal
The time of marker, xciIndicate the abscissa of current frame motion person, xb1Indicate the abscissa of first marker, xb2Indicate the
The abscissa of two markers, σ indicate the threshold value of setting;
Step 3.2: calculating the duration t for passing through starting mark object and post objectf:
Wherein, tpIndicate the time needed for handling each frame picture.
Preferably, the step 4 includes the following steps:
Step 4.1: according to camera and marker distance D, it is known that camera field angle θ, zequin marker and
The distance L of post object, calculation formula are as follows:
Step 4.2: according to the distance L of starting mark object and post object and passing through starting mark object and post
The duration t of objectfThe leg speed of sportsman is calculated, calculation formula is as follows:
Wherein, λ indicates the step-length of ordinary movement person.
Preferably, the step-length is calculated according to sportsman's height, and calculation formula is as follows:
SG=λ * 0.54+132
Wherein, SG indicates height, and unit cm, λ indicate the step-length of ordinary movement person.
Preferably, the threshold value σ calculation formula of the setting is as follows:
Wherein, σ indicates the threshold value of setting, WfIndicate the pixel value of picture traverse, WrIndicate that camera lens range, v indicate to run
Leg speed degree, fps indicate video number of pictures per second.
In conclusion by adopting the above-described technical solution, the beneficial effects of the present invention are:
1. the present invention determines position of the marker in video/image by Grabcut algorithm, detected by HOG feature
The position of sportsman in image determines time started and end according to the threshold value of berth, marker position and setting
Time determines that sportsman by marker, obtains the duration by marker, solves movement in conjunction with by the distance of marker
The leg speed of member solves and lacks in image in the existing walking speed measurement method based on image apart from object of reference to by many factors
The problem for influencing to cause measuring result error big, has reached accurate positioning marker, has accurately calculated the effect of sportsman's leg speed;
2. the present invention needs that HOG characteristics algorithm is overcome to be influenced by sportsman's height and figure, when calculating leg speed according to
Height material calculation, further decreases measurement error;
3. the horizontal distance between vertical range and marker of the rationally setting sportsman apart from camera of the invention, avoids
Because hypertelorism camera cannot take marker completely, the disadvantage that the instantaneous velocity of sportsman causes error larger is measured;
4. measurement object of the invention be sportsman, speed differ larger with general measure object, each frame image
The distance that middle sportsman advances is related with speed, and threshold value, the abscissa of judgement symbol object location and berth is rationally arranged
The size of difference and threshold value determines that sportsman avoids direct calculating figure to calculate corresponding time and distance by marker
The disadvantage for causing measurement error big apart from influences such as camera subject factors that people passes through as in is accurately positioned marker, is conducive to improve
The precision that leg speed calculates.
Detailed description of the invention
Examples of the present invention will be described by way of reference to the accompanying drawings, in which:
Fig. 1 is method flow block diagram of the invention;
Fig. 2 is flow chart of the method for the present invention;
Fig. 3 is imaging schematic diagram of the invention;
Fig. 4 is that camera of the invention puts schematic diagram;
Fig. 5 is leg speed calculation flow chart of the present invention;
Fig. 6 is sportsman's overhaul flow chart of the invention;
Fig. 7 is marker detection flow chart of the invention.
Specific embodiment
All features disclosed in this specification or disclosed all methods or in the process the step of, in addition to mutually exclusive
Feature and/or step other than, can combine in any way.
It elaborates below with reference to Fig. 1-7 couples of present invention.
The application technical problems to be solved: it is detected by HOG feature and obtains the position of sportsman in the picture, passed through
Grabcut algorithm obtains the position of marker in the picture, according to the berth of acquisition and marker position, in conjunction with threshold value
Judge whether sportsman passes through start point/end point marker, obtains the duration for passing through starting mark object and post object, calculate
The distance of point marker and post object, to seek the leg speed of sportsman;The technical scheme steps of use are as follows: step 1:
Acquisition, pretreatment image;Step 2: being detected by HOG feature and obtain the position of sportsman in the picture, pass through Grabcut algorithm
Obtain the position of marker in the picture;Step 3: being transported according to the threshold decision of berth, marker position and setting
It whether mobilizes by starting mark object and post object, if so, calculating sportsman passes through starting mark object and terminal mark
The duration of will object simultaneously skips to step 4, if it is not, then explanation cannot start timing, needs to repeat step 3 until its difference is less than threshold
Value records the time at this time as starting or terminal time and calculates duration;Step 4: based on step 2 zequin marker and
The distance of post object solves sportsman's leg speed by the duration of starting mark object and post object in conjunction with sportsman.Its
In, determine that sportsman uses the abscissa of comparing motion person position and marker position by starting mark object and post object
It is determined less than the threshold value of setting, records the corresponding time respectively after determining;Need to overcome the spacing of marker in measurement process
Problem guarantees the reasonability of the position of camera and the vertical range of marker, avoids sportsman too small in the picture or mistake
Greatly, need rationally to be arranged camera at a distance from sportsman.
Embodiment 1
It acquires data: obtaining the image/video of sportsman and marker by multimedia equipment;
Pretreatment: the image/video of sportsman and marker to acquisition carry out the operation such as change of scale, gray processing, go
Except pretreatment is completed in the influence of illumination, noise;
Feature extraction: feature extraction is carried out using HOG to player image/video;To the RGB of marker image/video
Triple channel establishes model GM M and carries out feature extraction, marks area-of-interest, that is, ROI;GMM is used to model foreground and background,
When each iteration, learn and create new pixel distribution, and classify to foreground and background, the foundation of classification is upper one
Prospect or background pixel value in secondary iteration.
Classification: player image/video features of extraction are put into the model SVM trained and obtain the possibility of sportsman
Multiple rectangle frames of region select optimal frame to calculate the position of sportsman in the picture;Using Grabcut algorithm to ROI
It is split, obtains source node, that is, prospect mark, sink node, that is, background indicia and foreground image pixel, establish packet
New figure containing all ROI foreground image pixels, wherein prospect refers to marker;Display foreground and background are completed after successive ignition
Accurate Segmentation, and the position of calculation flag object in the picture;
Time measurement: by comparing the relative position of sportsman and marker, judge sportsman by recording after marker
By its time, by first marker be starting mark object, second marker is post object, judges to move
Member is the threshold size of comparing motion person position abscissa Yu marker position abscissa difference and setting by marker, is compared
Calculation formula it is as follows:
Wherein, tiIndicate the time by marker, tsIndicate the time by starting mark object, teExpression passes through terminal
The time of marker, xciIndicate the abscissa of current frame motion person, xb1Indicate the abscissa of first marker, xb2Indicate the
The abscissa of two markers, σ indicate the threshold value of setting;
Calculate the duration t for passing through starting mark object and post objectf:
Wherein, tpIndicate the time needed for handling each frame picture.
Calculate leg speed: according to the duration and starting mark object and post for passing through starting mark object and post object
Object distance calculates leg speed according to formula:
Wherein, L indicates starting mark object and post object distance, tfIt indicates to pass through starting mark object and post object
Duration, λ indicate ordinary movement person step-length.
Embodiment 2
Acquisition, pretreatment:
Imaging schematic diagram as shown in Figure 3:
Step 1.1: camera and marker are determined according to marker image height h in the height H of marker and camera
Vertical range D, calculation formula is as follows:
Wherein, f indicates the focal length of camera, value 45mm;The height H of marker is 0.75m;Original image size
It is 300 pixel of 300dpi i.e. one inch for 1280 × 720, resolution ratio, therefore pixel size are as follows: (300*2.54)/(1280*
720)=0.0083cm/pixel;Marker accounts for 85 pixel in image vertical direction, can get the image height h of marker
For 0.7cm, it can thus be concluded that the vertical range D=4.9m of camera and marker;
Step 1.2: fixing camera being installed according to the vertical range of camera and marker and carries out Image Acquisition;
Step 1.3: the image of acquisition being subjected to the operations such as change of scale, gray processing and completes pretreatment.
Sportsman's detection:
Step S2.1.1: forming sliding window using HOG feature, and according to horizontal (direction x), (direction y) is upward to the right and vertically
Direction, after determining its step-length according to filling size, feature extraction is carried out to pretreated image, calculation formula is as follows:
G(xi,yi)=dx(xi,yi)+dy(xi,yi)
dx(xi,yi)=I (xi+1,yi)-I(xi,yi)
dy(xi,yi)=I (xi,yi+1)-I(xi,yi)
Wherein, I (xi,yi) indicate i-th point of input picture of pixel value, G (xi,yi) indicate input picture gradient, dx
(xi,yi) indicate input picture horizontal gradient, dy(xi,yi) indicate input picture vertical gradient;It is divided by between single pixel
Step-length, pixel separation is smaller, and image traversal degree is wider, further increases the accuracy of feature extraction, image completion padding
For N, the horizontal and vertical step-length value of sliding window is N/2, and 1.05 times of image augmentation, the present embodiment padding takes 8, laterally walks
Long and longitudinal step-length takes 4;
Step S2.1.2: acquisition sportsman may region in the model SVM that the feature input after extraction has been trained
Multiple rectangle frames;
Step S2.1.3: optimal frame in multiple rectangle frames is obtained by non-maximum suppression (NMS), that is, calculates multiple rectangle frames
Friendship and than IOU, select to hand over and rectangle frame more the smallest than IOU be as optimal frame;
Step S2.1.4: sportsman's detection: by the coordinate of optimal frame, the center for calculating sportsman obtains sportsman and is scheming
Position as in, calculation formula are as follows:
Wherein, (xi,yi) indicate that optimal frame apex coordinate, N indicate number of vertices, xciIndicate the horizontal seat of berth
Mark, yciIndicate the ordinate of berth.
Marker detection:
Step S2.2.1: to pretreated image labeling area-of-interest, that is, ROI;
Step S2.2.2: being split ROI using Grabcut algorithm, obtains source node, that is, prospect mark, sink
Node, that is, background indicia and foreground image pixel establish the new figure comprising all ROI foreground image pixels, wherein prospect
Refer to that marker, Grabcut algorithm establish gauss hybrid models GMM to RGB triple channel, GMM is as follows:
Wherein, N (x | μk,Σk) indicate GMM k-th of element, K is mixed coefficint, meet
πkExpression N (x | μk,Σk) weight;GMM is used to model foreground and background, in each iteration, learns and creates new
Pixel distribution, and classify to foreground and background, the foundation of classification is prospect or background pixel value in last iteration,
Grabcut algorithm keeps foreground image more accurate by constantly iteration.
Step S2.2.3: it by successive ignition using the pixel being connect with source node as prospect, will be saved with sink
The pixel of point connection completes the segmentation of display foreground and background as background, and the upper left of foreground image is obtained by formula
Angular coordinate, width and height, calculation formula are as follows:
Pick (x, y, w, h)
Wherein, x indicates the upper left corner abscissa of foreground image, and y indicates the upper left corner ordinate of foreground image, before w expression
The width of scape image, h indicate the height of foreground image;
Step S2.2.4: the abscissa of marker is calculated by the abscissa in the foreground image upper left corner and its width, is calculated
Formula is as follows:
xbi=x+w/2
Wherein, xbiIndicate the abscissa of marker.
Sportsman is determined by starting mark object and post object and calculates its duration:
Step 3.1: comparing, analyze the relative position of sportsman and marker in the picture, according to the abscissa of sportsman
The difference that the two is calculated with the abscissa of marker, difference is compared with the threshold value of setting, multiple differences are small if it exists
In threshold value, then first difference position of sportsman's direction of advance is chosen as timing point, when the cross of two markers and sportsman
Coordinate difference is respectively less than the threshold value σ set, it is determined that sportsman passes through first marker, that is, starting mark object and second mark
Will object, that is, post object, and the time for passing through starting mark object and post object is recorded, calculation formula is as follows:
Wherein, tiIndicate the time by marker, tsIndicate the time by starting mark object, teExpression passes through terminal
The time of marker, xciIndicate the abscissa of current frame motion person, xb1Indicate the abscissa of first marker, xb2Indicate the
The abscissa of two markers, σ indicate the threshold value of setting;The threshold value σ of setting can be obtained according to formula, and specific formula for calculation is such as
Under: the threshold value σ calculation formula of the setting is as follows:
Wherein, σ indicates the threshold value of setting, WfIndicate the pixel value of picture traverse, WrIndicate that camera lens range, v indicate to run
Leg speed degree, fps indicate video number of pictures per second;
In the present embodiment, calculates the parameter of threshold value and be known or give according to the actual situation, the application will combine this
A little parameters calculate threshold value, ensure that the accuracy of the setting of threshold value;Learn that the prestissimo i.e. v of people's 100-meter dash is according to investigation
10m/s, it is 25fps that sportsman's footrace, which shoots video, shoots camera under 1280*720 scale, the pixel value W of picture traversefFor
1280, camera lens range WrFor 10m, therefore sportsman's max pixel value mobile in each frame of direction of advance is obtained by above data
It is 51.2, so the threshold value set is 50, which can be effectively detected whether people passes through marker.
Step 3.2: calculating the duration t for passing through starting mark object and post objectf:
Wherein, tpIndicate the time needed for handling each frame picture.
Calculate leg speed: as shown in Figure 4:
Step 4.1: according to camera and marker distance D, it is known that camera field angle θ, between calculation flag object away from
From L, calculation formula is as follows:
Actual measurement can obtain camera field angle θ=90 °, it can thus be concluded that L=9.8m;
Step 4.2: the distance of the starting mark object and post object that obtain according to step 4.1 and passing through starting mark
The leg speed of the duration calculation sportsman of object and post object, calculation formula are as follows:
Wherein, L indicates the distance between mark, tfIndicate the duration by starting mark object and post object, λ indicates general
The step-length of logical sportsman.
Step-length is calculated according to sportsman's height, and calculation formula is as follows:
SG=λ * 0.54+132
Wherein, SG indicates height, and unit cm, λ indicate the step-length of ordinary movement person.
For example height is 178cm, it is 85cm that step-length is practical, calculated value 85.18cm, which passes through several sportsmen
Personnel test, the formula for counting and analyzing, and accuracy is high.
To sum up, the present invention determines position of the marker in video/image by Grabcut algorithm, is examined by HOG feature
The position of sportsman in altimetric image determines time started and knot according to the threshold value of berth, marker position and setting
The beam time determines that sportsman by marker, obtains the duration by marker, solves fortune in conjunction with by the distance of marker
The leg speed of mobilization, solve lack in image in the existing walking speed measurement method based on image apart from object of reference to by it is a variety of because
Element influences the problem for causing measuring result error big, has reached accurate positioning marker, has accurately calculated the effect of sportsman's leg speed.
Claims (8)
1. a kind of walking speed measurement method based on RGB image, characterized by the following steps:
Step 1: acquisition, pretreatment image;
Step 2: being detected by HOG feature and obtain the position of sportsman in the picture, marker is obtained by Grabcut algorithm and is existed
Position in image;
Step 3: whether starting mark is passed through according to the threshold decision sportsman of berth, marker position and setting
Object and post object pass through the duration of starting mark object and post object and skip to step 4 if so, calculating sportsman,
If it is not, then repeating the step;
Step 4: the distance based on step 2 zequin marker and post object passes through starting mark object in conjunction with sportsman
Sportsman's leg speed is solved with the duration of post object.
2. a kind of walking speed measurement method based on RGB image according to claim 1, it is characterised in that: step 1 packet
Include following steps:
Step 1.1: hanging down for camera and marker is determined according to marker image height h in the height H of marker and camera
Directly distance D, calculation formula are as follows:
Wherein, f indicates the focal length of camera;
Step 1.2: fixing camera being installed according to the vertical range of camera and marker and carries out Image Acquisition;
Step 1.3: the image of acquisition being subjected to the operations such as change of scale, gray processing and obtains pretreated image.
3. a kind of walking speed measurement method based on RGB image according to claim 2, it is characterised in that: in the step 2
Detected by HOG feature and obtain sportsman position in the picture and include the following steps:
Step S2.1.1: forming sliding window using HOG feature, to the right and vertical (direction y) the upward side according to horizontal (direction x)
To after determining its step-length according to filling size, to the progress feature extraction of pretreated image, calculation formula is as follows:
G(xi,yi)=dx(xi,yi)+dy(xi,yi)
dx(xi,yi)=I (xi+1,yi)-I(xi,yi)
dy(xi,yi)=I (xi,yi+1)-I(xi,yi)
Wherein, I (xi,yi) indicate i-th point of input picture of pixel value, G (xi,yi) indicate input picture gradient, dx(xi,
yi) indicate input picture horizontal gradient, dy(xi,yi) indicate input picture vertical gradient;
Step S2.1.2: the feature of extraction is input in the model SVM trained, and obtaining sportsman in the image may place
Region multiple rectangle frames;
Step S2.1.3: the friendship that the optimal frame in multiple rectangle frames calculates multiple rectangle frames is obtained by non-maximum suppression NMS
And than IOU, selects to hand over and rectangle frame more the smallest than IOU is as optimal frame;
Step S2.1.4: sportsman's detection: by the coordinate of optimal frame, the center for calculating berth obtains sportsman and is scheming
Position as in, calculation formula are as follows:
Wherein, (xi,yi) indicate that optimal frame apex coordinate, N indicate number of vertices, xciIndicate the abscissa of berth, yci
Indicate the ordinate of berth.
4. a kind of walking speed measurement method based on RGB image according to claim 3, it is characterised in that: in the step 2
Marker position in the picture obtained by Grabcut algorithm include the following steps:
Step S2.2.1: to pretreated image labeling area-of-interest, that is, ROI;
Step S2.2.2: being split ROI using Grabcut algorithm, obtains source node, that is, prospect mark, sink node
That is background indicia and foreground image pixel establish the new figure comprising all ROI foreground image pixels, wherein prospect index
Will object;
Step S2.2.3: by successive ignition using the pixel being connect with source node as prospect, will connect with sink node
The pixel connect completes the segmentation of display foreground and background as background, and is sat by the upper left corner that formula obtains foreground image
Mark, width and height, calculation formula are as follows:
Pick (x, y, w, h)
Wherein, x indicates that the upper left corner abscissa of foreground image, y indicate that the upper left corner ordinate of foreground image, w indicate foreground picture
The width of picture, h indicate the height of foreground image;
Step S2.2.4: the abscissa of marker, calculation formula are calculated by the abscissa in the foreground image upper left corner and its width
It is as follows:
xbi=x+w/2
Wherein, xbiIndicate the abscissa of marker.
5. a kind of walking speed measurement method based on RGB image according to claim 4, it is characterised in that: step 3 packet
Include following steps:
Step 3.1: comparing, analyze the relative position of sportsman and marker in the picture, according to the abscissa x of sportsmanciWith
The abscissa x of markerbiThe difference both calculated, difference is compared with the threshold value σ of setting, by sportsman's direction of advance the
After one corresponding position of difference less than threshold value is as timing point, determine that sportsman passes through first marker i.e. starting mark
Object and second marker, that is, post object, and record the time for passing through starting mark object and post object, calculation formula
It is as follows:
Wherein, tiIndicate the time by marker, tsIndicate the time by starting mark object, teExpression passes through post
The time of object, xciIndicate the abscissa of current frame motion person, xb1Indicate the abscissa of first marker, xb2Indicate second
The abscissa of marker, σ indicate the threshold value of setting;
Step 3.2: calculating the duration t for passing through starting mark object and post objectf:
Wherein, tpIndicate the time needed for handling each frame picture.
6. a kind of walking speed measurement method based on RGB image according to claim 5, it is characterised in that: step 4 packet
Include following steps:
Step 4.1: according to camera and marker distance D, it is known that camera field angle θ, zequin marker and terminal
The distance L of marker, calculation formula are as follows:
Step 4.2: according to the distance L of starting mark object and post object and passing through starting mark object and post object
Duration tfThe leg speed of sportsman is calculated, calculation formula is as follows:
Wherein, λ indicates the step-length of ordinary movement person.
7. a kind of walking speed measurement method based on RGB image according to claim 6, it is characterised in that: the step-length root
It is calculated according to sportsman's height, calculation formula is as follows:
SG=λ * 0.54+132
Wherein, SG indicates height, and unit cm, λ indicate the step-length of ordinary movement person.
8. a kind of walking speed measurement method based on RGB image according to claim 5, it is characterised in that: the setting
Threshold value σ calculation formula is as follows:
Wherein, σ indicates the threshold value of setting, WfIndicate the pixel value of picture traverse, WrIndicate that camera lens range, v indicate running speed
Degree, fps indicate video number of pictures per second.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810589119.5A CN109030854B (en) | 2018-06-08 | 2018-06-08 | Pace measuring method based on RGB image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810589119.5A CN109030854B (en) | 2018-06-08 | 2018-06-08 | Pace measuring method based on RGB image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109030854A true CN109030854A (en) | 2018-12-18 |
CN109030854B CN109030854B (en) | 2020-11-10 |
Family
ID=64612527
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810589119.5A Active CN109030854B (en) | 2018-06-08 | 2018-06-08 | Pace measuring method based on RGB image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109030854B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110349415A (en) * | 2019-06-26 | 2019-10-18 | 江西理工大学 | A kind of running speed measurement method based on multi-scale transform |
CN110991413A (en) * | 2019-12-20 | 2020-04-10 | 西南交通大学 | Running detection method based on ReiD |
CN112485461A (en) * | 2020-10-21 | 2021-03-12 | 国网电力科学研究院有限公司 | Power inspection robot speed detection system and method based on multi-vision markers |
WO2021143716A1 (en) * | 2020-01-13 | 2021-07-22 | 目骉资讯有限公司 | Deep learning-based horse speed calculation system and method thereof |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103861265A (en) * | 2012-12-18 | 2014-06-18 | 卡西欧计算机株式会社 | Exercise support device, exercise support method, and exercise support program |
KR101633619B1 (en) * | 2016-03-23 | 2016-06-27 | 주식회사 토페스 | Method and apparatus for detecting velocity of vehicle using recognizing number of the vehicle of 2-dimensional image |
EP3040678A1 (en) * | 2014-12-29 | 2016-07-06 | Nuctech Company Limited | Photogrammetry system and photogrammetry method |
CN106447726A (en) * | 2016-08-23 | 2017-02-22 | 广西科技大学 | Method for vision detection on body position of athlete during climbing |
CN107315095A (en) * | 2017-06-19 | 2017-11-03 | 哈尔滨工业大学 | Many vehicle automatic speed-measuring methods with illumination adaptability based on Video processing |
-
2018
- 2018-06-08 CN CN201810589119.5A patent/CN109030854B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103861265A (en) * | 2012-12-18 | 2014-06-18 | 卡西欧计算机株式会社 | Exercise support device, exercise support method, and exercise support program |
EP3040678A1 (en) * | 2014-12-29 | 2016-07-06 | Nuctech Company Limited | Photogrammetry system and photogrammetry method |
KR101633619B1 (en) * | 2016-03-23 | 2016-06-27 | 주식회사 토페스 | Method and apparatus for detecting velocity of vehicle using recognizing number of the vehicle of 2-dimensional image |
CN106447726A (en) * | 2016-08-23 | 2017-02-22 | 广西科技大学 | Method for vision detection on body position of athlete during climbing |
CN107315095A (en) * | 2017-06-19 | 2017-11-03 | 哈尔滨工业大学 | Many vehicle automatic speed-measuring methods with illumination adaptability based on Video processing |
Non-Patent Citations (1)
Title |
---|
B. FOSTY等: "Accuracy and reliability of the RGB-D camera for measuring walking speed on a treadmill", 《GAIT & POSTURE》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110349415A (en) * | 2019-06-26 | 2019-10-18 | 江西理工大学 | A kind of running speed measurement method based on multi-scale transform |
CN110349415B (en) * | 2019-06-26 | 2021-08-20 | 江西理工大学 | Driving speed measuring method based on multi-scale transformation |
CN110991413A (en) * | 2019-12-20 | 2020-04-10 | 西南交通大学 | Running detection method based on ReiD |
WO2021143716A1 (en) * | 2020-01-13 | 2021-07-22 | 目骉资讯有限公司 | Deep learning-based horse speed calculation system and method thereof |
CN112485461A (en) * | 2020-10-21 | 2021-03-12 | 国网电力科学研究院有限公司 | Power inspection robot speed detection system and method based on multi-vision markers |
Also Published As
Publication number | Publication date |
---|---|
CN109030854B (en) | 2020-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109030854A (en) | A kind of walking speed measurement method based on RGB image | |
CN109522854A (en) | A kind of pedestrian traffic statistical method based on deep learning and multiple target tracking | |
CN102706319B (en) | Distance calibration and measurement method and system based on image shoot | |
CN104183127B (en) | Traffic surveillance video detection method and device | |
CN103099602B (en) | Based on the physical examinations method and system of optical identification | |
CN106375706A (en) | Method and apparatus for velocity measurement of moving object by use of double pick-up heads, and terminal | |
CN109598242A (en) | A kind of novel biopsy method | |
CN110084197A (en) | Bus passenger flow volume statistical method and system based on deep learning | |
CN104665838B (en) | Physical examinations method and system | |
CN109145708A (en) | A kind of people flow rate statistical method based on the fusion of RGB and D information | |
CN109583373A (en) | A kind of pedestrian identifies implementation method again | |
CN110009675A (en) | Generate method, apparatus, medium and the equipment of disparity map | |
CN104778676A (en) | Depth ranging-based moving target detection method and system | |
Schramm et al. | Data fusion for 3D thermal imaging using depth and stereo camera for robust self-localization | |
CN103096117B (en) | Video noise detection method and device | |
Ancona et al. | Goal detection in football by using support vector machines for classification | |
Qi et al. | Alpine skiing tracking method based on deep learning and correlation filter | |
CN101021948A (en) | Automatic identifying device and method for joint in human body symmetric motion image | |
CN110298864A (en) | A kind of vision sensing method and device of golf push rod equipment | |
KR101703316B1 (en) | Method and apparatus for measuring velocity based on image | |
CN113763444B (en) | Phase unwrapped three-dimensional face reconstruction method and system for hierarchical line pairing | |
CN105761504B (en) | Speed method for real-time measurement based on the collection of non-homogeneous video frame image | |
JP3947456B2 (en) | Stride measuring device and stride measuring method | |
CN114067427A (en) | Snake-shaped running assessment method and system, electronic equipment and storage medium | |
CN114359817A (en) | People flow measuring method based on entrance and exit pedestrian identification |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |