How do I define ROI( region of Interest) inline code? Without using impoly.

1 回表示 (過去 30 日間)
Rosy
Rosy 2018 年 3 月 13 日
コメント済み: Rosy 2018 年 3 月 14 日
For Indian currency denomination recognition I need to crop only center area to detect Denomination. How can I define the ROI using percentage or else to detect the center for all Indian currecy notes.
From this data sets I want to crop only the center (where the digit only be cropped) by define the area using a generalized code. Like below.

採用された回答

KSSV
KSSV 2018 年 3 月 13 日
I = imread('100_frn.jpg') ;
% Get center of image
C = round(size(I)/2) ;
C = [C(2) C(1)] ;
%%Get number part
idx = C(1)-150:C(1)+150 ;
idy = C(2)-100:C(2)+100 ;
I1 = I(idy,idx,:) ;
imshow(I1)
  1 件のコメント
Rosy
Rosy 2018 年 3 月 14 日
Thanks, but if we define any arbitrary step pixel value like 150, 100. It cant work properly for other images. Can we define it another way without define any fixed number? using any percentage?

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

その他の回答 (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