Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Recognize Text Within an Image

     businessCard   = imread('businessCard.png');
     ocrResults     = ocr(businessCard)
ocrResults = 
  ocrText with properties:

                      Text: '‘ MathWorks®...'
    CharacterBoundingBoxes: [103x4 double]
      CharacterConfidences: [103x1 single]
                     Words: {16x1 cell}
         WordBoundingBoxes: [16x4 double]
           WordConfidences: [16x1 single]

     recognizedText = ocrResults.Text;    
     figure;
     imshow(businessCard);
     text(600, 150, recognizedText, 'BackgroundColor', [1 1 1]);