[PD] mean color value of a video grid
IOhannes m zmoelnig
zmoelnig at iem.at
Thu Aug 24 13:35:22 CEST 2006
hi
vincent rioux wrote:
>
> pix_video (to read a stream from a webcam e.g.)
> 8 pix_crop (to divide the image)
> pix_snap to take a snapshot as a picture.
> pix_mean_color to compute the mean value.
[pix_snap] is unneeded here: this object will grab the render-buffer
(what you see in the gemwindow) and make it available as a pix-buf.
the output of [pix_video] is exactly that kind of image that is needed
by pix_mean_color.
> Moreover would it be possible to compute these values on a more complex
> shape than a rectangle?
images in Gem are always rectangular.
so there are 2 ways to acchieve what you want:
- make [pix_mean_color] operate on "sub-shapes" of the rectangle image
(neither currently possible with this object nor planned)
- set the unwanted pixels (those between the bounding rectangle and the
borders of your more complex form) with a pixel-mask to some constant
value. the offset you are introducing by this is constant (like the
surrounding pixels) and can therefore be eliminated.
fmasdr
IOhannes
More information about the Pd-list
mailing list