1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
//! Provide 2D image feature detectors and descriptor extractors
mod bow_k_means_trainer;
mod descriptor_matcher;
mod mser;
mod sift;
mod surf;

pub use self::bow_k_means_trainer::*;
pub use self::descriptor_matcher::*;
pub use self::mser::*;
pub use self::sift::*;
pub use self::surf::*;

use core::*;
use mat::*;

/// Basic trait for 2D image feature detectors and descriptor extractors
pub trait Feature2D {
    /// Detects keypoints and computes the descriptors
    fn detect_and_compute(&self, image: &Mat, mask: &Mat) -> (Vec<KeyPoint>, Mat);
}