Ask Your Question

Revision history [back]

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

click to hide/show revision 2
retagged

updated 2014-01-24 07:39:19 -0600

berak gravatar image

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

How to make an array element (class mat), where the elements are bitstrings

Hello,

acutally i work with this code: 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);

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

descriptors(1,1)=184

is there any way to get a bitstring for every element like this example descriptors(1,1)=100111010101 example

descriptors(1,1)=100111010101

and so on 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