static void Main(string[] args) { var image = new TiffImage("..\\TestImages\\L15-3792E-1717N-Q4.tif"); var N = 5; var threshold = 800.0F; var segmentation = new SegmentationService(image, N, threshold); image.overlaySegmentation("segmentedN" + N + ".tif", N, segmentation); }
static void Main(string[] args) { var image = new TiffImage(args[0]); var N = 5; var threshold = 800.0F; var segmentation = SegmentationModule.Segment(image, N, threshold); image.overlaySegmentation("segmented.tif", N, segmentation); return; // We're all good in the hood }
static void Main(string[] args) { // load a Tiff image var image = new TiffImage(args[0]); // testing using sub-image of size 32x32 pixels var N = 5; // increasing this threshold will result in more segment merging and therefore fewer final segments var threshold = 800.0f; // determine the segmentation for the (top left corner of the) image (2^N x 2^N) pixels var segmentation = new Segmenter(image, N, threshold); // draw the (top left corner of the) original image but with the segment boundaries overlayed in blue image.overlaySegmentation("segmented.tif", N, segmentation); }
static void Main(string[] args) { // the size for the image int size = 6; TiffImage image = new TiffImage("D:/SegmentationSkeleton/TestImages/L15-3662E-1902N-Q4.tif"); //passing the image, the size (2*size x 2*size image ) and the threshhol into the segmentation module SegmentationModule module1 = new SegmentationModule(image, size, 800); //grow the Segmentation in the module from an emty dictionary module1.GrowUntilNoChange(); // determine the segmentation for the (top left corner of the) image (2^N x 2^N) pixels Segmentation segmentation = new Segmentation(module1.Segment); // draw the (top left corner of the) original image but with the segment boundaries overlayed in blue image.overlaySegmentation("C#output.tif", size, segmentation); // Notify the Console when the output is finished. Console.WriteLine("finish"); Console.ReadKey(); }
static void Main(string[] args) { // load a Tiff image // FIX HERE TiffImage image = new TiffImage("..//TestImages//L15-3792E-1717N-Q4.tif"); // testing using sub-image of N 32x32 pixels // let N =5, execution time: 5 secs int N = 5; // increasing this threshold will result in more segment merging and therefore fewer final segments int threshold = 800; //passing the image, the N (2*N x 2*N image ) and the threshold into the segmentation module SegmentationModule segmentation = new SegmentationModule(image, N, threshold); //grow the Segmentation in the module from an emty dictionary segmentation.GrowUntilNoChange(); // draw the (top left corner of the) original image but with the segment boundaries overlayed in blue image.overlaySegmentation("csharpSegmented.tif", N, segmentation.Segment); }