Need to read text from a metal plate. Text is embossed on the plate.

The first image (file named: foto7.png) is my input image and using OCR i need to read the text written on the image.
I did some pre-processing and those were
  1. Converted the Image to grayscale
  2. Sharpening the grayscale image
I2 = imsharpen(I,'Amount',0.475);% 0.475
3. Threshold of image
I2 = imbinarize(I2,'adaptive','ForegroundPolarity','dark','Sensitivity',0.37); %0.37 and dark
The output Image after doing the above steps is attacehed (file named: output image).
4. Finally OCR
The result i obtained from OCR is
IMO Energy GmbH & Cd. VKG ~
‘ I-14/0.5.839‘/r_JQ —uCJ6 l
' www.imo.de L
Is there any idea that can be implemented so that correct can be read from the image.

2 Comments

I don't have any OCR tools, so I'm in no position to test anything. That said, flattening the lighting may help:
I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/883005/foto7.png');
I = rgb2gray(I);
I2 = imflatfield(I,20);
I2 = imadjust(I2);
subplot(2,1,1)
imshow(I)
subplot(2,1,2)
imshow(I2)
Hello,
Thank you DGM for your help. Unfortunately it didn't came as expected.

Sign in to comment.

Answers (1)

yes,sir,may be use other ocr model,such as
https://cloud.tencent.com/act/event/ocrdemo

2 Comments

Thank you yanqi liu.
I will surely check out the website.
Hi Yanqi Liu,
Once again thank you for the website.
the website is in chinese languaue and I couldn't trasnlate it. Moreover, could you help me with matlab way?

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Asked:

on 3 Feb 2022

Commented:

on 8 Feb 2022

Community Treasure Hunt

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

Start Hunting!