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

Summary

Types

t()

Type that represents an CUDA.HoughLinesDetector struct.

Functions

Clears the algorithm state

Variant 1:

Finds lines in a binary image using the classical Hough transform.

Variant 1:

Finds lines in a binary image using the classical Hough transform.

Variant 1:

Downloads results from cuda::HoughLinesDetector::detect to host memory.

Variant 1:

Downloads results from cuda::HoughLinesDetector::detect to host memory.

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

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Types

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

Type that represents an CUDA.HoughLinesDetector 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.HoughLinesDetector.t()

Python prototype (for reference only):

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

Variant 1:

Finds lines in a binary image using the classical Hough transform.

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

  • src: Evision.Mat.

    8-bit, single-channel binary source image.

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

    Stream for the asynchronous version.

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

    Output vector of lines. Each line is represented by a two-element vector \f$(\rho, \theta)\f$ . \f$\rho\f$ is the distance from the coordinate origin \f$(0,0)\f$ (top-left corner of the image). \f$\theta\f$ is the line rotation angle in radians ( \f$0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\f$ ).

@sa HoughLines

Python prototype (for reference only):

detect(src[, lines[, stream]]) -> lines

Variant 2:

Finds lines in a binary image using the classical Hough transform.

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

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

    8-bit, single-channel binary source image.

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

    Stream for the asynchronous version.

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

    Output vector of lines. Each line is represented by a two-element vector \f$(\rho, \theta)\f$ . \f$\rho\f$ is the distance from the coordinate origin \f$(0,0)\f$ (top-left corner of the image). \f$\theta\f$ is the line rotation angle in radians ( \f$0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\f$ ).

@sa HoughLines

Python prototype (for reference only):

detect(src[, lines[, stream]]) -> lines
@spec detect(t(), Evision.Mat.maybe_mat_in(), [{:stream, term()}] | nil) ::
  Evision.Mat.t() | {:error, String.t()}
@spec detect(t(), Evision.CUDA.GpuMat.t(), [{:stream, term()}] | nil) ::
  Evision.CUDA.GpuMat.t() | {:error, String.t()}

Variant 1:

Finds lines in a binary image using the classical Hough transform.

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

  • src: Evision.Mat.

    8-bit, single-channel binary source image.

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

    Stream for the asynchronous version.

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

    Output vector of lines. Each line is represented by a two-element vector \f$(\rho, \theta)\f$ . \f$\rho\f$ is the distance from the coordinate origin \f$(0,0)\f$ (top-left corner of the image). \f$\theta\f$ is the line rotation angle in radians ( \f$0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\f$ ).

@sa HoughLines

Python prototype (for reference only):

detect(src[, lines[, stream]]) -> lines

Variant 2:

Finds lines in a binary image using the classical Hough transform.

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

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

    8-bit, single-channel binary source image.

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

    Stream for the asynchronous version.

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

    Output vector of lines. Each line is represented by a two-element vector \f$(\rho, \theta)\f$ . \f$\rho\f$ is the distance from the coordinate origin \f$(0,0)\f$ (top-left corner of the image). \f$\theta\f$ is the line rotation angle in radians ( \f$0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}\f$ ).

@sa HoughLines

Python prototype (for reference only):

detect(src[, lines[, stream]]) -> lines
Link to this function

downloadResults(named_args)

View Source
@spec downloadResults(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

downloadResults(self, d_lines)

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

Variant 1:

Downloads results from cuda::HoughLinesDetector::detect to host memory.

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

  • d_lines: Evision.Mat.

    Result of cuda::HoughLinesDetector::detect .

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

    Stream for the asynchronous version.

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

    Output host array.

  • h_votes: Evision.Mat.t().

    Optional output array for line's votes.

Python prototype (for reference only):

downloadResults(d_lines[, h_lines[, h_votes[, stream]]]) -> h_lines, h_votes

Variant 2:

Downloads results from cuda::HoughLinesDetector::detect to host memory.

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

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

    Result of cuda::HoughLinesDetector::detect .

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

    Stream for the asynchronous version.

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

    Output host array.

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

    Optional output array for line's votes.

Python prototype (for reference only):

downloadResults(d_lines[, h_lines[, h_votes[, stream]]]) -> h_lines, h_votes
Link to this function

downloadResults(self, d_lines, opts)

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

Variant 1:

Downloads results from cuda::HoughLinesDetector::detect to host memory.

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

  • d_lines: Evision.Mat.

    Result of cuda::HoughLinesDetector::detect .

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

    Stream for the asynchronous version.

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

    Output host array.

  • h_votes: Evision.Mat.t().

    Optional output array for line's votes.

Python prototype (for reference only):

downloadResults(d_lines[, h_lines[, h_votes[, stream]]]) -> h_lines, h_votes

Variant 2:

Downloads results from cuda::HoughLinesDetector::detect to host memory.

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

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

    Result of cuda::HoughLinesDetector::detect .

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

    Stream for the asynchronous version.

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

    Output host array.

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

    Optional output array for line's votes.

Python prototype (for reference only):

downloadResults(d_lines[, h_lines[, h_votes[, stream]]]) -> h_lines, h_votes
@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.HoughLinesDetector.t()
Return
  • retval: bool

Python prototype (for reference only):

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

getDoSort

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

Python prototype (for reference only):

getDoSort() -> retval
@spec getMaxLines(Keyword.t()) :: any() | {:error, String.t()}
@spec getMaxLines(t()) :: integer() | {:error, String.t()}

getMaxLines

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

Python prototype (for reference only):

getMaxLines() -> retval
@spec getRho(Keyword.t()) :: any() | {:error, String.t()}
@spec getRho(t()) :: number() | {:error, String.t()}

getRho

Positional Arguments
  • self: Evision.CUDA.HoughLinesDetector.t()
Return
  • retval: float

Python prototype (for reference only):

getRho() -> retval
@spec getTheta(Keyword.t()) :: any() | {:error, String.t()}
@spec getTheta(t()) :: number() | {:error, String.t()}

getTheta

Positional Arguments
  • self: Evision.CUDA.HoughLinesDetector.t()
Return
  • retval: float

Python prototype (for reference only):

getTheta() -> retval
Link to this function

getThreshold(named_args)

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

getThreshold

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

Python prototype (for reference only):

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

setDoSort

Positional Arguments
  • self: Evision.CUDA.HoughLinesDetector.t()
  • doSort: bool

Python prototype (for reference only):

setDoSort(doSort) -> None
@spec setMaxLines(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setMaxLines(self, maxLines)

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

setMaxLines

Positional Arguments
  • self: Evision.CUDA.HoughLinesDetector.t()
  • maxLines: integer()

Python prototype (for reference only):

setMaxLines(maxLines) -> None
@spec setRho(Keyword.t()) :: any() | {:error, String.t()}
@spec setRho(t(), number()) :: t() | {:error, String.t()}

setRho

Positional Arguments
  • self: Evision.CUDA.HoughLinesDetector.t()
  • rho: float

Python prototype (for reference only):

setRho(rho) -> None
@spec setTheta(Keyword.t()) :: any() | {:error, String.t()}
@spec setTheta(t(), number()) :: t() | {:error, String.t()}

setTheta

Positional Arguments
  • self: Evision.CUDA.HoughLinesDetector.t()
  • theta: float

Python prototype (for reference only):

setTheta(theta) -> None
Link to this function

setThreshold(named_args)

View Source
@spec setThreshold(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setThreshold(self, threshold)

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

setThreshold

Positional Arguments
  • self: Evision.CUDA.HoughLinesDetector.t()
  • threshold: integer()

Python prototype (for reference only):

setThreshold(threshold) -> 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