Skip to content

Commit 6540425

Browse files
committed
Added missing doc help. Reformatted pics layout in main README.
1 parent 0fc2683 commit 6540425

File tree

2 files changed

+32
-12
lines changed

2 files changed

+32
-12
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
usage: compute_motion_energy.py [-h] --invideo INVIDEO --outmotioncurve
2+
OUTMOTIONCURVE [--normalize]
3+
[--frame-start FRAME_START]
4+
[--frame-end FRAME_END]
5+
[--output-video OUTPUT_VIDEO]
6+
7+
Calculates the 'motion energy' of the input frame sequence. The motion energy
8+
is a mono-dimensional curve. Each sample is calculated by first computing the
9+
optical flow between consecutive frames and the summing up the magnitude of
10+
each flow vector. The resulting motion curve contains one frame less than the
11+
input sequences.
12+
13+
optional arguments:
14+
-h, --help show this help message and exit
15+
--invideo INVIDEO, -i INVIDEO
16+
Input video.
17+
--outmotioncurve OUTMOTIONCURVE, -o OUTMOTIONCURVE
18+
Path to the output motion energy data.
19+
--normalize If specified, normalizes the energy curve in the range
20+
[0,1] before saving it.
21+
--frame-start FRAME_START
22+
Start frame included in the motion energy computation
23+
(default 0: first frame).
24+
--frame-end FRAME_END
25+
End frame (excluded) in the motion energy computation
26+
(default: last frame of the video).
27+
--output-video OUTPUT_VIDEO, -ov OUTPUT_VIDEO
28+
Video output of the file.

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ Draws a rectangle as overlay of an input frame sequence
6464

6565
Watch here the [draw_bbox help text](Docs/Help/draw_bbox.txt)
6666

67-
<img src="Docs/Pics/video-original.png" width="20%" alt="Cropping area"> + bbox {"x": 227, "y": 200, "width": 741, "height": 442 }
68-
==>
69-
<img src="Docs/Pics/video-bboxarea.png" width="20%" alt="Cropping area">
67+
<img src="Docs/Pics/video-original.png" width="20%" alt="Cropping area"> + bbox {"x": 227, "y": 200, "width": 741, "height": 442 } ==> <img src="Docs/Pics/video-bboxarea.png" width="20%" alt="Cropping area">
7068

7169

7270
### Crop Video
@@ -81,9 +79,7 @@ python -m slvideotools.crop_video --help
8179
Watch here the [crop_video help text](Docs/Help/crop_video.txt)
8280

8381

84-
<img src="Docs/Pics/video-bboxarea.png" width="30%" alt="Cropping area">
85-
==>
86-
<img src="Docs/Pics/video-cropped.png" width="30%" alt="Cropped video">
82+
<img src="Docs/Pics/video-bboxarea.png" width="30%" alt="Cropping area"> ==> <img src="Docs/Pics/video-cropped.png" width="30%" alt="Cropped video">
8783

8884

8985
_Warning!!!_ The resolution of the output video might differ from the width/height specified in the JSON file. This is due to limitations of some codecs.
@@ -99,9 +95,7 @@ python -m slvideotools.extract_face_data --help
9995
Watch here the [extract_face_data help text](Docs/Help/extract_face_data.txt)
10096

10197

102-
<img src="Docs/Pics/video-original.png" width="30%" alt="Original Video">
103-
==>
104-
<img src="Docs/Pics/video-facedata.png" width="30%" alt="Face Data Overlay. Blue dots: MediaPipe landmarks. Red dots: normalized landmarks">
98+
<img src="Docs/Pics/video-original.png" width="30%" alt="Original Video">==><img src="Docs/Pics/video-facedata.png" width="30%" alt="Face Data Overlay. Blue dots: MediaPipe landmarks. Red dots: normalized landmarks">
10599

106100
For a reference about the landmark ID and its location on the face, please see the official MediaPipe docs [Here](https://raw.githubusercontent.com/google/mediapipe/master/mediapipe/modules/face_geometry/data/canonical_face_model_uv_visualization.png).
107101

@@ -143,9 +137,7 @@ Watch here the [compute_motion_energy help text](Docs/Help/compute_motion_energy
143137
The motion energy is a mono-dimensional curve.
144138
Each sample is calculated by first computing the optical flow between consecutive frames and then summing up the magnitude of each flow vector.
145139

146-
<img src="Docs/Pics/video_motion_energy_original.png" width="30%" alt="Video with moving face">
147-
==>
148-
<img src="Docs/Pics/video_motion_energy_computed.png" width="30%" alt="Computed motion energy">
140+
<img src="Docs/Pics/video_motion_energy_original.png" width="30%" alt="Video with moving face">==><img src="Docs/Pics/video_motion_energy_computed.png" width="30%" alt="Computed motion energy">
149141

150142

151143

0 commit comments

Comments
 (0)