How to convert special font text in image to string in pythonHow can I safely create a nested directory in Python?How do I parse a string to a float or int in Python?How to get the current time in PythonConverting string into datetimeHow can I make a time delay in Python?Convert bytes to a string?Converting integer to string in Python?How do I concatenate two lists in Python?Does Python have a string 'contains' substring method?How do I lowercase a string in Python?
How much RAM could one put in a typical 80386 setup?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
Basic combinations logic doubt in probability
How is it possible to have an ability score that is less than 3?
What is the offset in a seaplane's hull?
How to write a macro that is braces sensitive?
strToHex ( string to its hex representation as string)
same font throughout bibliography
"You are your self first supporter", a more proper way to say it
Can a German sentence have two subjects?
Animated Series: Alien black spider robot crashes on Earth
Risk of getting Chronic Wasting Disease (CWD) in the United States?
How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?
Type 1 Error & Type 2 Error's pregnancy test analogy: is it legit?
Prevent a directory in /tmp from being deleted
Explain the parameters before and after @ in the treminal
Has the BBC provided arguments for saying Brexit being cancelled is unlikely?
can i play a electric guitar through a bass amp?
Mains transformer blew up amplifier, incorrect description in wiring instructions?
Creating a document with mixed languages
Email Account under attack (really) - anything I can do?
How to test if a transaction is standard without spending real money?
How can I make my BBEG immortal short of making them a Lich or Vampire?
How to convert special font text in image to string in python
How can I safely create a nested directory in Python?How do I parse a string to a float or int in Python?How to get the current time in PythonConverting string into datetimeHow can I make a time delay in Python?Convert bytes to a string?Converting integer to string in Python?How do I concatenate two lists in Python?Does Python have a string 'contains' substring method?How do I lowercase a string in Python?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
The below code is converting the image text to string but its not accurate , some special characters are coming in between sampe image
from PIL import Image
import pytesseract
image=Image.open('C://Users/Arjun/Desktop/1512350.jpg')
pytesseract.pytesseract.tesseract_cmd='C://Program Files (x86)/Tesseract-
OCR/tesseract'
result=pytesseract.image_to_string(image,config='-psm7 -c
tessedit_char_whitlist=ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890')
print(result)
output:
fl/'S‘TIW ° MILLER‘ 1003055666 ° gum/71; C6521:pmuzznmmimfmmpmy *5mg[e
* 2900456023 ° Uj7s564550 ° 130013 ° mm 51£®IC/‘(L 0£0wEmm'2zowLI5vg gazmyw 250 0’/lrkksrmgf" flowzzyvg (jfiff-W" M * 42101 ° wowiany " qw—
I’Va:/11/£172 ' J6 ’ 19955.65 * 5685.26 " 4586.65 ’ Safaxizf
python ocr tesseract
add a comment |
The below code is converting the image text to string but its not accurate , some special characters are coming in between sampe image
from PIL import Image
import pytesseract
image=Image.open('C://Users/Arjun/Desktop/1512350.jpg')
pytesseract.pytesseract.tesseract_cmd='C://Program Files (x86)/Tesseract-
OCR/tesseract'
result=pytesseract.image_to_string(image,config='-psm7 -c
tessedit_char_whitlist=ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890')
print(result)
output:
fl/'S‘TIW ° MILLER‘ 1003055666 ° gum/71; C6521:pmuzznmmimfmmpmy *5mg[e
* 2900456023 ° Uj7s564550 ° 130013 ° mm 51£®IC/‘(L 0£0wEmm'2zowLI5vg gazmyw 250 0’/lrkksrmgf" flowzzyvg (jfiff-W" M * 42101 ° wowiany " qw—
I’Va:/11/£172 ' J6 ’ 19955.65 * 5685.26 " 4586.65 ’ Safaxizf
python ocr tesseract
What happens if you remove config altogether?
– Jarad
Mar 9 at 3:35
im getting almost same output even after removing the config
– Arjun Vc
Mar 9 at 4:18
Which tessdata are you using?
– user3169
Mar 11 at 1:08
add a comment |
The below code is converting the image text to string but its not accurate , some special characters are coming in between sampe image
from PIL import Image
import pytesseract
image=Image.open('C://Users/Arjun/Desktop/1512350.jpg')
pytesseract.pytesseract.tesseract_cmd='C://Program Files (x86)/Tesseract-
OCR/tesseract'
result=pytesseract.image_to_string(image,config='-psm7 -c
tessedit_char_whitlist=ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890')
print(result)
output:
fl/'S‘TIW ° MILLER‘ 1003055666 ° gum/71; C6521:pmuzznmmimfmmpmy *5mg[e
* 2900456023 ° Uj7s564550 ° 130013 ° mm 51£®IC/‘(L 0£0wEmm'2zowLI5vg gazmyw 250 0’/lrkksrmgf" flowzzyvg (jfiff-W" M * 42101 ° wowiany " qw—
I’Va:/11/£172 ' J6 ’ 19955.65 * 5685.26 " 4586.65 ’ Safaxizf
python ocr tesseract
The below code is converting the image text to string but its not accurate , some special characters are coming in between sampe image
from PIL import Image
import pytesseract
image=Image.open('C://Users/Arjun/Desktop/1512350.jpg')
pytesseract.pytesseract.tesseract_cmd='C://Program Files (x86)/Tesseract-
OCR/tesseract'
result=pytesseract.image_to_string(image,config='-psm7 -c
tessedit_char_whitlist=ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890')
print(result)
output:
fl/'S‘TIW ° MILLER‘ 1003055666 ° gum/71; C6521:pmuzznmmimfmmpmy *5mg[e
* 2900456023 ° Uj7s564550 ° 130013 ° mm 51£®IC/‘(L 0£0wEmm'2zowLI5vg gazmyw 250 0’/lrkksrmgf" flowzzyvg (jfiff-W" M * 42101 ° wowiany " qw—
I’Va:/11/£172 ' J6 ’ 19955.65 * 5685.26 " 4586.65 ’ Safaxizf
python ocr tesseract
python ocr tesseract
edited Mar 9 at 4:34
AkshayNevrekar
6,01992042
6,01992042
asked Mar 9 at 3:12
Arjun VcArjun Vc
53
53
What happens if you remove config altogether?
– Jarad
Mar 9 at 3:35
im getting almost same output even after removing the config
– Arjun Vc
Mar 9 at 4:18
Which tessdata are you using?
– user3169
Mar 11 at 1:08
add a comment |
What happens if you remove config altogether?
– Jarad
Mar 9 at 3:35
im getting almost same output even after removing the config
– Arjun Vc
Mar 9 at 4:18
Which tessdata are you using?
– user3169
Mar 11 at 1:08
What happens if you remove config altogether?
– Jarad
Mar 9 at 3:35
What happens if you remove config altogether?
– Jarad
Mar 9 at 3:35
im getting almost same output even after removing the config
– Arjun Vc
Mar 9 at 4:18
im getting almost same output even after removing the config
– Arjun Vc
Mar 9 at 4:18
Which tessdata are you using?
– user3169
Mar 11 at 1:08
Which tessdata are you using?
– user3169
Mar 11 at 1:08
add a comment |
1 Answer
1
active
oldest
votes
@Arjun, I think instead of passing an image directly, try applying some operations on image for getting better results. Try applying Threshold, like Binary Threshold, Adaptive threshold, Otsu_binary threshold and then try to get result. I think this might give you accurate result and let me know if you get stuck. Thanks
You can refer this link to understand use better Threshold techniques
Threshold Doc
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073639%2fhow-to-convert-special-font-text-in-image-to-string-in-python%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
@Arjun, I think instead of passing an image directly, try applying some operations on image for getting better results. Try applying Threshold, like Binary Threshold, Adaptive threshold, Otsu_binary threshold and then try to get result. I think this might give you accurate result and let me know if you get stuck. Thanks
You can refer this link to understand use better Threshold techniques
Threshold Doc
add a comment |
@Arjun, I think instead of passing an image directly, try applying some operations on image for getting better results. Try applying Threshold, like Binary Threshold, Adaptive threshold, Otsu_binary threshold and then try to get result. I think this might give you accurate result and let me know if you get stuck. Thanks
You can refer this link to understand use better Threshold techniques
Threshold Doc
add a comment |
@Arjun, I think instead of passing an image directly, try applying some operations on image for getting better results. Try applying Threshold, like Binary Threshold, Adaptive threshold, Otsu_binary threshold and then try to get result. I think this might give you accurate result and let me know if you get stuck. Thanks
You can refer this link to understand use better Threshold techniques
Threshold Doc
@Arjun, I think instead of passing an image directly, try applying some operations on image for getting better results. Try applying Threshold, like Binary Threshold, Adaptive threshold, Otsu_binary threshold and then try to get result. I think this might give you accurate result and let me know if you get stuck. Thanks
You can refer this link to understand use better Threshold techniques
Threshold Doc
answered Mar 12 at 12:25
Karsh SoniKarsh Soni
1139
1139
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073639%2fhow-to-convert-special-font-text-in-image-to-string-in-python%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What happens if you remove config altogether?
– Jarad
Mar 9 at 3:35
im getting almost same output even after removing the config
– Arjun Vc
Mar 9 at 4:18
Which tessdata are you using?
– user3169
Mar 11 at 1:08