How To Remove the Lines and Boxes On A Form? - 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: How To Remove the Lines and Boxes On A Form? (/Thread-How-To-Remove-the-Lines-and-Boxes-On-A-Form) Pages:
1
2
|
How To Remove the Lines and Boxes On A Form? - ghporter - 11-16-2018 I have a form with graphic data filled in it, and I have the blank form. I'd like to somehow use GIMP to remove the form's boxes and lines, so that ALL that's left is the graphic data. The form is printed in blue, while all the data is black. I tried removing the blue color from a scan of the completed form, but the graphics overlay the lines, and it became a pixel-by-pixel struggle - and so error prone that I gave up. Is there a way to use a scan of the blank form as a mask to remove the printed info from the form (lines, boxes, labels, etc.) from a completed form? Here's an example (not precisely the same thing, but it's close) of the kind of form I'm talking about (sorry for the size of the image): And a filled example: Thanks in advance! RE: How To Remove the Lines and Boxes On A Form? - rich2005 - 11-16-2018 Did you not ask CSI for a one click-fix. Every operating system listed but no mention of the version of Gimp you are using. Best demonstrated in Gimp 2.10 Your blank form is smaller in pixel size to the filled in form. You will need to scale it up. You could do that by eye, but a bit of measuring gives a scale factor of 186.82%. Then what do you do with it? Selection & cut can remove the white. Selection inverted and grown can replace the blue with something more solid and allow some overlap. That gave me a less-than-wonderful overlay. attached for you to play with. Put it on top and set the layer mode to erase. Other ways? Colors -> Map -> Color Exchange easier to show in Gimp 2.10 than Gimp 2.8 and a little 2 minute video demo, both overlay and color exchange: https://youtu.be/3foMwWWAUYo RE: How To Remove the Lines and Boxes On A Form? - Espermaschine - 11-16-2018 If we have an empty form and a filled in form it should be possible to filter the form out. I get this effect by putting the empty form on top and the filled in at the bottom, then put the top layermode to 'Color Erase' or 'Divide'. Of course this requires the two forms to line up 100% (which could be done with the 'Unified Transform Tool' and the 'Difference' mode). RE: How To Remove the Lines and Boxes On A Form? - ghporter - 11-17-2018 Thanks for the help. I think I have version 2.10 on the machine I'm trying to do this with, but I'm not at that machine to verify it at the moment. Rich, the examples may not be the same size, but the actual form, filled or blank, is the same size. I just used images I could snag from the Internet to demonstrate with. Your video was extremely informative, and once I get back home and have a go at it, I now have a great deal better idea of how to approach this problem. Espermachine, your approach is close to what I had envisioned, but I didn't know where to look for just the right tool. That's the problem I've run into with trying to figure out GIMP on my own: there's certainly a tool for everything, but what it's called and where it is are quite problematic. To both of you, I appreciate your time and helpful suggestions. I hope to get a chance to mess with this in the next couple of days (work and travel allowing), so I can report back what worked and what I had to do to make it happen. RE: How To Remove the Lines and Boxes On A Form? - Espermaschine - 11-18-2018 (11-17-2018, 10:37 PM)ghporter Wrote: Espermachine, your approach is close to what I had envisioned, but I didn't know where to look for just the right tool. That's the problem I've run into with trying to figure out GIMP on my own: there's certainly a tool for everything, but what it's called and where it is are quite problematic. I'd say you cant figure these things out on your own. Thats why forums are great. Aligning identical images with the help of the 'Difference' mode is a trick ofnuts teached me for example. Getting two scans of the same form to line up perfectly can be challenging, even if you position the paper perfectly on the glass, as soon as you close the lid, the airpressure can easily spoil it. I have scanned quite a few images and tried to stitch them together and its not an easy task. Thats why the new 'Unified Transform' Tool is a great addition. I know that Photoshop has a functionality that aligns images automatically, so maybe there is a script for Gimp that does this, or could be written. RE: How To Remove the Lines and Boxes On A Form? - Blighty - 11-18-2018 (11-18-2018, 09:33 AM)Espermaschine Wrote: I know that Photoshop has a functionality that aligns images automatically, so maybe there is a script for Gimp that does this, or could be written. Not automatic, but Ofnuts has layer aligner that works well and easy to use. ofn-layer-aligner , available here: https://sourceforge.net/projects/gimp-tools/files/scripts/ A much easier method that may or may not suit the OP is to select the black with the Colour Select Tool; and then paste as a new image. The difficulty comes with the edges of the black where the black tends to fade into a gray. Play with the Threshold to see if a suitable result can obtained. Worth doing a bit of experimenting. RE: How To Remove the Lines and Boxes On A Form? - Espermaschine - 11-18-2018 (11-18-2018, 10:20 AM)Blighty Wrote: A much easier method that may or may not suit the OP is to select the black with the Colour Select Tool; and then paste as a new image. The difficulty comes with the edges of the black where the black tends to fade into a gray. Play with the Threshold to see if a suitable result can obtained. Worth doing a bit of experimenting. Tried that, didnt work for me. Can you post an example ? (11-18-2018, 10:20 AM)Blighty Wrote: Not automatic, but Ofnuts has layer aligner that works well and easy to use. I cant figure out how the script works. EDIT: i figured it out, but its hard to get 100% accurate, which is a requirement for the "cancel out" method to work. RE: How To Remove the Lines and Boxes On A Form? - Blighty - 11-18-2018 (11-18-2018, 10:48 AM)Espermaschine Wrote: Tried that, didnt work for me. Example attached. Colour Select with threshold 100. Question is: is this good enough for the OP? Quote:I cant figure out how the script works. For anyone else trying to figure out how the script works, example attached. The left image is the lower layer. The right image is the upper layer. Draw a single path with nodes ABCD. Zoom in close on each node in turn to position it accurately. Now select the upper layer. Then Layer > Realign Note that in this example the angle of the two layers is not exactly the same. And the size are different. This script handles both of these. RE: How To Remove the Lines and Boxes On A Form? - Ofnuts - 11-18-2018 (11-18-2018, 10:48 AM)Espermaschine Wrote: EDIT: i figured it out, but its hard to get 100% accurate, which is a requirement for the "cancel out" method to work. And I thought the doc was enough, with the nice images and everything RE: How To Remove the Lines and Boxes On A Form? - Espermaschine - 11-18-2018 (11-18-2018, 01:39 PM)Blighty Wrote: Example attached. Colour Select with threshold 100. Question is: is this good enough for the OP? It looks good and the method is nice and simple. Not 100% accurate though, when original and processed image are blended in 'Difference' Mode. (11-18-2018, 02:03 PM)Ofnuts Wrote: And I thought the doc was enough, with the nice images and everything I messed up the selection order and several other concepts at first. Pretty cool script, btw. It boggles my mind how a path is capable of telling the rotate tool what to do. |