Measure the #Hex color in frame for every frame in a specific area

New Here ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

Hello,

 

Kinda stumped and not sure how to achieve this. I have an animation that has 10,000 frames. Inside those frames there is a primary color that exists in majority of the video and I would like to grab the hex value for that or the RGB whichever is easier. I than want it to take those values for all 10k frames and put it somewhere I can copy and paste from so it can ultimately go into an excel spreadsheet. 

 

Is this doable?

TOPICS
Error or problem , Expressions , How to , Import and export , Scripting , User interface or workspaces

Views

69

Likes

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 Community Professional ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

Interesting scripting question.

 

An expression should be able to sample the same coordinates for color value each frame to set the color value elsewhere in After Effects, I'm not sure if the results can be exported though.

 

So... I guess I'm not providing and answer and just pondering that this is interesting.  

Likes

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 Community Professional ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

As Warren pointed out, expressions have sampleImage to read those color values. Scripts cannot do that directly, but you could write a script that

- generates the expression

- reads the post expression value of the property with that expression

Not really sure that exactly you mean with "primary color that exists in majority of the video". If you want to sample a particular pixel or the average color of a particular area that's easy. If you want to figure out something like "the color that most pixels have", that's much more tricky.

Likes

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 Community Professional ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

LATEST

Agree with Mathias. It might be useful to actually define "primary color" more clearly. aside from the considerations on how to actually sample it, you may need to consider that there could be deviations even within a single frame that you may not "see", but that technically produce different values for each pixel. As such in fact you may also require additional processing with effects to cleanly isolate specific color ranges. A reference image/ screenshot might help to get at least an idea about the task.

 

Mylenium

Likes

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