photog.utils

Undocumented in source.

Members

Functions

clip
T clip(T value)

Clip value to the range provided.

dimensions
size_t[] dimensions(T arr, size_t[] dims)

Recursively determine dimensions of a Slice.

imageMean
auto imageMean(Slice!(T, 3) image)

Calculate the mean pixel value for an image.

pixelMap
auto pixelMap(Slice!(Iterator, 3) image)

Map a function across an image's pixels.

pixelPack
auto pixelPack(Slice!(InputType*, dims, kind) image)

Convert [M, N, P] slice to MxN slice of P arrays.

pixelUnpack
auto pixelUnpack(Slice!(InputType*, dims, kind) image, size_t height, size_t width)

Convert MxN slice of P arrays to [M, N, P] slice.

toFloating
Slice!(ReturnType*, 3) toFloating(Slice!(Iterator, 3) input)

Convert unsigned input to floating point.

toUnsigned
Slice!(ReturnType*, dims) toUnsigned(Slice!(InputType*, dims) input)

Convert floating point input to unsigned.

Templates

IteratorType
template IteratorType(Iterator)

Grabs iterator type at compile-time.

Meta