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

Summary

Types

t()

Type that represents an XImgProc.EdgeDrawing struct.

Functions

Clears the algorithm state

Detects edges in a grayscale image and prepares them to detect lines and ellipses.

Detects circles and ellipses.

Detects circles and ellipses.

Detects lines.

Detects lines.

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

returns Edge Image prepared by detectEdges() function.

returns Edge Image prepared by detectEdges() function.

returns Gradient Image prepared by detectEdges() function.

returns Gradient Image prepared by detectEdges() function.

Returns for each line found in detectLines() its edge segment index in getSegments()

Returns std::vector<std::vector<Point>> of detected edge segments, see detectEdges()

Reads algorithm parameters from a file storage

sets parameters.

Stores algorithm parameters in a file storage

Types

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

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

Python prototype (for reference only):

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

Detects edges in a grayscale image and prepares them to detect lines and ellipses.

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

  • src: Evision.Mat.

    8-bit, single-channel, grayscale input image.

Python prototype (for reference only):

detectEdges(src) -> None
Link to this function

detectEllipses(named_args)

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

Detects circles and ellipses.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • ellipses: Evision.Mat.t().

    output Vec<6d> contains center point and perimeter for circles, center point, axes and angle for ellipses.

Note: you should call detectEdges() before calling this function.

Python prototype (for reference only):

detectEllipses([, ellipses]) -> ellipses
Link to this function

detectEllipses(self, opts)

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

Detects circles and ellipses.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • ellipses: Evision.Mat.t().

    output Vec<6d> contains center point and perimeter for circles, center point, axes and angle for ellipses.

Note: you should call detectEdges() before calling this function.

Python prototype (for reference only):

detectEllipses([, ellipses]) -> ellipses
@spec detectLines(Keyword.t()) :: any() | {:error, String.t()}
@spec detectLines(t()) :: Evision.Mat.t() | {:error, String.t()}

Detects lines.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • lines: Evision.Mat.t().

    output Vec<4f> contains the start point and the end point of detected lines.

Note: you should call detectEdges() before calling this function.

Python prototype (for reference only):

detectLines([, lines]) -> lines
@spec detectLines(t(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

Detects lines.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • lines: Evision.Mat.t().

    output Vec<4f> contains the start point and the end point of detected lines.

Note: you should call detectEdges() before calling this function.

Python prototype (for reference only):

detectLines([, lines]) -> lines
@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.EdgeDrawing.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.EdgeDrawing.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

getEdgeImage(named_args)

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

returns Edge Image prepared by detectEdges() function.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • dst: Evision.Mat.t().

    returns 8-bit, single-channel output image.

Python prototype (for reference only):

getEdgeImage([, dst]) -> dst
Link to this function

getEdgeImage(self, opts)

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

returns Edge Image prepared by detectEdges() function.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • dst: Evision.Mat.t().

    returns 8-bit, single-channel output image.

Python prototype (for reference only):

getEdgeImage([, dst]) -> dst
Link to this function

getGradientImage(named_args)

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

returns Gradient Image prepared by detectEdges() function.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • dst: Evision.Mat.t().

    returns 16-bit, single-channel output image.

Python prototype (for reference only):

getGradientImage([, dst]) -> dst
Link to this function

getGradientImage(self, opts)

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

returns Gradient Image prepared by detectEdges() function.

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • dst: Evision.Mat.t().

    returns 16-bit, single-channel output image.

Python prototype (for reference only):

getGradientImage([, dst]) -> dst
Link to this function

getSegmentIndicesOfLines(named_args)

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

Returns for each line found in detectLines() its edge segment index in getSegments()

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • retval: [integer()]

Python prototype (for reference only):

getSegmentIndicesOfLines() -> retval
@spec getSegments(Keyword.t()) :: any() | {:error, String.t()}
@spec getSegments(t()) :: [[{number(), number()}]] | {:error, String.t()}

Returns std::vector<std::vector<Point>> of detected edge segments, see detectEdges()

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.t()
Return
  • retval: [[Point]]

Python prototype (for reference only):

getSegments() -> 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.EdgeDrawing.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 setParams(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setParams(self, parameters)

View Source
@spec setParams(t(), Evision.XImgProc.EdgeDrawing.Params.t()) ::
  t() | {:error, String.t()}

sets parameters.

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

  • parameters: Evision.XImgProc.EdgeDrawing.Params.t().

    Parameters of the algorithm

this function is meant to be used for parameter setting in other languages than c++ like python.

Python prototype (for reference only):

setParams(parameters) -> 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