I have a tif file read from a camera containing container image with text image (container id) in it, I would like to extract the text using tessaract applicaiton but the application having difficulty in extracting from colored images, so thought of using IM to convert it into Black And White image to try it with tessaract for extraction; I am new to IM, so I am trying to achieve following with IM.
Text color is white, background color is light red (usual container color), not sure what way to express the container color; So I want to replace all the container color (light red) to transparent so that the image will have only text color in white; So that I can pass this converted image to tessaract to extract the text; I am struck with this to continue further;
I am using below code to convert the image, but it does not remove light-red color but still the result is same as 1a.tiff.
convert 1a.tif -channel rgba -alpha set -fill none -draw "color 10,10replace" 1a_transparent.tif
Any help in this regards is much appreciated;
No option to attach image file with this query, hence I have not attached the actual image.
Best Regards,
B. Sudhakar
Using IM how to keep only particular info
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Using IM how to keep only particular info
You can upload to somewhere like dropbox.com and paste the URL here.
I think tesseract prefers black text on white background.
I think tesseract prefers black text on white background.
snibgo's IM pages: im.snibgo.com