Ask Your Question

noviceopencvuser's profile - activity

2013-07-20 23:56:42 -0600 commented answer what is the dimension of feature descriptor from BRISK and FREAK? How do I compute

What is the significance of this type (uchar/float)...why they could be different !!! Under what circumstances they will be different ? and what does that 'n' denotes? Sorry for asking such trivial stuffs ...but I need to understand

2013-07-20 10:26:51 -0600 asked a question what is the dimension of feature descriptor from BRISK and FREAK? How do I compute

How can I access the feature descriptor from FREAK and Brisk in oepncv framework....

for e.g.

#include <cv.hpp>
#include <cxcore.hpp>
#include <highgui.h>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/nonfree/features2d.hpp>


int main()
{

const char * PimA="water1.jpg";   // object
const char * PimB="water2.jpg"; // image

cv::Mat GrayA =cv::imread(PimA);
cv::Mat GrayB =cv::imread(PimB);

std::vector<cv::KeyPoint> keypointsA, keypointsB;
cv::Mat descriptorsA, descriptorsB;

int Threshl=60;
int Octaves=4; 
float PatternScales=1.0f;
cv::BRISK  BRISKD(Threshl,Octaves,PatternScales);//initialize algoritm
BRISKD.create("Feature2D.BRISK");

BRISKD.detect(GrayA, keypointsA);
BRISKD.compute(GrayA, keypointsA,descriptorsA);

BRISKD.detect(GrayB, keypointsB);
BRISKD.compute(GrayB, keypointsB,descriptorsB);
}

Now I want to access the elements inside descriptorsA and descriptorsB

what will be the dimension of those feature descriptors as well!