123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.PhotoModule
- {
-
-
- public class MergeMertens : MergeExposures
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- photo_MergeMertens_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal MergeMertens(IntPtr addr) : base(addr) { }
-
- public static new MergeMertens __fromPtr__(IntPtr addr) { return new MergeMertens(addr); }
-
-
-
- public override void process(List<Mat> src, Mat dst, Mat times, Mat response)
- {
- ThrowIfDisposed();
- if (dst != null) dst.ThrowIfDisposed();
- if (times != null) times.ThrowIfDisposed();
- if (response != null) response.ThrowIfDisposed();
- Mat src_mat = Converters.vector_Mat_to_Mat(src);
- photo_MergeMertens_process_10(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
- }
-
-
-
-
- public void process(List<Mat> src, Mat dst)
- {
- ThrowIfDisposed();
- if (dst != null) dst.ThrowIfDisposed();
- Mat src_mat = Converters.vector_Mat_to_Mat(src);
- photo_MergeMertens_process_11(nativeObj, src_mat.nativeObj, dst.nativeObj);
- }
-
-
-
- public float getContrastWeight()
- {
- ThrowIfDisposed();
- return photo_MergeMertens_getContrastWeight_10(nativeObj);
- }
-
-
-
- public void setContrastWeight(float contrast_weiht)
- {
- ThrowIfDisposed();
- photo_MergeMertens_setContrastWeight_10(nativeObj, contrast_weiht);
- }
-
-
-
- public float getSaturationWeight()
- {
- ThrowIfDisposed();
- return photo_MergeMertens_getSaturationWeight_10(nativeObj);
- }
-
-
-
- public void setSaturationWeight(float saturation_weight)
- {
- ThrowIfDisposed();
- photo_MergeMertens_setSaturationWeight_10(nativeObj, saturation_weight);
- }
-
-
-
- public float getExposureWeight()
- {
- ThrowIfDisposed();
- return photo_MergeMertens_getExposureWeight_10(nativeObj);
- }
-
-
-
- public void setExposureWeight(float exposure_weight)
- {
- ThrowIfDisposed();
- photo_MergeMertens_setExposureWeight_10(nativeObj, exposure_weight);
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
-
- [DllImport(LIBNAME)]
- private static extern void photo_MergeMertens_process_10(IntPtr nativeObj, IntPtr src_mat_nativeObj, IntPtr dst_nativeObj, IntPtr times_nativeObj, IntPtr response_nativeObj);
-
- [DllImport(LIBNAME)]
- private static extern void photo_MergeMertens_process_11(IntPtr nativeObj, IntPtr src_mat_nativeObj, IntPtr dst_nativeObj);
-
- [DllImport(LIBNAME)]
- private static extern float photo_MergeMertens_getContrastWeight_10(IntPtr nativeObj);
-
- [DllImport(LIBNAME)]
- private static extern void photo_MergeMertens_setContrastWeight_10(IntPtr nativeObj, float contrast_weiht);
-
- [DllImport(LIBNAME)]
- private static extern float photo_MergeMertens_getSaturationWeight_10(IntPtr nativeObj);
-
- [DllImport(LIBNAME)]
- private static extern void photo_MergeMertens_setSaturationWeight_10(IntPtr nativeObj, float saturation_weight);
-
- [DllImport(LIBNAME)]
- private static extern float photo_MergeMertens_getExposureWeight_10(IntPtr nativeObj);
-
- [DllImport(LIBNAME)]
- private static extern void photo_MergeMertens_setExposureWeight_10(IntPtr nativeObj, float exposure_weight);
-
- [DllImport(LIBNAME)]
- private static extern void photo_MergeMertens_delete(IntPtr nativeObj);
- }
- }
|