I need help to identify the border and compare the images with the original image. I need guidance on How can I achieve this through processing or matlab or anything for beginne
You can simplify the process proposed by @lennon310 using the normxcorr2 function:
file1='http://i.stack.imgur.com/1KyJA.jpg';
file2='http://i.stack.imgur.com/zyHuj.jpg';
It = imread(file1);
Ii = imread(file2);
It=rgb2gray(It);
Ii=rgb2gray(Ii);
It=double(It); % template
Ii=double(Ii); % image
c=normxcorr2(It, Ii);
imagesc(c);