44 {
45 tesseract::CheckSharedLibraryVersion();
46
48
49 std::string file_prefix;
51
52 if (!trainer) {
53 return EXIT_FAILURE;
54 }
55
56 if (FLAGS_display_cloud_font >= 0) {
57#ifndef GRAPHICS_DISABLED
58 trainer->DisplaySamples(FLAGS_canonical_class1.c_str(), FLAGS_display_cloud_font,
59 FLAGS_canonical_class2.c_str(), FLAGS_display_canonical_font);
60#endif
61 return EXIT_SUCCESS;
62 } else if (!FLAGS_canonical_class1.empty()) {
63 trainer->DebugCanonical(FLAGS_canonical_class1.c_str(), FLAGS_canonical_class2.c_str());
64 return EXIT_SUCCESS;
65 }
66 trainer->SetupMasterShapes();
68
69 return EXIT_SUCCESS;
70}
void WriteShapeTable(const std::string &file_prefix, const ShapeTable &shape_table)
void ParseArguments(int *argc, char ***argv)
std::unique_ptr< MasterTrainer > LoadTrainingData(const char *const *filelist, bool replication, ShapeTable **shape_table, std::string &file_prefix)