View Source Evision.CUDA.HOG (Evision v0.1.38)

Summary

Types

t()

Type that represents an CUDA.HOG struct.

Functions

Clears the algorithm state

Variant 1:

Returns block descriptors computed for the whole image.

Variant 1:

Returns block descriptors computed for the whole image.

Creates the HOG descriptor and detector.

Creates the HOG descriptor and detector.

Variant 1:

Performs object detection without a multi-scale window.

Variant 1:

Performs object detection with a multi-scale window.

Variant 1:

Performs object detection with a multi-scale window.

Variant 1:

Performs object detection without a multi-scale window.

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

Returns the block histogram size.

getDefaultName

Returns coefficients of the classifier trained for people detection.

getDescriptorFormat

Returns the number of coefficients required for the classification.

getGammaCorrection

getGroupThreshold

getHitThreshold

getL2HysThreshold

getNumLevels

getScaleFactor

getWinSigma

getWinStride

Reads algorithm parameters from a file storage

Variant 1:

Sets coefficients for the linear SVM classifier.

Stores algorithm parameters in a file storage

Types

@type t() :: %Evision.CUDA.HOG{ref: reference()}

Type that represents an CUDA.HOG struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.CUDA.HOG.t()

Python prototype (for reference only):

clear() -> None
@spec compute(t(), Evision.Mat.maybe_mat_in()) ::
  Evision.Mat.t() | {:error, String.t()}
@spec compute(t(), Evision.CUDA.GpuMat.t()) ::
  Evision.CUDA.GpuMat.t() | {:error, String.t()}

Variant 1:

Returns block descriptors computed for the whole image.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.Mat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Keyword Arguments
  • stream: Evision.CUDA.Stream.t().

    CUDA stream.

Return
  • descriptors: Evision.Mat.t().

    2D array of descriptors.

Python prototype (for reference only):

compute(img[, descriptors[, stream]]) -> descriptors

Variant 2:

Returns block descriptors computed for the whole image.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.CUDA.GpuMat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Keyword Arguments
  • stream: Evision.CUDA.Stream.t().

    CUDA stream.

Return
  • descriptors: Evision.CUDA.GpuMat.t().

    2D array of descriptors.

Python prototype (for reference only):

compute(img[, descriptors[, stream]]) -> descriptors
Link to this function

compute(self, img, opts)

View Source
@spec compute(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}
@spec compute(t(), Evision.CUDA.GpuMat.t(), [{atom(), term()}, ...] | nil) ::
  Evision.CUDA.GpuMat.t() | {:error, String.t()}

Variant 1:

Returns block descriptors computed for the whole image.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.Mat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Keyword Arguments
  • stream: Evision.CUDA.Stream.t().

    CUDA stream.

Return
  • descriptors: Evision.Mat.t().

    2D array of descriptors.

Python prototype (for reference only):

compute(img[, descriptors[, stream]]) -> descriptors

Variant 2:

Returns block descriptors computed for the whole image.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.CUDA.GpuMat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Keyword Arguments
  • stream: Evision.CUDA.Stream.t().

    CUDA stream.

Return
  • descriptors: Evision.CUDA.GpuMat.t().

    2D array of descriptors.

Python prototype (for reference only):

compute(img[, descriptors[, stream]]) -> descriptors
@spec create() :: t() | {:error, String.t()}

Creates the HOG descriptor and detector.

Keyword Arguments
  • win_size: Size.

    Detection window size. Align to block size and block stride.

  • block_size: Size.

    Block size in pixels. Align to cell size. Only (16,16) is supported for now.

  • block_stride: Size.

    Block stride. It must be a multiple of cell size.

  • cell_size: Size.

    Cell size. Only (8, 8) is supported for now.

  • nbins: int.

    Number of bins. Only 9 bins per cell are supported for now.

Return
  • retval: HOG

Python prototype (for reference only):

create([, win_size[, block_size[, block_stride[, cell_size[, nbins]]]]]) -> retval
@spec create([{atom(), term()}, ...] | nil) :: t() | {:error, String.t()}

Creates the HOG descriptor and detector.

Keyword Arguments
  • win_size: Size.

    Detection window size. Align to block size and block stride.

  • block_size: Size.

    Block size in pixels. Align to cell size. Only (16,16) is supported for now.

  • block_stride: Size.

    Block stride. It must be a multiple of cell size.

  • cell_size: Size.

    Cell size. Only (8, 8) is supported for now.

  • nbins: int.

    Number of bins. Only 9 bins per cell are supported for now.

Return
  • retval: HOG

Python prototype (for reference only):

create([, win_size[, block_size[, block_stride[, cell_size[, nbins]]]]]) -> retval
@spec detect(t(), Evision.Mat.maybe_mat_in()) ::
  {[{number(), number()}], [number()]} | {:error, String.t()}
@spec detect(t(), Evision.CUDA.GpuMat.t()) ::
  {[{number(), number()}], [number()]} | {:error, String.t()}

Variant 1:

Performs object detection without a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.Mat.t().

    Source image. CV_8UC1 and CV_8UC4 types are supported for now.

Return
  • found_locations: [Point].

    Left-top corner points of detected objects boundaries.

  • confidences: [double].

    Optional output array for confidences.

Python prototype (for reference only):

detect(img) -> found_locations, confidences

Variant 2:

Performs object detection without a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.CUDA.GpuMat.t().

    Source image. CV_8UC1 and CV_8UC4 types are supported for now.

Return
  • found_locations: [Point].

    Left-top corner points of detected objects boundaries.

  • confidences: [double].

    Optional output array for confidences.

Python prototype (for reference only):

detect(img) -> found_locations, confidences
Link to this function

detectMultiScale(self, img)

View Source
@spec detectMultiScale(t(), Evision.Mat.maybe_mat_in()) ::
  {[{number(), number(), number(), number()}], [number()]}
  | {:error, String.t()}
@spec detectMultiScale(t(), Evision.CUDA.GpuMat.t()) ::
  {[{number(), number(), number(), number()}], [number()]}
  | {:error, String.t()}

Variant 1:

Performs object detection with a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.Mat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Return
  • found_locations: [Rect].

    Detected objects boundaries.

  • confidences: [double].

    Optional output array for confidences.

Python prototype (for reference only):

detectMultiScale(img) -> found_locations, confidences

Variant 2:

Performs object detection with a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.CUDA.GpuMat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Return
  • found_locations: [Rect].

    Detected objects boundaries.

  • confidences: [double].

    Optional output array for confidences.

Python prototype (for reference only):

detectMultiScale(img) -> found_locations, confidences
Link to this function

detectMultiScaleWithoutConf(self, img)

View Source
@spec detectMultiScaleWithoutConf(t(), Evision.Mat.maybe_mat_in()) ::
  [{number(), number(), number(), number()}] | {:error, String.t()}
@spec detectMultiScaleWithoutConf(t(), Evision.CUDA.GpuMat.t()) ::
  [{number(), number(), number(), number()}] | {:error, String.t()}

Variant 1:

Performs object detection with a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.Mat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Return
  • found_locations: [Rect].

    Detected objects boundaries.

Python prototype (for reference only):

detectMultiScaleWithoutConf(img) -> found_locations

Variant 2:

Performs object detection with a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.CUDA.GpuMat.t().

    Source image. See cuda::HOGDescriptor::detect for type limitations.

Return
  • found_locations: [Rect].

    Detected objects boundaries.

Python prototype (for reference only):

detectMultiScaleWithoutConf(img) -> found_locations
Link to this function

detectWithoutConf(self, img)

View Source
@spec detectWithoutConf(t(), Evision.Mat.maybe_mat_in()) ::
  [{number(), number()}] | {:error, String.t()}
@spec detectWithoutConf(t(), Evision.CUDA.GpuMat.t()) ::
  [{number(), number()}] | {:error, String.t()}

Variant 1:

Performs object detection without a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.Mat.t().

    Source image. CV_8UC1 and CV_8UC4 types are supported for now.

Return
  • found_locations: [Point].

    Left-top corner points of detected objects boundaries.

Python prototype (for reference only):

detectWithoutConf(img) -> found_locations

Variant 2:

Performs object detection without a multi-scale window.

Positional Arguments
  • self: Evision.CUDA.HOG.t()

  • img: Evision.CUDA.GpuMat.t().

    Source image. CV_8UC1 and CV_8UC4 types are supported for now.

Return
  • found_locations: [Point].

    Left-top corner points of detected objects boundaries.

Python prototype (for reference only):

detectWithoutConf(img) -> found_locations
@spec empty(t()) :: boolean() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
Link to this function

getBlockHistogramSize(self)

View Source
@spec getBlockHistogramSize(t()) :: integer() | {:error, String.t()}

Returns the block histogram size.

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: size_t

Python prototype (for reference only):

getBlockHistogramSize() -> retval
@spec getDefaultName(t()) :: binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return

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.

Python prototype (for reference only):

getDefaultName() -> retval
Link to this function

getDefaultPeopleDetector(self)

View Source
@spec getDefaultPeopleDetector(t()) :: Evision.Mat.t() | {:error, String.t()}

Returns coefficients of the classifier trained for people detection.

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getDefaultPeopleDetector() -> retval
Link to this function

getDescriptorFormat(self)

View Source
@spec getDescriptorFormat(t()) ::
  Evision.CUDA.HOGDescriptor_DescriptorStorageFormat.t() | {:error, String.t()}

getDescriptorFormat

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: HOGDescriptor::DescriptorStorageFormat

Python prototype (for reference only):

getDescriptorFormat() -> retval
@spec getDescriptorSize(t()) :: integer() | {:error, String.t()}

Returns the number of coefficients required for the classification.

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: size_t

Python prototype (for reference only):

getDescriptorSize() -> retval
Link to this function

getGammaCorrection(self)

View Source
@spec getGammaCorrection(t()) :: boolean() | {:error, String.t()}

getGammaCorrection

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: bool

Python prototype (for reference only):

getGammaCorrection() -> retval
@spec getGroupThreshold(t()) :: integer() | {:error, String.t()}

getGroupThreshold

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: int

Python prototype (for reference only):

getGroupThreshold() -> retval
@spec getHitThreshold(t()) :: number() | {:error, String.t()}

getHitThreshold

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: double

Python prototype (for reference only):

getHitThreshold() -> retval
@spec getL2HysThreshold(t()) :: number() | {:error, String.t()}

getL2HysThreshold

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: double

Python prototype (for reference only):

getL2HysThreshold() -> retval
@spec getNumLevels(t()) :: integer() | {:error, String.t()}

getNumLevels

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: int

Python prototype (for reference only):

getNumLevels() -> retval
@spec getScaleFactor(t()) :: number() | {:error, String.t()}

getScaleFactor

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: double

Python prototype (for reference only):

getScaleFactor() -> retval
@spec getWinSigma(t()) :: number() | {:error, String.t()}

getWinSigma

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: double

Python prototype (for reference only):

getWinSigma() -> retval
@spec getWinStride(t()) :: {number(), number()} | {:error, String.t()}

getWinStride

Positional Arguments
  • self: Evision.CUDA.HOG.t()
Return
  • retval: Size

Python prototype (for reference only):

getWinStride() -> retval
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • fn_: Evision.FileNode.t()

Python prototype (for reference only):

read(fn_) -> None
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
Link to this function

setDescriptorFormat(self, descr_format)

View Source
@spec setDescriptorFormat(t(), Evision.CUDA.HOGDescriptor_DescriptorStorageFormat.t()) ::
  t() | {:error, String.t()}

setDescriptorFormat

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • descr_format: HOGDescriptor_DescriptorStorageFormat

Python prototype (for reference only):

setDescriptorFormat(descr_format) -> None
Link to this function

setGammaCorrection(self, gamma_correction)

View Source
@spec setGammaCorrection(t(), boolean()) :: t() | {:error, String.t()}

setGammaCorrection

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • gamma_correction: bool

Python prototype (for reference only):

setGammaCorrection(gamma_correction) -> None
Link to this function

setGroupThreshold(self, group_threshold)

View Source
@spec setGroupThreshold(t(), integer()) :: t() | {:error, String.t()}

setGroupThreshold

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • group_threshold: int

Python prototype (for reference only):

setGroupThreshold(group_threshold) -> None
Link to this function

setHitThreshold(self, hit_threshold)

View Source
@spec setHitThreshold(t(), number()) :: t() | {:error, String.t()}

setHitThreshold

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • hit_threshold: double

Python prototype (for reference only):

setHitThreshold(hit_threshold) -> None
Link to this function

setL2HysThreshold(self, threshold_L2hys)

View Source
@spec setL2HysThreshold(t(), number()) :: t() | {:error, String.t()}

setL2HysThreshold

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • threshold_L2hys: double

Python prototype (for reference only):

setL2HysThreshold(threshold_L2hys) -> None
Link to this function

setNumLevels(self, nlevels)

View Source
@spec setNumLevels(t(), integer()) :: t() | {:error, String.t()}

setNumLevels

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • nlevels: int

Python prototype (for reference only):

setNumLevels(nlevels) -> None
Link to this function

setScaleFactor(self, scale0)

View Source
@spec setScaleFactor(t(), number()) :: t() | {:error, String.t()}

setScaleFactor

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • scale0: double

Python prototype (for reference only):

setScaleFactor(scale0) -> None
Link to this function

setSVMDetector(self, detector)

View Source
@spec setSVMDetector(t(), Evision.Mat.maybe_mat_in()) :: t() | {:error, String.t()}
@spec setSVMDetector(t(), Evision.CUDA.GpuMat.t()) :: t() | {:error, String.t()}

Variant 1:

Sets coefficients for the linear SVM classifier.

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • detector: Evision.Mat.t()

Python prototype (for reference only):

setSVMDetector(detector) -> None

Variant 2:

Sets coefficients for the linear SVM classifier.

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • detector: Evision.CUDA.GpuMat.t()

Python prototype (for reference only):

setSVMDetector(detector) -> None
Link to this function

setWinSigma(self, win_sigma)

View Source
@spec setWinSigma(t(), number()) :: t() | {:error, String.t()}

setWinSigma

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • win_sigma: double

Python prototype (for reference only):

setWinSigma(win_sigma) -> None
Link to this function

setWinStride(self, win_stride)

View Source
@spec setWinStride(
  t(),
  {number(), number()}
) :: t() | {:error, String.t()}

setWinStride

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • win_stride: Size

Python prototype (for reference only):

setWinStride(win_stride) -> None
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • fs: Evision.FileStorage.t()

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments
  • self: Evision.CUDA.HOG.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None