Guest User

Untitled

a guest
Apr 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function minimum = get_min_reverse_raster(img, i, j)
  2. if i==size(img, 1) || j==size(img, 2)
  3. bottomright = intmax;
  4. else
  5. bottomright = img(i+1, j+1);
  6. end
  7. if i==size(img, 1)
  8. bottom = intmax;
  9. else
  10. bottom = img(i+1, j);
  11. end
  12. if j==size(img, 2)
  13. right = intmax;
  14. else
  15. right = img(i, j+1);
  16. end
  17. if j==1 || i==size(img, 1)
  18. bottomleft = intmax;
  19. else
  20. bottomleft = img(i+1, j-1);
  21. end
  22. minimum = min([bottomright, bottom, right, bottomleft]);
  23. end
Add Comment
Please, Sign In to add comment