Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Getting ORB descriptor values bit by bit

$
0
0
Hello! **Context:** I am re-implementing the kmeans algorithm into a kmajority algorithm for binary descriptors, like ORB, based on hamming distances, [inspired by this paper](http://imagelab.ing.unimore.it/imagelab/pubblicazioni/2013ElectronicImaging.pdf). This requires, for every binary descriptor in a cluster, to make each bit position of each descriptor "vote" for either 0 or 1 for the final value of that position in the cluster center. Descriptor 1: 0 0 0 0 1 0 1 0 ... Descriptor 2: 1 0 1 0 1 0 1 0 ... Descriptor 3: 1 0 0 0 1 0 0 0 ... --------------------------------- Center : 1 0 0 0 1 0 1 0 ... <-- after majority vote for each bit **Question:** ORB descriptors are stored in their mats as uchar, not bits. They are stored in a Mat of N rows (1 row per descriptor) and 32 columns (32 uchar for 256 bits). Obviously, I'm not interested in uchars, it's the bits I want. Therefore, is requesting the rows with: bool* descriptor = myMat .ptr(rowIndex) ... the right approach if I want to iterate over a descriptor bit by bit instead of uchar by uchar? (I'm pretty unfamiliar with C++).

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>