Пример #1
0
 private Task <double> CalculateMse(string text, Bitmap emptyContainer, int delta, double alpha)
 {
     return(Task.Factory.StartNew(() =>
     {
         var kutter = new KutterEncoder(delta, alpha);
         var fullContainer = kutter.Encode(text, emptyContainer);
         var estimator = new MseCalculator();
         return estimator.Calculate(emptyContainer, fullContainer);
     }));
 }
Пример #2
0
 private Task <double> CalculatePerr(string text, Bitmap emptyContainer, int delta, double alpha)
 {
     return(Task.Factory.StartNew(() =>
     {
         var kutter = new KutterEncoder(delta, alpha);
         var fullContainer = kutter.Encode(text, emptyContainer);
         var estimator = new HammingDistanceCalculator();
         return estimator.EstimateBitErrorRate(text, fullContainer, kutter);
     }));
 }