diff --git a/implementations/main.cpp b/implementations/main.cpp index 789b6b9..36c2a3c 100644 --- a/implementations/main.cpp +++ b/implementations/main.cpp @@ -77,7 +77,7 @@ bool g_verbose = false; // feels. A frame costs four QTEE round trips regardless; the gap on top is // pure delay. int g_frameGapMs = 40; -int g_samples = 10; // common.max_enrolling_samples, as shipped +int g_samples = 20; // common.max_enrolling_samples, stock's value std::string g_logDir = "/var/log/fingerprintd"; std::string g_stateDir = "/var/lib/fingerprintd"; int g_rescan = -1; // -1 = leave the config's value alone diff --git a/packaging/fpenrol.sh b/packaging/fpenrol.sh index 3bf46f8..a8739eb 100755 --- a/packaging/fpenrol.sh +++ b/packaging/fpenrol.sh @@ -7,7 +7,9 @@ # roughly one position, and it matches roughly one frame in seven -- against # 47-75% for the template the research harness enrolled. The algorithm was # given ten near-duplicate images of one spot, so it recognises that spot and -# little else. +# little else. It accepted them because our config set none of stock's +# enrolment-quality keys and the trustlet's own defaults accept anything; +# those keys are now set, so the algorithm enforces the spread too. # # This walks a different contact position per accepted sample. It reads # fprintd-enroll's per-stage output and prompts the next position as each @@ -15,32 +17,46 @@ # how many times you pressed. F=${1:-right-middle-finger} i=1 +# Twenty positions, stock's sample count. The config now enforces stock's +# coverage and overlap thresholds, so a sample that does not move enough from +# the last one is REFUSED by the algorithm rather than stored -- the guidance +# and the enforcement finally agree. set -- "centre of the pad" \ "slightly LEFT of centre" \ "slightly RIGHT of centre" \ "higher up, toward the TIP" \ "lower down, toward the JOINT" \ - "centre again, rolled LEFT" \ - "centre again, rolled RIGHT" \ + "centre, rolled LEFT" \ + "centre, rolled RIGHT" \ "tip, rolled slightly left" \ "joint, rolled slightly right" \ - "centre, pressed a little firmer" -echo "enrolling $F with position guidance -- 10 samples" + "centre, a little firmer" \ + "far LEFT edge of the pad" \ + "far RIGHT edge of the pad" \ + "very tip of the finger" \ + "well down toward the joint" \ + "upper left of the pad" \ + "upper right of the pad" \ + "lower left of the pad" \ + "lower right of the pad" \ + "centre, rolled hard left" \ + "centre, rolled hard right" +echo "enrolling $F with position guidance -- 20 samples (stock's count)" echo "press FLAT and firm, hold about a second, then LIFT fully." echo # The reader runs in a subshell, so `shift` there cannot advance the caller's # list. Index into it instead. pos() { eval "printf '%s' \"\$$1\""; } -echo ">>> sample 1/10: $(pos 1)" +echo ">>> sample 1/20: $(pos 1)" fprintd-enroll -f "$F" user 2>&1 | while IFS= read -r line; do case "$line" in *enroll-stage-passed*) i=$((i+1)) - if [ "$i" -le 10 ]; then + if [ "$i" -le 20 ]; then echo " accepted." - echo ">>> sample $i/10: $(pos $i)" + echo ">>> sample $i/20: $(pos $i)" fi ;; - *enroll-retry-scan*) echo " not accepted -- same position, press flatter and firmer" ;; + *enroll-retry-scan*) echo " REFUSED -- move further from the last position, or press flatter" ;; *enroll-completed*) echo; echo "COMPLETED." ;; *enroll-failed*) echo; echo "FAILED." ;; *) printf '%s\n' "$line" ;;