Advertisement
Guest User

help

a guest
May 6th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public void eraseBlob(int row, int col){
  2. if(row >=0 && row < size && col >= 0 && col < size){//size is number of rows and cols in a square 2d array
  3. if(image[row][col] == 0){
  4. image[row][col] = 255;
  5. eraseblob(row - 1, col);
  6. eraseblob(row + 1, col);
  7. eraseBlob(row, col + 1);
  8. eraseBlob(row, col - 1);
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement