title: trying to implement "imabsdiff" function
body: <p>I am trying to implement imabsdiff function in scliab , but i am getting different results, when i do it theoretically and using inbuilt functions</p>
  
  <pre><code>//Image subtraction with absolute difference and its effect
  //Image 2 is being subtracted from image 1
  
  clc;
  clear;
  
  
  //reading the image
  A=ReadImage('E:\pruthvi iitb\DIP\Chapter 3 DIP\cocacola1.png');
  B=ReadImage('E:\pruthvi iitb\DIP\Chapter 3 DIP\cocacola2.png');
  A=RGB2Gray(A);
  B=RGB2Gray(B);
  figure(1);
  ShowImage(A,'First Image');
  title("First Image");
  
  figure(2);
  ShowImage(B,'Second Image');
  title("Second Image");
  
  
  [m n]=size(A);//size om image , M rows and N cols
  //C=[][];//Absolute  Subtracted Image
  for i=1:m
      for j=1:n
          a=A(i,j);
          b=B(i,j);
            C(i,j)=abs(a -b);// absolute difference
  
  
      end
  end
  
  figure(3);
  ShowImage(C,'Absolute Subtracted Image');
  title("Absolute Subtracted Image");
  figure(4);
  ShowImage(imabsdiff(A,B),'formula Image');
  title("Absolute Subtracted Image");
  </code></pre>
  
  <p>Cocalcola1.png <img src="https://i.stack.imgur.com/BbB2G.png" alt="Image A">
  Cocacola2.png<img src="https://i.stack.imgur.com/fjB3P.png" alt="Image 2"></p>
  
  <p>results</p>
  
  <p>right side using inbuilt function</p>
  
  <p><img src="https://i.stack.imgur.com/9Svr0.png" alt="result"></p>