Gimp-Forum.net
Removing graph lines from image - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Removing graph lines from image (/Thread-Removing-graph-lines-from-image)



Removing graph lines from image - taratears - 10-21-2017

[attachment=837][attachment=838]I need to remove the lines from the following image. It was recommended that I use threshold. When I tried that, it removed some of them, but not all of them. In addition, it turned it black and white. Is there anything else that can be done?


RE: Removing graph lines from image - Ofnuts - 10-21-2017

Quality of image is a problem. There are compression artifacts (chroma subsampling quartered means that black isn't black), and it has been rescaled. If you really want a clean result it has to be redone, but even though there is no silver bullet it is not such a daunting task. So IHMO you best course of action:

  1. Rescale the image to a multiple of 49x49 (for instance, 588x588 (12*49), but if you need a bigger image, go for it...)
  2. Using Image>Configure grid create a 12x12 grid that marks the intersections. Make the grid "snappy" using View>Snap to grid.
  3. Using either the freehand selection ( SelectFree ) in "polygon mode" (ie, click, move, click....) or the path tool ( Path ), make selection around the yellow and orange shapes. The grid will make it very to click on the corners of the squares. You can work without stress if you follow these hints.
  4. Create  a layer that you fill with the purple.
  5. Add (see link above) the selections for each color and bucket-fill
  6. Using paths instead of a plain selection allows you to resize the picture and still get sharp shapes. Resize the picture and repeat step 4 and 5.

If you use paths, once you have rescaled the picture to a multiple of 49x49 you can also use Inkscape to create a SVG file.


RE: Removing graph lines from image - rich2005 - 10-22-2017

Do you have lots of these? Ofnuts method is general and will work with a variety of images.

For simple image as given:

1. Filters -> Generic -> Dilate will tend to overwrite the black grid.
screenshot: https://i.imgur.com/OB9wQBI.jpg

2. Image -> Mode -> Indexed with the number of colours set to the number of colours in the image to reduce to those colours. Hopefully that works, otherwise it becomes a matter of editing the colormap.
https://i.imgur.com/Yu4jJ3B.jpg

3. Assuming it works easily, that will Export to a .png file "as-is" or back to RGB mode  for inclusion in a larger image. Again Export that as a png.
https://i.imgur.com/cky5wB4.jpg

edit: your image using above.

[attachment=842]


RE: Removing graph lines from image - Ofnuts - 10-22-2017

The problem is that there are no real black lines, since they don't fall on integer pixels. So they are a mix of colors and it is very difficult to select the black lines without selecting the purple squares as well.