Using Photogrammetry To Design 3D Printed Parts

[Stefan] is building a fixed wing drone, and with that comes the need for special mounts and adapters for a GoPro. The usual way of creating an adapter is pulling out a ruler, caliper, measuring everything, making a 3D model, and sending it off to a 3D printer. Instead of doing things the usual way, [Stefan] is using photogrammetric 3D reconstruction to build a camera adapter that fits perfectly in his plane and holds a camera securely.

ScanPhotogrammetry requires taking a few dozen pictures with a camera, using software to turn these 2D images into a 3D model, and building the new part from that model. The software [Stefan] is using is Pix4D, a piece of software that is coincidentally used to create large-scale 3D models from drone footage.

With the 2D images turned into a 3D model, [Stefan] imported the .obj file into MeshLab where the model could be cropped, smoothed, and the file size reduced. From there, creating the adapter was as simple as a little bit of OpenSCAD and sending the adapter model off to a 3D printer.

Just last week we saw photogrammetry used in another 3D object scanner. The results from both of these projects show real promise for modeling, especially with objects that are difficult to measure by hand.

33 thoughts on “Using Photogrammetry To Design 3D Printed Parts

    1. OpenScad is awesome, who cares if rendering takes a little longer when the software is free and open source.
      If i need to do some post processing or simple geometry i will fire up OpenScad before any other CAD package.

      1. “OpenSCAD is awesome”

        Open source zealot detected. Reality distortion meter is pegged.

        OpenSCAD is great unless you want to produce something that can be used by someone who takes CAD seriously and therefore uses something other than OpenSCAD… I’ve personally installed that blight on my computer. It’s the type of project that results when subject who isn’t serious about a subject tries to buck convention and make something “special” and custom that caters to their unique flavor of autism instead of learning an industry standard.

        I’m super happy for the developers that they took a linear algebra class. For those of us who have work to do OpenSCAD is a joke that isn’t taken seriously enough by it’s developers to have interoperability with ANY serious interchange formats. Import/export of interchange formats made Google Sketchup worthless and OpenSCAD thought they could make do without it as a feature? Lol.

        1. By “produce something”, I take it you mean a design file that can then be loaded into more standard tools? What interchange formats are you talking about? DXF, STL, etc? What are some features of “serious” CAD software that you find critical?

          If you don’t find the tool useful, then don’t use it.

    2. I think the main reason is that most modeling packages can’t deal with .obj or .stl files well… Please correct me if I’m wrong but to this day openscad is the only thing I can easily edit STLs with. I use solidworks and inventor otherwise, but they’re not designed to manipulate STLs. there’s a plugin for sketchup to deal with STLs but it’s not great.

  1. judging from the first screenshot in the article, the resolution and noise seem unworkable.

    and since it’s just a box, and he’s using it to make a rectangular extrusion cut, a caliper would have given him the dimensions in less than a minute.

    this might be interesting for matching exotic shapes, i have pondered going this route a few times, but the result is just too poor to be usable imo.

  2. the resulting mesh quality only seems on par with a kinect scan, I would have expected photogrammetry to yield better results. But as I understand that technique requires surfaces with a lot of texture, so i think this wasn’t the best test case.

  3. Talking around the subject in general without detriment to the project, I’m not that taken with photogrammetry done this way either. I built a makerscanner and was unimpressed with the results, and tried the android based ones, but seems to me for reverse engineering parts to make mating parts is not well suited to it with the results I can get in my equipment budget.
    For a box or plate with holes in or similar real world issues the way to go is with a cmm. Faro or romer, or a microscribe portable arm or similar or a fixed cmm if you have access to one. Calipers and a cad program if thats not arround.
    The reason is I want to describe the part with simple co-ordinates, for me because only some of my machines are cnc, and I might do the job on the manual mill that has a dro on it, then I just cut to co-ordinates. This obviously isnt the ticket for complex 3d shapes, but I don’t machine too many impellor turbines out in the shed day to day.

    I’d love to see a open innards based measurement arm one day come to fruition. The romers are proprietory locked up secret innards with huge costs to get recalibrated and stuff. Faro’s are a mystery to me but probably the same. $300 can get you a microscribe if your canny with your shopping. Maybe some brave soul will port linuxcnc with its robot kinematics to read read one.
    For a shape map you can also get good results with a touch probe in a cnc mill, or use a portable cmm and take a lot of sampling points to map the curvature of the parts out.
    Theres one more variant that does yield accurate results that I’ve played with, and that is a laser scanner on a portable arm or fixed cmm, but thats really big money territory. There’s a scanning head add-on on ebay at the moment and its $1500 and missing a major part of the electronics! (the laser scanner -> pc interface). Expensive paperweight without. I know because I have 3 of them in a cupboard also missing the interface modules!

    1. i was looking for an excuse to build a delta- bot/manipulator .. and it would be nice to have an alternative to a caliper, or when exotic geometry is involved, it would be nice to be able to put the object on a surface and be able to create a 3D pointcloud from touching the object with an arm and clicking a button.

    2. So many people I have disappointed by explaining that, no, 3d scanning is NOT an easy way to reverse engineer a part.

      I know most dont believe me and go on blithely believing everything is easy, and will never learn otherwise, because they are simply technologists, not actual doers of things.

      Maybe in another 5-10 years a usable 3d scanning tech will come out, but at this point, it is for architecture and art conservation, or special purpose uses.

      I want to say dismissive things about the effort detailed above, but what is left to say that others havent?

      Calipers… Use them.

      1. I have calipers. They’re great for quick 2d measurements or tossing in the chip pan for loose tolerance work with the cheapy disposible digitals.
        I also have a (working after fixing someone elses trash) romer arm, and there is no way you can reverse engineer say a crankcase or a intake port + combustion chamber shape using calipers and discrete measuring devices as fast as you can with a portable cmm, as not only are you digitizing flat surfaces, you are also measuring offsets from other features, protrusions, shape, and other 3d features. I can scan a mating face in, use the ball probe to locate the bolt centres and critical dimensions I need to reproduce then load the cad it produces into a cam package , tinker with it a few minutes to make sure I’m happy and have defined hole sizes accurately etc and squirt it into the linuxcnc powered mill, and what pops out will just line up and screw on first time.
        I’ve done cardboard cad, calipers and gauge pins, threaded transfer punches onto raw stock etc, and its great if its all you have to hand, for 2d stuff. If I needed extreme accuracy I’d still move to a surface plate and use slips and I’m no stranger to smearing prussian blue on things and rubbing them on a master so I’m not firmly routed in new school cad and whizzy tools.
        The romer has a 6ft radius reach, so I can turn a sacraficial mount plate, bolt or weld it the centre of a hotrod chassis early on and use it to locate the arm on for all the tabs and other parts to carry suspension, engine mounts etc in 3d from that reference point. I dont even have to leave the arm on, just the mount plate that repeats. I can leave that on for the life of the car too. You can also do measurement “hopping” by mounting tooling balls, and using them to relocate the arm, so the distance you can locate points in is as much as you have tooling balls and patience to relocate the arm for.
        One day I’ll get my perceptron laser scanners going when I find out whats inside that mythical interface box, and I’ll have the full shebang, and still for less than $1000 investment I hope.

  4. “Photogrammetry requires taking a few dozen pictures with a camera, using software to turn these 2D images into a 3D model, and building the new part from that model”
    No it does not require those. This is just one single application of photogrammetry. Making measurements from a single photo is also a photogrammetry application.

  5. How about the really cheap and almost instant old-school way? I worked in a test lab for over 30 years and we had to deal with custom mounts very frequently.My favorite solution was epoxy putty to squish between the items to be mated. Its easy to form into thick blocks where extreme strength is needed or thin, light-weight ribs that project from the substrate to the device under test. It forms absolutely perfectly to both surfaces. A bit of oil coating the surface of the device under test keeps the putty from adhering to that surface even tho it conforms to the surface exactly. It can then be glued, screwed or whatever to the device. It can also be formed to hold the device captive with no fastening. On the substrate side the adhesion to the substrate was never that good. Best solution is to wait until it hardens, break it off the surface, and then re-attach it with superglue. Since the surfaces match perfectly the, glue bond is really permanent. My favorite Epoxies are from the ‘Polymeric Systems’ line. Use ‘RepairitQuik’ for super hard and super fast, (ceramic-like hardness in 10-15 minutes, no joke) or ‘QuikPlastic’ for slower curing and less hard final piece. The less hard is great for where shock and vibration might otherwise crack something loose. The real beauty of this is no measurements of any kind, no writing code, no 3-D Printing, no time spent on these activities. Instead you get perfect fit that is virtually unattainable with any of the above and all done in minutes. These epoxies can be drilled to lighten the piece, can be sanded, tapped, etc. I have used this stuff a thousand times in a hundred different ways. Once you start to use it you keep thinking of more ways. They have lots of different types now, even QuikTitanium! No, I don’t work for these guys I just love the stuff because it makes makes my life easier. Zip ties, velcro, bailing wire, Sugru, and epoxy putty.

  6. I normally use calipers, micrometers, etc, to reverse engineer.
    A few people have lauded CMMs (coordinate measuring machines)-
    I’ve used them extensively, and they are absolutely indespensible for reverse
    engineering, or really accurate, quick QC.

    The place I now work for just bought a brand new 3D Faro arm, portable,
    but screws to a granite plate with fixturing, all portable on a cart. I don’t know
    much about it- other than looking at it, it should be a really accurate freeform
    CMM. It will be a while before I am allowed to use the thing- it’s only for QC dept. now.

    So many wonderful things become possible, beyond the realms of advanced fab
    with even the most exotic 3D printer- when you can measure accurately and
    quickly complex forms and create coordinate systems for their layout.
    People say 3D printing has made a new world possible- I say we aren’t
    there yet. We will arrive when low cost, portable 3D scanners, CMMs, and CAD
    are affordable, and perfectly integrated with each other, to allow effortless
    reverse engineering of anything in minutes. That’s when the real fun will happen.

    Does anyone know- is there an affordable CMM or Faro arm type item you can
    build yourself? That’s a build log I’d kill to see- a serious 3D coordinate mapper.

    1. Ive seen a faro arm type DIY project before.. I think it was on cnczone.com, but it might have been here.

      I am skeptical of using a faro arm or especially a CMM for reverse engineering. I get MUCH FASTER results with a calipers, a depth indicator, etc.

      CMM is, correct me if I am wrong, best for, you know, coordinate specific measurements… Having it scan a surface only works on maybe 15% of surfaces – and trying to escape the mental effort of CAD modeling a part just means you still dont have a CAD model of the part in question.

    2. I think the worst part of it would be finding encoders with sufficiently high quality, machining the joints accurately enough and finding non fake bearings of the correct abec class, then calibrating it after building. The standard is you have a master at least a digit more accurate than the thing your calibrating, so you need a high accuracy length/3d points to measure to check it. If you have someone with a length standard, or have someone to poke some dimples in a durabar length of barstock then measure it accurately in a cmm to make one, that would help but its not something someone looking to make a cmm might have handy.
      And to accurately align it to make matters worse, you need a bespoke arm calibration jig, not a universal setup like used to align a fixed cmm or machine with a auto collimator setup. The arm goes in a jig and all the joints are locked, then one is unlocked and its checked through its range to predefined test points and adjusted accordingly in calibration tables (which are password protected on the romer and this password is not divulged to customers/owners, insert naughty word of choice here but nothing IDA or the like can’t fish out with patience). A small error in any of the joints results in the stacked up vector sum used to arrive at the xyz position as being significantly in error so this is temperature controlled metrology room stuff at this stage. It costs >$1000 to have a company test your arm and reset the encoder offsets, and that is now only possible on the later ip connected arms as there is no recalibration service availabe on the older serial arms now as they are obsolete.
      I have had my romer in pieces repairing electronics faults inside (I bought a junked arm cheap) and I’ve realigned a few of the joints and I spent weeks getting them where I wanted them because it couldnt be done (even if it could, I doubt I would find it in me to shell out $1200 to a company for 30 mins work with the right tools), so the above is all from experience.
      Then there is materials in use, the arm I have is carbon reinforced tubes for low co-efficient of expansion, and very high quality high accuracy machined joints. The encoders for each section have their own single board computer with a xlinx fpga to process the encoder data and a 68000 to manage it, and they squirt this data from each segment through slip rings via a rs485 serial network in the older arms, and the later ones talk ip. But the clever thing is you never have encoder data passing slip rings in non error corrected transmission format, just voltage and serial data links.
      Interesting subject in general.

Leave a Reply to Cmh62Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.