diff --git a/src/main/org/audiveris/omr/Main.java b/src/main/org/audiveris/omr/Main.java index c12c67b1d..373ae4a64 100644 --- a/src/main/org/audiveris/omr/Main.java +++ b/src/main/org/audiveris/omr/Main.java @@ -28,6 +28,7 @@ import org.audiveris.omr.constant.ConstantSet; import org.audiveris.omr.log.LogUtil; import org.audiveris.omr.sheet.BookManager; +import org.audiveris.omr.text.tesseract.TesseractOCR; import org.audiveris.omr.ui.MainGui; import org.audiveris.omr.ui.symbol.MusicFont; import org.audiveris.omr.util.ClassUtil; @@ -378,13 +379,14 @@ private static void showEnvironment () if (constants.showEnvironment.isSet()) { logger.info( "Environment:\n" + "- Audiveris: {}\n" + "- OS: {}\n" - + "- Architecture: {}\n" + "- Java VM: {}", + + "- Architecture: {}\n" + "- Java VM: {}\n" + "- OCR Engine: {}", WellKnowns.TOOL_REF + ":" + WellKnowns.TOOL_BUILD, System.getProperty("os.name") + " " + System.getProperty("os.version"), System.getProperty("os.arch"), System.getProperty("java.vm.name") + " (build " + System.getProperty("java.vm.version") + ", " + System.getProperty("java.vm.info") - + ")"); + + ")", + TesseractOCR.getInstance().identify()); } } diff --git a/src/main/org/audiveris/omr/text/OCR.java b/src/main/org/audiveris/omr/text/OCR.java index df3a9669f..e277ccfc9 100644 --- a/src/main/org/audiveris/omr/text/OCR.java +++ b/src/main/org/audiveris/omr/text/OCR.java @@ -62,6 +62,13 @@ enum LayoutMode */ boolean isAvailable (); + /** + * Return OCR engine identification. + * + * @return string containing the name and the version of the OCR engine. + */ + String identify(); + /** * Launch the recognition of the provided image, whose language is specified. * diff --git a/src/main/org/audiveris/omr/text/tesseract/TesseractOCR.java b/src/main/org/audiveris/omr/text/tesseract/TesseractOCR.java index f3505d166..dc04a21a2 100644 --- a/src/main/org/audiveris/omr/text/tesseract/TesseractOCR.java +++ b/src/main/org/audiveris/omr/text/tesseract/TesseractOCR.java @@ -141,6 +141,19 @@ public boolean isAvailable () return constants.useOCR.isSet(); } + //----------// + // identify // + //----------// + @Override + public String identify() + { + if (isAvailable()) { + return "Tesseract OCR, version " + TessBaseAPI.Version().getString(); + } else { + return "OCR engine not available"; + } + } + //-----------// // recognize // //-----------//