Example #1
0
 /// <summary>
 /// Release all the unmanaged resource associated with MarrHildrethHash
 /// </summary>
 protected override void DisposeObject()
 {
     if (_ptr != IntPtr.Zero)
     {
         ImgHashInvoke.cveMarrHildrethHashRelease(ref _ptr, ref _sharedPtr);
     }
     base.DisposeObject();
 }
Example #2
0
 /// <summary>
 /// Release all the unmanaged resource associated with RadialVarianceHash
 /// </summary>
 protected override void DisposeObject()
 {
     if (_ptr != IntPtr.Zero)
     {
         ImgHashInvoke.cveRadialVarianceHashRelease(ref _ptr, ref _sharedPtr);
     }
     base.DisposeObject();
 }
Example #3
0
 /// <summary>
 /// Compare the hash value between inOne and inTwo
 /// </summary>
 /// <param name="hashOne">Hash value one</param>
 /// <param name="hashTwo">Hash value two</param>
 /// <returns>indicate similarity between inOne and inTwo, the meaning of the value vary from algorithms to algorithms</returns>
 public double Compare(IInputArray hashOne, IInputArray hashTwo)
 {
     using (InputArray iaHashOne = hashOne.GetInputArray())
         using (InputArray iaHashTwo = hashTwo.GetInputArray())
         {
             return(ImgHashInvoke.cveImgHashBaseCompare(_imgHashBase, iaHashOne, iaHashTwo));
         }
 }
Example #4
0
 /// <summary>
 /// Release all the unmanaged resource associated with ColorMomentHash
 /// </summary>
 protected override void DisposeObject()
 {
     if (_ptr != IntPtr.Zero)
     {
         ImgHashInvoke.cveColorMomentHashRelease(ref _ptr);
     }
     base.DisposeObject();
 }
Example #5
0
 /// <summary>
 /// Computes hash of the input image
 /// </summary>
 /// <param name="inputArr">input image to compute hash value</param>
 /// <param name="outputArr">hash of the image</param>
 public void Compute(IInputArray inputArr, IOutputArray outputArr)
 {
     using (InputArray iaInputArr = inputArr.GetInputArray())
         using (OutputArray oaOutputArr = outputArr.GetOutputArray())
         {
             ImgHashInvoke.cveImgHashBaseCompute(_imgHashBase, iaInputArr, oaOutputArr);
         }
 }
Example #6
0
 /// <summary>
 /// Create a Marr-Hildreth operator based hash.
 /// </summary>
 /// <param name="alpha">Scale factor for marr wavelet.</param>
 /// <param name="scale">Level of scale factor</param>
 public MarrHildrethHash(float alpha = 2.0f, float scale = 1.0f)
 {
     _ptr = ImgHashInvoke.cveMarrHildrethHashCreate(ref _imgHashBase, alpha, scale, ref _sharedPtr);
 }
Example #7
0
 /// <summary>
 /// Create an average hash object.
 /// </summary>
 public AverageHash()
 {
     _ptr = ImgHashInvoke.cveAverageHashCreate(ref _imgHashBase, ref _sharedPtr);
 }
Example #8
0
 /// <summary>
 /// Create a PHash object
 /// </summary>
 public PHash()
 {
     _ptr = ImgHashInvoke.cvePHashCreate(ref _imgHashBase, ref _sharedPtr);
 }
Example #9
0
 /// <summary>
 /// Create an image hash based on Radon transform
 /// </summary>
 /// <param name="sigma">Sigma</param>
 /// <param name="numOfAngleLine">Number of angle line</param>
 public RadialVarianceHash(double sigma = 1, int numOfAngleLine = 180)
 {
     _ptr = ImgHashInvoke.cveRadialVarianceHashCreate(ref _imgHashBase, sigma, numOfAngleLine, ref _sharedPtr);
 }
Example #10
0
 /// <summary>
 /// Create a Color Moment Hash object
 /// </summary>
 public ColorMomentHash()
 {
     _ptr = ImgHashInvoke.cveColorMomentHashCreate(ref _imgHashBase);
 }
Example #11
0
 /// <summary>
 /// Create a Block Mean Hash object
 /// </summary>
 /// <param name="mode">The hash mode</param>
 public BlockMeanHash(Mode mode = Mode.HashMode0)
 {
     _ptr = ImgHashInvoke.cveBlockMeanHashCreate(ref _imgHashBase, mode, ref _sharedPtr);
 }
Example #12
0
 /// <summary>
 /// Create a PHash object
 /// </summary>
 public PHash()
 {
     _ptr = ImgHashInvoke.cvePHashCreate(ref _imgHashBase);
 }
Example #13
0
 /// <summary>
 /// Create a Color Moment Hash object
 /// </summary>
 public ColorMomentHash()
 {
     _ptr = ImgHashInvoke.cveColorMomentHashCreate(ref _imgHashBase, ref _sharedPtr);
 }
Example #14
0
 /// <summary>
 /// Create an average hash object.
 /// </summary>
 public AverageHash()
 {
     _ptr = ImgHashInvoke.cveAverageHashCreate(ref _imgHashBase);
 }