(************************ LOCAL ATTRIBUTES ***************************) PROCEDURE CollectLocalAttributes( READONLY t: Texture; periodic: BOOLEAN; ): REF ARRAY OF LocalAttributes.T; (* Computes the local invariants at every texel of "t", and returns them as a linear array. If "periodic" is FALSE, ignores texels that are adjacent to the border of the image (i..e, only considers texels with coordinates in "[1..NX-2]x[1..NY-2]"). This is useful, for instance, if the texture "t" is a scanned image that is not actually periodic. *) (************************ ENERGY ***************************) PROCEDURE ComputeEnergy( VAR t: Texture; (* Current texture *) eval: LocalEvaluator; (* The local energy function *) VAR (*OUT*) E: LONGREAL; (* Energy of texture *) VAR (*OUT*) dEdt: RealPixelMatrix; (* Energy gradient *) ); (* Computes the total energy "E" of a texture, and its gradient "dEdt" (the partial derivatives of "E" with respect to the texel components). *)