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

Link to this section 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

getDefaultName

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Link to this section Types

@type t() :: %Evision.XImgProc.FastLineDetector{ref: reference()}

Type that represents an XImgProc.FastLineDetector struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@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(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.t().

    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.t().

    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(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.t().

    A vector of the lines that needed to be drawn.

Keyword Arguments
  • draw_arrow: bool.

    If true, arrow heads will be drawn.

  • linecolor: Scalar.

    Line color.

  • linethickness: int.

    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(),
  [{atom(), 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.t().

    A vector of the lines that needed to be drawn.

Keyword Arguments
  • draw_arrow: bool.

    If true, arrow heads will be drawn.

  • linecolor: Scalar.

    Line color.

  • linethickness: int.

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

Reads algorithm parameters from a file storage

Positional Arguments
  • self: Evision.XImgProc.FastLineDetector.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.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(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments
  • self: Evision.XImgProc.FastLineDetector.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.XImgProc.FastLineDetector.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None