- cross-posted to:
- cad@lemmy.world
- cross-posted to:
- cad@lemmy.world
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?
Dark table corrects lens distortion based on the design of the actual lens, not the image itself. The grid it just to check in after the fact. I’m not aware of similar tools in GIMP. It’s trivial in Darktable though, as long as your lens is in the database.
Don’t use a fish-eye lens, it’s lense distortion will be the worst and most difficult to correct. Use a lens with a longer focal length, ideally a prime lens with a fixed focal length. If you maximize focal length and distance to your object as much as is feasible, you will have already flattened the image (minimized lens distortion) a lot. If you use a prime (fixed focal length) lens from a popular brand, Darktable can remove the remaining lens distortion.
You can remove all lens distortion by using a pinhole camera, which has no lens. But that’s probably going to be a tricky setup without an expert.