123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.PhotoModule
- {
- // C++: class CalibrateDebevec
- /**
- * Inverse camera response function is extracted for each brightness value by minimizing an objective
- * function as linear system. Objective function is constructed using pixel values on the same position
- * in all images, extra term is added to make the result smoother.
- *
- * For more information see CITE: DM97 .
- */
- public class CalibrateDebevec : CalibrateCRF
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- photo_CalibrateDebevec_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal CalibrateDebevec(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new CalibrateDebevec __fromPtr__(IntPtr addr) { return new CalibrateDebevec(addr); }
- //
- // C++: float cv::CalibrateDebevec::getLambda()
- //
- public float getLambda()
- {
- ThrowIfDisposed();
- return photo_CalibrateDebevec_getLambda_10(nativeObj);
- }
- //
- // C++: void cv::CalibrateDebevec::setLambda(float lambda)
- //
- public void setLambda(float lambda)
- {
- ThrowIfDisposed();
- photo_CalibrateDebevec_setLambda_10(nativeObj, lambda);
- }
- //
- // C++: int cv::CalibrateDebevec::getSamples()
- //
- public int getSamples()
- {
- ThrowIfDisposed();
- return photo_CalibrateDebevec_getSamples_10(nativeObj);
- }
- //
- // C++: void cv::CalibrateDebevec::setSamples(int samples)
- //
- public void setSamples(int samples)
- {
- ThrowIfDisposed();
- photo_CalibrateDebevec_setSamples_10(nativeObj, samples);
- }
- //
- // C++: bool cv::CalibrateDebevec::getRandom()
- //
- public bool getRandom()
- {
- ThrowIfDisposed();
- return photo_CalibrateDebevec_getRandom_10(nativeObj);
- }
- //
- // C++: void cv::CalibrateDebevec::setRandom(bool random)
- //
- public void setRandom(bool random)
- {
- ThrowIfDisposed();
- photo_CalibrateDebevec_setRandom_10(nativeObj, random);
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: float cv::CalibrateDebevec::getLambda()
- [DllImport(LIBNAME)]
- private static extern float photo_CalibrateDebevec_getLambda_10(IntPtr nativeObj);
- // C++: void cv::CalibrateDebevec::setLambda(float lambda)
- [DllImport(LIBNAME)]
- private static extern void photo_CalibrateDebevec_setLambda_10(IntPtr nativeObj, float lambda);
- // C++: int cv::CalibrateDebevec::getSamples()
- [DllImport(LIBNAME)]
- private static extern int photo_CalibrateDebevec_getSamples_10(IntPtr nativeObj);
- // C++: void cv::CalibrateDebevec::setSamples(int samples)
- [DllImport(LIBNAME)]
- private static extern void photo_CalibrateDebevec_setSamples_10(IntPtr nativeObj, int samples);
- // C++: bool cv::CalibrateDebevec::getRandom()
- [DllImport(LIBNAME)]
- [return: MarshalAs(UnmanagedType.U1)]
- private static extern bool photo_CalibrateDebevec_getRandom_10(IntPtr nativeObj);
- // C++: void cv::CalibrateDebevec::setRandom(bool random)
- [DllImport(LIBNAME)]
- private static extern void photo_CalibrateDebevec_setRandom_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool random);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void photo_CalibrateDebevec_delete(IntPtr nativeObj);
- }
- }
|