public static void KMeansMethodAndSave( string sourceFilePath, byte[,,] sourceImage, int numOfClasses, double weightOfPos) { byte[,,] resultImage = ImageAreaDivision.KMeansMethod( sourceImage, numOfClasses, weightOfPos, new Random()); string newFilePath = ProbE.NewFilePath( sourceFilePath, $"KMeansMethod-{numOfClasses}-{weightOfPos}"); Utility.SaveColorImage(resultImage, newFilePath); Console.WriteLine($"K-means method done and saved to \'{newFilePath}\'"); }
public static void RegionUnificationMethodAndSave( string sourceFilePath, byte[,,] sourceImage, double averageDiffThreshold) { byte[,,] resultImage = ImageAreaDivision.RegionUnificationMethod( sourceImage, averageDiffThreshold); string newFilePath = ProbE.NewFilePath( sourceFilePath, $"RegionUnificationMethod-{averageDiffThreshold}"); Utility.SaveColorImage(resultImage, newFilePath); Console.WriteLine($"Region unification method done and saved to \'{newFilePath}\'"); }