Fix pupil overflow and cross-platform tracker bugs - #19
Open
OpenNerdz wants to merge 1 commit into
Open
Conversation
Address several correctness and portability bugs that made tracking unstable or prevented the project from running outside Windows. - Cast gray-pixel sums and thresholds to int so uint8 overflow no longer corrupts darkest-area search and binary thresholding - Fix contour length check operator precedence (len(arr) > 5) - Restore stuck-ellipse overlay drawing in the stereo tracker - Open cameras with CAP_ANY on macOS/Linux instead of CAP_MSMF-only - Replace keyboard package hotkeys with OpenCV waitKey (Head/Webcam trackers) - Write screen_position.txt next to the script instead of a hardcoded C: path - Prefer local eye_test.mp4 and local output paths in pupil detectors - Pin MediaPipe to versions that still expose solutions.face_mesh Verified with compile checks and headless smoke tests on eye_test.mp4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a few correctness bugs in the 3D pupil trackers and makes Head/Webcam tooling work more reliably outside Windows.
Pupil / stereo tracking
intsouint8overflow no longer corrupts darkest-area search (search region could jump or lock onto the wrong spot).len(arr > 5)→len(arr) > 5.draw_stuck_ellipses()in the stereo tracker so E/C ellipse capture actually draws.Cross-platform
CAP_ANY.keyboardpackage with OpenCVwaitKey(toggle mouse with m; no root on Linux/macOS).screen_position.txtnext to the script instead of a hardcodedC:/...path.eye_test.mp4/ local output paths.>=0.10.5,<0.10.15sosolutions.face_meshstill installs cleanly.Test plan
eye_test.mp4(stereo + mono; no overflow warnings)