View Source Evision.Stereo.QuasiDenseStereo (Evision v0.1.28)

Link to this section Summary

Types

t()

Type that represents an Stereo.QuasiDenseStereo struct.

Functions

Get The dense corresponding points.

Compute and return the disparity map based on the correspondences found in the "process" method.

Specify pixel coordinates in the left image and get its corresponding location in the right image.

Get The sparse corresponding points.

Load a file containing the configuration parameters of the class.

Main process of the algorithm. This method computes the sparse seeds and then densifies them.

Save a file containing all the configuration parameters the class is currently set to.

Link to this section Types

@type t() :: %Evision.Stereo.QuasiDenseStereo{ref: reference()}

Type that represents an Stereo.QuasiDenseStereo struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@spec create({number(), number()}) :: t() | {:error, String.t()}

create

Positional Arguments
  • monoImgSize: Size
Keyword Arguments
Return
  • retval: cv::Ptr<QuasiDenseStereo>

Python prototype (for reference only):

create(monoImgSize[, paramFilepath]) -> retval
Link to this function

create(monoImgSize, opts)

View Source
@spec create(
  {number(), number()},
  [{atom(), term()}, ...] | nil
) :: t() | {:error, String.t()}

create

Positional Arguments
  • monoImgSize: Size
Keyword Arguments
Return
  • retval: cv::Ptr<QuasiDenseStereo>

Python prototype (for reference only):

create(monoImgSize[, paramFilepath]) -> retval
@spec get_Param(t()) :: Evision.Stereo.PropagationParameters.t()
@spec getDenseMatches(t()) ::
  [Evision.Stereo.MatchQuasiDense.t()] | {:error, String.t()}

Get The dense corresponding points.

Positional Arguments
  • self: Evision.Stereo.QuasiDenseStereo.t()
Return
  • denseMatches: [MatchQuasiDense].

    A vector containing all dense matches.

Note: The method clears the denseMatches vector. Note: The returned Match elements inside the sMatches vector, do not use corr member.

Python prototype (for reference only):

getDenseMatches() -> denseMatches
@spec getDisparity(t()) :: Evision.Mat.t() | {:error, String.t()}

Compute and return the disparity map based on the correspondences found in the "process" method.

Positional Arguments
  • self: Evision.Stereo.QuasiDenseStereo.t()
Return
  • retval: Evision.Mat.t()

Note: Default level is 50 @return cv::Mat containing a the disparity image in grayscale. @sa computeDisparity @sa quantizeDisparity

Python prototype (for reference only):

getDisparity() -> retval
@spec getMatch(t(), integer(), integer()) ::
  {number(), number()} | {:error, String.t()}

Specify pixel coordinates in the left image and get its corresponding location in the right image.

Positional Arguments
  • self: Evision.Stereo.QuasiDenseStereo.t()

  • x: int.

    The x pixel coordinate in the left image channel.

  • y: int.

    The y pixel coordinate in the left image channel.

Return
  • retval: cv::Point2f

@retval cv::Point(x, y) The location of the corresponding pixel in the right image. @retval cv::Point(0, 0) (NO_MATCH) if no match is found in the right image for the specified pixel location in the left image. Note: This method should be always called after process, otherwise the matches will not be correct.

Python prototype (for reference only):

getMatch(x, y) -> retval
@spec getSparseMatches(t()) ::
  [Evision.Stereo.MatchQuasiDense.t()] | {:error, String.t()}

Get The sparse corresponding points.

Positional Arguments
  • self: Evision.Stereo.QuasiDenseStereo.t()
Return
  • sMatches: [MatchQuasiDense].

    A vector containing all sparse correspondences.

Note: The method clears the sMatches vector. Note: The returned Match elements inside the sMatches vector, do not use corr member.

Python prototype (for reference only):

getSparseMatches() -> sMatches
Link to this function

loadParameters(self, filepath)

View Source
@spec loadParameters(t(), binary()) :: integer() | {:error, String.t()}

Load a file containing the configuration parameters of the class.

Positional Arguments
  • self: Evision.Stereo.QuasiDenseStereo.t()

  • filepath: String.

    The location of the .YAML file containing the configuration parameters.

Return
  • retval: int

Note: default value is an empty string in which case the default parameters will be loaded. @retval 1: If the path is not empty and the program loaded the parameters successfully. @retval 0: If the path is empty and the program loaded default parameters. @retval -1: If the file location is not valid or the program could not open the file and loaded default parameters from defaults.hpp. Note: The method is automatically called in the constructor and configures the class. Note: Loading different parameters will have an effect on the output. This is useful for tuning in case of video processing. @sa loadParameters

Python prototype (for reference only):

loadParameters(filepath) -> retval
Link to this function

process(self, imgLeft, imgRight)

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

Main process of the algorithm. This method computes the sparse seeds and then densifies them.

Positional Arguments
  • self: Evision.Stereo.QuasiDenseStereo.t()

  • imgLeft: Evision.Mat.t().

    The left Channel of a stereo image pair.

  • imgRight: Evision.Mat.t().

    The right Channel of a stereo image pair.

Initially input images are converted to gray-scale and then the sparseMatching method is called to obtain the sparse stereo. Finally quasiDenseMatching is called to densify the corresponding points. Note: If input images are in color, the method assumes that are BGR and converts them to grayscale. @sa sparseMatching @sa quasiDenseMatching

Python prototype (for reference only):

process(imgLeft, imgRight) -> None
Link to this function

saveParameters(self, filepath)

View Source
@spec saveParameters(t(), binary()) :: integer() | {:error, String.t()}

Save a file containing all the configuration parameters the class is currently set to.

Positional Arguments
  • self: Evision.Stereo.QuasiDenseStereo.t()

  • filepath: String.

    The location to store the parameters file.

Return
  • retval: int

Note: Calling this method with no arguments will result in storing class parameters to a file names "qds_parameters.yaml" in the root project folder. Note: This method can be used to generate a template file for tuning the class. @sa loadParameters

Python prototype (for reference only):

saveParameters(filepath) -> retval
@spec set_Param(t(), Evision.Stereo.PropagationParameters.t()) :: t()