0

In my project, i read some images, find their keypoints and compute descriptors. And, then i store these descriptors in another image called featureUnclustered.

Now, i want to know the "Datatype" (i.e. float / Uchar / int) of this featureUnclustered image. How can i do so?

Mat input = ("sample.jpg", 1);

Mat descriptor, featureUnclustered;

detector.detect(input, keypoints);
detector.compute(input, keypoints,descriptor); 
featuresUnclustered.push_back(descriptor);        

How can i know the datatype of "featureUnclustered"?

skm
  • 5,015
  • 8
  • 43
  • 104

1 Answers1

0

You could use

Mat::type() which will returns the type of a matrix element. This is an identifier compatible with the CvMat type system, like CV_16SC3 or 16-bit signed 3-channel array, and so on.

Also see the answer here

Community
  • 1
  • 1
Haris
  • 13,645
  • 12
  • 90
  • 121