static void Main(string[] args) { try { if (args.Length == 4) { bool Run = Convert.ToBoolean(args[3]); Bitmap Source = null; if (Run) { Source = ImgF.ImageSmaller(new Bitmap(args[0])); } else { Source = new Bitmap(args[0]); } Source.Save(args[1], ImgF.ChooseImageFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch { Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 3) { Bitmap Source = new Bitmap(args[0]); Bitmap Result = ImgF.Phasedisplay(Source); Result.Save(args[1], ImgF.ChooseImageFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch { Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 3) { Bitmap Source = new Bitmap(args[0]); Bitmap Result = ImgF.HistogramEqualization(Source); Result.Save(args[1], ImgF.ChooseImgFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch { Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 4) { HColor HC = (HColor)(Convert.ToInt32(args[3])); Bitmap Source = new Bitmap(args[0]); Bitmap Result = ImgF.Threecolorimg(Source, HC); Result.Save(args[1], ImgF.ChooseImageFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch { Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 3) { Bitmap Source = new Bitmap(args[0]); Bitmap Result = ImgF.Imagereverse(Source); Result.Save(args[1], ImgF.ChooseImageFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 4) { float Length = Convert.ToSingle(args[3]); BGRImg Source = BGRImg.From(args[0]); Source.SimpleMotionBlur(Length).ToImage().Save(args[1], ImgF.ChooseImgFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 4) { Bitmap SourceA = new Bitmap(args[0]); Bitmap SourceB = new Bitmap(args[1]); Bitmap Result = ImgF.Convolution(SourceA, SourceB); Result.Save(args[2], ImgF.ChooseImgFormat(args[3])); Environment.Exit(0); } else { Environment.Exit(1); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 4) { double D0 = Convert.ToDouble(args[3]); Bitmap Source = new Bitmap(args[0]); Bitmap Result = ImgF.Gaussianpass(Source, D0, GaussianPass.Low, BinaryImage.False); Result.Save(args[1], ImgF.ChooseImageFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 3) { string RPath = args[0]; string WPath = args[1]; string WExt = args[2]; BGRImg Source = BGRImg.From(RPath); Source.LaplaceFilter(); Source.ToImage().Save(WPath, ImgF.ChooseImgFormat(WExt)); Environment.Exit(0); } else { Environment.Exit(1); } } catch { Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 4) { string RPath = args[0]; string WPath = args[1]; string WExt = args[2]; double Length = Convert.ToDouble(args[3]); double Lambda = Convert.ToDouble(args[4]); BGRImg Source = BGRImg.From(RPath); Source.SimpleMotionDeblur(Length, Lambda).ToImage().Save(WPath, ImgF.ChooseImgFormat(WExt)); Environment.Exit(0); } else { Environment.Exit(1); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 4) { int Range = Convert.ToInt32(args[3]); if (Range % 2 == 0) { Environment.Exit(1); } Bitmap Source = new Bitmap(args[0]); Bitmap Result = ImgF.Medianfilter(Source, Range); Result.Save(args[1], ImgF.ChooseImageFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch { Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 7) { Bitmap Source = new Bitmap(args[0]); double GammaHigh = Convert.ToDouble(args[3]); double GammaLow = Convert.ToDouble(args[4]); double C = Convert.ToDouble(args[5]); double D0 = Convert.ToDouble(args[6]); Bitmap Result = ImgF.HomomorphicFilter(Source, GammaHigh, GammaLow, C, D0); Result.Save(args[1], ImgF.ChooseImgFormat(args[2])); Environment.Exit(0); } else { Environment.Exit(1); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(2); } }
static void Main(string[] args) { try { if (args.Length >= 3) { string RPath = args[0]; string WPath = args[1]; string WExt = args[2]; BGRImg Source = BGRImg.From(RPath); BGRImg Result = Source.Extend(); Result.BFFTShift(); Result.FFT2(); Result.ToImage(true).Save(WPath, ImgF.ChooseImgFormat(WExt)); Environment.Exit(0); } else { Environment.Exit(1); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); Environment.Exit(2); } }