Skip to content

Commit 52ec33f

Browse files
author
arch
committed
improve processing speed
1 parent 2a86688 commit 52ec33f

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

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 16:10:17.226076+00:00
207+
Build Date UTC : 2021-06-27 17:20:43.616076+00:00
208208
-->

docs/app/site/sitemap.xml.gz

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

funscript_editor/algorithms/funscriptgenerator.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ def scale_score(self, status: str, direction : str = 'y') -> None:
329329

330330
if successMin and successMax:
331331
if self.params.use_equirectangular:
332-
dim = (int(self.params.equirectangular_width*self.params.equirectangular_scaling), int(self.params.equirectangular_height*self.params.equirectangular_scaling))
332+
dim = (int(self.params.equirectangular_width*self.params.equirectangular_scaling), \
333+
int(self.params.equirectangular_height*self.params.equirectangular_scaling))
333334
imgMin = cv2.resize(imgMin, dim)
334335
imgMax = cv2.resize(imgMax, dim)
335336
else:
@@ -432,6 +433,12 @@ def get_perspective_roi(self, image :np.ndarray) -> None:
432433
'width': int(self.params.equirectangular_width*self.params.equirectangular_scaling)
433434
}
434435

436+
if image.shape[0] > 6000 or image.shape[1] > 6000:
437+
image = cv2.resize(image, None, fx=0.25, fy=0.25)
438+
439+
if image.shape[0] > 3000 or image.shape[1] > 3000:
440+
image = cv2.resize(image, None, fx=0.5, fy=0.5)
441+
435442
selected = False
436443
while not selected:
437444
preview = EquirectangularVideoStream.get_perspective(

funscript_editor/config/hyperparameter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ top_threshold: 5.0
2727

2828
# Define the bottom threshold. All bottom points lower than (min + threshold) will be set to
2929
# the specified min value. Set 0.0 to disable this function.
30-
bottom_threshold: 5.0
30+
bottom_threshold: 10.0

0 commit comments

Comments
 (0)