Skip to content

Commit

Permalink
Add more tolerance to green summary page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysticial committed Oct 16, 2023
1 parent 85aa41d commit 925167d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ void TestProgramComputer::program(ProgramEnvironment& env, CancellableScope& sco
// using namespace NintendoSwitch::PokemonSwSh::MaxLairInternal;


ImageRGB32 image("screenshot-20231016-130205783594.png");
PokemonSummaryDetector detector;
cout << detector.detect(image) << endl;



#if 0
ImageRGB32 image("screenshot-20231005-203932147068.png");
SummaryStatsReader reader;
// cout << detector.detect(image) << endl;
Expand All @@ -246,7 +253,7 @@ void TestProgramComputer::program(ProgramEnvironment& env, CancellableScope& sco
cout << (int)nature.spatk << endl;
cout << (int)nature.spdef << endl;
cout << (int)nature.speed << endl;

#endif



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ namespace PokemonSV{
bool is_summary_color(const ImageStats& stats){
return is_solid(stats, {0.648549, 0.2861580, 0.0652928}, 0.15, 20) // Scarlet
|| is_solid(stats, {0.367816, 0.0746615, 0.5575230}, 0.15, 20) // Violet
|| is_solid(stats, {0.196536, 0.5933000, 0.2101630}, 0.18, 20); // DLC Green
|| is_solid(stats, {0.196536, 0.5933000, 0.2101630}, 0.18, 20) // DLC Green
|| (stats.average.g / stats.average.sum()) > 0.5; // DLC Green
}


Expand Down

0 comments on commit 925167d

Please sign in to comment.