Matlab ROİ(Region of İnterest) Mask …..
Matlab m-file code:
img=imread(‘keypad.jpg’);
img_gray=rgb2gray(img);
img_graydouble=double(img_gray);
x=[65 104 104 65];
y=[93 93 125 125];
bw=roipoly(img,x,y);
f = @(a) imadjust(a,[],[],0.4);
I2 = roifilt2(img_gray,bw,f);
imshow(I2);