View Source Evision.XImgProc.Segmentation.SelectiveSearchSegmentation (Evision v0.2.9)

Summary

Types

t()

Type that represents an XImgProc.Segmentation.SelectiveSearchSegmentation struct.

Functions

Add a new graph segmentation in the list of graph segementations to process.

Add a new image in the list of images to process.

Add a new strategy in the list of strategy to process.

Clears the algorithm state

Clear the list of graph segmentations to process;

Clear the list of images to process

Clear the list of strategy to process;

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

Based on all images, graph segmentations and stragies, computes all possible rects and return them

Reads algorithm parameters from a file storage

Set a image used by switch* functions to initialize the class

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Initialize the class with the 'Single stragegy' parameters describled in @cite uijlings2013selective.

Initialize the class with the 'Single stragegy' parameters describled in @cite uijlings2013selective.

Stores algorithm parameters in a file storage

Types

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

Type that represents an XImgProc.Segmentation.SelectiveSearchSegmentation struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

Link to this function

addGraphSegmentation(named_args)

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

addGraphSegmentation(self, g)

View Source
@spec addGraphSegmentation(t(), Evision.XImgProc.GraphSegmentation.t()) ::
  t() | {:error, String.t()}

Add a new graph segmentation in the list of graph segementations to process.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

  • g: Evision.XImgProc.GraphSegmentation.t().

    The graph segmentation

Python prototype (for reference only):

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

Add a new image in the list of images to process.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

  • img: Evision.Mat.

    The image

Python prototype (for reference only):

addImage(img) -> None
@spec addStrategy(Keyword.t()) :: any() | {:error, String.t()}
@spec addStrategy(t(), Evision.XImgProc.SelectiveSearchSegmentationStrategy.t()) ::
  t() | {:error, String.t()}

Add a new strategy in the list of strategy to process.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

  • s: Evision.XImgProc.SelectiveSearchSegmentationStrategy.t().

    The strategy

Python prototype (for reference only):

addStrategy(s) -> None
@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

Python prototype (for reference only):

clear() -> None
Link to this function

clearGraphSegmentations(named_args)

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

Clear the list of graph segmentations to process;

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

Python prototype (for reference only):

clearGraphSegmentations() -> None
@spec clearImages(Keyword.t()) :: any() | {:error, String.t()}
@spec clearImages(t()) :: t() | {:error, String.t()}

Clear the list of images to process

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

Python prototype (for reference only):

clearImages() -> None
Link to this function

clearStrategies(named_args)

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

Clear the list of strategy to process;

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

Python prototype (for reference only):

clearStrategies() -> None
@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.Segmentation.SelectiveSearchSegmentation.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.Segmentation.SelectiveSearchSegmentation.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 process(Keyword.t()) :: any() | {:error, String.t()}
@spec process(t()) ::
  [{number(), number(), number(), number()}] | {:error, String.t()}

Based on all images, graph segmentations and stragies, computes all possible rects and return them

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
Return
  • rects: [Rect].

    The list of rects. The first ones are more relevents than the lasts ones.

Python prototype (for reference only):

process() -> rects
@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
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
  • func: Evision.FileNode

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.Segmentation.SelectiveSearchSegmentation.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

setBaseImage(named_args)

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

Set a image used by switch* functions to initialize the class

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()

  • img: Evision.Mat.

    The image

Python prototype (for reference only):

setBaseImage(img) -> None
Link to this function

switchToSelectiveSearchFast(named_args)

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

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
Keyword Arguments
  • base_k: integer().

    The k parameter for the first graph segmentation

  • inc_k: integer().

    The increment of the k parameter for all graph segmentations

  • sigma: float.

    The sigma parameter for the graph segmentation

Python prototype (for reference only):

switchToSelectiveSearchFast([, base_k[, inc_k[, sigma]]]) -> None
Link to this function

switchToSelectiveSearchFast(self, opts)

View Source
@spec switchToSelectiveSearchFast(
  t(),
  [base_k: term(), inc_k: term(), sigma: term()] | nil
) ::
  t() | {:error, String.t()}

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
Keyword Arguments
  • base_k: integer().

    The k parameter for the first graph segmentation

  • inc_k: integer().

    The increment of the k parameter for all graph segmentations

  • sigma: float.

    The sigma parameter for the graph segmentation

Python prototype (for reference only):

switchToSelectiveSearchFast([, base_k[, inc_k[, sigma]]]) -> None
Link to this function

switchToSelectiveSearchQuality(named_args)

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

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
Keyword Arguments
  • base_k: integer().

    The k parameter for the first graph segmentation

  • inc_k: integer().

    The increment of the k parameter for all graph segmentations

  • sigma: float.

    The sigma parameter for the graph segmentation

Python prototype (for reference only):

switchToSelectiveSearchQuality([, base_k[, inc_k[, sigma]]]) -> None
Link to this function

switchToSelectiveSearchQuality(self, opts)

View Source
@spec switchToSelectiveSearchQuality(
  t(),
  [base_k: term(), inc_k: term(), sigma: term()] | nil
) ::
  t() | {:error, String.t()}

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
Keyword Arguments
  • base_k: integer().

    The k parameter for the first graph segmentation

  • inc_k: integer().

    The increment of the k parameter for all graph segmentations

  • sigma: float.

    The sigma parameter for the graph segmentation

Python prototype (for reference only):

switchToSelectiveSearchQuality([, base_k[, inc_k[, sigma]]]) -> None
Link to this function

switchToSingleStrategy(named_args)

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

Initialize the class with the 'Single stragegy' parameters describled in @cite uijlings2013selective.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
Keyword Arguments
  • k: integer().

    The k parameter for the graph segmentation

  • sigma: float.

    The sigma parameter for the graph segmentation

Python prototype (for reference only):

switchToSingleStrategy([, k[, sigma]]) -> None
Link to this function

switchToSingleStrategy(self, opts)

View Source
@spec switchToSingleStrategy(t(), [k: term(), sigma: term()] | nil) ::
  t() | {:error, String.t()}

Initialize the class with the 'Single stragegy' parameters describled in @cite uijlings2013selective.

Positional Arguments
  • self: Evision.XImgProc.Segmentation.SelectiveSearchSegmentation.t()
Keyword Arguments
  • k: integer().

    The k parameter for the graph segmentation

  • sigma: float.

    The sigma parameter for the graph segmentation

Python prototype (for reference only):

switchToSingleStrategy([, k[, sigma]]) -> 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