private VectorPixel[][] InitilizeVectorPixels() { var image = Util.GetGreyScaleImage(@"D:\Image Resource\21.png"); GaussianBlur gaussianBlur = new GaussianBlur(image); var sobelOperator = new SobelOperator(gaussianBlur.GaussianBlurredImage); VectorPixel.NormalizeIntensity(sobelOperator.VectorPixels); return(sobelOperator.VectorPixels); }
public void SobelTest() { var image = Util.GetGreyScaleImage(@"D:\Image Resource\7.png"); GaussianBlur gaussianBlur = new GaussianBlur(image); SobelOperator sobelOperator = new SobelOperator(gaussianBlur.GaussianBlurredImage); VectorPixel.NormalizeIntensity(sobelOperator.VectorPixels); Util.SaveImage(@"D:\Sobel.png", VectorPixel.GetByteArray(sobelOperator.VectorPixels)); CannyEdgeFilter cannyEdgeFilter = new CannyEdgeFilter(sobelOperator.VectorPixels, 20, 50); Util.SaveImage(@"D:\Canny.png", VectorPixel.GetByteArray(cannyEdgeFilter.VectorPixels)); Process.Start(@"D:\Canny.png"); }