Eyeon:Script/Reference/Applications/Fuse/Classes/Image/SampleAreaD

From VFXPedia

Jump to: navigation, search

Contents


Summary

This function will sample an area of the image, using the co-ordinates specified by the first two arguments, and fill the Pixel object p with the average of the pixels within the area. If the co-ordinates provided include pixels outside the actual bounds of the image, the pixels will besampled from the edge of the image.

See SampleAreaW and SampleAreaB for functions that treat out of bound sampling in different ways.

Before using the SampleArea methods, initial setup must be done, which pre-calculates values needed by the area sampling functions. Be aware however area sampling is a very memory intensive approach and should only be used if “full quality” is required. The setup is done using the UseSAT()function. This maintains a reference count, and so an equivalent RecycleSAT() must be done once you’re finished area sampling. Without the RecycleSAT(), Fusion will not be able to free up the pre-calculated values until the whole Image itself is destroyed.


Usage

Image:SampleAreaD(number x1, number y1, number x2, number y2, number x3, number y3, number x4, number y4, Pixel p)

x1, x2, x3, x4 (number, required)
The x co-ordinate of the pixel to be sampled.
y1, y2, y3, y4 (number, required)
The y co-ordinate of the pixel to be sampled.
p (pixel, required)
A Pixel object that will be filled with the results.

Example



Tips for SampleAreaD (edit)

EyeonTips:Script/Reference/Applications/Fuse/Classes/Image/SampleAreaD