Average RGB

leleko's icon

hi,

I've been trying to calculate the average color of a video frame and fill the frame with that color, for example if i have a blue sky with white clouds i would like the frame to be light blue.
photoshop has this under filters/blur/average, but processing a lot of frames with photoshop is going to be too much of a task for me.

azs's icon

Look at jit.3m for finding the average for each plane. Then send the message setcell or setall and the rgb values to a jitter matrix.

leleko's icon

hi and thanks for the reply,

this might sound frustrating, but i don't really know how to do that. I just got the program.
I managed to open an play a video in the jit.3m and i suppose the average value is calculated where the text 'mean' is. I just don't have a clue where to find setcell or setail to send the message to jitter matrix, which i thought the jit.3m was on already.

thanks

Jean-Francois Charles's icon

Here is a patch.
To get to know Max, you will have to go the good old way. Tutorials (Max & Jitter), slowly, gently.
Help files, without moderation (the more advanced a user you are, the more you are using the help files and documentation).
Best,
Jean-François Charles.

Max Patch
Copy patch and select New From Clipboard in Max.

leleko's icon

thanks,

the patch doesn't seem to work, does it make a difference if i have a mac? i've copied the patch you sent to the build collective window, but when i try to build it says error line.

and many thanks

azs's icon

Building collective window is for building standalone applications and collections of patches, that might be distributed to other people, so they can use but not edit your finished project.

To open the posted patch, highlight the text and copy it to your computer's clipboard. (Edit>copy) In max, under the "file" tab, choose new from clipboard.

The answers to these kinds of questions can be found under the help tab, under the general heading of "max help."

leleko's icon

thanks again, i am one more step ahead.

leleko's icon

patch opened and i could play a film, but unfortunately the final window is black. It plays the video, shows it before it goes to the jit.3m, but in the window after that it is just blank (black).