private PlateGraph Histogram_Old(IplImage image) { IplImage imageCopy = null; PlateGraph graph = new PlateGraph(this); try { imageCopy = new IplImage(image.Size, image.Depth, image.NChannels); Cv.CvtColor(image, imageCopy, ColorConversion.RgbToHsv); for (Int32 x = 0; x < image.Width; x++) { Double counter = 0; for (Int32 y = 0; y < image.Height; y++) { counter += GetBrightness(imageCopy, x, y); } graph.AddPeak(counter); } } finally { if (null != imageCopy) { Cv.ReleaseImage(imageCopy); } } return(graph); }
private List <Graph.Peak> ComputeGraph() { if (null != graphHandle) { return(graphHandle.GetPeaks); } graphHandle = Histogram(plateCopy.image); graphHandle.ApplyProbabilityDistributor(distributor); graphHandle.FindPeaks(numberOfCandidates); return(graphHandle.GetPeaks); }