Average RGB

Apr 3, 2009 at 12:46am

Average RGB

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.

#43176
Apr 3, 2009 at 12:50am

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.

#154796
Apr 3, 2009 at 9:52am

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

#154797
Apr 3, 2009 at 12:42pm

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.

– Pasted Max Patch, click to expand. –
#154798
Apr 3, 2009 at 8:35pm

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

#154799
Apr 3, 2009 at 8:44pm

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.”

#154800
Apr 3, 2009 at 8:47pm

thanks again, i am one more step ahead.

#154801
Apr 3, 2009 at 8:57pm

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).

#154802

You must be logged in to reply to this topic.