pub trait HOGDescriptorTraitConst {
Show 40 methods
// Required method
fn as_raw_HOGDescriptor(&self) -> *const c_void;
// Provided methods
fn win_size(&self) -> Size { ... }
fn block_size(&self) -> Size { ... }
fn block_stride(&self) -> Size { ... }
fn cell_size(&self) -> Size { ... }
fn nbins(&self) -> i32 { ... }
fn deriv_aperture(&self) -> i32 { ... }
fn win_sigma(&self) -> f64 { ... }
fn histogram_norm_type(&self) -> HOGDescriptor_HistogramNormType { ... }
fn l2_hys_threshold(&self) -> f64 { ... }
fn gamma_correction(&self) -> bool { ... }
fn svm_detector(&self) -> Vector<f32> { ... }
fn ocl_svm_detector(&self) -> UMat { ... }
fn free_coef(&self) -> f32 { ... }
fn nlevels(&self) -> i32 { ... }
fn signed_gradient(&self) -> bool { ... }
fn get_descriptor_size(&self) -> Result<size_t> { ... }
fn check_detector_size(&self) -> Result<bool> { ... }
fn get_win_sigma(&self) -> Result<f64> { ... }
fn write(&self, fs: &mut impl FileStorageTrait, objname: &str) -> Result<()> { ... }
fn save(&self, filename: &str, objname: &str) -> Result<()> { ... }
fn save_def(&self, filename: &str) -> Result<()> { ... }
fn copy_to(&self, c: &mut impl HOGDescriptorTrait) -> Result<()> { ... }
fn compute(
&self,
img: &impl ToInputArray,
descriptors: &mut Vector<f32>,
win_stride: Size,
padding: Size,
locations: &Vector<Point>,
) -> Result<()> { ... }
fn compute_def(
&self,
img: &impl ToInputArray,
descriptors: &mut Vector<f32>,
) -> Result<()> { ... }
fn detect_weights(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
weights: &mut Vector<f64>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
search_locations: &Vector<Point>,
) -> Result<()> { ... }
fn detect_weights_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
weights: &mut Vector<f64>,
) -> Result<()> { ... }
fn detect(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
search_locations: &Vector<Point>,
) -> Result<()> { ... }
fn detect_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
) -> Result<()> { ... }
fn detect_multi_scale_weights(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
found_weights: &mut Vector<f64>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
scale: f64,
group_threshold: f64,
use_meanshift_grouping: bool,
) -> Result<()> { ... }
fn detect_multi_scale_weights_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
found_weights: &mut Vector<f64>,
) -> Result<()> { ... }
fn detect_multi_scale(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
scale: f64,
group_threshold: f64,
use_meanshift_grouping: bool,
) -> Result<()> { ... }
fn detect_multi_scale_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
) -> Result<()> { ... }
fn compute_gradient(
&self,
img: &impl ToInputArray,
grad: &mut impl ToInputOutputArray,
angle_ofs: &mut impl ToInputOutputArray,
padding_tl: Size,
padding_br: Size,
) -> Result<()> { ... }
fn compute_gradient_def(
&self,
img: &impl ToInputArray,
grad: &mut impl ToInputOutputArray,
angle_ofs: &mut impl ToInputOutputArray,
) -> Result<()> { ... }
fn detect_roi(
&self,
img: &impl ToInputArray,
locations: &Vector<Point>,
found_locations: &mut Vector<Point>,
confidences: &mut Vector<f64>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
) -> Result<()> { ... }
fn detect_roi_def(
&self,
img: &impl ToInputArray,
locations: &Vector<Point>,
found_locations: &mut Vector<Point>,
confidences: &mut Vector<f64>,
) -> Result<()> { ... }
fn detect_multi_scale_roi(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
locations: &mut Vector<DetectionROI>,
hit_threshold: f64,
group_threshold: i32,
) -> Result<()> { ... }
fn detect_multi_scale_roi_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
locations: &mut Vector<DetectionROI>,
) -> Result<()> { ... }
fn group_rectangles(
&self,
rect_list: &mut Vector<Rect>,
weights: &mut Vector<f64>,
group_threshold: i32,
eps: f64,
) -> Result<()> { ... }
}
Expand description
Constant methods for crate::objdetect::HOGDescriptor
Required Methods§
fn as_raw_HOGDescriptor(&self) -> *const c_void
Provided Methods§
Sourcefn win_size(&self) -> Size
fn win_size(&self) -> Size
Detection window size. Align to block size and block stride. Default value is Size(64,128).
Sourcefn block_size(&self) -> Size
fn block_size(&self) -> Size
Block size in pixels. Align to cell size. Default value is Size(16,16).
Sourcefn block_stride(&self) -> Size
fn block_stride(&self) -> Size
Block stride. It must be a multiple of cell size. Default value is Size(8,8).
Sourcefn nbins(&self) -> i32
fn nbins(&self) -> i32
Number of bins used in the calculation of histogram of gradients. Default value is 9.
Sourcefn deriv_aperture(&self) -> i32
fn deriv_aperture(&self) -> i32
not documented
Sourcefn histogram_norm_type(&self) -> HOGDescriptor_HistogramNormType
fn histogram_norm_type(&self) -> HOGDescriptor_HistogramNormType
histogramNormType
Sourcefn l2_hys_threshold(&self) -> f64
fn l2_hys_threshold(&self) -> f64
L2-Hys normalization method shrinkage.
Sourcefn gamma_correction(&self) -> bool
fn gamma_correction(&self) -> bool
Flag to specify whether the gamma correction preprocessing is required or not.
Sourcefn svm_detector(&self) -> Vector<f32>
fn svm_detector(&self) -> Vector<f32>
coefficients for the linear SVM classifier.
Sourcefn ocl_svm_detector(&self) -> UMat
fn ocl_svm_detector(&self) -> UMat
coefficients for the linear SVM classifier used when OpenCL is enabled
Sourcefn signed_gradient(&self) -> bool
fn signed_gradient(&self) -> bool
Indicates signed gradient will be used or not
Sourcefn get_descriptor_size(&self) -> Result<size_t>
fn get_descriptor_size(&self) -> Result<size_t>
Returns the number of coefficients required for the classification.
Sourcefn check_detector_size(&self) -> Result<bool>
fn check_detector_size(&self) -> Result<bool>
Checks if detector size equal to descriptor size.
Sourcefn get_win_sigma(&self) -> Result<f64>
fn get_win_sigma(&self) -> Result<f64>
Returns winSigma value
Sourcefn write(&self, fs: &mut impl FileStorageTrait, objname: &str) -> Result<()>
fn write(&self, fs: &mut impl FileStorageTrait, objname: &str) -> Result<()>
Stores HOGDescriptor parameters and coefficients for the linear SVM classifier in a file storage.
§Parameters
- fs: File storage
- objname: Object name
Sourcefn save_def(&self, filename: &str) -> Result<()>
fn save_def(&self, filename: &str) -> Result<()>
saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file
§Parameters
- filename: File name
- objname: Object name
§Note
This alternative version of HOGDescriptorTraitConst::save function uses the following default values for its arguments:
- objname: String()
Sourcefn copy_to(&self, c: &mut impl HOGDescriptorTrait) -> Result<()>
fn copy_to(&self, c: &mut impl HOGDescriptorTrait) -> Result<()>
Sourcefn compute(
&self,
img: &impl ToInputArray,
descriptors: &mut Vector<f32>,
win_stride: Size,
padding: Size,
locations: &Vector<Point>,
) -> Result<()>
fn compute( &self, img: &impl ToInputArray, descriptors: &mut Vector<f32>, win_stride: Size, padding: Size, locations: &Vector<Point>, ) -> Result<()>
@example samples/cpp/train_HOG.cpp / Computes HOG descriptors of given image.
§Parameters
- img: Matrix of the type CV_8U containing an image where HOG features will be calculated.
- descriptors: Matrix of the type CV_32F
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- locations: Vector of Point
§C++ default parameters
- win_stride: Size()
- padding: Size()
- locations: std::vector
()
Sourcefn compute_def(
&self,
img: &impl ToInputArray,
descriptors: &mut Vector<f32>,
) -> Result<()>
fn compute_def( &self, img: &impl ToInputArray, descriptors: &mut Vector<f32>, ) -> Result<()>
@example samples/cpp/train_HOG.cpp / Computes HOG descriptors of given image.
§Parameters
- img: Matrix of the type CV_8U containing an image where HOG features will be calculated.
- descriptors: Matrix of the type CV_32F
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- locations: Vector of Point
§Note
This alternative version of HOGDescriptorTraitConst::compute function uses the following default values for its arguments:
- win_stride: Size()
- padding: Size()
- locations: std::vector
()
Sourcefn detect_weights(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
weights: &mut Vector<f64>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
search_locations: &Vector<Point>,
) -> Result<()>
fn detect_weights( &self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, weights: &mut Vector<f64>, hit_threshold: f64, win_stride: Size, padding: Size, search_locations: &Vector<Point>, ) -> Result<()>
Performs object detection without a multi-scale window.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of point where each point contains left-top corner point of detected object boundaries.
- weights: Vector that will contain confidence values for each detected object.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- searchLocations: Vector of Point includes set of requested locations to be evaluated.
§C++ default parameters
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- search_locations: std::vector
()
Sourcefn detect_weights_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
weights: &mut Vector<f64>,
) -> Result<()>
fn detect_weights_def( &self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, weights: &mut Vector<f64>, ) -> Result<()>
Performs object detection without a multi-scale window.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of point where each point contains left-top corner point of detected object boundaries.
- weights: Vector that will contain confidence values for each detected object.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- searchLocations: Vector of Point includes set of requested locations to be evaluated.
§Note
This alternative version of HOGDescriptorTraitConst::detect_weights function uses the following default values for its arguments:
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- search_locations: std::vector
()
Sourcefn detect(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
search_locations: &Vector<Point>,
) -> Result<()>
fn detect( &self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, hit_threshold: f64, win_stride: Size, padding: Size, search_locations: &Vector<Point>, ) -> Result<()>
Performs object detection without a multi-scale window.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of point where each point contains left-top corner point of detected object boundaries.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- searchLocations: Vector of Point includes locations to search.
§C++ default parameters
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- search_locations: std::vector
()
Sourcefn detect_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Point>,
) -> Result<()>
fn detect_def( &self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, ) -> Result<()>
Performs object detection without a multi-scale window.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of point where each point contains left-top corner point of detected object boundaries.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- searchLocations: Vector of Point includes locations to search.
§Note
This alternative version of HOGDescriptorTraitConst::detect function uses the following default values for its arguments:
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- search_locations: std::vector
()
Sourcefn detect_multi_scale_weights(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
found_weights: &mut Vector<f64>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
scale: f64,
group_threshold: f64,
use_meanshift_grouping: bool,
) -> Result<()>
fn detect_multi_scale_weights( &self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, found_weights: &mut Vector<f64>, hit_threshold: f64, win_stride: Size, padding: Size, scale: f64, group_threshold: f64, use_meanshift_grouping: bool, ) -> Result<()>
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of rectangles where each rectangle contains the detected object.
- foundWeights: Vector that will contain confidence values for each detected object.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- scale: Coefficient of the detection window increase.
- groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
- useMeanshiftGrouping: indicates grouping algorithm
§C++ default parameters
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- scale: 1.05
- group_threshold: 2.0
- use_meanshift_grouping: false
Sourcefn detect_multi_scale_weights_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
found_weights: &mut Vector<f64>,
) -> Result<()>
fn detect_multi_scale_weights_def( &self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, found_weights: &mut Vector<f64>, ) -> Result<()>
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of rectangles where each rectangle contains the detected object.
- foundWeights: Vector that will contain confidence values for each detected object.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- scale: Coefficient of the detection window increase.
- groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
- useMeanshiftGrouping: indicates grouping algorithm
§Note
This alternative version of HOGDescriptorTraitConst::detect_multi_scale_weights function uses the following default values for its arguments:
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- scale: 1.05
- group_threshold: 2.0
- use_meanshift_grouping: false
Sourcefn detect_multi_scale(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
scale: f64,
group_threshold: f64,
use_meanshift_grouping: bool,
) -> Result<()>
fn detect_multi_scale( &self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, hit_threshold: f64, win_stride: Size, padding: Size, scale: f64, group_threshold: f64, use_meanshift_grouping: bool, ) -> Result<()>
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of rectangles where each rectangle contains the detected object.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- scale: Coefficient of the detection window increase.
- groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
- useMeanshiftGrouping: indicates grouping algorithm
§C++ default parameters
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- scale: 1.05
- group_threshold: 2.0
- use_meanshift_grouping: false
Sourcefn detect_multi_scale_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
) -> Result<()>
fn detect_multi_scale_def( &self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, ) -> Result<()>
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of rectangles where each rectangle contains the detected object.
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- winStride: Window stride. It must be a multiple of block stride.
- padding: Padding
- scale: Coefficient of the detection window increase.
- groupThreshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
- useMeanshiftGrouping: indicates grouping algorithm
§Note
This alternative version of HOGDescriptorTraitConst::detect_multi_scale function uses the following default values for its arguments:
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
- scale: 1.05
- group_threshold: 2.0
- use_meanshift_grouping: false
Sourcefn compute_gradient(
&self,
img: &impl ToInputArray,
grad: &mut impl ToInputOutputArray,
angle_ofs: &mut impl ToInputOutputArray,
padding_tl: Size,
padding_br: Size,
) -> Result<()>
fn compute_gradient( &self, img: &impl ToInputArray, grad: &mut impl ToInputOutputArray, angle_ofs: &mut impl ToInputOutputArray, padding_tl: Size, padding_br: Size, ) -> Result<()>
Computes gradients and quantized gradient orientations.
§Parameters
- img: Matrix contains the image to be computed
- grad: Matrix of type CV_32FC2 contains computed gradients
- angleOfs: Matrix of type CV_8UC2 contains quantized gradient orientations
- paddingTL: Padding from top-left
- paddingBR: Padding from bottom-right
§C++ default parameters
- padding_tl: Size()
- padding_br: Size()
Sourcefn compute_gradient_def(
&self,
img: &impl ToInputArray,
grad: &mut impl ToInputOutputArray,
angle_ofs: &mut impl ToInputOutputArray,
) -> Result<()>
fn compute_gradient_def( &self, img: &impl ToInputArray, grad: &mut impl ToInputOutputArray, angle_ofs: &mut impl ToInputOutputArray, ) -> Result<()>
Computes gradients and quantized gradient orientations.
§Parameters
- img: Matrix contains the image to be computed
- grad: Matrix of type CV_32FC2 contains computed gradients
- angleOfs: Matrix of type CV_8UC2 contains quantized gradient orientations
- paddingTL: Padding from top-left
- paddingBR: Padding from bottom-right
§Note
This alternative version of HOGDescriptorTraitConst::compute_gradient function uses the following default values for its arguments:
- padding_tl: Size()
- padding_br: Size()
Sourcefn detect_roi(
&self,
img: &impl ToInputArray,
locations: &Vector<Point>,
found_locations: &mut Vector<Point>,
confidences: &mut Vector<f64>,
hit_threshold: f64,
win_stride: Size,
padding: Size,
) -> Result<()>
fn detect_roi( &self, img: &impl ToInputArray, locations: &Vector<Point>, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64>, hit_threshold: f64, win_stride: Size, padding: Size, ) -> Result<()>
evaluate specified ROI and return confidence value for each location
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- locations: Vector of Point
- foundLocations: Vector of Point where each Point is detected object’s top-left point.
- confidences: confidences
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here
- winStride: winStride
- padding: padding
§C++ default parameters
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
Sourcefn detect_roi_def(
&self,
img: &impl ToInputArray,
locations: &Vector<Point>,
found_locations: &mut Vector<Point>,
confidences: &mut Vector<f64>,
) -> Result<()>
fn detect_roi_def( &self, img: &impl ToInputArray, locations: &Vector<Point>, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64>, ) -> Result<()>
evaluate specified ROI and return confidence value for each location
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- locations: Vector of Point
- foundLocations: Vector of Point where each Point is detected object’s top-left point.
- confidences: confidences
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here
- winStride: winStride
- padding: padding
§Note
This alternative version of HOGDescriptorTraitConst::detect_roi function uses the following default values for its arguments:
- hit_threshold: 0
- win_stride: Size()
- padding: Size()
Sourcefn detect_multi_scale_roi(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
locations: &mut Vector<DetectionROI>,
hit_threshold: f64,
group_threshold: i32,
) -> Result<()>
fn detect_multi_scale_roi( &self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, locations: &mut Vector<DetectionROI>, hit_threshold: f64, group_threshold: i32, ) -> Result<()>
evaluate specified ROI and return confidence value for each location in multiple scales
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of rectangles where each rectangle contains the detected object.
- locations: Vector of DetectionROI
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
§C++ default parameters
- hit_threshold: 0
- group_threshold: 0
Sourcefn detect_multi_scale_roi_def(
&self,
img: &impl ToInputArray,
found_locations: &mut Vector<Rect>,
locations: &mut Vector<DetectionROI>,
) -> Result<()>
fn detect_multi_scale_roi_def( &self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, locations: &mut Vector<DetectionROI>, ) -> Result<()>
evaluate specified ROI and return confidence value for each location in multiple scales
§Parameters
- img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations: Vector of rectangles where each rectangle contains the detected object.
- locations: Vector of DetectionROI
- hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
- groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
§Note
This alternative version of HOGDescriptorTraitConst::detect_multi_scale_roi function uses the following default values for its arguments:
- hit_threshold: 0
- group_threshold: 0
Sourcefn group_rectangles(
&self,
rect_list: &mut Vector<Rect>,
weights: &mut Vector<f64>,
group_threshold: i32,
eps: f64,
) -> Result<()>
fn group_rectangles( &self, rect_list: &mut Vector<Rect>, weights: &mut Vector<f64>, group_threshold: i32, eps: f64, ) -> Result<()>
Groups the object candidate rectangles.
§Parameters
- rectList: Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.)
- weights: Input/output vector of weights of rectangles. Output vector includes weights of retained and grouped rectangles. (The Python list is not modified in place.)
- groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
- eps: Relative difference between sides of the rectangles to merge them into a group.
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.