@Override
    public void initialize(Map<String, Param> params) throws TikaConfigException {
        hasTesseract = hasTesseract();
        if (isEnableImagePreprocessing()) {
            hasImageMagick = hasImageMagick();
        } else {
            hasImageMagick = false;
        }
        if (preloadLangs) {
            preloadLangs();
            if (!StringUtils.isBlank(defaultConfig.getLanguage())) {
                validateLangString(defaultConfig.getLanguage());
            }
        }
        imagePreprocessor = new ImagePreprocessor(getImageMagickPath() + getImageMagickProg());
    }
Starts a thread that reads the contents of the standard output or error
stream of the given process to not block the process. The stream is closed
once fully processed.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-ocr-module/src/main/java/org/apache/tika/parser/ocr/TesseractOCRParser.java