View Source Evision.XImgProc.FastLineDetector (Evision v0.2.9)

Summary

Types

t()

Type that represents an XImgProc.FastLineDetector struct.

Functions

Clears the algorithm state

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.

Draws the line segments on a given image.

Draws the line segments on a given image.

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.XImgProc.FastLineDetector{ref: reference()}

Type that represents an XImgProc.FastLineDetector 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.XImgProc.FastLineDetector.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()}

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.

Positional Arguments
  • self: Evision.XImgProc.FastLineDetector.t()

  • image: Evision.Mat.

    A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use: fld_ptr-\>detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);

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

    A vector of Vec4f elements specifying the beginning and ending point of a line. Where Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are directed so that the brighter side is on their left.

image

Python prototype (for reference only):

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

detect(self, image, opts)

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

Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.

Positional Arguments
  • self: Evision.XImgProc.FastLineDetector.t()

  • image: Evision.Mat.

    A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use: fld_ptr-\>detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);

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

    A vector of Vec4f elements specifying the beginning and ending point of a line. Where Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are directed so that the brighter side is on their left.

image

Python prototype (for reference only):

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

drawSegments(named_args)

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

drawSegments(self, image, lines)

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

Draws the line segments on a given image.

Positional Arguments
  • self: Evision.XImgProc.FastLineDetector.t()

  • lines: Evision.Mat.

    A vector of the lines that needed to be drawn.

Keyword Arguments
  • draw_arrow: bool.

    If true, arrow heads will be drawn.

  • linecolor: Evision.scalar().

    Line color.

  • linethickness: integer().

    Line thickness.

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

    The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.

Python prototype (for reference only):

drawSegments(image, lines[, draw_arrow[, linecolor[, linethickness]]]) -> image
Link to this function

drawSegments(self, image, lines, opts)

View Source
@spec drawSegments(
  t(),
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [draw_arrow: term(), linecolor: term(), linethickness: term()] | nil
) :: Evision.Mat.t() | {:error, String.t()}

Draws the line segments on a given image.

Positional Arguments
  • self: Evision.XImgProc.FastLineDetector.t()

  • lines: Evision.Mat.

    A vector of the lines that needed to be drawn.

Keyword Arguments
  • draw_arrow: bool.

    If true, arrow heads will be drawn.

  • linecolor: Evision.scalar().

    Line color.

  • linethickness: integer().

    Line thickness.

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

    The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found.

Python prototype (for reference only):

drawSegments(image, lines[, draw_arrow[, linecolor[, linethickness]]]) -> image
@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.XImgProc.FastLineDetector.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.XImgProc.FastLineDetector.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 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.XImgProc.FastLineDetector.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 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