hwo to extract numeric value from an image
Ältere Kommentare anzeigen
_I have an image in which I recognise the numeric part using OCR FUNCTION numeric value is lablled with yellow line rectangle I want to extract that numeric value and save in .txt file_

results = ocr(O, 'TextLayout', 'Block');
results.Text
GrayImage = uint8(255 * O);
regularExpr = '\d';
bboxes = locateText(results, regularExpr, 'UseRegexp', true);
digits = regexp(results.Text, regularExpr, 'match');
Idigits = insertObjectAnnotation(GrayImage, 'rectangle', bboxes, digits);
figure;
imshow(Idigits);title('digit image');
*i have used this code to make yellow rectangle box on numbers*
_when i am using_
results.Text
_output is coming_ *JANE IJYRE. 343 but i want only 343*
*'O' is my input binary image*
Akzeptierte Antwort
Weitere Antworten (1)
praveen rai
am 12 Jun. 2018
1 Stimme
Kategorien
Mehr zu Text Detection and Recognition finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!