prepareRgb method
Implementation
VisionImageInput prepareRgb(
Uint8List rgb, {
required int height,
required int width,
}) {
final (outH, outW) = resizedSize(height, width);
if (rgb.length != height * width * 3) {
throw ArgumentError('expected height * width * 3 packed RGB bytes');
}
final pixels = _resizeRgb(rgb, height, width, outH, outW);
return _patchify(
List.filled(temporalPatchSize, pixels),
outH,
outW,
patchSize,
mergeSize,
);
}