diff --git a/src/main/java/es/yonatan/tfg/image/post/PostProcessor.java b/src/main/java/es/yonatan/tfg/image/post/PostProcessor.java index 216ebf920f6057ca277e0a02aeea226dd3f51b11..df601081b773ab62d8db69a90057e621441b7d6a 100644 --- a/src/main/java/es/yonatan/tfg/image/post/PostProcessor.java +++ b/src/main/java/es/yonatan/tfg/image/post/PostProcessor.java @@ -69,7 +69,7 @@ public class PostProcessor implements IImagePostProcessor { var g2d = ((Graphics2D) finalImage.getGraphics()); g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); - g2d.setFont(new Font("Arial", Font.PLAIN, 18)); + g2d.setFont(new Font("Times New Roman", Font.PLAIN, 22)); for (UnitGroup group : groups) { g2d.setColor(Color.black); diff --git a/src/main/java/es/yonatan/tfg/recognizer/TesseractRecognizer.java b/src/main/java/es/yonatan/tfg/recognizer/TesseractRecognizer.java index f9b95f29d14850d15012b754d95b4200afc45590..d8e61bf70bcd96a10dd096949658c1a305d4c2be 100644 --- a/src/main/java/es/yonatan/tfg/recognizer/TesseractRecognizer.java +++ b/src/main/java/es/yonatan/tfg/recognizer/TesseractRecognizer.java @@ -69,7 +69,7 @@ public final class TesseractRecognizer implements IUnitRecognizer<Unit> { public Builder withDefaults() { return this.setDataPath(LoadLibs.extractTessResources("tessdata")). - setSupportedLanguages(Set.of("latin")). + setSupportedLanguages(Set.of("latin", "es", "en")). setLanguage("latin"). setCharWhitelist(null). setCharBlacklist(null); diff --git a/src/main/java/es/yonatan/tfg/server/TranslateRoute.java b/src/main/java/es/yonatan/tfg/server/TranslateRoute.java index 2431650fd535b61234c742ff6f262817ab7f5ee1..0df73851ae716d05453b766a856746cc04ac2757 100644 --- a/src/main/java/es/yonatan/tfg/server/TranslateRoute.java +++ b/src/main/java/es/yonatan/tfg/server/TranslateRoute.java @@ -84,7 +84,7 @@ public class TranslateRoute implements Route { //------------- var postprocessor = new PostProcessor(); - var postProcessingResult = postprocessor.processImage(image, translationResult.units(), options.debug); + var postProcessingResult = postprocessor.processImage(decodeBase64(base64Img), translationResult.units(), options.debug); if (postProcessingResult == null) return errorResponse("Error post-processing image"); //-------------