title: How to get pixel neighbors in MATLAB?
body: <p>I need to get pixel neighbors in order to get a sequence of boundary points , so my plan is to :-</p>
  
  <ol>
  <li>Find a boundary pixel .</li>
  <li>Find its neighbor ( it should be a boundary pixel too ) .</li>
  <li>Recursively do this until i reach the starting pixel .</li>
  </ol>
  
  <p>How can i get  pixel neighbors in MATLAB ? </p>