예제 #1
0
파일: ColorImage.cs 프로젝트: KFlaga/Cam3D
 public double this[int y, int x, RGBChannel channel]
 {
     get
     {
         return (ImageMatrix[(int)channel])[y, x];
     }
     set
     {
         (ImageMatrix[(int)channel])[y, x] = value;
     }
 }
예제 #2
0
파일: ColorImage.cs 프로젝트: KFlaga/Cam3D
 public Matrix<double> this[RGBChannel channel]
 {
     get
     {
         return (ImageMatrix[(int)channel]);
     }
     set
     {
         (ImageMatrix[(int)channel]) = value;
     }
 }
예제 #3
0
    //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);
    }
예제 #4
0
 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;
     }
 }
예제 #5
0
        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();
        }
예제 #6
0
 private double GetColorValue(int y, int x, RGBChannel channel)
 {
     return _colorImage[y, x, channel] * _colorImage[y, x, channel];
 }