pdft.color.klt

Contents

pdft.color.klt#

pdft.color.klt(images)[source]#

The principal axes of the pixel colours of images ((..., H, W, C)), largest variance first.

The Karhunen-Loeve transform of the colours: an orthonormal space whose planes are uncorrelated over these pixels, so the inverse is the transpose and the error in its coefficients is the error in the image. On photographs the first axis is a luminance (all its weights positive) with about nine tenths of the variance. The sign of each axis is fixed by making its largest weight positive. Fit it on training images.

Return type:

ColorSpace