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

count transparent pixels in a layer

Community Beginner ,
Jan 27, 2023 Jan 27, 2023

Copy link to clipboard

Copied

Hi,

 

I have a foreground render video (which has an alpha so we know what pixels are transparent vs not).
And I lay it on top of a background video. Basically what i want is to be able to count the pixels that
are transparent. And separately the ones that are not.

 

Is there an easy way to do it ? can be done manually ? or using scripting ? or maybe i should write a plugin using the SDK for it (e.g. an effect plugin that would be applied to a layer) ?

 

I'm new to Adobe PP and video editting, but i hope the terminology i've used is OK. If anything unclear, do let me know.

 

Thanks,
Lukasz

TOPICS
Effects and Titles , How to , SDK

Views

230

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

correct answers 1 Correct answer

Adobe Employee , Jan 27, 2023 Jan 27, 2023

You understand it correctly; an AE API effect plug-in, running in PPro, would be able to detect the alpha (opacity) value of each pixel. 

I'm curious; what would you do, with that information? "At this moment in time, there were 17,239 transparent pixels in the source layer"...?

Votes

Translate

Translate
Adobe Employee ,
Jan 27, 2023 Jan 27, 2023

Copy link to clipboard

Copied

You understand it correctly; an AE API effect plug-in, running in PPro, would be able to detect the alpha (opacity) value of each pixel. 

I'm curious; what would you do, with that information? "At this moment in time, there were 17,239 transparent pixels in the source layer"...?

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
Community Beginner ,
Jan 27, 2023 Jan 27, 2023

Copy link to clipboard

Copied

Thanks for the answer.

 

I want to do that to capture the information about the ratio - number of transparent pixels vs number of all pixels. Cause that render video has an embedded object and i'd like to know its relative size. Hope that makes sense.

 

So the correct approach would be to write a plugin that has access to the pixels and counts the ones with alpha value zero or close to zero. So AE SDK is the right tool for the job and there's no easier alternative, right ?

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
Adobe Employee ,
Jan 27, 2023 Jan 27, 2023

Copy link to clipboard

Copied

LATEST

Yes, AE effect API (as explained in the AE C++ SDK) is the right approach.

You're placing a lot of trust in the Editor to not any of a million different things, that could impact the alpha value of those pixels. 🙂

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