Перейти к содержимому
Compvision.ru
fen1ksss

Features2d detect

Recommended Posts

Hi guys, do anybody know, how the detect-function works? for example here:

Mat img = imread (...);    

    SurfFeatureDetector detector(400); 

    vector<KeyPoint> keypoints;

    detector.detect(img, keypoints);

especially how it's writting in keypoints1 .

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Fragment from opencv\modules\features2d\src\keypoint.cpp

I think it looks quite self-explaining:

void write(FileStorage& fs, const string& objname, const vector<KeyPoint>& keypoints)
{
WriteStructContext ws(fs, objname, CV_NODE_SEQ + CV_NODE_FLOW);

int i, npoints = (int)keypoints.size();
for( i = 0; i < npoints; i++ )
{
const KeyPoint& kpt = keypoints[i];
write(fs, kpt.pt.x);
write(fs, kpt.pt.y);
write(fs, kpt.size);
write(fs, kpt.angle);
write(fs, kpt.response);
write(fs, kpt.octave);
write(fs, kpt.class_id);
}
}
[/code]

Look also to other files in folder opencv\modules\features2d\src\.

Example of using descriptors you can find in samples folder in file

descriptor_extractor_matcher.cpp

If you need SURF descriptor explanation, there a lot of documents in internet (http://en.wikipedia.org/wiki/SURF) for example.

May be I don't understand you correctly?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Создайте учётную запись или войдите для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать учётную запись

Зарегистрируйтесь для создания учётной записи. Это просто!

Зарегистрировать учётную запись

Войти

Уже зарегистрированы? Войдите здесь.

Войти сейчас


  • Сейчас на странице   0 пользователей

    Нет пользователей, просматривающих эту страницу

×