(root)/ – Rev 37438
Rev 37437 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 37438 2026-08-27 06:38:15
- Author: amit
- Log message:
- Oppo: aim by tracking the ring element, not by re-detecting circles
r37437's closed loop could not close. Production, 13 minutes:
step 0 (probe) ok 36
lost the circles 32 (25 of them on step 1, right after the main move)
aligned within 2px 0
The probe worked and derived sane ratios (0.75-1.00), then the next measurement
returned null nearly every time and the loop bailed.
The cause is structural, not a tuning miss. getMatCircles2 needs Hough to resolve
TWO circles of similar radius, and as the ring closes on the hole they overlap and
stop being two. The measurement dies exactly at convergence, so no loop built on
"distance between two detected circles" can ever verify success. The old refine()
hit the same wall and silently released, which is why it never helped either.
So detection is now used ONCE, for what it is good at -- locating the hole while
the two are still far apart -- and from then on we track the ring's OWN element,
dx_captcha_basic_sub-slider_, whose rect stays readable however close it gets.
Validated on the live widget before committing:
bg element page x=556, width 288 CSS
ring centre page 598 -> 42 relative to bg
dark target 138 relative to bg -> page 694, gap 96px
The ring sits in the same 0-288 CSS space as OpenCV's x values, so bg.x + circleX
is directly comparable to the ring's position. That holds because getMatCircles2
crops by CSS coordinates and chrome runs --force-device-scale-factor=1. A 96px gap
matches the range production logs as "Distance is".
Also validated earlier that the ring's rect tracks a drag cleanly the whole way in
(+10 mouse -> +11 ring, repeatably), which is the property the circle detection
lacks.
The ratio is still derived per move and is now signed, so overshoot corrects itself
rather than needing to be detected. No screenshot or Hough pass per step either, so
the drag is quicker as well.
Oppo only. Realme is converting 78% and is not touched.