Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function minimum = get_min_reverse_raster(img, i, j)
- if i==size(img, 1) || j==size(img, 2)
- bottomright = intmax;
- else
- bottomright = img(i+1, j+1);
- end
- if i==size(img, 1)
- bottom = intmax;
- else
- bottom = img(i+1, j);
- end
- if j==size(img, 2)
- right = intmax;
- else
- right = img(i, j+1);
- end
- if j==1 || i==size(img, 1)
- bottomleft = intmax;
- else
- bottomleft = img(i+1, j-1);
- end
- minimum = min([bottomright, bottom, right, bottomleft]);
- end
Add Comment
Please, Sign In to add comment