[][src]Struct cv::KeyPoint

pub struct KeyPoint(pub Point<f64, U2>);

A point on an image frame. This type should only be used when the point location is on the image frame in pixel coordinates. This means the keypoint is neither undistorted nor normalized.

Methods from Deref<Target = Point<f64, U2>>

pub fn to_homogeneous(
    &self
) -> Matrix<N, <D as DimNameAdd<U1>>::Output, U1, <DefaultAllocator as Allocator<N, <D as DimNameAdd<U1>>::Output, U1>>::Buffer> where
    D: DimNameAdd<U1>,
    N: One,
    DefaultAllocator: Allocator<N, <D as DimNameAdd<U1>>::Output, U1>, 
[src]

Converts this point into a vector in homogeneous coordinates, i.e., appends a 1 at the end of it.

This is the same as .into().

Example

let p = Point2::new(10.0, 20.0);
assert_eq!(p.to_homogeneous(), Vector3::new(10.0, 20.0, 1.0));

// This works in any dimension.
let p = Point3::new(10.0, 20.0, 30.0);
assert_eq!(p.to_homogeneous(), Vector4::new(10.0, 20.0, 30.0, 1.0));

pub fn len(&self) -> usize[src]

The dimension of this point.

Example

let p = Point2::new(1.0, 2.0);
assert_eq!(p.len(), 2);

// This works in any dimension.
let p = Point3::new(10.0, 20.0, 30.0);
assert_eq!(p.len(), 3);

pub fn stride(&self) -> usize[src]

👎 Deprecated:

This methods is no longer significant and will always return 1.

The stride of this point. This is the number of buffer element separating each component of this point.

pub fn iter(
    &self
) -> MatrixIter<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
[src]

Iterates through this point coordinates.

Example

let p = Point3::new(1.0, 2.0, 3.0);
let mut it = p.iter().cloned();

assert_eq!(it.next(), Some(1.0));
assert_eq!(it.next(), Some(2.0));
assert_eq!(it.next(), Some(3.0));
assert_eq!(it.next(), None);

pub unsafe fn get_unchecked(&self, i: usize) -> &N[src]

Gets a reference to i-th element of this point without bound-checking.

pub fn iter_mut(
    &mut self
) -> MatrixIterMut<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>
[src]

Mutably iterates through this point coordinates.

Example

let mut p = Point3::new(1.0, 2.0, 3.0);

for e in p.iter_mut() {
    *e *= 10.0;
}

assert_eq!(p, Point3::new(10.0, 20.0, 30.0));

pub unsafe fn get_unchecked_mut(&mut self, i: usize) -> &mut N[src]

Gets a mutable reference to i-th element of this point without bound-checking.

pub unsafe fn swap_unchecked(&mut self, i1: usize, i2: usize)[src]

Swaps two entries without bound-checking.

pub fn inf(&self, other: &Point<N, D>) -> Point<N, D>[src]

Computes the infimum (aka. componentwise min) of two points.

pub fn sup(&self, other: &Point<N, D>) -> Point<N, D>[src]

Computes the supremum (aka. componentwise max) of two points.

pub fn inf_sup(&self, other: &Point<N, D>) -> (Point<N, D>, Point<N, D>)[src]

Computes the (infimum, supremum) of two points.

pub fn xx(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn xxx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xy(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn yx(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn yy(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn xxy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xyx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xyy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yxx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yxy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yyx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yyy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xz(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn yz(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn zx(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn zy(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn zz(&self) -> Point<N, U2>[src]

Builds a new point from components of self.

pub fn xxz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xyz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xzx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xzy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn xzz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yxz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yyz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yzx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yzy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn yzz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zxx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zxy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zxz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zyx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zyy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zyz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zzx(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zzy(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

pub fn zzz(&self) -> Point<N, U3>[src]

Builds a new point from components of self.

Trait Implementations

impl AsMut<Point<f64, U2>> for KeyPoint[src]

impl AsRef<Point<f64, U2>> for KeyPoint[src]

impl Clone for KeyPoint[src]

impl Copy for KeyPoint[src]

impl Debug for KeyPoint[src]

impl Deref for KeyPoint[src]

type Target = Point<f64, U2>

The resulting type after dereferencing.

impl DerefMut for KeyPoint[src]

impl From<KeyPoint> for Point<f64, U2>[src]

impl From<Point<f64, U2>> for KeyPoint[src]

impl ImagePoint for KeyPoint[src]

impl PartialEq<KeyPoint> for KeyPoint[src]

impl PartialOrd<KeyPoint> for KeyPoint[src]

impl StructuralPartialEq for KeyPoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,