title: Background on leg stays after subtraction in MATLAB
body: <p>The picture on the left is my background image and the one on the right is the original image:</p>
  
  <p><a href="https://i.stack.imgur.com/5dN5O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5dN5O.png" alt="enter image description here"></a></p>
  
  <p>After doing subtraction,im having trouble in removing the background on the ankle:</p>
  
  <p><a href="https://i.stack.imgur.com/gmnHT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gmnHT.png" alt="enter image description here"></a></p>
  
  <p>The purpose is to get the foreground only, does anyone have an idea? Shown below is the code on how I carry out my background subtraction as well as display it. Thanks. </p>
  
  <pre><code> I = (imread('frame9.jpg'));
   figure(1),imshow(I);
   bg =(imread('background.jpg'));
   figure(2),imshow(bg);
   Ip = bg-I;
   figure(3),imshow(Ip);
  </code></pre>