From 0ad16dbbcc90cfcce8d501234bede051c08e8d75 Mon Sep 17 00:00:00 2001 From: Lincoln-LM Date: Fri, 7 Jan 2022 10:14:16 -0700 Subject: [PATCH] avoid resizing --- configs/config_phone_turnback.json | 21 +++++++++++++++++++++ images/phone_turnback/eye.png | Bin 0 -> 896 bytes src/rngtool.py | 10 ++++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 configs/config_phone_turnback.json create mode 100644 images/phone_turnback/eye.png diff --git a/configs/config_phone_turnback.json b/configs/config_phone_turnback.json new file mode 100644 index 0000000..7e46ae8 --- /dev/null +++ b/configs/config_phone_turnback.json @@ -0,0 +1,21 @@ +{ + "MonitorWindow": false, + "WindowPrefix": "", + "image": "./images/phone_turnback/eye.png", + "view": [ + 286, + 231, + 37, + 36 + ], + "thresh": 0.9, + "white_delay": 0.0, + "advance_delay": 0, + "crop": [ + 0, + 0, + 0, + 0 + ], + "camera": 3 +} \ No newline at end of file diff --git a/images/phone_turnback/eye.png b/images/phone_turnback/eye.png new file mode 100644 index 0000000000000000000000000000000000000000..c88172de3ea910675d27d254fe79debd35306a12 GIT binary patch literal 896 zcmV-`1AqL9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0~JX`K~y+TJyg+h z;zkhcT_Gf+!v+kT&w22JtNaJ|3-?|5zucu#aaCLur)B&Ge`osiw3m z?auUc_sYy4X72s{9WS$2tX3=3b&YnrjZd8}y4@x^oesjV1JCpDY2?8eqoG$-!{&L8 z1U2<_j*0p(gMzx{v|3Iv-)BkCbHgTVl! z(Ma|LE#bqLc0?-Ugvwfy2^VF7c)P*#;uW){5PH}lH?7MI=!a z;r#qugJUYdpogeh7=}9MlizKUtR-V22Fe8m%@#@`;I!ApmtQV07!T0xi{!lsRm*A1 z)9F+ZaZI_*qRbtwo@a&nVzr1>wk*qa5f{^`oD=c(=M>}d7&kXJYPvzc51X!6Na7{Z zRg65{id+>Uzl|si5VSl*g6zx17@t3n1p0}#!{n6ugBP>RcaE%=dD*zMR6s}tCKpw% zIgr_*P=uwRBBH(^xV*f?Pm(5`&=V(eBeM?{oFRpCF& WUHZP= 1920: + frame = cv2.resize(frame,(960,round(fh/fw*960))) time_counter = time.perf_counter() roi = cv2.cvtColor(frame[roi_y:roi_y+roi_h,roi_x:roi_x+roi_w],cv2.COLOR_RGB2GRAY) if (roi==prev_roi).all(): @@ -214,7 +217,10 @@ def tracking_poke_blink(img, roi_x, roi_y, roi_w, roi_h, size = 60, MonitorWindo while len(intervals)= 1920: + frame = cv2.resize(frame,(960,round(fh/fw*960))) time_counter = time.perf_counter() roi = cv2.cvtColor(frame[roi_y:roi_y+roi_h,roi_x:roi_x+roi_w],cv2.COLOR_RGB2GRAY)