Set up a directory for the project (I like to name the folder after the device I'm working on), stick all the photos in there, and copy the ones you want to use into a sub-folder - I call mine "working".



Start with the solder-side of the board (although with SMD's, there's not going to be much solder there). Open the picture in the Gimp, and save-as something meaningful, like solder-side-clean.xcf, for example.



Flip the picture - otherwise it won't match the component side.



Set up a vertical guide. If the board has a ground-plane, align it to that, otherwise just use the edge of the board or a long straight track. Rotate the image slightly so that the board or ground plane or track is aligned all the way down. (Of course, a horizontal guide may work better for you)



Set up a second vertical guide, and a pair of horizontal guides, aligned with the other edges (or ground-planes, or long tracks) of the board. Use the perspective tool (toolbox: right hand edge, third tool down) and click each corner of the board you need to line up, and just drag them so that the other edges are parallel to the guides.



Make a rectangular selection around the board, invert it, and press delete. This will clear the background. Get rid of any other distractions like projecting connectors by selecting around them and deleting. Don't mess about with the fuzzy select tool for things like this, just use the rectangle and ellipse tools. You can make compound selections/de-selections with these to make complex shapes.



Get rid of any artefacts using the clone and blur tools as appropriate. To use the Gimp's clone tool, press ctrl when you click the area you are cloning from. A useful trick with vertical and horizontal PCB tracks is to set a guide over where you want to clone from and to. The clone tool will snap to the guide. If you have tracks set at a 45 degree angle, rotate the layer (toolbox, 3rd row, 3rd tool along) by 45 degrees, and you can use the horizontal and vertical guides again. (You may have to enlarge the canvas to fit the picture) Rotate the board by -45 degrees to put it back how it was. Use the same trick for other known angles.



Okay, so you have a nice clean picture to work on. From now on, the general idea is that the picture contains a lot of detail, most of which you don't want. The detail you want to keep needs to be separated out and kept as discreet images, so the next few steps concentrate on these two ideas.



Before you go any further, it is worth saving the image as a .png and opening it up in Inkscape. Click the image to select it, the go to Path > Trace Bitmap... Experiment with all the methods and see if you can get a an image where the edges of the tracks are nice and smooth, from that. If not, at least you will get a good idea of what you are up against. If you get a clean image, work on it instead of the original. You still need to pick out holes and remove ground planes and substrate, but it should be much easier to work on due to having the edges of the tracks smoothed out.



Create a new layer, and make sure it is active. This will contain your alignment marks. Being on a separate layer, they will be easier to copy to the other layers.



Put borders at the corners of the board to make it easier to align the images later. To do this, make a square selection at each corner, then make another square selection the same size but shifted inwards a bit, using subtract mode. Fill the selection using the bucket fill tool. I didn't do this and found alignment without corners to be tricky. You could use any alignment marks you like of course, corners is just what I thought of.

