123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.XphotoModule
- {
- // C++: class SimpleWB
- /**
- * A simple white balance algorithm that works by independently stretching
- * each of the input image channels to the specified range. For increased robustness
- * it ignores the top and bottom \(p\%\) of pixel values.
- */
- public class SimpleWB : WhiteBalancer
- {
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing)
- {
- }
- if (IsEnabledDispose)
- {
- if (nativeObj != IntPtr.Zero)
- xphoto_SimpleWB_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- protected internal SimpleWB(IntPtr addr) : base(addr) { }
- // internal usage only
- public static new SimpleWB __fromPtr__(IntPtr addr) { return new SimpleWB(addr); }
- //
- // C++: float cv::xphoto::SimpleWB::getInputMin()
- //
- /**
- * Input image range minimum value
- * SEE: setInputMin
- * return automatically generated
- */
- public float getInputMin()
- {
- ThrowIfDisposed();
- return xphoto_SimpleWB_getInputMin_10(nativeObj);
- }
- //
- // C++: void cv::xphoto::SimpleWB::setInputMin(float val)
- //
- /**
- * getInputMin SEE: getInputMin
- * param val automatically generated
- */
- public void setInputMin(float val)
- {
- ThrowIfDisposed();
- xphoto_SimpleWB_setInputMin_10(nativeObj, val);
- }
- //
- // C++: float cv::xphoto::SimpleWB::getInputMax()
- //
- /**
- * Input image range maximum value
- * SEE: setInputMax
- * return automatically generated
- */
- public float getInputMax()
- {
- ThrowIfDisposed();
- return xphoto_SimpleWB_getInputMax_10(nativeObj);
- }
- //
- // C++: void cv::xphoto::SimpleWB::setInputMax(float val)
- //
- /**
- * getInputMax SEE: getInputMax
- * param val automatically generated
- */
- public void setInputMax(float val)
- {
- ThrowIfDisposed();
- xphoto_SimpleWB_setInputMax_10(nativeObj, val);
- }
- //
- // C++: float cv::xphoto::SimpleWB::getOutputMin()
- //
- /**
- * Output image range minimum value
- * SEE: setOutputMin
- * return automatically generated
- */
- public float getOutputMin()
- {
- ThrowIfDisposed();
- return xphoto_SimpleWB_getOutputMin_10(nativeObj);
- }
- //
- // C++: void cv::xphoto::SimpleWB::setOutputMin(float val)
- //
- /**
- * getOutputMin SEE: getOutputMin
- * param val automatically generated
- */
- public void setOutputMin(float val)
- {
- ThrowIfDisposed();
- xphoto_SimpleWB_setOutputMin_10(nativeObj, val);
- }
- //
- // C++: float cv::xphoto::SimpleWB::getOutputMax()
- //
- /**
- * Output image range maximum value
- * SEE: setOutputMax
- * return automatically generated
- */
- public float getOutputMax()
- {
- ThrowIfDisposed();
- return xphoto_SimpleWB_getOutputMax_10(nativeObj);
- }
- //
- // C++: void cv::xphoto::SimpleWB::setOutputMax(float val)
- //
- /**
- * getOutputMax SEE: getOutputMax
- * param val automatically generated
- */
- public void setOutputMax(float val)
- {
- ThrowIfDisposed();
- xphoto_SimpleWB_setOutputMax_10(nativeObj, val);
- }
- //
- // C++: float cv::xphoto::SimpleWB::getP()
- //
- /**
- * Percent of top/bottom values to ignore
- * SEE: setP
- * return automatically generated
- */
- public float getP()
- {
- ThrowIfDisposed();
- return xphoto_SimpleWB_getP_10(nativeObj);
- }
- //
- // C++: void cv::xphoto::SimpleWB::setP(float val)
- //
- /**
- * getP SEE: getP
- * param val automatically generated
- */
- public void setP(float val)
- {
- ThrowIfDisposed();
- xphoto_SimpleWB_setP_10(nativeObj, val);
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: float cv::xphoto::SimpleWB::getInputMin()
- [DllImport(LIBNAME)]
- private static extern float xphoto_SimpleWB_getInputMin_10(IntPtr nativeObj);
- // C++: void cv::xphoto::SimpleWB::setInputMin(float val)
- [DllImport(LIBNAME)]
- private static extern void xphoto_SimpleWB_setInputMin_10(IntPtr nativeObj, float val);
- // C++: float cv::xphoto::SimpleWB::getInputMax()
- [DllImport(LIBNAME)]
- private static extern float xphoto_SimpleWB_getInputMax_10(IntPtr nativeObj);
- // C++: void cv::xphoto::SimpleWB::setInputMax(float val)
- [DllImport(LIBNAME)]
- private static extern void xphoto_SimpleWB_setInputMax_10(IntPtr nativeObj, float val);
- // C++: float cv::xphoto::SimpleWB::getOutputMin()
- [DllImport(LIBNAME)]
- private static extern float xphoto_SimpleWB_getOutputMin_10(IntPtr nativeObj);
- // C++: void cv::xphoto::SimpleWB::setOutputMin(float val)
- [DllImport(LIBNAME)]
- private static extern void xphoto_SimpleWB_setOutputMin_10(IntPtr nativeObj, float val);
- // C++: float cv::xphoto::SimpleWB::getOutputMax()
- [DllImport(LIBNAME)]
- private static extern float xphoto_SimpleWB_getOutputMax_10(IntPtr nativeObj);
- // C++: void cv::xphoto::SimpleWB::setOutputMax(float val)
- [DllImport(LIBNAME)]
- private static extern void xphoto_SimpleWB_setOutputMax_10(IntPtr nativeObj, float val);
- // C++: float cv::xphoto::SimpleWB::getP()
- [DllImport(LIBNAME)]
- private static extern float xphoto_SimpleWB_getP_10(IntPtr nativeObj);
- // C++: void cv::xphoto::SimpleWB::setP(float val)
- [DllImport(LIBNAME)]
- private static extern void xphoto_SimpleWB_setP_10(IntPtr nativeObj, float val);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void xphoto_SimpleWB_delete(IntPtr nativeObj);
- }
- }
|