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

Flood it game, crash after some tries

Task is to create a flood-it game in a 20x60 game, starting in the upper left corner. Numbers are used instead of colours for ease. So, the code seems to be working fine up to one point. But after a certain amount of rounds, player plays and then it…
Konzo
  • 37
  • 7
0
votes
0 answers

Qt- How to get the color of a QPoint in QImage for QPixmap

I am trying to implement the flood-fill algorithm, which requires on each iteration to get the color of point in an area. But the color of the selected point is always the background color even if I have drawn something. void…
rednefed
  • 71
  • 2
  • 11
0
votes
1 answer

How can I read from a .txt file to determine the size of a 2-D array?

I am working on a flood-fill recursion assignment where I have to read an ASCII art text file and fill it in. The assignment can be found here: https://faculty.utrgv.edu/robert.schweller/CS2380/homework/hw10.pdf Recursion() //construcor { column…
Josh Garza
  • 63
  • 1
  • 7
0
votes
2 answers

P5 Flood Fill Attempt

I have been attempting to create a flood fill function using an initial mouseX and mouseY value. After experimenting and failing with a 4 way recursive method I found an article that suggested using an array to store the 4 way values and queue them…
David
  • 27
  • 4
0
votes
2 answers

Calculating un-floodfill-able area

I have a 2D array (n * m) as a canvas and coordinates of Used points (startingPoints) in it. I have to calculate, how many points in it is not fieldable with floodfill from outside of the canvas. Field can go only in 4 directions and there are three…
user7558351
0
votes
0 answers

How to Implement FloodFill Algorithm in iphone

Possible Duplicate: FloodFill in iphone I want to implement floodfill algorithm in iphone.What are the methods are used to implement the floodfill algorithm in iphone.Please any one guide me in this regard. If i want to include any of the…
kanmani
  • 671
  • 1
  • 10
  • 28
0
votes
3 answers

What sort of fuzzy flood fill algorithms are there?

I'm implementing a flood fill algorithm for the project I'm currently working on. I'm using it for the normal purpose, image editing. I have no problem with the basic algorithm, but I'd like a better looking fill. In many cases areas of my image…
Edward
  • 1
  • 1
0
votes
2 answers

Implementing a flood algorithm in javascript

Suppose I have a grid in javascript represented as such: ** Note this is just a tiny grid to serve as an example. { "width": 5, "height": 5, "nodes": [ [{ "x": 0, "y": 0, "walkable":…
Chris Scott
  • 583
  • 1
  • 7
  • 23
0
votes
0 answers

Flood fill algorithm for Visual Basic

I've looked online for a flood fill algorithm in visual basic, but I couldn't find one that made sense to me. I am a beginner at vb, which is probably why. I have tried to use Wikipedia's algorithm on flood fill, and I understand the logic of how…
0
votes
1 answer

Minesweeper floodfill algorithm Python

def floodfill(col,rowb,neigh,bombpos): #neigh is number of bombs (neighbors) around the position (row,col) try: neigh[rowb][col] bombpos[rowb][col] visit[rowb][col] except IndexError: return #if the position is an isolated position,…
0
votes
1 answer

Flood Fill Java (filling a circle in a canvas)

I am trying to fill a circle, i made in my canvas with some dots, using the floodfill method. Only the circle should be filled, nothing outside. So i made a list, in which i stored all the points that are already marked in the canvas. private…
Calimera
  • 145
  • 2
  • 13
0
votes
2 answers

Excel Fill blank rows with values from above

Looking to fill blank values in a row with the 'top' value, similar to the functionality provided by Editing>Fill>Top. The difference being that the Fill function requires you to go row-by-row rather than applying itself to a larger dataset. Example…
Tyler Dickson
  • 473
  • 1
  • 7
  • 24
0
votes
1 answer

Seed fill using recursive call in Java - Stackoverflow error

I am implementing a simple Seed fill algorithm using recursive call. The problem is that its throwing this exception on the recursive call: Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError I am trying to fill only small spaces,…
T.Nosek
  • 31
  • 9
0
votes
2 answers

How to use flood fill for coloring a wall on Video Camera using OpenCV?

I need to fill wall paint with real time video camera using flood fill, the below code results in a white layer on the image: (void) processImage:(cv::Mat&)image { cv::Mat mask; cv::Point seed(100,200); cvtColor(image, image,…
0
votes
1 answer

Android flood fill - Works on one image but does not work on a diffrent one

I am trying to make an android app that fills in the picture. Here is the code that floods the white area in: public class floodfill { public void flood(Bitmap bitmap, int x, int y){ int color; int red; int green; …