Module object_detector_rust::feature
source · Expand description
This module contains traits and structs for feature descriptors that can be extracted from images.
Examples
use object_detector_rust::feature::{DummyFeature, Feature};
use image::{DynamicImage, RgbImage};
let image = DynamicImage::ImageRgb8(RgbImage::new(16, 16));
let feature = DummyFeature::new(123.0);
let descriptor = feature.extract(&image).unwrap();
assert_eq!(descriptor.len(), 1);
assert_eq!(descriptor[0], 123.0);This example shows how to use the DummyFeature struct, which is a simple implementation of the Feature trait, to extract a feature descriptor from an image.
Structs
- Struct for extracting BRIEF (Binary Robust Independent Elementary Features) from an image.
- Dummy feature descriptor that always returns the same value
- Struct for extracting HOG features from images.
Traits
- Trait for feature descriptors that can be extracted from images