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?
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.
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.
Copy link to clipboard
Copied
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