I'm trying to edge detecetion. But it works on just one image : i'm trying to create a simple edge detection filter. And as i said it works with only one image. I'm trying to create this filter with 2 steps. 
1)Blurring image
2)calculate ( Original image-Blurring image)
First step works well. And code of second one is simple like first one. But i see an error message:
System.ArgumentOutOfRangeException: 'Parameter must be positive and < Height.
Parameter name: y'



Working image:https://i.hizliresim.com/dLXkbn.png




```
 public void edgedetectionfilter( )
        {
            Bitmap InputPicture,BlurredPicture, OutputPicture;
            InputPicture = new Bitmap(pBox_SOURCE.Image);
            BlurredPicture = new Bitmap(pBox_PROCESSED.Image);
            int PicWidth = InputPicture.Width;
            int PicHeight= InputPicture.Height;
            OutputPicture = new Bitmap(PicWidth, PicHeight);
            OutputPicture = InputPicture;


            int x, y, difR, difG, difB;

           Color OrgPicColoValue,BluredPicColorValue;

            for (x = 0; x < PicWidth; x++)
            {
                for (y = 0; y < PicWidth; y++)
                {
          BluredPicColorValue = BlurredPicture.GetPixel(x, y);
          OrgPicColoValue = InputPicture.GetPixel(x, y); //ERROR LINE
          difR = Convert.ToInt16(OrgPicColoValue.R -BluredPicColorValue.R);
          difG = Convert.ToInt16(OrgPicColoValue.G- BluredPicColorValue.G );
          difB = Convert.ToInt16(OrgPicColoValue.B- BluredPicColorValue.B);

                    if (difR > 255) difR = 255;
                    if (difG > 255) difG = 255;
                    if (difB > 255) difB = 255;
                    if (difR < 0) difR = 0;
                    if (difG < 0) difG = 0;
                    if (difB < 0) difB = 0;

       OutputPicture.SetPixel(x, y, Color.FromArgb(difR, difG, difB));

                }
            }
            pBoxMedian.Image = OutputPicture;

        }
```