Questions tagged [flood-fill]

Flood fill is an algorithm to determine node adjacency in graphics or multidimensional data sets.

Flood Fill (sometimes known as Seed Fill) is an algorithm to determine node adjacency in graphics or multidimensional data sets, commonly used for "paint bucket"-style operations.

See also

475 questions
0
votes
1 answer

Fill WriteableBitmap more efficient

I create WriteableBitmaps on the fly. Is this the efficient and best way to do it? var image = new WriteableBitmap(128, 128); var colorBuffer = Enumerable.Repeat( new[] {this.ImageColor.B, this.ImageColor.G, this.ImageColor.R,…
esskar
  • 10,638
  • 3
  • 36
  • 57
0
votes
3 answers

android using flood fill algorithm getting out of memory exception

after your suggestions i got working code: public class FingerPaint extends Activity { private RelativeLayout drawingLayout; private MyView myView; @Override protected void onCreate(Bundle savedInstanceState) { …
G_S
  • 7,068
  • 2
  • 21
  • 51
0
votes
1 answer

Floodfill Not working (c)

I am having some trouble with my floodfill function not working. The purpose of this assignment is to see if P and C are connected within the array. In the floodfill function it doesnt seem to be changing the '_' to 'P' Sample input 5 1 2 PC 2…
Ryan
  • 57
  • 3
  • 11
0
votes
1 answer

Loop Encountered When Using Flood Fill

I have encountered an infinite loop when running the following code. Inside a grid that is surrounded by blocks, a predefined square is started with that this implementation runs off of. A square is labeled as one if it needs to be visited and two…
Behemyth
  • 195
  • 3
  • 13
0
votes
1 answer

Flood Fill Algorithm in Iphone Apps

I want to implement flood fill algorithm in my iphone app.I have been searching from long days and i have seen all the stack overflow answer but nothing helped me. Please can any one post some sample application code which is using flood fill.
Lakshmi Reddy
  • 313
  • 5
  • 17
-1
votes
1 answer

Recursive flood fill to find max area of shape in 2D array

It is required to find the maximum area of the figure. A figure is a group of cells that has a shared side (1 means that the cell is filled in, 0 - empty). INPUT: 6 10 // array size 1 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1…
yaQvadrat
  • 1
  • 4
-1
votes
2 answers

Flood fill algorithm uncovers all area (Minesweeper)

I'm implementing flood fill algorithm for minesweeper game on C++ and all is fine, but I'am not enjoyed the result of it's work. It's uncovers all area except bombs when in right version it needs to uncover some area with numbers, that represents…
Vlad
  • 3
  • 2
-1
votes
1 answer

Flood fill algorithm is causing OutOfMemory Exception

Well, I'm getting the outline (path) of a building. And there is a problem. When I iterate it's pixels I check if the current pixel is white to start detecting it's walls. What happens with this? When the detection is finished it starts again and…
z3nth10n
  • 2,341
  • 2
  • 25
  • 49
-1
votes
1 answer

Flood fill explanation

Im working with my project with paiting/coloring features.Can anyone explain this flood fill algorithm and how this works? Is this flood fill queue? and what does queue mean(in this algorithm)? public class FloodFill { public void…
John Joe
  • 1
  • 4
-1
votes
1 answer

How do I implement a simultaneous irregular flood fill algorithm in java?

I am looking to implement a flood fill algorithm that selects a number of random points and irregularly spreads all of the points' unique colours simultaneously, until all points are assigned to a colour. I have managed to fill one colour at a…
-1
votes
1 answer

Java Find Grid and FloodFill on BufferedImage

I had a problem when I try to segmentation board game with first try to find grid and floodfill. But i stuck, i flood all pixel white to red and i don't know how to ONLY fill the grid no number or other to fill just gridline. My current result like…
-1
votes
1 answer

"Shadow" in C Flood Fill Program

So I'm having some problems with my Flood fill program, basically what happens is that if you enter a shape smaller that the perimeter it comes back with a "shadow" under it, just more rows. For example my code is set up for a size of ten, and if…
Jake M
  • 11
  • 3
-1
votes
3 answers

array index out of boundary exception floodfill java

I am trying to count number of zero from a 2d array by using floodfill, but I am getting an ArrayIndexOutOfBoundsException. Here is what I've done so far. I commented where the error is. public class floodfill { public static int[][] input =…
Dante
  • 35
  • 9
-1
votes
1 answer

Recursion Algorithm Flood Fill

Every time I run this I get a stack overflow and I know it is because the algorithm never reaches the base case. I also know that iteration is best used in this case but this has to be done recursively. Any tips, tricks or advice as to how to make…
-1
votes
1 answer

Issues with modifying a list based on another list?

Hello I'm fairly new to python and I'm currently trying to construct a minesweeper game. I've made 2 lists, 1 is shown to the player (field) and 1 contains the mines (minefield). I ask the player to select coordinates and the program then checks…
Aapoman
  • 21
  • 1
1 2 3
31
32