Floodfill: segment stack overflow
Posted: 2013-01-26T13:15:52-07:00
Input image file: https://www.dropbox.com/s/fq1wj6ahwfk3nxc/stackOv.png
The image is mostly gray, with a number of green (78,211,51) pixels, and a 1 pixel gray border. Windows 7 command:
On 6.8.1-10 and various older versions, the command gives:
The alternative floodfill gives the same error:
I suppose the required stacksize for a floodfill can only be estimated in advance. I have a vague memory that it is set as three times the maximum dimension. Can it be automatically resized as required? Failing that, can we have a "define" that we can use for awkward images such as this one?
I am using this to identify grey pixels that are entirely surrounded by green pixels, as part of a chain for image segmentation and simplification. It generally works fine, but not on this image.
The image is mostly gray, with a number of green (78,211,51) pixels, and a 1 pixel gray border. Windows 7 command:
Code: Select all
"%IMG681%convert" ^
stackOv.png ^
-fill rgb(1,2,3) ^
-bordercolor "rgb(78,211,51)" ^
-draw "color 0,0 filltoborder" ^
x.png
Code: Select all
convert.exe: Segment stack overflow `stackOv.png' @ error/paint.c/FloodfillPaintImage/295.
Code: Select all
"%IMG681%convert" ^
stackOv.png ^
-fill rgb(1,2,3) ^
-floodfill 0x0 rgb(78,211,51) ^
y.png
I am using this to identify grey pixels that are entirely surrounded by green pixels, as part of a chain for image segmentation and simplification. It generally works fine, but not on this image.