Ejemplo n.º 1
0
 public QualityPSNR(IInputArray refImgs, double maxPixelValue = 255.0)
 {
     using (InputArray iaRefImgs = refImgs.GetInputArray())
         _ptr = QualityInvoke.cveQualityPSNRCreate(
             iaRefImgs,
             maxPixelValue,
             ref _qualityBasePtr,
             ref _algorithmPtr,
             ref _sharedPtr);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Release the unmanaged memory associated with this object
 /// </summary>
 protected override void DisposeObject()
 {
     if (_sharedPtr == IntPtr.Zero)
     {
         QualityInvoke.cveQualityGMSDRelease(ref _sharedPtr);
         _ptr          = IntPtr.Zero;
         _algorithmPtr = IntPtr.Zero;
         _sharedPtr    = IntPtr.Zero;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Release the unmanaged memory associated with this object
 /// </summary>
 protected override void DisposeObject()
 {
     if (_sharedPtr != IntPtr.Zero)
     {
         QualityInvoke.cveQualityBRISQUERelease(ref _sharedPtr);
         _ptr            = IntPtr.Zero;
         _qualityBasePtr = IntPtr.Zero;
         _algorithmPtr   = IntPtr.Zero;
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create an object which calculates quality.
 /// </summary>
 /// <param name="modelFilePath">Contains a path to the BRISQUE model data. If empty, attempts to load from ${OPENCV_DIR}/testdata/contrib/quality/brisque_model_live.yml</param>
 /// <param name="rangeFilePath">contains a path to the BRISQUE range data. If empty, attempts to load from ${OPENCV_DIR}/testdata/contrib/quality/brisque_range_live.yml</param>
 public QualityBRISQUE(
     String modelFilePath = "",
     String rangeFilePath = "")
 {
     using (CvString csModelFilePath = new CvString(modelFilePath))
         using (CvString csRangeFilePath = new CvString(rangeFilePath))
             _ptr = QualityInvoke.cveQualityBRISQUECreate(
                 csModelFilePath,
                 csRangeFilePath,
                 ref _qualityBasePtr,
                 ref _algorithmPtr,
                 ref _sharedPtr);
 }