Introduction - If you have any usage issues, please Google them yourself
for p=1:1
[X,Y,Z]=random_point(img,0.5);
C=coeffi(X,Y,Z);
background=form(img,C);
IMG=im2double(img);
defect=IMG-background;
img=defect;
end
defect=abs(defect);
figure(2),imshow(img,[]),title('');