Reputation: 27
I want to calculate the boundary of the signature image before going to Moment Invariant, the algorithm should check from left to the right the first white pixel is the left boundary and the last white pixel is the right boundary. Similarly from top to the bottom.
My research step:
This is my code so far
a=imread('ttd.bmp');
b=rgb2gray(a);
c=im2bw(b);
c=~c;
c=1-c;
c=(c == 0);
imshow(c);
Upvotes: 0
Views: 687
Reputation: 2441
Normalize? You mean map it to range [0,1] ? img
is your single channel input image you want to map:
imgNormalized = (img-min(min(img)))./(max(max(img))-min(min(img)))
Upvotes: 1