im 是 灰度图
function [imR,imRR] = getROI(im,x,y,height,width)
%you can use this function to get a ROI
%and this x+width must smaller then your pic width.
%im's model is gray
%imR is the oringal
%imRR's model is gray
imRR = im(x:x+width,y:y+height);
imR = im;
figure(54832);
imshow(im);
figure(54832);
rectangle('Position',[x,y,width,height],'EdgeColor','R');