From a8247d4ecda9e123d8f5333295ea3819cedf8604 Mon Sep 17 00:00:00 2001 From: EZ Date: Sat, 11 Jul 2026 20:50:15 -0700 Subject: [PATCH] Increased Detector Tolerances Increased RMSD values for Pokopia detectors --- .../Inference/PokemonPokopia_ButtonDetector.cpp | 6 +++--- .../PokemonPokopia/Inference/PokemonPokopia_PCDetection.cpp | 4 ++-- .../Inference/PokemonPokopia_SelectionArrowDetector.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_ButtonDetector.cpp b/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_ButtonDetector.cpp index 94c3116b90..a59f5d8eae 100644 --- a/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_ButtonDetector.cpp +++ b/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_ButtonDetector.cpp @@ -27,15 +27,15 @@ class ButtonMatcher : public ImageMatch::WaterfillTemplateMatcher{ // - min_height: candidate image min height if video stream is 1080p ButtonMatcher(ButtonType type, size_t min_width, size_t min_height, double max_rmsd); static const ButtonMatcher& A(){ - static ButtonMatcher matcher(ButtonType::ButtonA, 40, 40, 70); + static ButtonMatcher matcher(ButtonType::ButtonA, 40, 40, 100); return matcher; } static const ButtonMatcher& DpadLeft(){ - static ButtonMatcher matcher(ButtonType::ButtonDpadLeft, 30, 30, 120); + static ButtonMatcher matcher(ButtonType::ButtonDpadLeft, 25, 25, 120); return matcher; } static const ButtonMatcher& DpadRight(){ - static ButtonMatcher matcher(ButtonType::ButtonDpadRight, 30, 30, 120); + static ButtonMatcher matcher(ButtonType::ButtonDpadRight, 25, 25, 120); return matcher; } diff --git a/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_PCDetection.cpp b/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_PCDetection.cpp index 8a89bfa53c..343ca03b78 100644 --- a/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_PCDetection.cpp +++ b/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_PCDetection.cpp @@ -96,7 +96,7 @@ class StampMatcher : public ImageMatch::WaterfillTemplateMatcher{ // - min_height: candidate image min height if video stream is 1080p StampMatcher(Stamp stamp, size_t min_width, size_t min_height, double max_rmsd); static const StampMatcher& mew(){ - static StampMatcher matcher(Stamp::MEW, 40, 40, 70); + static StampMatcher matcher(Stamp::MEW, 40, 40, 100); return matcher; } @@ -260,7 +260,7 @@ bool RecipeIconDetector::detect(const ImageViewRGB32& screen){ double screen_rel_size_2 = screen_rel_size * screen_rel_size; double min_area_1080p = 500; - double rmsd_threshold = 95; + double rmsd_threshold = 100; size_t min_area = size_t(screen_rel_size_2 * min_area_1080p); const std::vector> FILTERS = { diff --git a/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_SelectionArrowDetector.cpp b/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_SelectionArrowDetector.cpp index d74d5369ac..04fba9fcbb 100644 --- a/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_SelectionArrowDetector.cpp +++ b/SerialPrograms/Source/PokemonPokopia/Inference/PokemonPokopia_SelectionArrowDetector.cpp @@ -72,7 +72,7 @@ bool SelectionArrowDetector::detect(const ImageViewRGB32& screen){ double screen_rel_size_2 = screen_rel_size * screen_rel_size; double min_area_1080p = 400; - double rmsd_threshold = 80; + double rmsd_threshold = 100; size_t min_area = size_t(screen_rel_size_2 * min_area_1080p); const std::vector> FILTERS = {