pub struct CUDA_HOG { /* private fields */ }
Expand description

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

Implementations§

source§

impl CUDA_HOG

source

pub fn create( win_size: Size, block_size: Size, block_stride: Size, cell_size: Size, nbins: i32 ) -> Result<Ptr<CUDA_HOG>>

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

Trait Implementations§

source§

impl AlgorithmTrait for CUDA_HOG

source§

fn as_raw_mut_Algorithm(&mut self) -> *mut c_void

source§

fn clear(&mut self) -> Result<()>

Clears the algorithm state
source§

fn read(&mut self, fn_: &FileNode) -> Result<()>

Reads algorithm parameters from a file storage
source§

impl AlgorithmTraitConst for CUDA_HOG

source§

fn as_raw_Algorithm(&self) -> *const c_void

source§

fn write(&self, fs: &mut FileStorage) -> Result<()>

Stores algorithm parameters in a file storage
source§

fn write_1(&self, fs: &mut FileStorage, name: &str) -> Result<()>

Stores algorithm parameters in a file storage Read more
source§

fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>

@deprecated Read more
source§

fn empty(&self) -> Result<bool>

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
source§

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).
source§

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.
source§

impl Boxed for CUDA_HOG

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl CUDA_HOGTrait for CUDA_HOG

source§

fn as_raw_mut_CUDA_HOG(&mut self) -> *mut c_void

source§

fn set_win_sigma(&mut self, win_sigma: f64) -> Result<()>

Gaussian smoothing window parameter.
source§

fn set_l2_hys_threshold(&mut self, threshold_l2hys: f64) -> Result<()>

L2-Hys normalization method shrinkage.
source§

fn set_gamma_correction(&mut self, gamma_correction: bool) -> Result<()>

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

fn set_num_levels(&mut self, nlevels: i32) -> Result<()>

Maximum number of detection window increases.
source§

fn set_hit_threshold(&mut self, hit_threshold: f64) -> Result<()>

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.
source§

fn set_win_stride(&mut self, win_stride: Size) -> Result<()>

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

fn set_scale_factor(&mut self, scale0: f64) -> Result<()>

Coefficient of the detection window increase.
source§

fn set_group_threshold(&mut self, group_threshold: i32) -> Result<()>

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

fn set_descriptor_format( &mut self, descr_format: HOGDescriptor_DescriptorStorageFormat ) -> Result<()>

Descriptor storage format: Read more
source§

fn set_svm_detector(&mut self, detector: &impl ToInputArray) -> Result<()>

Sets coefficients for the linear SVM classifier.
source§

fn detect( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64> ) -> Result<()>

Performs object detection without a multi-scale window. Read more
source§

fn detect_1( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64> ) -> Result<()>

source§

fn detect_without_conf( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point> ) -> Result<()>

Performs object detection without a multi-scale window. Read more
source§

fn detect_multi_scale( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, confidences: &mut Vector<f64> ) -> Result<()>

Performs object detection with a multi-scale window. Read more
source§

fn detect_multi_scale_1( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, confidences: &mut Vector<f64> ) -> Result<()>

source§

fn detect_multi_scale_without_conf( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect> ) -> Result<()>

Performs object detection with a multi-scale window. Read more
source§

fn compute( &mut self, img: &impl ToInputArray, descriptors: &mut impl ToOutputArray, stream: &mut Stream ) -> Result<()>

Returns block descriptors computed for the whole image. Read more
source§

impl CUDA_HOGTraitConst for CUDA_HOG

source§

fn as_raw_CUDA_HOG(&self) -> *const c_void

source§

fn get_win_sigma(&self) -> Result<f64>

source§

fn get_l2_hys_threshold(&self) -> Result<f64>

source§

fn get_gamma_correction(&self) -> Result<bool>

source§

fn get_num_levels(&self) -> Result<i32>

source§

fn get_hit_threshold(&self) -> Result<f64>

source§

fn get_win_stride(&self) -> Result<Size>

source§

fn get_scale_factor(&self) -> Result<f64>

source§

fn get_group_threshold(&self) -> Result<i32>

source§

fn get_descriptor_format(&self) -> Result<HOGDescriptor_DescriptorStorageFormat>

source§

fn get_descriptor_size(&self) -> Result<size_t>

Returns the number of coefficients required for the classification.
source§

fn get_block_histogram_size(&self) -> Result<size_t>

Returns the block histogram size.
source§

fn get_default_people_detector(&self) -> Result<Mat>

Returns coefficients of the classifier trained for people detection.
source§

impl Debug for CUDA_HOG

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for CUDA_HOG

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<CUDA_HOG> for Algorithm

source§

fn from(s: CUDA_HOG) -> Self

Converts to this type from the input type.
source§

impl Send for CUDA_HOG

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.