Node - how to pick color from pixel/area?

Dear all,

I want to know if there is a way to pick a color from an image at x/y pixel position or average color value of pixel area.
I have a Keying node to remove green background from a person.
Now I don’t want to pick the ‘Key color’ but I want to get it from the image itself.
So I need a way to pick the color from the image at a certain psoition (can be e.g. a mask) and feed it into the ‘Key color’ input of the keying node. Bteer would be to have an pixel area to get an average value instead of a single pixel.

Is there any way to pick the color at x,y position (or area) like a pipette and take it as color value?

How can I do that?

Thanks…

I think just “Crop” node can works for you.

In this blend http://www.pasteall.org/blend/40202 I use image 10 x 10 px.
In blender’s “logic” if crop is set to 0/0/0/0 keeps left-down pixel visible.
To get visible right-up pixel (green in my example) set crop to 9/9/9/9.
Like that you get separated green pixel.
With scale node set to “render size” you will cover by this pixel-color whole image.
(now I see my screen is not good representation of result, but just follow node tree and you will see.)

In that way you can use image or movie that will generate color from specific pixel position.


Sure just load the image into the movie clip editor (tracker) and add a track. This will provide a colour sample from that location via the Keying Screen node. You simply select the correct movie clip from its node menu. If you use more than one tracker it will average their results. You can also scale the tracker up to gather a larger area of sample.

Ah :slight_smile: Thanks for light in my blindness - much faster and more flexible way :slight_smile: