• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Generate mask based on luminance?

Contributor ,
Aug 24, 2016 Aug 24, 2016

Copy link to clipboard

Copied

Hi,

I am familiar with how to create masks within scripting. However, I was wondering if there is any way to generate them based off of luminance values. For example, with this image of fractal noise, would it be possible for a script to procedurally generate a mask around one of the white areas?

Fractal Noise High Contrast_00000.jpg

Many thanks,

Nate

TOPICS
Scripting

Views

485

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 28, 2016 Aug 28, 2016

Copy link to clipboard

Copied

LATEST

Possible? Anything is possible. Easy? Highly unlikely.

What you are asking for is a blob detection algorithm like this : BlobDetection library / v3ga​  You might be able to use this code as a foundational guide for the concept of how to approach building it in ExtendScript maybe. It would require outside libraries is my guess, as ExtendScript isn't this powerful by itself.

Another thought would be using the layer expression sampleImage() as a feeder of color information somehow and then read that via script to then process and try to determine a white area. I doubt the resulting mask detail would be of any high quality due to how heavy sampleImage would be just to gather all of the pixel info to even begin the math of blob detection.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines