MATLAB Answers


recognizing numbers from a table in an image

Asked by Akshay
on 12 Dec 2012 this is my image..its a railway ticket.. i need to recognize the pnr no. on the top left corner of the table using image processing and ocr.. how to do this?? i am a beginer please help

  1 Comment

Log in to comment.

1 Answer

Answer by Image Analyst
on 15 Dec 2012

If the yellow box is always in a fixed position, you can simply crop it out using known, fixed coordinates. If it moves around you can find the yellow box by using one of my color segmentation methods in my File Exchange. Basically find yellow by something like

yellowPixels = redChannel > 128 | greenChannel > 128 | blueChannel < 128;

then call imfill. Then use regionprops to find the largest yellow blob and use ismember or wbareaopen to extract only the biggest blob. Then multiply that mask by the image. Then you need to do OCR on the image which goes beyond the help we offer here.


Log in to comment.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!