示例#1
0
        /// <summary>
        /// Compute and return the disparity map based on the correspondences found in the "process" method.
        /// </summary>
        /// <returns>Mat containing a the disparity image in grayscale.</returns>
        public Mat GetDisparity()
        {
            Mat disparity = new Mat();

            StereoInvoke.cveQuasiDenseStereoGetDisparity(_ptr, disparity);
            return(disparity);
        }
示例#2
0
        /// <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);
        }
示例#3
0
 /// <summary>
 /// Release the unmanaged memory associated with this object
 /// </summary>
 protected override void DisposeObject()
 {
     if (_sharedPtr != IntPtr.Zero)
     {
         StereoInvoke.cveQuasiDenseStereoRelease(ref _sharedPtr);
         _ptr = IntPtr.Zero;
     }
 }
示例#4
0
 /// <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))
         _ptr = StereoInvoke.cveQuasiDenseStereoCreate(
             ref monoImgSize,
             csParamFilePath,
             ref _sharedPtr);
 }
示例#5
0
 /// <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);
 }