Skip to content

Commit 6416c2d

Browse files
author
arch
committed
add better scaling options
1 parent 01b8054 commit 6416c2d

20 files changed

+84
-25
lines changed

docs/app/docs/user-guide/config.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Config Files:
3333
- `equirectangular_scaling` (float): scaling parameter for the equirectangular preview window. `1.0` is `1240x720`, `1.5` would be `1860x1080`, ... (Do not use to high scaling values, the perspective calculation need a lot of computer resources!)
3434

3535
- `tracking_direction` (str): Specify the tracking direction. Allowed values are `'x'` and `'y'`.
36+
- `scaling_method` (str): Specify the scaling method for the video before apply tracking and the preview window size. Allowed values are `'auto'` and `'config'`. `'auto'`: try to calculate the scaling depending on your screen resolution. If you have a very high screen resolution e.g. 8K Monitor this option will strongly slow down the tracking speed, because all videos are scaled up/down to 8K before tracking. If you set `'config'` the scaling form `video_scaling.json` will be used. You can adjust this config to your like as described in the documentation on github.
3637
- `max_playback_fps` (int): Limit the max player speed in the tracking preview window (0 = disable limit)
3738

3839
#### `video_scaling.json`
@@ -44,9 +45,9 @@ The entries in this config file consist of a pair of values.
4445
Example config:
4546

4647
```json
47-
{ "1920": 1.0, "3500": 0.5, "5000": 0.25 }
48+
{ "0": 2.0, "1000": 1.0, "3500": 0.5, "5000": 0.25 }
4849
```
4950

50-
One pair in the example config is e.g. `"1920": 1.0`. Each pair of values defines which scaling should be used for which video resolution. The first value, refers to the video width in pixels. Videos with size larger than 1920 pixels horizontally use a scaling of `1.0`. Videos with 3500 pixel and more are scaled with `0.5` and from 5000 with `0.25`. All videos which are smaller than the smallest value (in this case 1920) are scaled always with `1.0` (original size). You can enter as many values as you want and change the existing scaling.
51+
One pair in the example config is e.g. `"0": 2.0`. Each pair of values defines which scaling should be used for which video resolution. The first value, refers to the video width in pixels. Videos with size larger than 0 pixels horizontally use a scaling of `2.0`. Videos with 1000 pixel and more are scaled with `1.0`, from 3500 with `0.5` and from 5000 with `0.25`. You can enter as many values as you want and change the existing scaling.
5152

5253
It’s best to look at your screen resolution and calculate which scaling you need for which video size so that the window fits on the monitor. e.g. You have `1920x1080` screen and `5400x2700` Video, you can divide `1920 / 5400 = 0.36` → add `"5300": 0.35` to the config (the key value have to be a little bit smaller than the Video resolution to apply the correct scaling).

docs/app/site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
204204

205205
<!--
206206
MkDocs version : 1.1.2
207-
Build Date UTC : 2021-06-27 08:31:10.353033+00:00
207+
Build Date UTC : 2021-06-27 10:05:14.619159+00:00
208208
-->

docs/app/site/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/app/site/sitemap.xml.gz

0 Bytes
Binary file not shown.

docs/app/site/user-guide/config/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,24 @@ <h4 id="hyperparameteryaml"><code>hyperparameter.yaml</code></h4>
135135
<h4 id="settingsyaml"><code>settings.yaml</code></h4>
136136
<ul>
137137
<li><code>use_zoom</code> (bool): Enable or disable an additional step to zoom in the Video before selecting a tracking feature for the Woman or Men.</li>
138+
<li><code>zoom_factor:</code> (float): Set the desired zoom value which will be used when the zoom function is activated.</li>
138139
<li><code>use_equirectangular</code> (bool): Convert video in normal perspective view before apply tracking. This should improve the tracking at the border of videos, because there is the distortion very high.</li>
139140
<li>
140141
<p><code>equirectangular_scaling</code> (float): scaling parameter for the equirectangular preview window. <code>1.0</code> is <code>1240x720</code>, <code>1.5</code> would be <code>1860x1080</code>, ... (Do not use to high scaling values, the perspective calculation need a lot of computer resources!)</p>
141142
</li>
142143
<li>
143144
<p><code>tracking_direction</code> (str): Specify the tracking direction. Allowed values are <code>'x'</code> and <code>'y'</code>.</p>
144145
</li>
146+
<li><code>scaling_method</code> (str): Specify the scaling method for the video before apply tracking and the preview window size. Allowed values are <code>'auto'</code> and <code>'config'</code>. <code>'auto'</code>: try to calculate the scaling depending on your screen resolution. If you have a very high screen resolution e.g. 8K Monitor this option will strongly slow down the tracking speed, because all videos are scaled up/down to 8K before tracking. If you set <code>'config'</code> the scaling form <code>video_scaling.json</code> will be used. You can adjust this config to your like as described in the documentation on github.</li>
145147
<li><code>max_playback_fps</code> (int): Limit the max player speed in the tracking preview window (0 = disable limit)</li>
146148
</ul>
147149
<h4 id="video_scalingjson"><code>video_scaling.json</code></h4>
148150
<p>The <code>video_scaling.json</code> config file specifies how the video get scaled bevor the tracking. The scaling also apply tho the preview size. If the preview to select the tracking feature is to small or to large you have to adjust this config file.</p>
149151
<p>The entries in this config file consist of a pair of values.</p>
150152
<p>Example config:</p>
151-
<pre><code class="language-json">{ &quot;1920&quot;: 1.0, &quot;3500&quot;: 0.5, &quot;5000&quot;: 0.25 }
153+
<pre><code class="language-json">{ &quot;0&quot;: 2.0, &quot;1000&quot;: 1.0, &quot;3500&quot;: 0.5, &quot;5000&quot;: 0.25 }
152154
</code></pre>
153-
<p>One pair in the example config is e.g. <code>"1920": 1.0</code>. Each pair of values defines which scaling should be used for which video resolution. The first value, refers to the video width in pixels. Videos with size larger than 1920 pixels horizontally use a scaling of <code>1.0</code>. Videos with 3500 pixel and more are scaled with <code>0.5</code> and from 5000 with <code>0.25</code>. All videos which are smaller than the smallest value (in this case 1920) are scaled always with <code>1.0</code> (original size). You can enter as many values as you want and change the existing scaling.</p>
155+
<p>One pair in the example config is e.g. <code>"0": 2.0</code>. Each pair of values defines which scaling should be used for which video resolution. The first value, refers to the video width in pixels. Videos with size larger than 0 pixels horizontally use a scaling of <code>2.0</code>. Videos with 1000 pixel and more are scaled with <code>1.0</code>, from 3500 with <code>0.5</code> and from 5000 with <code>0.25</code>. You can enter as many values as you want and change the existing scaling.</p>
154156
<p>It’s best to look at your screen resolution and calculate which scaling you need for which video size so that the window fits on the monitor. e.g. You have <code>1920x1080</code> screen and <code>5400x2700</code> Video, you can divide <code>1920 / 5400 = 0.36</code> → add <code>"5300": 0.35</code> to the config (the key value have to be a little bit smaller than the Video resolution to apply the correct scaling).</p></div>
155157
</div>
156158
</div>
732 Bytes
Binary file not shown.
5.67 KB
Binary file not shown.
344 Bytes
Binary file not shown.
96 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)