Inkscape.org
Creating New Extensions Extenstion to grabcut images with paths and automatically calculate outline and outset them
  1. #1
    KadaB KadaB @KadaB

    Hi,

    I'm trying to code an extension that helps me setup standup miniatures to print and cut.

    For that I would like to use OpenCV grabcut-algorithm (you place paths ontop of the image to tell it where you suspect foreground vs background and the algorithm does the rest) and then I want to get the outline of that cut out shape and outset. I know Inkscape can do "bitmap to path" for example to get the outline. However I could also simply use OpenCV to get the extend from the cut out image. I also know that Inkscape can extend/outset a path. I used to use Gimp and Inkscape in somewhat this combination.

    So I need a bit of advice on how to set up such an extension with python and

    • whether it's possible to use inkscape's "outset path" function
    • and how to replace or add an image to the SVG.

    Thx in advance!

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Extenstion to grabcut images with paths and automatically calculate outline and outset them