title: How to detect lines from image and remove in c# using image processor api?
body: <p>I have code as follows. This is sample image from which is  have to remove dark lines and save to new location.In this code didnt found any error but i didnt get acutal result.</p>
  
  <pre><code>  private static void RemoveLines(MagickImage original, MagickImage image, string geometryValue)
      {
          image.Scale(new MagickGeometry(geometryValue));
          MagickGeometry geometry = new MagickGeometry(original.Width, original.Height);
          geometry.IgnoreAspectRatio = true;
          image.Scale(geometry);
  
          image.AutoLevel();
          image.Shave(20, 20);
          image.Despeckle();
          image.ReduceNoise();
  
          image.Morphology(MorphologyMethod.Erode, Kernel.Diamond, 2);
          using (MagickImage clone = image.Clone())
          {
              image.Negate(); 
              image.Composite(original, Gravity.Center);                
          }           
      }
  
      public static void RemoveLines(string filePath)
      {
          using (MagickImage image = new MagickImage(filePath)) // image001.tif
          {
              image.RePage(); // +repage
              image.RemoveArtifact(filePath);
              using (MagickImage original = image.Clone())
              {
                  using (MagickImage firstClone = original.Clone()) // -clone 0
                  {
                      RemoveLines(original, firstClone, "x1!"); // -scale x1!
                      using (MagickImage secondClone = firstClone.Clone()) // -clone 0
                      {
                          RemoveLines(secondClone, firstClone, "1x!"); // -scale x1!
                          firstClone.Write(@"C:\a\result2.tiff");
                      }
                  }
              }
          }
      }
  </code></pre>