In the C++ interface to OpenCV, it seems easy enough to check the type of an image. If you have an image cv::Mat img = cv::imread("someImage.xyz")
, you just do int theType = img.type()
.
However, as you would expect, calling img.type()
just gives an integer, an not an enum name (e.g. CV_32FC1
).
Is there an easy way to print out the enum name (e.g. CV_32FC1
) if I know the integer value of the OpenCV enum?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…