Need to find the digit of this image
4 ビュー (過去 30 日間)
古いコメントを表示

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{:});
0 件のコメント
回答 (1 件)
Sarvesh Kale
2023 年 3 月 6 日
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!