This extractor uses Tesseract. Information on Tesseract and how to install it can be found at the Tesseract's project page.
This extractor uses pyClowder. Information on pyClowder can be found here.
This extractor depends on RabbitMQ. You will need to set the URL to point to RabbitMQ (https://www.rabbitmq.com/uri-spec.html). For example, to connect to RabbitMQ running on the localhost with default parameters you can use the following URL: amqp://guest:guest@localhost:5672/%2f
Performs simple OCR on an image and associates the resulting text with it. The text is not supposed to be a perfect transcription, but a way to associate words with an image so to make images more searchable.
An image file in a format supported by Tesseract.
OCR text extracted from the input associated with the original file.
A sample input file "browndog.png" and a sample output file "browndog.png.sample-output" are available in this directory.
-
In extractor-tesseract/ folder run:
docker build -t clowder/ocr:test .
-
In the tests subdirectory, run:
docker-compose -f docker-compose.yml -f docker-compose.extractors.yml up -d
-
Initialize Clowder:
docker run -ti --rm --network tests_clowder clowder/mongo-init
-
Enter email, first name, last name password, and admin: true when prompted.
-
Navigate to localhost:9001 and login with credentials you created in step 4.
-
Create a test space and dataset. Then click 'Select Files' and upload tests/browndog.png.
-
Click on file and type submit for extraction.
-
It may take a few minutes for you to be able to see the extractors available within Clowder.
-
Eventually you should see ocr in the list and click submit.
-
Navigate back to file and click on metadata.
-
You should see the ocr_text metadata present.
Setting the timezone variable (TZ) above is optional. It can help understand better the time shown in the log file. By default a container uses UTC.