Struct opencv::xfeatures2d::LATCH
source · [−]pub struct LATCH { /* private fields */ }
Expand description
latch Class for computing the LATCH descriptor. If you find this code useful, please add a reference to the following paper in your work: Gil Levi and Tal Hassner, “LATCH: Learned Arrangements of Three Patch Codes”, arXiv preprint arXiv:1501.03719, 15 Jan. 2015
LATCH is a binary descriptor based on learned comparisons of triplets of image patches.
- bytes is the size of the descriptor - can be 64, 32, 16, 8, 4, 2 or 1
- rotationInvariance - whether or not the descriptor should compansate for orientation changes.
- half_ssd_size - the size of half of the mini-patches size. For example, if we would like to compare triplets of patches of size 7x7x then the half_ssd_size should be (7-1)/2 = 3.
- sigma - sigma value for GaussianBlur smoothing of the source image. Source image will be used without smoothing in case sigma value is 0.
Note: the descriptor can be coupled with any keypoint extractor. The only demand is that if you use set rotationInvariance = True then you will have to use an extractor which estimates the patch orientation (in degrees). Examples for such extractors are ORB and SIFT.
Note: a complete example can be found under /samples/cpp/tutorial_code/xfeatures2D/latch_match.cpp
Implementations
Trait Implementations
sourceimpl AlgorithmTrait for LATCH
impl AlgorithmTrait for LATCH
sourceimpl AlgorithmTraitConst for LATCH
impl AlgorithmTraitConst for LATCH
fn as_raw_Algorithm(&self) -> *const c_void
sourcefn write(&self, fs: &mut FileStorage) -> Result<()>
fn write(&self, fs: &mut FileStorage) -> Result<()>
Stores algorithm parameters in a file storage
sourcefn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
simplified API for language bindings Stores algorithm parameters in a file storage Read more
sourcefn empty(&self) -> Result<bool>
fn empty(&self) -> Result<bool>
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
sourcefn save(&self, filename: &str) -> Result<()>
fn save(&self, filename: &str) -> Result<()>
Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more
sourcefn get_default_name(&self) -> Result<String>
fn get_default_name(&self) -> Result<String>
Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string. Read more
sourceimpl Boxed for LATCH
impl Boxed for LATCH
sourceimpl Feature2DTrait for LATCH
impl Feature2DTrait for LATCH
fn as_raw_mut_Feature2D(&mut self) -> *mut c_void
sourcefn detect(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &dyn ToInputArray
) -> Result<()>
fn detect(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &dyn ToInputArray
) -> Result<()>
Detects keypoints in an image (first variant) or image set (second variant). Read more
sourcefn detect_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &dyn ToInputArray
) -> Result<()>
fn detect_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &dyn ToInputArray
) -> Result<()>
Detects keypoints in an image (first variant) or image set (second variant). Read more
sourcefn compute(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
fn compute(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). Read more
sourcefn compute_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
fn compute_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). Read more
sourcefn detect_and_compute(
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
fn detect_and_compute(
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
Detects keypoints and computes the descriptors Read more
fn read(&mut self, file_name: &str) -> Result<()>
fn read_1(&mut self, unnamed: &FileNode) -> Result<()>
sourceimpl Feature2DTraitConst for LATCH
impl Feature2DTraitConst for LATCH
fn as_raw_Feature2D(&self) -> *const c_void
fn descriptor_size(&self) -> Result<i32>
fn descriptor_type(&self) -> Result<i32>
fn default_norm(&self) -> Result<i32>
fn write(&self, file_name: &str) -> Result<()>
fn write_1(&self, unnamed: &mut FileStorage) -> Result<()>
fn get_default_name(&self) -> Result<String>
sourceimpl LATCHTrait for LATCH
impl LATCHTrait for LATCH
fn as_raw_mut_LATCH(&mut self) -> *mut c_void
sourceimpl LATCHTraitConst for LATCH
impl LATCHTraitConst for LATCH
fn as_raw_LATCH(&self) -> *const c_void
impl Send for LATCH
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more