cv.jit.floodfill and max crashes
Hello
I'm stack with cv.jit.floodfill object.
I'm trying to draw on a screen and apply masks to the drawings.
cv.jit.floodfill does it perfectly, but every second or third time when I close the patch,
application crashes. Sometimes it happens even when I just start metro.
I feel that the reason is somehow connected with cv.jit.floodfill, because sometimes it does not react to LCD output, and I have to change treshold to make it work. Also I notice some onnection of those crashes with undo mode of the drawing. In the example patch there is matrixset used for this mode. If I cut this option in simpler version of this patch, then crashes are much less regular, but still they happen!
PS. This Open GL drawing, when I do something similar in CPU, MAX never crashes. But I need the effect in Open GL.
Any idea about what and where might be the reason?
I'm already more then a week in this clinch...
example patch is for windows!
thnkss!
Alex
So, continue to crash max everu third time when closing the patch and sometimes when loading. this is new simplyfied version, even without OpenGL. Still trying to guess, is it cv.jit.floodfill, or I do something wrong with jit.ops there.
Would be greate to get any opinion
Alex
Well, I'll go on with this post.
It seems I can not figure out why combination of lit.lcd and cv.jit.floodfill crashes max on patch closing.
So I'm thinking about side ways to get something like floodfill functionality, but much simpler. In fact I need to make transparent mask around simple closed shape. The drawing is
black and white, so the matrix is binary. So the object should be a normal Magic Wand from any illustration software, but only for black color.
It seems that I have to scan a matrix and output a new one with only those pixels ON, which don't have neighboors of other colour.
Would it be possible to do it with jitter objects - iter, zl, spill, or this task requires scripting?
I guess this task is rather trivial and has been solved long time ago, so may be there are some internet sources for such an algorithm?
I attach couple picture of what I need - b/w drawing with mask apllied.
any comments and directions will be appreciated
Alex