How to make an array element (class mat), where the elements are bitstrings
Hello,
acutally i work with this code:
Mat image = imread("img1.ppm",CV_LOAD_IMAGE_GRAYSCALE);
ORB orb;
vector<key_points>;
Mat descriptors;
orb.detect(image,key_points,Mat());
orb.compute(image,key_points,descriptors);
so the elements from Mat descriptors is uchar (usigned char). So i get for example:
descriptors(1,1)=184
is there any way to get a bitstring for every element like this example
descriptors(1,1)=100111010101
and so on? I need this, because i use ORB and ORB uses BRIEF descriptor
my first try was: Mat descriptors(rows,cols,CV_32FC2); and it fail
please help me
what do you need the bits for ? visualization ?
uchar b = descriptors.at<uchar>(1,1); for(int i=0;i<8;i++) cerr << ((b&(1<<i))?1:0); cerr << endl;