Hi,
I'd find this very usefull:
Select either the paintbrush or the pencil. Hold down shift. The first click on the canvas will now be the startingpoint of a line and every next click with shift-down generates a line from the last click-position to the current click-position.
Do you mean this:
- you add a new layer and draw everything you want to have selected black
- you run the plugin and everything on the current layer which is black, gets selected
?
I stayed with my first solution with the flag. A private boolean, which indicates, whether it's the first call of the render-function. If so, I loop over so whole Sourceimage to determine the min- and maxvalues of the pixels.
The difference:
The default one only detects angles in a certain direction. Mine detects all edges.
See on the image, how some edges aren't detected by the default-one.
The ui of mine is simple. Just a slider to controll the amount of noise-reduce.
First image: Really nice result with noise-reduce = 1 and then normalized (See viewtopic.php?f=16&t=23154 ).
I don't know, how the default-one works. I think it goes in a specific angle with scanlines over the image and the result is the first derive of the pixels in this direction.
Mine goes in x- and y-direction with the second derive and combines the two results (Laplace-filter). First, it reduces the noise with a gaussian blurr.
-> Laplace-Kernel:
0 1 0
1 -4 1
0 1 0