mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
added basic support for CV_16F (the new datatype etc.) (#12463)
* added basic support for CV_16F (the new datatype etc.). CV_USRTYPE1 is now equal to CV_16F, which may break some [rarely used] functionality. We'll see * fixed just introduced bug in norm; reverted errorneous changes in Torch importer (need to find a better solution) * addressed some issues found during the PR review * restored the patch to fix some perf test failures
This commit is contained in:
@@ -43,15 +43,15 @@ static const char* getTestOpMath(unsigned testOp)
|
||||
|
||||
const char* depthToString_(int depth)
|
||||
{
|
||||
static const char* depthNames[] = { "CV_8U", "CV_8S", "CV_16U", "CV_16S", "CV_32S", "CV_32F", "CV_64F", "CV_USRTYPE1" };
|
||||
return (depth <= CV_USRTYPE1 && depth >= 0) ? depthNames[depth] : NULL;
|
||||
static const char* depthNames[] = { "CV_8U", "CV_8S", "CV_16U", "CV_16S", "CV_32S", "CV_32F", "CV_64F", "CV_16F" };
|
||||
return (depth <= CV_16F && depth >= 0) ? depthNames[depth] : NULL;
|
||||
}
|
||||
|
||||
const cv::String typeToString_(int type)
|
||||
{
|
||||
int depth = CV_MAT_DEPTH(type);
|
||||
int cn = CV_MAT_CN(type);
|
||||
if (depth >= 0 && depth <= CV_USRTYPE1)
|
||||
if (depth >= 0 && depth <= CV_16F)
|
||||
return cv::format("%sC%d", depthToString_(depth), cn);
|
||||
return cv::String();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user