Borrar filtros
Borrar filtros

Need to find the digit of this image

5 visualizaciones (últimos 30 días)
Abdur Rob
Abdur Rob el 6 de Mzo. de 2023
Respondida: Sarvesh Kale el 6 de Mzo. de 2023
I want to extract the number from this image. I used ocr technique to extract the number but could not get the appropriate result. As being new user of matlab, Don't understand how to solve my problem.
Here is my attemps
I = imread("mm.jpg");
ocrResults = ocr(I,Language="seven-segment");
and The ERROR
Error using vision.internal.ocr.validateLanguage
Invalid language character vector. Display valid language character vectors.
Error in ocr>checkLanguage (line 312)
lang = vision.internal.ocr.validateLanguage(modifiedLang, vision.internal.ocr.ocrSpkgInstalled());
Error in ocr>parseInputs (line 224)
[validLanguage, isCustomLanguage] = checkLanguage(userInput.Language);
Error in ocr (line 119)
[roi, hasROI, params] = parseInputs(I,varargin{:});

Respuestas (1)

Sarvesh Kale
Sarvesh Kale el 6 de Mzo. de 2023
You can try the following code snippet for detecting digits in image
img = imread('mm.jpeg'); % your image path
ocr_result = ocr(img,[125.5 103.5 87 39],Language="seven-segment"); % this gives the co-ordinates of the bounding box around the digits
% i got the roi values by using the imcrop function
ocr_result.Words % displays the text detected
Iocr = insertObjectAnnotation(i,"rectangle",...
ocr_result.WordBoundingBoxes,ocr_result.Words,LineWidth=5,fontsize=18);
figure ;
imshow(Iocr)
More information on ocr can be found at the following documentation https://in.mathworks.com/help/vision/ref/ocr.html
I hope this helps your query
Thank you

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by