toPlanarU8

fun ColorBuffer.toPlanarU8(target: Planar<GrayU8>? = null): Planar<GrayU8>(source)

Converts this ColorBuffer to an image represented as a Planar object with the same number of channels (bands) as the original.

Return

A Planar<GrayU8> instance containing the representation of the ColorBuffer.

Parameters

target

An optional Planar<GrayU8> instance to store the result. If not provided, a new instance will be created.