示例#1
0
 /// <summary>
 /// Release all the unmanaged memory associated with this white balancer
 /// </summary>
 protected override void DisposeObject()
 {
     if (_ptr != IntPtr.Zero)
     {
         XPhotoInvoke.cveGrayworldWBRelease(ref _ptr);
     }
     base.DisposeObject();
 }
示例#2
0
 /// <summary>
 /// Release all the unmanaged memory associated with this white balancer
 /// </summary>
 protected override void DisposeObject()
 {
     if (_ptr != IntPtr.Zero)
     {
         XPhotoInvoke.cveSimpleWBRelease(ref _ptr, ref _sharedPtr);
     }
     base.DisposeObject();
 }
示例#3
0
 /// <summary>
 /// Release the unmanaged memory associated with this TonemapDurand
 /// </summary>
 protected override void DisposeObject()
 {
     if (IntPtr.Zero != _ptr)
     {
         XPhotoInvoke.cveTonemapDurandRelease(ref _ptr, ref _sharedPtr);
         _tonemapPtr   = IntPtr.Zero;
         _algorithmPtr = IntPtr.Zero;
     }
 }
示例#4
0
 /// <summary>
 /// Release all the unmanaged memory associated with this white balancer
 /// </summary>
 protected override void DisposeObject()
 {
     if (_ptr != IntPtr.Zero)
     {
         XPhotoInvoke.cveLearningBasedWBRelease(ref _sharedPtr);
         _ptr = IntPtr.Zero;
     }
     base.DisposeObject();
 }
示例#5
0
 /// <summary>
 /// Creates TonemapDurand object.
 /// </summary>
 /// <param name="gamma">gamma value for gamma correction. </param>
 /// <param name="contrast">resulting contrast on logarithmic scale, i. e. log(max / min), where max and min are maximum and minimum luminance values of the resulting image.</param>
 /// <param name="saturation">saturation enhancement value. </param>
 /// <param name="sigmaSpace">bilateral filter sigma in color space</param>
 /// <param name="sigmaColor">bilateral filter sigma in coordinate space</param>
 public TonemapDurand(float gamma = 1.0f, float contrast = 4.0f, float saturation = 1.0f, float sigmaSpace = 2.0f, float sigmaColor = 2.0f)
     : base(IntPtr.Zero, IntPtr.Zero)
 {
     _ptr = XPhotoInvoke.cveTonemapDurandCreate(gamma, contrast, saturation, sigmaSpace, sigmaColor, ref _tonemapPtr, ref _algorithmPtr, ref _sharedPtr);
 }
示例#6
0
 /// <summary>
 /// Creates a simple white balancer
 /// </summary>
 public SimpleWB()
 {
     _ptr = XPhotoInvoke.cveSimpleWBCreate(ref _whiteBalancerPtr, ref _sharedPtr);
 }
示例#7
0
 /// <summary>
 /// Applies white balancing to the input image.
 /// </summary>
 /// <param name="src">Input image</param>
 /// <param name="dst">White balancing result</param>
 public void BalanceWhite(IInputArray src, IOutputArray dst)
 {
     using (InputArray iaSrc = src.GetInputArray())
         using (OutputArray oaDst = dst.GetOutputArray())
             XPhotoInvoke.cveWhiteBalancerBalanceWhite(_whiteBalancerPtr, iaSrc, oaDst);
 }
示例#8
0
 /// <summary>
 /// Create a learning based white balancer.
 /// </summary>
 public LearningBasedWB()
 {
     _ptr = XPhotoInvoke.cveLearningBasedWBCreate(ref _whiteBalancerPtr, ref _sharedPtr);
 }
示例#9
0
 /// <summary>
 /// Creates a gray-world white balancer
 /// </summary>
 public GrayworldWB()
 {
     _ptr = XPhotoInvoke.cveGrayworldWBCreate(ref _whiteBalancerPtr, ref _sharedPtr);
 }