HarrisFeature#

class HarrisFeature(kp: list | ndarray | None = None, des: ndarray | None = None, scale: bool = False, orient: bool = False, image: ndarray | None = None)[source]#

Create set of Harris corner features

Inheritance diagram of machinevisiontoolbox.ImagePointFeatures.HarrisFeature

Create set of 2D point features

Parameters:
  • kp (list of N elements, optional) – list of opencv.KeyPoint objects, one per feature, defaults to None

  • des (ndarray(N,M), optional) – Feature descriptor, each is an M-vector, defaults to None

  • scale (bool, optional) – features have an inherent scale, defaults to False

  • orient (bool, optional) – features have an inherent orientation, defaults to False

A BaseFeature2D object:

  • has a length, the number of feature points it contains

  • can be sliced to extract a subset of features

This object behaves like a list, allowing indexing, slicing and iteration over individual features. It also supports a number of convenience methods.

Note

OpenCV consider feature points as opencv.KeyPoint objects and the descriptors as a multirow NumPy array. This class provides a more convenient abstraction.

Methods

distance(other[, metric])

Distance between feature sets

draw(image, *args[, ax, filled, color, ...])

Draw features into image

draw2(image[, color, type])

drawKeypoints(image[, drawing, isift, ...])

Render keypoints into image

drawMatches(im1, sift1, im2, sift2, matches, ...)

filter(**kwargs)

Filter features

gridify(nbins, nfeat)

Sort features into grid

list()

List matches

match(other[, ratio, crosscheck, metric, ...])

Match point features

plot(*args[, ax, filled, color, alpha, ...])

Plot features using Matplotlib

sort([by, descending, inplace])

Sort features

subset([N])

Select subset of features

support(images[, N])

Find support region

table()

Print features in tabular form

Properties

descriptor

Descriptor of feature

id

Image id for feature point

octave

Octave of feature

orientation

Orientation of feature

p

Feature coordinates

scale

Scale of feature

strength

Strength of feature

u

Horizontal coordinate of feature point

v

Vertical coordinate of feature point