parseFrameFormat static method
Parses frame format from int to string
-1 is returned if frame format is not valid
Implementation
static String parseFrameFormat(int frameFormat) {
const typeList = ['8U', '8S', '16U', '16S', '32S', '32F', '64F', '16F'];
if (frameFormat == -1) {
return "UnknownFormat";
}
final depth = frameFormat % 8;
if (depth < 0 || depth >= typeList.length) {
return "UnknownFormat";
}
return '${typeList[depth]}C${frameFormat ~/ 8 + 1}';
}