Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is mask_bounds if the selection contains inner holes?
#4
You can:
Code:
pdb.plug_in_sel2path(image,None)

This creates a vector/path with one stroke per rectangle. Each stroke appears to be 4 "triplets" (24 coordinates: 4 corners times 3 points(*) times 2 coordinates). The difficulty may be to figure out the inner ones from the outer ones (ie, which are "holes"). But if you have only one outer one, the rest being holes, this isn't too hard.

See here for an introductions to paths if needed.

See there for a bunch of scripts that deal with path, in particular the "pathSummary" function in ofn-path-edits.

(*) since lines from the corners are straight lines, the "tangent handles" have the same coordinates as the anchors.

See here for an introductions to paths if needed.
See there for a bunch of scripts that deal with path, in particular the "summary" function in ofn-path-edits.
Reply


Messages In This Thread
RE: What is mask_bounds if the selection contains inner holes? - by Ofnuts - 08-22-2017, 07:20 PM

Forum Jump: