From 699dd0be77064fb8d13ab5d2a655946641998a5a Mon Sep 17 00:00:00 2001 From: niart120 <38847256+niart120@users.noreply.github.com> Date: Thu, 23 Dec 2021 01:02:45 +0900 Subject: [PATCH] Update rngtool.py --- src/rngtool.py | 68 ++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/src/rngtool.py b/src/rngtool.py index 8b56047..5c64347 100644 --- a/src/rngtool.py +++ b/src/rngtool.py @@ -16,7 +16,7 @@ def randrange(r,mi,ma): t = (r & 0x7fffff) / 8388607.0 return t * mi + (1.0 - t) * ma -def tracking_blink(img, roi_x, roi_y, roi_w, roi_h, size = 40)->Tuple[List[int],List[int],float]: +def tracking_blink(img, roi_x, roi_y, roi_w, roi_h, th = 0.9, size = 40)->Tuple[List[int],List[int],float]: """measuring the type and interval of player's blinks Returns: @@ -52,7 +52,10 @@ def tracking_blink(img, roi_x, roi_y, roi_w, roi_h, size = 40)->Tuple[List[int], res = cv2.matchTemplate(roi,eye,cv2.TM_CCOEFF_NORMED) _, match, _, _ = cv2.minMaxLoc(res) - if 0.01Xorshift: result.getNextRandSequence(advanced_frame) return result -def reidentifyByBlinks(rng:Xorshift, observed_blinks:List[int], search_max=10**6, search_min=0)->Xorshift: +def reidentifyByBlinks(rng:Xorshift, observed_blinks:List[int], npc = 0, search_max=10**6, search_min=0)->Xorshift: if search_max