Forum

Author Topic: Masks_From_Color.py  (Read 2301 times)

rananna

  • Newbie
  • *
  • Posts: 7
    • View Profile
Masks_From_Color.py
« on: December 13, 2017, 08:05:05 PM »
http://wiki.agisoft.com/wiki/Masks_From_Color.py
This is a great script that works very well.
One request though.
Would it be possible to add colors to the selection, each with their tolerance?
One way to do this is to preserve the existing mask when creating a new mask from color.
This would effectively allow for an additive selection.
You would run this script with one color and then run it again with another color and the mask would be additive reflecting the two pass approach.
Anyone know how to modify the script to accomplish this?
Perhaps there is another way to accomplish this?

bmartin

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Masks_From_Color.py
« Reply #1 on: December 20, 2017, 07:49:54 PM »
The possibility to make the mask creation additive would be a very useful feature indeed!

That's one of the ingredients that would be needed in using the Magic Wand feature from Python scripts as I asked in

http://www.agisoft.com/forum/index.php?topic=8165.0

Bruno

kaaiinn

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Masks_From_Color.py
« Reply #2 on: April 27, 2018, 01:55:53 PM »
Big +1 on this from me.
Being in Scotland there are many, many varying colours of grey, white, black and blue in the sky at one time... being able to mask all these through scripting would be incredible.

Have also been looking for a way to only apply these masks in the top 50% of the image (along the horizon) so as not to mask all the important stuff with the same colour in the bottom half...

This could be achieved by either applying the masking to only the top 50%, or by doing the 'subtract selection' at the end to remove the masks that have been made in the bottom half.
« Last Edit: April 27, 2018, 01:58:05 PM by cmckain »