Skip to content

Commit

Permalink
Documentation improvement for the Stereo module.
Browse files Browse the repository at this point in the history
  • Loading branch information
emgucv committed Apr 23, 2019
1 parent 5b3bc8f commit 76a90ef
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Emgu.CV.Contrib/Quality/QualitySSIM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public IntPtr AlgorithmPtr
/// Create an object which calculates quality via mean square error.
/// </summary>
/// <param name="refImgs">input image(s) to use as the source for comparison</param>
public QualitySSIM(IInputArray refImgs)
public QualitySSIM(IInputArrayOfArrays refImgs)
{
using (InputArray iaRefImgs = refImgs.GetInputArray())
_ptr = QualityInvoke.cveQualitySSIMCreate(
Expand Down
23 changes: 23 additions & 0 deletions Emgu.CV.Contrib/Stereo/QuasiDenseStereo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@

namespace Emgu.CV.Stereo
{
/// <summary>
/// Class containing the methods needed for Quasi Dense Stereo computation.
/// </summary>
public partial class QuasiDenseStereo : SharedPtrObject
{
/// <summary>
/// Create a new instance containing the methods needed for Quasi Dense Stereo computation.
/// </summary>
/// <param name="monoImgSize">Image size</param>
/// <param name="paramFilepath">The path for the parameters</param>
public QuasiDenseStereo(Size monoImgSize, String paramFilepath = "")
{
using (CvString csParamFilePath = new CvString(paramFilepath))
Expand All @@ -37,18 +45,33 @@ protected override void DisposeObject()
}
}

/// <summary>
/// Main process of the algorithm. This method computes the sparse seeds and then densifies them.
/// 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.
/// </summary>
/// <param name="imgLeft">The left Channel of a stereo image pair.</param>
/// <param name="imgRight">The right Channel of a stereo image pair.</param>
/// <remarks>If input images are in color, the method assumes that are BGR and converts them to grayscale.</remarks>
public void Process(Mat imgLeft, Mat imgRight)
{
StereoInvoke.cveQuasiDenseStereoProcess(_ptr, imgLeft, imgRight);
}

/// <summary>
/// Compute and return the disparity map based on the correspondences found in the "process" method.
/// </summary>
/// <param name="disparityLvls">The level of detail in output disparity image.</param>
/// <returns>Mat containing a the disparity image in grayscale.</returns>
public Mat GetDisparity(byte disparityLvls = (byte)50)
{
Mat disparity = new Mat();
StereoInvoke.cveQuasiDenseStereoGetDisparity(_ptr, disparityLvls, disparity);
return disparity;
}

/// <summary>
/// The propagation parameters
/// </summary>
public struct PropagationParameters
{
/// <summary>
Expand Down

0 comments on commit 76a90ef

Please sign in to comment.