View Source Evision.StructuredLight.SinusoidalPattern (Evision v0.2.9)

Summary

Types

t()

Type that represents an StructuredLight.SinusoidalPattern struct.

Functions

Clears the algorithm state

Compute a wrapped phase map from sinusoidal patterns.

Compute a wrapped phase map from sinusoidal patterns.

Constructor.

Constructor.

Decodes the structured light pattern, generating a disparity map

Decodes the structured light pattern, generating a disparity map

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

Find correspondences between the two devices thanks to unwrapped phase maps.

Find correspondences between the two devices thanks to unwrapped phase maps.

Generates the structured light pattern to project.

Generates the structured light pattern to project.

Reads algorithm parameters from a file storage

Unwrap the wrapped phase map to remove phase ambiguities.

Unwrap the wrapped phase map to remove phase ambiguities.

Stores algorithm parameters in a file storage

Types

@type t() :: %Evision.StructuredLight.SinusoidalPattern{ref: reference()}

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

Python prototype (for reference only):

clear() -> None
Link to this function

computeDataModulationTerm(named_args)

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

computeDataModulationTerm(self, patternImages, shadowMask)

View Source
@spec computeDataModulationTerm(
  t(),
  [Evision.Mat.maybe_mat_in()],
  Evision.Mat.maybe_mat_in()
) ::
  Evision.Mat.t() | {:error, String.t()}

compute the data modulation term.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • patternImages: [Evision.Mat].

    captured images with projected patterns.

  • shadowMask: Evision.Mat.

    Mask used to discard shadow regions.

Return
  • dataModulationTerm: Evision.Mat.t().

    Mat where the data modulation term is saved.

Python prototype (for reference only):

computeDataModulationTerm(patternImages, shadowMask[, dataModulationTerm]) -> dataModulationTerm
Link to this function

computeDataModulationTerm(self, patternImages, shadowMask, opts)

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

compute the data modulation term.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • patternImages: [Evision.Mat].

    captured images with projected patterns.

  • shadowMask: Evision.Mat.

    Mask used to discard shadow regions.

Return
  • dataModulationTerm: Evision.Mat.t().

    Mat where the data modulation term is saved.

Python prototype (for reference only):

computeDataModulationTerm(patternImages, shadowMask[, dataModulationTerm]) -> dataModulationTerm
Link to this function

computePhaseMap(named_args)

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

computePhaseMap(self, patternImages)

View Source
@spec computePhaseMap(t(), [Evision.Mat.maybe_mat_in()]) ::
  {Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

Compute a wrapped phase map from sinusoidal patterns.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • patternImages: [Evision.Mat].

    Input data to compute the wrapped phase map.

Keyword Arguments
  • fundamental: Evision.Mat.

    Fundamental matrix used to compute epipolar lines and ease the matching step.

Return
  • wrappedPhaseMap: Evision.Mat.t().

    Wrapped phase map obtained through one of the three methods.

  • shadowMask: Evision.Mat.t().

    Mask used to discard shadow regions.

Python prototype (for reference only):

computePhaseMap(patternImages[, wrappedPhaseMap[, shadowMask[, fundamental]]]) -> wrappedPhaseMap, shadowMask
Link to this function

computePhaseMap(self, patternImages, opts)

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

Compute a wrapped phase map from sinusoidal patterns.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • patternImages: [Evision.Mat].

    Input data to compute the wrapped phase map.

Keyword Arguments
  • fundamental: Evision.Mat.

    Fundamental matrix used to compute epipolar lines and ease the matching step.

Return
  • wrappedPhaseMap: Evision.Mat.t().

    Wrapped phase map obtained through one of the three methods.

  • shadowMask: Evision.Mat.t().

    Mask used to discard shadow regions.

Python prototype (for reference only):

computePhaseMap(patternImages[, wrappedPhaseMap[, shadowMask[, fundamental]]]) -> wrappedPhaseMap, shadowMask
@spec create() :: t() | {:error, String.t()}

Constructor.

Keyword Arguments
Return
  • retval: Evision.StructuredLight.SinusoidalPattern.t()

Python prototype (for reference only):

create([, parameters]) -> retval
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create([{:parameters, term()}] | nil) :: t() | {:error, String.t()}

Constructor.

Keyword Arguments
Return
  • retval: Evision.StructuredLight.SinusoidalPattern.t()

Python prototype (for reference only):

create([, parameters]) -> retval
@spec decode(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

decode(self, patternImages)

View Source
@spec decode(t(), [[Evision.Mat.maybe_mat_in()]]) ::
  Evision.Mat.t() | false | {:error, String.t()}

Decodes the structured light pattern, generating a disparity map

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • patternImages: [[Evision.Mat]].

    The acquired pattern images to decode (vector<vector<Mat>>), loaded as grayscale and previously rectified.

Keyword Arguments
  • blackImages: [Evision.Mat].

    The all-black images needed for shadowMasks computation.

  • whiteImages: [Evision.Mat].

    The all-white images needed for shadowMasks computation.

  • flags: integer().

    Flags setting decoding algorithms. Default: DECODE_3D_UNDERWORLD.

Return
  • retval: bool

  • disparityMap: Evision.Mat.t().

    The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.

Note: All the images must be at the same resolution.

Python prototype (for reference only):

decode(patternImages[, disparityMap[, blackImages[, whiteImages[, flags]]]]) -> retval, disparityMap
Link to this function

decode(self, patternImages, opts)

View Source
@spec decode(
  t(),
  [[Evision.Mat.maybe_mat_in()]],
  [blackImages: term(), flags: term(), whiteImages: term()] | nil
) :: Evision.Mat.t() | false | {:error, String.t()}

Decodes the structured light pattern, generating a disparity map

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • patternImages: [[Evision.Mat]].

    The acquired pattern images to decode (vector<vector<Mat>>), loaded as grayscale and previously rectified.

Keyword Arguments
  • blackImages: [Evision.Mat].

    The all-black images needed for shadowMasks computation.

  • whiteImages: [Evision.Mat].

    The all-white images needed for shadowMasks computation.

  • flags: integer().

    Flags setting decoding algorithms. Default: DECODE_3D_UNDERWORLD.

Return
  • retval: bool

  • disparityMap: Evision.Mat.t().

    The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.

Note: All the images must be at the same resolution.

Python prototype (for reference only):

decode(patternImages[, disparityMap[, blackImages[, whiteImages[, flags]]]]) -> retval, disparityMap
@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.StructuredLight.SinusoidalPattern.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
Link to this function

findProCamMatches(named_args)

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

findProCamMatches(self, projUnwrappedPhaseMap, camUnwrappedPhaseMap)

View Source
@spec findProCamMatches(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  [Evision.Mat.t()] | {:error, String.t()}

Find correspondences between the two devices thanks to unwrapped phase maps.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • projUnwrappedPhaseMap: Evision.Mat.

    Projector's unwrapped phase map.

  • camUnwrappedPhaseMap: Evision.Mat.

    Camera's unwrapped phase map.

Return
  • matches: [Evision.Mat].

    Images used to display correspondences map.

Python prototype (for reference only):

findProCamMatches(projUnwrappedPhaseMap, camUnwrappedPhaseMap[, matches]) -> matches
Link to this function

findProCamMatches(self, projUnwrappedPhaseMap, camUnwrappedPhaseMap, opts)

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

Find correspondences between the two devices thanks to unwrapped phase maps.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • projUnwrappedPhaseMap: Evision.Mat.

    Projector's unwrapped phase map.

  • camUnwrappedPhaseMap: Evision.Mat.

    Camera's unwrapped phase map.

Return
  • matches: [Evision.Mat].

    Images used to display correspondences map.

Python prototype (for reference only):

findProCamMatches(projUnwrappedPhaseMap, camUnwrappedPhaseMap[, matches]) -> matches
@spec generate(Keyword.t()) :: any() | {:error, String.t()}
@spec generate(t()) :: [Evision.Mat.t()] | false | {:error, String.t()}

Generates the structured light pattern to project.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()
Return
  • retval: bool

  • patternImages: [Evision.Mat].

    The generated pattern: a vector<Mat>, in which each image is a CV_8U Mat at projector's resolution.

Python prototype (for reference only):

generate([, patternImages]) -> retval, patternImages
@spec generate(t(), [{atom(), term()}, ...] | nil) ::
  [Evision.Mat.t()] | false | {:error, String.t()}

Generates the structured light pattern to project.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()
Return
  • retval: bool

  • patternImages: [Evision.Mat].

    The generated pattern: a vector<Mat>, in which each image is a CV_8U Mat at projector's resolution.

Python prototype (for reference only):

generate([, patternImages]) -> retval, patternImages
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.StructuredLight.SinusoidalPattern.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(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.StructuredLight.SinusoidalPattern.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

unwrapPhaseMap(named_args)

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

unwrapPhaseMap(self, wrappedPhaseMap, camSize)

View Source
@spec unwrapPhaseMap(t(), Evision.Mat.maybe_mat_in(), {number(), number()}) ::
  Evision.Mat.t() | {:error, String.t()}

Unwrap the wrapped phase map to remove phase ambiguities.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • wrappedPhaseMap: Evision.Mat.

    The wrapped phase map computed from the pattern.

  • camSize: Size.

    Resolution of the camera.

Keyword Arguments
  • shadowMask: Evision.Mat.

    Mask used to discard shadow regions.

Return
  • unwrappedPhaseMap: Evision.Mat.t().

    The unwrapped phase map used to find correspondences between the two devices.

Python prototype (for reference only):

unwrapPhaseMap(wrappedPhaseMap, camSize[, unwrappedPhaseMap[, shadowMask]]) -> unwrappedPhaseMap
Link to this function

unwrapPhaseMap(self, wrappedPhaseMap, camSize, opts)

View Source
@spec unwrapPhaseMap(
  t(),
  Evision.Mat.maybe_mat_in(),
  {number(), number()},
  [{:shadowMask, term()}] | nil
) :: Evision.Mat.t() | {:error, String.t()}

Unwrap the wrapped phase map to remove phase ambiguities.

Positional Arguments
  • self: Evision.StructuredLight.SinusoidalPattern.t()

  • wrappedPhaseMap: Evision.Mat.

    The wrapped phase map computed from the pattern.

  • camSize: Size.

    Resolution of the camera.

Keyword Arguments
  • shadowMask: Evision.Mat.

    Mask used to discard shadow regions.

Return
  • unwrappedPhaseMap: Evision.Mat.t().

    The unwrapped phase map used to find correspondences between the two devices.

Python prototype (for reference only):

unwrapPhaseMap(wrappedPhaseMap, camSize[, unwrappedPhaseMap[, shadowMask]]) -> unwrappedPhaseMap
@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