Exemplo n.º 1
0
        private VerificationStatus VerifyElasto(ref Elastogram workingElasto, out ElastoBlob workingBlob)
        {
            workingElasto.GetFibroLine();
            _fibroline = workingElasto.Fibroline;
            workingElasto.PaintOverFibroline();
            workingElasto = new Elastogram(new SimpleGrayImage(workingElasto.Image.Bitmap.GrayscaleKuwahara(KuwaharaKernel)));

            _workingElasto = new Elastogram(new SimpleGrayImage(_workingElasto.Image.Bitmap.MorphologyNiblackBinarization(
                                                                    MorphologyBin_K, MorphologyBinLocalRadius, MorphologyBinGlobalRadius, MorphologyBinThreshold)));

            workingElasto.RemoveEdgeObjects(LeftEdgeDistance1, LeftCentralEdgeDist1,
                                            LeftEdgeDistance2, LeftCentralEdgeDist2,
                                            RightEdgeDistance, RightCentralEdgeDist);

            workingElasto = new Elastogram(new SimpleGrayImage(workingElasto.Image.Bitmap.MorphologyOpening(MorphologyOpeningKernel)));

            workingElasto.CropObjects(CropSteps, CropDistance);

            workingElasto.ChooseContour(AreaProportion, AreaMinLimit, HeightProportion);

            workingBlob = workingElasto.TargetObject;

            if (workingBlob == null)
            {
                return(VerificationStatus.NotCalculated);
            }

            workingBlob.Approximate(ElastogramTopIndention, SampleShare, OutliersShare, RansacIterations);
            return((new OldElastoClassificator()).Classiffy(workingBlob, _fibroline));
        }