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

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.

Returns coefficients of the classifier trained for people detection.

getDescriptorFormat

Returns the number of coefficients required for the classification.

getGammaCorrection

getGroupThreshold

getHitThreshold

getL2HysThreshold

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(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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.

    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(), [{:stream, term()}] | nil) ::
  Evision.Mat.t() | {:error, String.t()}
@spec compute(t(), Evision.CUDA.GpuMat.t(), [{:stream, 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.

    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: integer().

    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(Keyword.t()) :: any() | {:error, String.t()}
@spec create(
  [
    block_size: term(),
    block_stride: term(),
    cell_size: term(),
    nbins: term(),
    win_size: 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: integer().

    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(Keyword.t()) :: any() | {:error, String.t()}
@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.

    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(named_args)

View Source
@spec detectMultiScale(Keyword.t()) :: any() | {:error, String.t()}
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.

    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(named_args)

View Source
@spec detectMultiScaleWithoutConf(Keyword.t()) :: any() | {:error, String.t()}
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.

    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(named_args)

View Source
@spec detectWithoutConf(Keyword.t()) :: any() | {:error, String.t()}
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.

    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(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec getBlockHistogramSize(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getDefaultName(named_args)

View Source
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec getDefaultPeopleDetector(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec getDescriptorFormat(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getDescriptorSize(named_args)

View Source
@spec getDescriptorSize(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec getGammaCorrection(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getGroupThreshold(named_args)

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

getGroupThreshold

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

Python prototype (for reference only):

getGroupThreshold() -> retval
Link to this function

getHitThreshold(named_args)

View Source
@spec getHitThreshold(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getL2HysThreshold(named_args)

View Source
@spec getL2HysThreshold(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getNumLevels(named_args)

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

getNumLevels

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

Python prototype (for reference only):

getNumLevels() -> retval
Link to this function

getScaleFactor(named_args)

View Source
@spec getScaleFactor(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getWinStride(named_args)

View Source
@spec getWinStride(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec setDescriptorFormat(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setGammaCorrection(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setGroupThreshold(Keyword.t()) :: any() | {:error, String.t()}
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: integer()

Python prototype (for reference only):

setGroupThreshold(group_threshold) -> None
Link to this function

setHitThreshold(named_args)

View Source
@spec setHitThreshold(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setL2HysThreshold(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setNumLevels(Keyword.t()) :: any() | {:error, String.t()}
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: integer()

Python prototype (for reference only):

setNumLevels(nlevels) -> None
Link to this function

setScaleFactor(named_args)

View Source
@spec setScaleFactor(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setSVMDetector(Keyword.t()) :: any() | {:error, String.t()}
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

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
@spec setWinSigma(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setWinStride(Keyword.t()) :: any() | {:error, String.t()}
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(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

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

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None