View Source Evision.StructuredLight.SinusoidalPattern (Evision v0.2.9)
Summary
Functions
Clears the algorithm state
compute the data modulation term.
compute the data modulation term.
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.
getDefaultName
Reads algorithm parameters from a file storage
save
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
write
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
@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
@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
@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
@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
Constructor.
Keyword Arguments
parameters:
Evision.StructuredLight.SinusoidalPattern.Params
.SinusoidalPattern parameters SinusoidalPattern::Params: width, height of the projector and patterns parameters.
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
parameters:
Evision.StructuredLight.SinusoidalPattern.Params
.SinusoidalPattern parameters SinusoidalPattern::Params: width, height of the projector and patterns parameters.
Return
- retval:
Evision.StructuredLight.SinusoidalPattern.t()
Python prototype (for reference only):
create([, parameters]) -> retval
@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
@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
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
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
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.StructuredLight.SinusoidalPattern.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.StructuredLight.SinusoidalPattern.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
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
@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
@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(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}
Stores algorithm parameters in a file storage
Positional Arguments
- self:
Evision.StructuredLight.SinusoidalPattern.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.StructuredLight.SinusoidalPattern.t()
- fs:
Evision.FileStorage
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None