View Source Evision.XImgProc.FastLineDetector (Evision v0.2.9)
Summary
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
save
Stores algorithm parameters in a file storage
write
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(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.
Python prototype (for reference only):
detect(image[, lines]) -> lines
@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.
Python prototype (for reference only):
detect(image[, lines]) -> lines
@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
@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
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.XImgProc.FastLineDetector.t()
Return
- retval:
String
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()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
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
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
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None