【keypoint】in OpenCV

Data structure for salient point detectors in OpenCV:

KeyPoint
{
public:
    // default constructor
    KeyPoint();
    // two complete constructors
    KeyPoint(Point2f _pt, float _size, float _angle=-1,
            float _response=0, int _octave=0, int _class_id=-1);
    KeyPoint(float x, float y, float _size, float _angle=-1,
             float _response=0, int _octave=0, int _class_id=-1);
    // coordinate of the point
    Point2f pt;
    // feature size
    float size;
    // feature orintation in degrees (has negative value if the orientation is not defined/not computed)
    float angle;
    // feature strength (can be used to select only the most prominent key points)
    float response;
    // scale-space octave in which the feature has been found; may correlate with the size
    int octave;
    // point (can be used by feature classifiers or object detectors)
    int class_id;
};

// reading/writing a vector of keypoints to a file storage
void write(FileStorage& fs, const string& name, const vector& keypoints);
void read(const FileNode& node, vector& keypoints);

Each of these interest points contains a vector of descriptors ,

  • an Point2f pt (x coordinate (int), an y coordinate (int)),
  • the scale (float response)
  • the orientation (float angle)
  • the scale-space octave (int octave)
  • the feature size (float size)

if (showDetail)
sbResult.AppendFormat("第{0}点(坐标:{1},尺寸:{2},方向:{3}°,响应:{4},octave:{5}),",
idx, keypoint.Point, keypoint.Size, keypoint.Angle, keypoint.Response, keypoint.Octave);

Each SURF image have X features (descriptors) of 64 dimensions.

Match EACH feature for the image you want to compare to the flann tree of all images finding features with lowest euclidean distance. Then take all the features you found and identify the images in which they belong (means there is minimum 1 feature match in this image). Then do an individual SURF compare to all images with matching SURF features, and select the image with the best match. Also, to gain better matches, you can use the Lowe optimization

Compare the interest points from one image to a list of images in a database ( a list of interest points) –  to build an FLANN index while at the same time keeping track of where the interest points comes from.

  •  construct a tree for every image and then use these tree’s for comparison, OR
  • construct one big tree with the descriptors for all the images which you then use to match a single image against
  • construct ONE flann index for all the images using 4 randomized kd-tree’s, THEN match against this tree
  • match one images to a flann index of all the other images’ SURF descriptors, tracking descriptors identified.  Then take all the images with one or more matching descriptors and do an individual matching. The best image is the found match.
  • Using the Lowe optimization, dists.Data[i, 0] < 0.6 * dists.Data[i, 1])
  • FLANN (Fast Approximate Nearest Neighbor Search Library )

“In keypoint matching step, the nearest neighbor is defined as the keypoint with minimum Euclidean distance for the invariant descriptor vector”.

It seems as the best method for single image SURF comparison is for one image1 with X interest points to search for similar interest point in image2 comparing descriptors. That is:
for (int i=0; i < 64; i++) {
(Descriptor(image1[i])-Descriptor(image2[i]) += DIST;
}

and then select the point with the lowest distance and sum it all up at the end.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

生活在西班牙

自己动手丰衣足食

BlueAsteroid

Just another WordPress.com site

Jing's Blog

Just another WordPress.com site

Start from here......

我的心情魔方

天才遠私廚

希望能做一個分享各種資訊的好地方

语义噪声

西瓜大丸子汤的博客

笑对人生,傲立寰宇

Just another WordPress.com site

Where On Earth Is Waldo?

A Project By Melanie Coles

the Serious Computer Vision Blog

A blog about computer vision and serious stuff

Cauthy's Blog

paper review...

Cornell Computer Vision Seminar Blog

Blog for CS 7670 - Special Topics in Computer Vision

datarazzi

Life through nerd-colored glasses

Luciana Haill

Brainwaves Augmenting Consciousness

槑烎

1,2,∞

Dr Paul Tennent

and the university of nottingham

turn off the lights, please

A bunch of random, thinned and stateless thoughts around the Web

%d bloggers like this: