How I can eject the text I have been draw in image?
How I can eject the text I have been draw in image?
Someone has already drew(or annotated) a lot words on an image with IM, but now I need to eject these words into a text.
How I can eject these words with IM? Is there any way to do this? I cannot find any useful information in documents and I would like to express my gratitude to whom can help me solved this problem.
How I can eject these words with IM? Is there any way to do this? I cannot find any useful information in documents and I would like to express my gratitude to whom can help me solved this problem.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How I can eject the text I have been draw in image?
What is your IM version and platform? Always provide that information with questions, since syntax may differ. Can you post an example image for us to understand your problem better. You can upload to some free hosting service such as dropbox.com and put the URL here.
If the text is all the same color and that color differs from the rest of the image, then you can make the rest of the image transparent using something like:
If the text is all the same color and that color differs from the rest of the image, then you can make the rest of the image transparent using something like:
Code: Select all
convert image -fuzz XX% +transparent your_text_color result
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How I can eject the text I have been draw in image?
I don't understand what you want.RogerAFH wrote:How I can eject these words with IM?
Perhaps you have an image that contains text (as pixels in the image), and you want to convert this back into text that can be pasted as characters into a document. That process is called OCR (Optical Character Recognition). ImageMagick can't do OCR. For OCR, use software such as Tesseract.
snibgo's IM pages: im.snibgo.com
Re: How I can eject the text I have been draw in image?
I'm sorry that I post an ambiguous question.fmw42 wrote:What is your IM version and platform? Always provide that information with questions, since syntax may differ. Can you post an example image for us to understand your problem better. You can upload to some free hosting service such as dropbox.com and put the URL here.
If the text is all the same color and that color differs from the rest of the image, then you can make the rest of the image transparent using something like:
Code: Select all
convert image -fuzz XX% +transparent your_text_color result
My IM version is Version: ImageMagick 6.9.2-7 Q16 x86_64 2015-12-06.
http://pic.fdzh.org/uploads/2016/05/Scr ... _09_38.png
This is a little cut of the image, and the red or blue words are my friend annotated. His use only IM to annotate these words and I want to find a way to print these words as text. I think these words are annotation and is there any way to find out them?
Thank you very much!
Re: How I can eject the text I have been draw in image?
snibgo wrote:I don't understand what you want.RogerAFH wrote:How I can eject these words with IM?
Perhaps you have an image that contains text (as pixels in the image), and you want to convert this back into text that can be pasted as characters into a document. That process is called OCR (Optical Character Recognition). ImageMagick can't do OCR. For OCR, use software such as Tesseract.
It is a question that post on a web.
I used to think it is an OCR problem but I was told the image author eject these words(name with red,blue color) for this image only using IM. Is IM keep the words imformation(annotated or drew) when we annotating these words on image? I just want to find these words out.
Thank you very much!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How I can eject the text I have been draw in image?
Once text is put into an image, it is no longer text but raster data. You would have to remove all the background except for say red using the command I mentioned above, then make the image black for the text and white for the background. Then you would have to use OCR to convert the image to ascii text, so that it can be read as text. Imagemagick can do the former, but it does not do OCR. You would need some tool such as Tesseract to convert the data to ascii text.
IM does not keep the textual words as words once the image is created, unless the user specifies that it should also be written to the meta data of the image as a comment or label.
You can check for that using the original images (not the screen shot) by:
or
IM does not keep the textual words as words once the image is created, unless the user specifies that it should also be written to the meta data of the image as a comment or label.
You can check for that using the original images (not the screen shot) by:
Code: Select all
convert image -format "%c" info:
Code: Select all
convert image -format "%l" info:
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How I can eject the text I have been draw in image?
The image you provide is a screenshot, which is the pixels as shown on a screen. If any software wrote annotation in the metadata of the original image, it won't appear on the screenshot.
snibgo's IM pages: im.snibgo.com
Re: How I can eject the text I have been draw in image?
The image I show is just a part of the image because the image is too large.snibgo wrote:The image you provide is a screenshot, which is the pixels as shown on a screen. If any software wrote annotation in the metadata of the original image, it won't appear on the screenshot.
Re: How I can eject the text I have been draw in image?
Thanks~~fmw42 wrote:Once text is put into an image, it is no longer text but raster data. You would have to remove all the background except for say red using the command I mentioned above, then make the image black for the text and white for the background. Then you would have to use OCR to convert the image to ascii text, so that it can be read as text. Imagemagick can do the former, but it does not do OCR. You would need some tool such as Tesseract to convert the data to ascii text.
IM does not keep the textual words as words once the image is created, unless the user specifies that it should also be written to the meta data of the image as a comment or label.
You can check for that using the original images (not the screen shot) by:
orCode: Select all
convert image -format "%c" info:
Code: Select all
convert image -format "%l" info: