I am reading text from a document image by using OCR function but some is coming in the numeric form and some like ^ ! etc. What is the exact method to read a text from a document image.
Best Answer
This is one of the image from the data set I am using. Thank you
If you want to change part of a line based on a match (checkstr), a good way to achieve this is to use regular expressions, e.g.
buffer = fileread('inFile.txt') ;
buffer = regexprep(buffer, 'I hate regexp', 'I love regexp') ;
fid = fopen('outFile.txt', 'w') ;
fwrite(fid, buffer) ;
fclose(fid) ;
If you tell me the pattern that you are matching and the replacement, I can help you building a pattern for the regexp if it is more elaborate that basic alpha-numeric characters.
Best Answer