cross-posted from @[email protected]: https://lemmy.world/post/23787115

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?

  • @kitnaht
    link
    12
    edit-2
    6 days ago

    Flatbed scanner – takes a image along a single line, with no perspective distortions. Additionally, I believe I’ve seen some people set up cameras that can do the same thing, basically taking pictures overhead directly and laying all of that out as ‘layers’ on top of one another and getting rid of anything that was not in the ‘center’ of the picture in order to minimize distortions.

    I think there’s also some sort of trick with taking the photo from far away? I’m no photography expert, but I believe I’ve also been told that the further away you are from the object, the less perspective distortion you get. I’m not sure on this.

    • @officermike
      link
      6
      edit-2
      5 days ago

      As an engineer who sometimes has to reverse-engineer stuff to integrate with CAD, flatbed is the fastest, easiest way. You don’t even need to scan with a ruler or known scale either. If you scan at a known DPI, and you know the resolution, you can scale the image in CAD to (horizontal resolution/DPI) width by (vertical resolution/DPI) height. I don’t know how FreedCAD works in this regard with sketch pictures, but in SolidWorks it’s important to have an arbitrarily-sized, dimensioned piece of construction geometry in the sketch beforehand to lock in the scale (of there’s no existing sketches or solids). Otherwise, the scale can get fucked really easy with no way to unfuck them without starting over, as sketch picture dimensions entered when placing the image don’t turn into defining dimensions automatically.

      Edit: as for the camera, shooting with a long lens from really far away means the light rays entering the lens are nearly parallel rather than diverging. YouTuber “Stuff Made Here” has a recent video that briefly touches on this. https://youtu.be/aXfTgCCsRSg?si=FegiCAgFMKj6tDkv

    • astrsk
      link
      fedilink
      15 days ago

      Was looking for this comment. The camera and long focal length lens route does work, but short of spending hundreds or thousands on new equipment, $15-$25 for a cheap thrift store flatbed scanner will work wonders for years.