Text Recognition using ocr of Matlab

前端 未结 1 758
遥遥无期
遥遥无期 2021-01-18 20:13

I am trying to do OCR of this image-

\"enter

This is what I am doing using

相关标签:
1条回答
  • 2021-01-18 20:38

    You can dilate the image with a vertical line structuring element in order to vertically elongate the symbol and make it somewhat look more like a N.

    Eg:

    clear
    clc
    
    I=imread('N.jpg');
    
    %// Line oriented at 90 degrees.
    SE = strel('line',4,90);
    I = imdilate(I,SE);
    
    imshow(I)
    
    r = ocr(I,'TextLayout','Word')
    

    Image:

    enter image description here

    ahh now it looks like a N...

    And output:

    r = 
    
      ocrText with properties:
    
                          Text: 'N
    
    '
        CharacterBoundingBoxes: [3x4 double]
          CharacterConfidences: [3x1 single]
                         Words: {'N'}
             WordBoundingBoxes: [276 118 13 11]
               WordConfidences: 0.8150
    

    Yay!

    0 讨论(0)
提交回复
热议问题