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

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

getDefaultName

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

Link to this section Types

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

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

Python prototype (for reference only):

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

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

Python prototype (for reference only):

detectEdges(src) -> None
@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(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(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
@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
@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
@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(self)

View Source
@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: [int]

Python prototype (for reference only):

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

Reads algorithm parameters from a file storage

Positional Arguments
  • self: Evision.XImgProc.EdgeDrawing.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.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
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().

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

Stores algorithm parameters in a file storage

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

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None