Calculus

TD COMPs / TOPs / 2023 – Present

This Calculus category extends TouchDesigner’s mathematical capabilities into the domain of continuous accumulation and variation. These components translate concepts of integration and differentiation into an image‐based context, enabling the analysis of intensity flow, energy distribution, and cumulative spatial change across visual data.

While derivative‐based operations such as Sobel, Prewitt, and Laplacian operators — which compute first and second image derivatives — are documented within the Edge Detectors category, these Calculus components focus on the complementary process of integration. Integration aggregates pixel values over an image, revealing cumulative structure rather than instantaneous change.

At present, this category remains small, with only a limited set of components. However, future additions will expand this foundation.

Together, these tools form a bridge between traditional mathematical calculus and digital image processing — transforming continuous mathematical theory into tangible, visual computation.

Index:
Integral

Integral

Summed Area Computation

This component calculates the integral image (also known as the summed area table) of the input, producing an output where each pixel represents the cumulative sum of all pixel values above and to the left of its position. This operation is widely used in computer vision and image analysis, providing an efficient way to compute regional sums or averages with constant‐time lookups — fundamental to algorithms like Haar feature detection, adaptive thresholding, and local filtering.

Formally, the integral image is defined as:

ΙΣ (x,y) = i=0x j=0y Ι(i,j)

In addition to the standard integral, this component also includes an experimental Product mode. Rather than summing pixel values, this mode computes the cumulative product of all pixels above and to the left of each position — effectively generating a product area table. While not commonly applied in practical image processing, this operation serves as a conceptual counterpart to the integral, emphasizing multiplicative relationships instead of additive ones.

Formally, the product image is defined as:

ΙΠ (x,y) = i=0x j=0y Ι(i,j)

Together, these operations extend the notion of cumulative image accumulation into both additive and multiplicative domains, revealing new ways to explore spatial relationships and intensity distributions in images.

Resources:

Download the .tox files
Integral Image on Medium

Parameters

Operation:

Specifies which type of accumulation is performed across the input image.
Integral or Product.

Epsilon:

Defines a small positive constant used to clamp near‐zero pixel values when the Operation is set to Product. This prevents numerical underflow and ensures that valid results are maintained even in dark or low‐intensity regions of the input image.

In‐ / Outputs

Input 0TOP image to be processed.

Output 0TOP calculated accumulation of the input image.

Updated19/10/2025