I’ve managed to do reverse engineering of circuit boards using GIMP and rough alignment of layers using images like the one pictured. I want to use images to reverse engineer parts in CAD, but the minor lens distortion of a camera on a phone at ~20cm high on top of a stack of objects to keep it eyeballed flat is not enough. The result is off in multiple planes. There are minor errors in my curves in the transparent CAD part pictured, but the hole pattern is correct. The picture has been calibrated to 20mm against the ruler. Any suggestions on how to make this usable for replicating the ellipse that crosses the holes ±0.05mm?
If you don’t have a flatbed scanner, and the item is flat on the side you want to photograph, you can do a pencil rubbing of it onto a sheet of paper (that you do know the dimensions of), and photograph that instead.
As others have said, using a flat bed scanner will save some work. If you need to photograph it though:
-
Use paper with grid lines as background (not sure the name, used to use it in maths at school). This will give you not just an index for scale but also for ‘squareness’.
-
Position camera perpendicular to subject
-
Use a telephoto or zoom lens from a distance rather than wide angle from close up to minimise lens distortion.
-
Import image into GIMP or photoshop and use rulers, guides and transform tools to scale the image correctly and make it perfectly square.
-
Matching the colour perfectly is more complicated and I won’t go into that here.
Let me know if you need any more tips. I photograph a lot of artwork and documents.
To build if you’re doing this a lot and can’t use a brand lens with known correction data in darktable, set up graph paper and phone camera on a tripod to keep everything consistent, then photograph the empty paper. Create a transform in gimp to make the paper completely flat / square, and then just reapply that transform for every object you need to capture.
-
Flatbed scanner, or photo with grid paper in background.
Warp it until the gridlines are straight.
I don’t know how to do the last part - I suck at photoshop.
i believe you need distance. but you’ll loose resolution. the lens distortion will be way less fish-eye’e if you take the picture from meters away instead of centimeters. photo software like darktable also has lens correction for lots of camera-lenses. but not for smartphone lenses i believe. 🤔 not sure though.