Display nth character in a Binary image
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
RandomChikiBum
am 11 Okt. 2022
Kommentiert: Walter Roberson
am 12 Okt. 2022
I have a binary image consisting of characters (alphanumeric), I can find the total number of characters in the Image but How do I find the nth charecter
I have also attatched the image, how do i find out the 5th character in the image?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 11 Okt. 2022
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1152713/AlphanumericBinaryImage%20copy.png';
I = imread(filename);
t = ocr(I)
n = 5
t.Words{1}(n)
This would need a slight bit more work if there were multiple words and you wanted to know the n'th character wrapping through the words (for example, the 15th character from the beginning.) One of the questions would be whether the break between words should count as a letter for this purpose -- are you effectively transcribing the text (which would expect a space between words) ?
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!