[][src]Trait opencv::cudaobjdetect::HOG

pub trait HOG: AlgorithmTrait {
    pub fn as_raw_HOG(&self) -> *const c_void;
pub fn as_raw_mut_HOG(&mut self) -> *mut c_void; pub fn set_win_sigma(&mut self, win_sigma: f64) -> Result<()> { ... }
pub fn get_win_sigma(&self) -> Result<f64> { ... }
pub fn set_l2_hys_threshold(&mut self, threshold_l2hys: f64) -> Result<()> { ... }
pub fn get_l2_hys_threshold(&self) -> Result<f64> { ... }
pub fn set_gamma_correction(&mut self, gamma_correction: bool) -> Result<()> { ... }
pub fn get_gamma_correction(&self) -> Result<bool> { ... }
pub fn set_num_levels(&mut self, nlevels: i32) -> Result<()> { ... }
pub fn get_num_levels(&self) -> Result<i32> { ... }
pub fn set_hit_threshold(&mut self, hit_threshold: f64) -> Result<()> { ... }
pub fn get_hit_threshold(&self) -> Result<f64> { ... }
pub fn set_win_stride(&mut self, win_stride: Size) -> Result<()> { ... }
pub fn get_win_stride(&self) -> Result<Size> { ... }
pub fn set_scale_factor(&mut self, scale0: f64) -> Result<()> { ... }
pub fn get_scale_factor(&self) -> Result<f64> { ... }
pub fn set_group_threshold(&mut self, group_threshold: i32) -> Result<()> { ... }
pub fn get_group_threshold(&self) -> Result<i32> { ... }
pub fn set_descriptor_format(
        &mut self,
        descr_format: HOGDescriptor_DescriptorStorageFormat
    ) -> Result<()> { ... }
pub fn get_descriptor_format(
        &self
    ) -> Result<HOGDescriptor_DescriptorStorageFormat> { ... }
pub fn get_descriptor_size(&self) -> Result<size_t> { ... }
pub fn get_block_histogram_size(&self) -> Result<size_t> { ... }
pub fn set_svm_detector(
        &mut self,
        detector: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn get_default_people_detector(&self) -> Result<Mat> { ... }
pub fn detect(
        &mut self,
        img: &dyn ToInputArray,
        found_locations: &mut Vector<Point>,
        confidences: &mut Vector<f64>
    ) -> Result<()> { ... }
pub fn detect_1(
        &mut self,
        img: &dyn ToInputArray,
        found_locations: &mut Vector<Point>,
        confidences: &mut Vector<f64>
    ) -> Result<()> { ... }
pub fn detect_without_conf(
        &mut self,
        img: &dyn ToInputArray,
        found_locations: &mut Vector<Point>
    ) -> Result<()> { ... }
pub fn detect_multi_scale(
        &mut self,
        img: &dyn ToInputArray,
        found_locations: &mut Vector<Rect>,
        confidences: &mut Vector<f64>
    ) -> Result<()> { ... }
pub fn detect_multi_scale_1(
        &mut self,
        img: &dyn ToInputArray,
        found_locations: &mut Vector<Rect>,
        confidences: &mut Vector<f64>
    ) -> Result<()> { ... }
pub fn detect_multi_scale_without_conf(
        &mut self,
        img: &dyn ToInputArray,
        found_locations: &mut Vector<Rect>
    ) -> Result<()> { ... }
pub fn compute(
        &mut self,
        img: &dyn ToInputArray,
        descriptors: &mut dyn ToOutputArray,
        stream: &mut Stream
    ) -> Result<()> { ... } }

The class implements Histogram of Oriented Gradients (Dalal2005) object detector.

Note:

  • An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/cpp/peopledetect.cpp
  • A CUDA example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/gpu/hog.cpp
  • (Python) An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/python/peopledetect.py

Required methods

pub fn as_raw_HOG(&self) -> *const c_void[src]

pub fn as_raw_mut_HOG(&mut self) -> *mut c_void[src]

Loading content...

Provided methods

pub fn set_win_sigma(&mut self, win_sigma: f64) -> Result<()>[src]

Gaussian smoothing window parameter.

pub fn get_win_sigma(&self) -> Result<f64>[src]

pub fn set_l2_hys_threshold(&mut self, threshold_l2hys: f64) -> Result<()>[src]

L2-Hys normalization method shrinkage.

pub fn get_l2_hys_threshold(&self) -> Result<f64>[src]

pub fn set_gamma_correction(&mut self, gamma_correction: bool) -> Result<()>[src]

Flag to specify whether the gamma correction preprocessing is required or not.

pub fn get_gamma_correction(&self) -> Result<bool>[src]

pub fn set_num_levels(&mut self, nlevels: i32) -> Result<()>[src]

Maximum number of detection window increases.

pub fn get_num_levels(&self) -> Result<i32>[src]

pub fn set_hit_threshold(&mut self, hit_threshold: f64) -> Result<()>[src]

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.

pub fn get_hit_threshold(&self) -> Result<f64>[src]

pub fn set_win_stride(&mut self, win_stride: Size) -> Result<()>[src]

Window stride. It must be a multiple of block stride.

pub fn get_win_stride(&self) -> Result<Size>[src]

pub fn set_scale_factor(&mut self, scale0: f64) -> Result<()>[src]

Coefficient of the detection window increase.

pub fn get_scale_factor(&self) -> Result<f64>[src]

pub fn set_group_threshold(&mut self, group_threshold: i32) -> Result<()>[src]

Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping. See groupRectangles.

pub fn get_group_threshold(&self) -> Result<i32>[src]

pub fn set_descriptor_format(
    &mut self,
    descr_format: HOGDescriptor_DescriptorStorageFormat
) -> Result<()>
[src]

Descriptor storage format:

  • DESCR_FORMAT_ROW_BY_ROW - Row-major order.
  • DESCR_FORMAT_COL_BY_COL - Column-major order.

pub fn get_descriptor_format(
    &self
) -> Result<HOGDescriptor_DescriptorStorageFormat>
[src]

pub fn get_descriptor_size(&self) -> Result<size_t>[src]

Returns the number of coefficients required for the classification.

pub fn get_block_histogram_size(&self) -> Result<size_t>[src]

Returns the block histogram size.

pub fn set_svm_detector(&mut self, detector: &dyn ToInputArray) -> Result<()>[src]

Sets coefficients for the linear SVM classifier.

pub fn get_default_people_detector(&self) -> Result<Mat>[src]

Returns coefficients of the classifier trained for people detection.

pub fn detect(
    &mut self,
    img: &dyn ToInputArray,
    found_locations: &mut Vector<Point>,
    confidences: &mut Vector<f64>
) -> Result<()>
[src]

Performs object detection without a multi-scale window.

Parameters

  • img: Source image. CV_8UC1 and CV_8UC4 types are supported for now.
  • found_locations: Left-top corner points of detected objects boundaries.
  • confidences: Optional output array for confidences.

C++ default parameters

  • confidences: NULL

pub fn detect_1(
    &mut self,
    img: &dyn ToInputArray,
    found_locations: &mut Vector<Point>,
    confidences: &mut Vector<f64>
) -> Result<()>
[src]

pub fn detect_without_conf(
    &mut self,
    img: &dyn ToInputArray,
    found_locations: &mut Vector<Point>
) -> Result<()>
[src]

Performs object detection without a multi-scale window.

Parameters

  • img: Source image. CV_8UC1 and CV_8UC4 types are supported for now.
  • found_locations: Left-top corner points of detected objects boundaries.

pub fn detect_multi_scale(
    &mut self,
    img: &dyn ToInputArray,
    found_locations: &mut Vector<Rect>,
    confidences: &mut Vector<f64>
) -> Result<()>
[src]

Performs object detection with a multi-scale window.

Parameters

  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • found_locations: Detected objects boundaries.
  • confidences: Optional output array for confidences.

C++ default parameters

  • confidences: NULL

pub fn detect_multi_scale_1(
    &mut self,
    img: &dyn ToInputArray,
    found_locations: &mut Vector<Rect>,
    confidences: &mut Vector<f64>
) -> Result<()>
[src]

pub fn detect_multi_scale_without_conf(
    &mut self,
    img: &dyn ToInputArray,
    found_locations: &mut Vector<Rect>
) -> Result<()>
[src]

Performs object detection with a multi-scale window.

Parameters

  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • found_locations: Detected objects boundaries.

pub fn compute(
    &mut self,
    img: &dyn ToInputArray,
    descriptors: &mut dyn ToOutputArray,
    stream: &mut Stream
) -> Result<()>
[src]

Returns block descriptors computed for the whole image.

Parameters

  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • descriptors: 2D array of descriptors.
  • stream: CUDA stream.

C++ default parameters

  • stream: Stream::Null()
Loading content...

Implementations

impl<'_> dyn HOG + '_[src]

pub fn create(
    win_size: Size,
    block_size: Size,
    block_stride: Size,
    cell_size: Size,
    nbins: i32
) -> Result<Ptr<dyn HOG>>
[src]

Creates the HOG descriptor and detector.

Parameters

  • win_size: Detection window size. Align to block size and block stride.
  • block_size: Block size in pixels. Align to cell size. Only (16,16) is supported for now.
  • block_stride: Block stride. It must be a multiple of cell size.
  • cell_size: Cell size. Only (8, 8) is supported for now.
  • nbins: Number of bins. Only 9 bins per cell are supported for now.

C++ default parameters

  • win_size: Size(64,128)
  • block_size: Size(16,16)
  • block_stride: Size(8,8)
  • cell_size: Size(8,8)
  • nbins: 9

Implementors

impl HOG for PtrOfHOG[src]

Loading content...