Nuke binary plugins 15.0.5
 
Loading...
Searching...
No Matches
DD::Image::Filter::Coefficients Struct Reference

#include <Filter.h>

Public Member Functions

float apply (const float *array) const
 
float apply (const float *array, int left, int right) const
 

Public Attributes

const float * array
 coefficients
 
int delta
 distance between cefficients in array
 
int count
 number of coefficients
 
int first
 index to multiply by array[0]
 
float normalize
 common multiplier to make it sum to 1
 

Detailed Description

Coefficients for the filter at a particular position & width.

Member Function Documentation

◆ apply()

float Filter::Coefficients::apply ( const float *  array) const

Multiply an array of pixels by the filter coefficients and return the sum of the results. It is equivalent to the following code:

float sum = pixels[first]*array[0];
for (int i = 1; i < count; i++) sum += pixels[first+i]*array[delta*i];
return sum*normalize;
const float * array
coefficients
Definition: Filter.h:66
float normalize
common multiplier to make it sum to 1
Definition: Filter.h:70
int first
index to multiply by array[0]
Definition: Filter.h:69
int delta
distance between cefficients in array
Definition: Filter.h:67
int count
number of coefficients
Definition: Filter.h:68

Note that in many cases your input is a bounded array or is not an array at all. You can either write equivalent code to read your source, or copy it to an array and call this.

References array, count, delta, first, and normalize.



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com