The magnetic lasso tool was lost in the port to Qt4. The code was in bad shape, but is now in working condition. Before it is possible to add to Krita as an experimental feature, the magnetic lasso tool will need:
- New icons
- Redesign for on-screen feedback
The algorithm itself could use major tweaking.
- Most straightforward: switch to GSL for the optimization.
- Most important: write least a "localized" optimizer to throw away pointless zig-zags among multiple detected edges.
- Switch to a more advanced canny or differential edge detection algorithm.
- Generate a cache of edge gradients upon tool activation so they don't have to be re-computed constantly.
- Perform pre-blurring on the image.
- Think about multiscale edge detection.
- Set down "committed" points so the path doesn't have to be recomputed with every redraw.
- Possibly hook in with the pre-existing filtering classes.
- Subtle consideration 1: is there a rigorous way to choose a metric for choosing a good trace? (i.e. the edginess() metric)
- Subtle consideration 2: think about performing multiple edge detection simultaneously on luminosity/hue/saturation. We use only luminosity at the moment. (An example of why this is problematic: we will not detect an edge on canvas split down the middle red and green if the two pigments have the same luminosity.)