How to count occurrence of every character of a image in MATLAB R2019b?

3 ビュー (過去 30 日間)
Balkar Singh
Balkar Singh 2022 年 2 月 25 日
コメント済み: Balkar Singh 2022 年 3 月 2 日
I want to count the occurrence of every character of a image using OCR in MATLAB R2019b. Image is attached.
Thanks
  2 件のコメント
KSSV
KSSV 2022 年 2 月 25 日
What have you tried?
Balkar Singh
Balkar Singh 2022 年 2 月 25 日
clear all;
img = imread('Image1.png');% Read secret image
ocr1 = ocr(img);
str = ocr1.Text;
str = lower(str);
out_str = regexp(str, '[a-z]', 'match');
count_occr = count(out_str, '[a-z]', 'IgnoreCase', true);
This is the code i tried

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2022 年 2 月 25 日
Use the ocr() function
txt = ocr(yourImage);
  7 件のコメント
Balkar Singh
Balkar Singh 2022 年 3 月 2 日
Thanks
Balkar Singh
Balkar Singh 2022 年 3 月 2 日
After using histcounts i got the following output
11 2 4 6 21 2 3 9 17 0 4 0 2 11 16 5 2 9 14 21 5 2 7 0 1
Is it possible to generate the Markov Matrix of this output.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by