-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
531 additions
and
528 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
51 changes: 0 additions & 51 deletions
51
SerialPrograms/Source/Pokemon/Inference/Pokemon_IVCheckerReader.h
This file was deleted.
Oops, something went wrong.
This file contains 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
51 changes: 51 additions & 0 deletions
51
SerialPrograms/Source/Pokemon/Inference/Pokemon_IvJudgeReader.h
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* IV Judge Reader | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#ifndef PokemonAutomation_Pokemon_IvJudgeReader_H | ||
#define PokemonAutomation_Pokemon_IvJudgeReader_H | ||
|
||
#include "CommonFramework/OCR/OCR_SmallDictionaryMatcher.h" | ||
#include "Pokemon/Pokemon_IvJudge.h" | ||
|
||
namespace PokemonAutomation{ | ||
namespace Pokemon{ | ||
|
||
|
||
|
||
class IvJudgeReader : public OCR::SmallDictionaryMatcher{ | ||
public: | ||
static constexpr double MAX_LOG10P = -1.40; | ||
static constexpr double MAX_LOG10P_SPREAD = 0.50; | ||
|
||
public: | ||
struct Results{ | ||
IvJudgeValue hp = IvJudgeValue::UnableToDetect; | ||
IvJudgeValue attack = IvJudgeValue::UnableToDetect; | ||
IvJudgeValue defense = IvJudgeValue::UnableToDetect; | ||
IvJudgeValue spatk = IvJudgeValue::UnableToDetect; | ||
IvJudgeValue spdef = IvJudgeValue::UnableToDetect; | ||
IvJudgeValue speed = IvJudgeValue::UnableToDetect; | ||
|
||
std::string to_string() const; | ||
}; | ||
|
||
IvJudgeReader(const std::string& json_path); | ||
|
||
OCR::StringMatchResult read_substring( | ||
Logger& logger, | ||
Language language, | ||
const ImageViewRGB32& image, | ||
const std::vector<OCR::TextColorRange>& text_color_ranges, | ||
double min_text_ratio = 0.01, double max_text_ratio = 0.50 | ||
) const; | ||
|
||
}; | ||
|
||
|
||
|
||
} | ||
} | ||
#endif |
This file contains 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
Oops, something went wrong.