pub trait PCTSignaturesTrait: AlgorithmTrait + PCTSignaturesTraitConst {
Show 22 methods
// Required method
fn as_raw_mut_PCTSignatures(&mut self) -> *mut c_void;
// Provided methods
fn set_grayscale_bits(&mut self, grayscale_bits: i32) -> Result<()> { ... }
fn set_window_radius(&mut self, radius: i32) -> Result<()> { ... }
fn set_weight_x(&mut self, weight: f32) -> Result<()> { ... }
fn set_weight_y(&mut self, weight: f32) -> Result<()> { ... }
fn set_weight_l(&mut self, weight: f32) -> Result<()> { ... }
fn set_weight_a(&mut self, weight: f32) -> Result<()> { ... }
fn set_weight_b(&mut self, weight: f32) -> Result<()> { ... }
fn set_weight_contrast(&mut self, weight: f32) -> Result<()> { ... }
fn set_weight_entropy(&mut self, weight: f32) -> Result<()> { ... }
fn set_weight(&mut self, idx: i32, value: f32) -> Result<()> { ... }
fn set_weights(&mut self, weights: &Vector<f32>) -> Result<()> { ... }
fn set_translation(&mut self, idx: i32, value: f32) -> Result<()> { ... }
fn set_translations(&mut self, translations: &Vector<f32>) -> Result<()> { ... }
fn set_sampling_points(
&mut self,
sampling_points: Vector<Point2f>,
) -> Result<()> { ... }
fn set_init_seed_indexes(
&mut self,
init_seed_indexes: Vector<i32>,
) -> Result<()> { ... }
fn set_iteration_count(&mut self, iteration_count: i32) -> Result<()> { ... }
fn set_max_clusters_count(&mut self, max_clusters_count: i32) -> Result<()> { ... }
fn set_cluster_min_size(&mut self, cluster_min_size: i32) -> Result<()> { ... }
fn set_joining_distance(&mut self, joining_distance: f32) -> Result<()> { ... }
fn set_drop_threshold(&mut self, drop_threshold: f32) -> Result<()> { ... }
fn set_distance_function(&mut self, distance_function: i32) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::xfeatures2d::PCTSignatures
Required Methods§
fn as_raw_mut_PCTSignatures(&mut self) -> *mut c_void
Provided Methods§
Sourcefn set_grayscale_bits(&mut self, grayscale_bits: i32) -> Result<()>
fn set_grayscale_bits(&mut self, grayscale_bits: i32) -> Result<()>
Color resolution of the greyscale bitmap represented in allocated bits (i.e., value 4 means that 16 shades of grey are used). The greyscale bitmap is used for computing contrast and entropy values.
Sourcefn set_window_radius(&mut self, radius: i32) -> Result<()>
fn set_window_radius(&mut self, radius: i32) -> Result<()>
Size of the texture sampling window used to compute contrast and entropy (center of the window is always in the pixel selected by x,y coordinates of the corresponding feature sample).
Sourcefn set_weight_x(&mut self, weight: f32) -> Result<()>
fn set_weight_x(&mut self, weight: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)
Sourcefn set_weight_y(&mut self, weight: f32) -> Result<()>
fn set_weight_y(&mut self, weight: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)
Sourcefn set_weight_l(&mut self, weight: f32) -> Result<()>
fn set_weight_l(&mut self, weight: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)
Sourcefn set_weight_a(&mut self, weight: f32) -> Result<()>
fn set_weight_a(&mut self, weight: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)
Sourcefn set_weight_b(&mut self, weight: f32) -> Result<()>
fn set_weight_b(&mut self, weight: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)
Sourcefn set_weight_contrast(&mut self, weight: f32) -> Result<()>
fn set_weight_contrast(&mut self, weight: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)
Sourcefn set_weight_entropy(&mut self, weight: f32) -> Result<()>
fn set_weight_entropy(&mut self, weight: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space (x,y = position; L,a,b = color in CIE Lab space; c = contrast. e = entropy)
Sourcefn set_weight(&mut self, idx: i32, value: f32) -> Result<()>
fn set_weight(&mut self, idx: i32, value: f32) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space.
§Parameters
- idx: ID of the weight
- value: Value of the weight
Note: WEIGHT_IDX = 0; X_IDX = 1; Y_IDX = 2; L_IDX = 3; A_IDX = 4; B_IDX = 5; CONTRAST_IDX = 6; ENTROPY_IDX = 7;
Sourcefn set_weights(&mut self, weights: &Vector<f32>) -> Result<()>
fn set_weights(&mut self, weights: &Vector<f32>) -> Result<()>
Weights (multiplicative constants) that linearly stretch individual axes of the feature space.
§Parameters
- weights: Values of all weights.
Note: WEIGHT_IDX = 0; X_IDX = 1; Y_IDX = 2; L_IDX = 3; A_IDX = 4; B_IDX = 5; CONTRAST_IDX = 6; ENTROPY_IDX = 7;
Sourcefn set_translation(&mut self, idx: i32, value: f32) -> Result<()>
fn set_translation(&mut self, idx: i32, value: f32) -> Result<()>
Translations of the individual axes of the feature space.
§Parameters
- idx: ID of the translation
- value: Value of the translation
Note: WEIGHT_IDX = 0; X_IDX = 1; Y_IDX = 2; L_IDX = 3; A_IDX = 4; B_IDX = 5; CONTRAST_IDX = 6; ENTROPY_IDX = 7;
Sourcefn set_translations(&mut self, translations: &Vector<f32>) -> Result<()>
fn set_translations(&mut self, translations: &Vector<f32>) -> Result<()>
Translations of the individual axes of the feature space.
§Parameters
- translations: Values of all translations.
Note: WEIGHT_IDX = 0; X_IDX = 1; Y_IDX = 2; L_IDX = 3; A_IDX = 4; B_IDX = 5; CONTRAST_IDX = 6; ENTROPY_IDX = 7;
Sourcefn set_sampling_points(
&mut self,
sampling_points: Vector<Point2f>,
) -> Result<()>
fn set_sampling_points( &mut self, sampling_points: Vector<Point2f>, ) -> Result<()>
Sets sampling points used to sample the input image.
§Parameters
- samplingPoints: Vector of sampling points in range [0..1)
Note: Number of sampling points must be greater or equal to clusterization seed count.
Sourcefn set_init_seed_indexes(
&mut self,
init_seed_indexes: Vector<i32>,
) -> Result<()>
fn set_init_seed_indexes( &mut self, init_seed_indexes: Vector<i32>, ) -> Result<()>
Initial seed indexes for the k-means algorithm.
Sourcefn set_iteration_count(&mut self, iteration_count: i32) -> Result<()>
fn set_iteration_count(&mut self, iteration_count: i32) -> Result<()>
Number of iterations of the k-means clustering. We use fixed number of iterations, since the modified clustering is pruning clusters (not iteratively refining k clusters).
Sourcefn set_max_clusters_count(&mut self, max_clusters_count: i32) -> Result<()>
fn set_max_clusters_count(&mut self, max_clusters_count: i32) -> Result<()>
Maximal number of generated clusters. If the number is exceeded, the clusters are sorted by their weights and the smallest clusters are cropped.
Sourcefn set_cluster_min_size(&mut self, cluster_min_size: i32) -> Result<()>
fn set_cluster_min_size(&mut self, cluster_min_size: i32) -> Result<()>
This parameter multiplied by the index of iteration gives lower limit for cluster size. Clusters containing fewer points than specified by the limit have their centroid dismissed and points are reassigned.
Sourcefn set_joining_distance(&mut self, joining_distance: f32) -> Result<()>
fn set_joining_distance(&mut self, joining_distance: f32) -> Result<()>
Threshold euclidean distance between two centroids. If two cluster centers are closer than this distance, one of the centroid is dismissed and points are reassigned.
Sourcefn set_drop_threshold(&mut self, drop_threshold: f32) -> Result<()>
fn set_drop_threshold(&mut self, drop_threshold: f32) -> Result<()>
Remove centroids in k-means whose weight is lesser or equal to given threshold.
Sourcefn set_distance_function(&mut self, distance_function: i32) -> Result<()>
fn set_distance_function(&mut self, distance_function: i32) -> Result<()>
Distance function selector used for measuring distance between two points in k-means. Available: L0_25, L0_5, L1, L2, L2SQUARED, L5, L_INFINITY.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.