flood-fill

OpenCV FloodFill with multiple seeds

爱⌒轻易说出口 提交于 2019-12-22 11:03:03
问题 Is there a floodFill function for python/openCV that takes a list of seeds and starts changing the color of its neighbours? I know that simplecv as a function like that SimpleCV floodFill. OpenCV says it has two floodFill functions when that uses a mask and another one that doesn't, documentation, I'm not being able to use the opencv floodfill function without a mask and with a list of seeds. Any help? This is what I'm trying to do so far: A=array([[0,1,1,0],[0,0,0,0],[1,1,1,1],[1,1,1,1]],np

White spaces left in coloring using QueueLinearFloodFillAlgorithm

此生再无相见时 提交于 2019-12-22 09:46:55
问题 I am trying to implement flood fill algorithm in android. It was working very slow, so I tried queue linear flood fill algorithm according to this link How to use flood fill algorithm in Android? It is working fast but the portion is not completely colored. There are some white spaces left on the edgeslike in this picture. I used the following code: public class QueueLinearFloodFiller { protected Bitmap image = null; protected int[] tolerance = new int[] { 0, 0, 0 }; protected int width = 0;

FloodFill in iPhone

纵饮孤独 提交于 2019-12-19 03:24:31
问题 I'm very new to iPhone development. I want to create a application using FloodFill algorithm in iPhone. I'm have no idea about FloodFill. Please Explain me the purpose of FloodFill algorithm.If you give a sample application for FloodFill(iPhone)means I'm really, really happy..Because I'm exploring about FloodFill since morning but, nothing I'm found. My task is, I want to fill the image with color as part by part. Which means, if I'm choosing one color and click on the particular area of the

Vector graphics flood fill algorithms?

非 Y 不嫁゛ 提交于 2019-12-18 13:00:37
问题 I am working on a simple drawing application, and i need an algorithm to make flood fills. The user workflow will look like this (similar to Flash CS, just more simpler): the user draws straight lines on the workspace. These are treated as vectors, and can be selected and moved after they are drawn. user selects the fill tool, and clicks on the drawing area. If the area is surrounded by lines in every direction a fill is applied to the area. if the lines are moved after the fill is applied,

Flood filling for number plate recognition

梦想与她 提交于 2019-12-18 08:58:23
问题 I have a number plate which is a binary image. I performed dilation to the image to thicken the edges then "flood filling", lastly erosion for thinning: But i want my output to be like this: Can anyone help me, please? And show me how to get the desired output. ab=imread('test1.png'); level=graythresh(ab); ab=im2bw(ab,level); se=strel('disk',1); ab=imdilate(ab,se); ab=imfill(ab,'holes'); ab=bwmorph(ab,'thin',1); ab=imerode(ab,strel('line',3,90)); figure();imshow(ab,[]); title('floodFilling');

QuickFill/flood fill algorithm in C#/VB.NET

时光毁灭记忆、已成空白 提交于 2019-12-18 07:21:56
问题 I need a flood fill algorithm to fill existing raster shapes with various colors and fill patterns. From what I know, the QuickFill algorithm is the best way to do a flood fill. I've found a number of implementations, but they are all in C++ and use Windows SDK functions. The problem is that I need a .NET implementation. If worse comes to worse I can write a new implementation, but I would rather use an existing implementation (that hopefully doesn't have bugs). Is anyone aware of an existing

QuickFill/flood fill algorithm in C#/VB.NET

自闭症网瘾萝莉.ら 提交于 2019-12-18 07:19:00
问题 I need a flood fill algorithm to fill existing raster shapes with various colors and fill patterns. From what I know, the QuickFill algorithm is the best way to do a flood fill. I've found a number of implementations, but they are all in C++ and use Windows SDK functions. The problem is that I need a .NET implementation. If worse comes to worse I can write a new implementation, but I would rather use an existing implementation (that hopefully doesn't have bugs). Is anyone aware of an existing

android using flood fill algorithm getting out of memory exception

江枫思渺然 提交于 2019-12-18 05:26:10
问题 after your suggestions i got working code: public class FingerPaint extends Activity { private RelativeLayout drawingLayout; private MyView myView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myView = new MyView(this); setContentView(myView); drawingLayout.addView(myView); } public class MyView extends View { private Paint paint; private Path path; Bitmap mBitmap; ProgressDialog pd; final Point p1 = new Point(); Canvas canvas; //Bitmap

OpenCV - Floodfill onto new Mat

江枫思渺然 提交于 2019-12-17 18:29:13
问题 Given a point on an image, I'd like to floodfill all points connected to that point - but onto a new image. A naive way to do this would be to floodfill the original image to a special magic colour value. Then, visit each pixel, and copy all pixels with this magic colour value to the new image. There must be a better way! 回答1: Why don't you use the second variant of cv::floodFill to create a mask? int floodFill(InputOutputArray image, InputOutputArray mask, Point seedPoint, Scalar newVal,

how to add mouseClicked to script

帅比萌擦擦* 提交于 2019-12-13 20:26:32
问题 I have floodfill algorithm and I want add to this mouseClicked, but I dont know how becouse I have many errors. Here is my code. I want get the x,y possition from mouseClicked and give it to "floodFill(image,x,y, yellow);" Can anyone help me? thanks import java.awt.Point; import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JLabel; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; class