public double this[int y, int x, RGBChannel channel] { get { return (ImageMatrix[(int)channel])[y, x]; } set { (ImageMatrix[(int)channel])[y, x] = value; } }
public Matrix<double> this[RGBChannel channel] { get { return (ImageMatrix[(int)channel]); } set { (ImageMatrix[(int)channel]) = value; } }
//Functions For Post Effects public static bool SetChannel(this Camera camera, float value, float duration = 0f) { RGBChannel channel = camera.GetComponent <RGBChannel>(); if (channel == null) { return(false); } channel.SetEffectScale(value, duration); return(true); }
private void Action_Undo() { if (imageList.Count > 1) { imageList.Remove(imageList.Last()); imgPreview = imageList.Last(); Bitmap image = new Bitmap(imgPreview); Bitmap rgb = RGBChannel.build(image, RChannel, GChannel, BChannel); Double zoom = Double.Parse(C_Zoom.SelectedValue.ToString()); previewPB.Image = Scala.Zoom(rgb, zoom); GC.Collect(); B_RefHis.Visible = true; } }
private void RGBChannelChanged() { Bitmap image = new Bitmap(imgPreview); Bitmap rgb = RGBChannel.build(image, RChannel, GChannel, BChannel); Double zoom = Double.Parse(C_Zoom.SelectedValue.ToString()); previewPB.Image = Scala.Zoom(rgb, zoom); //imgPreview = previewPB.Image; //drawHistogram(); if (imageList.Count == 15) { imageList.RemoveAt(0); } imageList.Add(new Bitmap(imgPreview)); GC.Collect(); }
private double GetColorValue(int y, int x, RGBChannel channel) { return _colorImage[y, x, channel] * _colorImage[y, x, channel]; }