recognize the text in image

In this image, I have to describe the texts in the red box.
I need to write a code to recognize the text present in the list of Recipe Flows highlighted in red.
how can i do this ?

Answers (1)

Image Analyst
Image Analyst on 31 Dec 2020
Crop out that rectangle from the image, then call ocr() which is a function in the Computer Vision Toolbox.

7 Comments

No, I have to read the inside of the red frame without cropping this image.
and I need to solve it by writing code, not using toolbox
OK, then start writing your own OCR program.
Thanks, but when I said I wouldn't use toolbox, I didn't mean I wouldn't actually use functions :)
OK, that's fine. There are lots of functions in the Computer Vision Toolbox and the Image Processing Toolbox. Feel free to use whatever functions you will allow yourself to use, and don't use functions that you don't allow yourself to use (like imcrop() and ocr()). Nearly all the code I write uses the toolbox functions. So, what is your plan for doing ocr without using the toolbox? Like maybe do a manual correlation with a set of predefined templates of all possible letters? Well anyway, good luck.
No, of course I will not create such a correlation :) I just want to be able to describe the text in that box when this picture is in its entirety. I wrote the following code using the ocr () function, but it could not identify the part starting with every AN because it does not detect all N letters.
img = imread('text.jpg');
ocrResults = ocr(img);
bboxes = locateText(ocrResults, 'AN','UseRegexp', true);
img = insertShape(img, 'FilledRectangle', bboxes);
figure; imshow(img);
OK, so you're not going to use correlation, either by writing it yourself or by using normxcorr2 (like my attached demo, but that uses normxcorr2 which is a built-in function anyway). And you're not going to use ocr() or certain other toolbox functions. So what is your plan? By the way, don't feel you need to explain it to me if you already know what you're going to do. You only need to reply if the code you wrote didn't work correctly or threw an error, in which case you'd need to attach your code of course.

Sign in to comment.

Asked:

on 31 Dec 2020

Commented:

on 31 Dec 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!