Change the bold level of the text
Change the bold level of the text
Do you know any formula that i can use to reduce the bold level of the text(make it thinner and less dark) on this picture
http://imgur.com/OA6vKyN
to look similar to this :
http://i.stack.imgur.com/A2Dq2.png
Thank you very much,
http://imgur.com/OA6vKyN
to look similar to this :
http://i.stack.imgur.com/A2Dq2.png
Thank you very much,
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Change the bold level of the text
The only thing I can suggest is to use -morphology dilate octagon:X followed by +level Yx100%
X is the size of the octagon shape for the -morphology to make the text thinner. Start with X=1 and try larger integers. Or use -morphology dilate disk:X, where X is a float.
See
http://www.imagemagick.org/Usage/morphology/#kernel
http://www.imagemagick.org/Usage/morphology/#basic
Y is the percent less dark you want, where 0% is full dark. So try Y=20% or something else as desired.
convert image -morphology dilate octagon:1 +level 20x100% result
But this will shrink your accent marks and perhaps even make them disappear.
X is the size of the octagon shape for the -morphology to make the text thinner. Start with X=1 and try larger integers. Or use -morphology dilate disk:X, where X is a float.
See
http://www.imagemagick.org/Usage/morphology/#kernel
http://www.imagemagick.org/Usage/morphology/#basic
Y is the percent less dark you want, where 0% is full dark. So try Y=20% or something else as desired.
convert image -morphology dilate octagon:1 +level 20x100% result
But this will shrink your accent marks and perhaps even make them disappear.
Re: Change the bold level of the text
yeah. It totally shrinks the image. Do you know anyway i can fix that?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Change the bold level of the text
What do you mean by shrinks the image? The image dimensions should not change!
Once your text is in pixel format (versus vector data), it is impossible to change fonts until you have done OCR. All you can do is try to thin out the fonts if the fonts are too thick.
Once your text is in pixel format (versus vector data), it is impossible to change fonts until you have done OCR. All you can do is try to thin out the fonts if the fonts are too thick.
Re: Change the bold level of the text
sorry i mean not reducing the accent mark.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Change the bold level of the text
No, the thinning is global, so affects everything.
Is this not acceptable?
Alternately, create the thinned result as above (or change the 1.3 to something else). Then create an image only of the accent marks from the original. Then combine them as the minimum graylevel of the two images after deleting the original. But that is only slightly better.
Is this not acceptable?
Code: Select all
convert OA6vKyN.png -alpha off -morphology dilate disk:1.3 result.png
Code: Select all
convert OA6vKyN.png -alpha off \
\( -clone 0 -morphology dilate disk:1.3 \) \
\( -clone 0 -negate -morphology tophat disk:4.2 -negate -threshold 40% \
-define connected-components:area-threshold=20 \
-define connected-components:mean-color=true \
-connected-components 4 \) \
-delete 0 -evaluate-sequence min result.png
Re: Change the bold level of the text
Yes. Your method produces better accuracy. But it can't still produce 100 % accuracy. When i took a screenshot from my wordpad program it produce 100 % accurarcy but even for images taken elsewhere with the same level of text thickness the accuracy is just about 70 %. It seems that i have to fix other image properties as well but i don't know what they are
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Change the bold level of the text
Sorry, I do not understand what you have done to get 100% accuracy from Wordpad? I do not know any further way to improve your results.
Re: Change the bold level of the text
i used Tesseract for extracting text from images. All i did to get 100% accuracy from Wordpad is to type the some words in Vietnamese into the Wordpad program and take a screenshot of it(printscreen). Afterwords i run the Tesseract:tesseract imagename filename -l vie and received 100% text accuracy.
Re: Change the bold level of the text
This is the link to that image which i sent you on last posts: http://i.stack.imgur.com/A2Dq2.png
Re: Change the bold level of the text
Why not try OCR and re create the image?
Re: Change the bold level of the text
what do you mean ?
Re: Change the bold level of the text
I tried Tesseract
Re: Change the bold level of the text
OCR = Optical character recognition
Re: Change the bold level of the text
Tesseract is an OCR.
https://code.google.com/p/tesseract-ocr/
https://code.google.com/p/tesseract-ocr/