123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.Calib3dModule
- {
- // C++: class StereoMatcher
- //javadoc: StereoMatcher
- public class StereoMatcher : Algorithm
- {
- protected override void Dispose (bool disposing)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- calib3d_StereoMatcher_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal StereoMatcher (IntPtr addr) : base (addr) { }
- // internal usage only
- public static new StereoMatcher __fromPtr__ (IntPtr addr) { return new StereoMatcher (addr); }
- // C++: enum <unnamed>
- public const int DISP_SHIFT = 4;
- public const int DISP_SCALE = (1 << DISP_SHIFT);
- //
- // C++: int cv::StereoMatcher::getBlockSize()
- //
- //javadoc: StereoMatcher::getBlockSize()
- public int getBlockSize ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = calib3d_StereoMatcher_getBlockSize_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::StereoMatcher::getDisp12MaxDiff()
- //
- //javadoc: StereoMatcher::getDisp12MaxDiff()
- public int getDisp12MaxDiff ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = calib3d_StereoMatcher_getDisp12MaxDiff_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::StereoMatcher::getMinDisparity()
- //
- //javadoc: StereoMatcher::getMinDisparity()
- public int getMinDisparity ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = calib3d_StereoMatcher_getMinDisparity_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::StereoMatcher::getNumDisparities()
- //
- //javadoc: StereoMatcher::getNumDisparities()
- public int getNumDisparities ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = calib3d_StereoMatcher_getNumDisparities_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::StereoMatcher::getSpeckleRange()
- //
- //javadoc: StereoMatcher::getSpeckleRange()
- public int getSpeckleRange ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = calib3d_StereoMatcher_getSpeckleRange_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: int cv::StereoMatcher::getSpeckleWindowSize()
- //
- //javadoc: StereoMatcher::getSpeckleWindowSize()
- public int getSpeckleWindowSize ()
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- int retVal = calib3d_StereoMatcher_getSpeckleWindowSize_10(nativeObj);
-
- return retVal;
- #else
- return -1;
- #endif
- }
- //
- // C++: void cv::StereoMatcher::compute(Mat left, Mat right, Mat& disparity)
- //
- //javadoc: StereoMatcher::compute(left, right, disparity)
- public void compute (Mat left, Mat right, Mat disparity)
- {
- ThrowIfDisposed ();
- if (left != null) left.ThrowIfDisposed ();
- if (right != null) right.ThrowIfDisposed ();
- if (disparity != null) disparity.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- calib3d_StereoMatcher_compute_10(nativeObj, left.nativeObj, right.nativeObj, disparity.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::StereoMatcher::setBlockSize(int blockSize)
- //
- //javadoc: StereoMatcher::setBlockSize(blockSize)
- public void setBlockSize (int blockSize)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- calib3d_StereoMatcher_setBlockSize_10(nativeObj, blockSize);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::StereoMatcher::setDisp12MaxDiff(int disp12MaxDiff)
- //
- //javadoc: StereoMatcher::setDisp12MaxDiff(disp12MaxDiff)
- public void setDisp12MaxDiff (int disp12MaxDiff)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- calib3d_StereoMatcher_setDisp12MaxDiff_10(nativeObj, disp12MaxDiff);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::StereoMatcher::setMinDisparity(int minDisparity)
- //
- //javadoc: StereoMatcher::setMinDisparity(minDisparity)
- public void setMinDisparity (int minDisparity)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- calib3d_StereoMatcher_setMinDisparity_10(nativeObj, minDisparity);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::StereoMatcher::setNumDisparities(int numDisparities)
- //
- //javadoc: StereoMatcher::setNumDisparities(numDisparities)
- public void setNumDisparities (int numDisparities)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- calib3d_StereoMatcher_setNumDisparities_10(nativeObj, numDisparities);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::StereoMatcher::setSpeckleRange(int speckleRange)
- //
- //javadoc: StereoMatcher::setSpeckleRange(speckleRange)
- public void setSpeckleRange (int speckleRange)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- calib3d_StereoMatcher_setSpeckleRange_10(nativeObj, speckleRange);
-
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::StereoMatcher::setSpeckleWindowSize(int speckleWindowSize)
- //
- //javadoc: StereoMatcher::setSpeckleWindowSize(speckleWindowSize)
- public void setSpeckleWindowSize (int speckleWindowSize)
- {
- ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- calib3d_StereoMatcher_setSpeckleWindowSize_10(nativeObj, speckleWindowSize);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: int cv::StereoMatcher::getBlockSize()
- [DllImport (LIBNAME)]
- private static extern int calib3d_StereoMatcher_getBlockSize_10 (IntPtr nativeObj);
- // C++: int cv::StereoMatcher::getDisp12MaxDiff()
- [DllImport (LIBNAME)]
- private static extern int calib3d_StereoMatcher_getDisp12MaxDiff_10 (IntPtr nativeObj);
- // C++: int cv::StereoMatcher::getMinDisparity()
- [DllImport (LIBNAME)]
- private static extern int calib3d_StereoMatcher_getMinDisparity_10 (IntPtr nativeObj);
- // C++: int cv::StereoMatcher::getNumDisparities()
- [DllImport (LIBNAME)]
- private static extern int calib3d_StereoMatcher_getNumDisparities_10 (IntPtr nativeObj);
- // C++: int cv::StereoMatcher::getSpeckleRange()
- [DllImport (LIBNAME)]
- private static extern int calib3d_StereoMatcher_getSpeckleRange_10 (IntPtr nativeObj);
- // C++: int cv::StereoMatcher::getSpeckleWindowSize()
- [DllImport (LIBNAME)]
- private static extern int calib3d_StereoMatcher_getSpeckleWindowSize_10 (IntPtr nativeObj);
- // C++: void cv::StereoMatcher::compute(Mat left, Mat right, Mat& disparity)
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_compute_10 (IntPtr nativeObj, IntPtr left_nativeObj, IntPtr right_nativeObj, IntPtr disparity_nativeObj);
- // C++: void cv::StereoMatcher::setBlockSize(int blockSize)
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_setBlockSize_10 (IntPtr nativeObj, int blockSize);
- // C++: void cv::StereoMatcher::setDisp12MaxDiff(int disp12MaxDiff)
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_setDisp12MaxDiff_10 (IntPtr nativeObj, int disp12MaxDiff);
- // C++: void cv::StereoMatcher::setMinDisparity(int minDisparity)
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_setMinDisparity_10 (IntPtr nativeObj, int minDisparity);
- // C++: void cv::StereoMatcher::setNumDisparities(int numDisparities)
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_setNumDisparities_10 (IntPtr nativeObj, int numDisparities);
- // C++: void cv::StereoMatcher::setSpeckleRange(int speckleRange)
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_setSpeckleRange_10 (IntPtr nativeObj, int speckleRange);
- // C++: void cv::StereoMatcher::setSpeckleWindowSize(int speckleWindowSize)
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_setSpeckleWindowSize_10 (IntPtr nativeObj, int speckleWindowSize);
- // native support for java finalize()
- [DllImport (LIBNAME)]
- private static extern void calib3d_StereoMatcher_delete (IntPtr nativeObj);
- }
- }
|