public void TestVectorOfVectorOfMat() { using (Mat m = new Mat()) using (VectorOfMat vm = new VectorOfMat()) { vm.Push(m); using (VectorOfVectorOfMat vvm = new VectorOfVectorOfMat()) { vvm.Push(vm); } } }
/// <summary> /// Decodes the structured light pattern, generating a disparity map. /// </summary> /// <param name="structuredLightPattern">The strucutred light pattern</param> /// <param name="patternImages">The acquired pattern images to decode VectorOfVectorOfMat), loaded as grayscale and previously rectified.</param> /// <param name="disparityMap">The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.</param> /// <param name="blackImages">The all-black images needed for shadowMasks computation.</param> /// <param name="whiteImages">The all-white images needed for shadowMasks computation.</param> /// <param name="flags">Flags setting decoding algorithms.</param> /// <returns>True if successful.</returns> public static bool Decode( this IStructuredLightPattern structuredLightPattern, VectorOfVectorOfMat patternImages, IOutputArray disparityMap, IInputArrayOfArrays blackImages = null, IInputArrayOfArrays whiteImages = null, DecodeFlag flags = DecodeFlag.Decode3dUnderworld) { using (OutputArray oaDisparityMap = disparityMap.GetOutputArray()) using (InputArray iaBlackImages = blackImages == null? InputArray.GetEmpty() : blackImages.GetInputArray()) using (InputArray iaWhiteImages = whiteImages == null? InputArray.GetEmpty() : whiteImages.GetInputArray()) { return(cveStructuredLightPatternDecode( structuredLightPattern.StructuredLightPatternPtr, patternImages, oaDisparityMap, iaBlackImages, iaWhiteImages, flags )); } }