Example #1
0
        public void Normalize()
        {
            Plate clone1 = Clone();

            clone1.VerticalEdgeDetector(clone1.GetBitmap());
            PlateVerticalGraph vertical = clone1.HistogramYaxis(clone1.GetBitmap());

            Image           = CutTopBottom(Image, vertical);
            PlateCopy.Image = CutTopBottom(PlateCopy.Image, vertical);

            Plate clone2 = Clone();

            if (HorizontalDetectionType == 1)
            {
                clone2.HorizontalEdgeDetector(clone2.GetBitmap());
            }
            PlateHorizontalGraph horizontal = clone1.HistogramXAxis(clone2.GetBitmap());

            Image           = CutLeftRight(Image, horizontal);
            PlateCopy.Image = CutLeftRight(PlateCopy.Image, horizontal);
        }
Example #2
0
        private List <Graph.Peak> ComputeGraph()
        {
            if (_graphHandle != null)
            {
                return(_graphHandle.Peaks);
            }

            _graphHandle = Histogram(PlateCopy.GetBitmap());
            _graphHandle.ApplyProbabilityDistributor(Distributor);
            _graphHandle.FindPeaks(NumberOfCandidates);

            return(_graphHandle.Peaks);
        }