How To Scan Objects Into 3D Models W/ Camera For Free: Instructables
How To Scan Objects Into 3D Models W/ Camera For Free: Instructables
by alansartlog
This is a bit old now as I'm planning a new video (edit: have added as second video above), but I finally got around
to doing the write up because of that so I thought I'd finally get around to posting it here since instructables no
longer lets you post just videos, which fine, just be warned all the following steps are basically in the video, though
I've made a few edits since.
Also I know there's quite a few tutorials on here about photogrammetry, but I'm not aware of many using Regard3D
which is by far the best of the free programs available imo.
Now I'm not an expert at any of this. I've tried as best as possible to read through all the documentation, at least
the parts I understand, and condense that into a video.
Also please note the cleanup process was aimed at getting it ready for sculpting. I know that people like to scan
objects to then 3d print them, but I don't have a 3d printer, so you'll have to look somewhere else for the details on
how to do that properly.
UPDATE: Lots of people have asked for the photos. For the model of the first video I will not be sharing it,
BUT I did a followup video (the second one), in which I specifically made photo sets I can share. You can
find more info about all that in this blog post.
Regard 3D Pros:
Open source
All-In-One Solution
Advanced options. (but also works well out of the box)
Simple Nice UI. - Branching (saves past parameters)
File "Autosaves" Crashes only loose what was computing.
Cons:
https://www.youtube.com/watch?v=GaYfpGcXxmA
https://youtu.be/7pGJ8rWiecw
The ideal way would be to have the camera rotate texture else you won't get any matches. For this you
around the object with plenty of soft lights. Alas, I can splatter some ink, or watercolors, or something
could not do that, so my setup was more like two (test the pigment will not stain first). This will help a
desk lamps which I diffused as much as possible with lot if your object is a sculpt like mine with minimal
a piece of paper and a blank white background. I then texture. Without it the software has no good reference
rotated the object instead of the camera. as to where anything is in space.
The moving highlights and shadows can cause some How many pictures to take?
problems, but I was able to get a decent scan this More is always better, but there is also a point where
way anyways. this will just slow down your computer. I recommend
4 different height angles and about ~16 photos each
Unless your object is made of glass (in which case round. In total I took about 74 photos for this not
you'll have to coat it in something so it's matte), and including the extras.
not too glossy it should work.
Also if possible your photos should all be with the
Texture same camera at the same focal length.
Even if the surface is matte though you need some
First create a project: File > New Project. Select sensor size. If the focal length isn't set you can also
where it's going to store the files (it can take up many set it manually but you'll have to know what focal
GBs, mine was ~15GBs by the end of this with so length you used.
many tries) and the name.
Then just name your picture set something and add
In the lower left you'll see a button that says Add all the images.
Picture Set...
NOTE: Do not move the images after you've
Here you can add all your image files. It might take a added them or you will get an error trying to open
few seconds for them to load all the metadata. Make the project. This can be fixed by opening the `.r3d`
sure the camera model, focal length, and sensor size file in the project folder with notepad or some
are set. If the sensor size is not set in the newest other text editor and finding and replacing the
version you can now set it manually (right click) if the incorrect paths, but be warned.
program could not find your camera model in it's
database. Just google for your camera model and
Now the Regard3D documentation, link below, goes (EDIT: Takes me 5-15 min on my new computer!).
more in depth into some of the options. I'm not going
to go over everything, just cover some of the stuff it Tree Structure
doesn't cover or what I learned worked best for me So at this point you'll notice the tree view in the
from experience. sidebar has started branching out. See Images.
Here the default settings work pretty well. I found on At any point you can go back and check the
my laptop (specs at the end) setting keypoint parameters you used, how much time it took, etc, and
sensitivity too high would cause it to crash (EDIT: each level will give you different options depending
this no longer happens on my new better desktop). on what stage you're on.
Setting the `keypoint matching ratio` to high though
and the keypoint sensitivity to low improved some You can also export point clouds and models to other
of my results without crashing. programs from here if that stage allows for it.
If you click on your matches you should now see should now be able to see a bunch of little circles
several options in the lower left: around the ink splatters.
If you click Show matching results... you'll get a To see matches between pairs, in the lower half click
dialog showing you the matches. At first you won't Show Matches. It might take a second to load. And if
see anything different. you took your pictures right you should see just a
bunch of lines, to the point you can't even see the
Check Show Keypoints to actually show the images well.
matches. Even then you might not quite see them. So
to zoom in you can Open Preview Window and you
I could not get the first to work, it just crashes (EDIT: You can also make the points bigger by moving the
This no longer happens to me on my new computer Point size slider in the top right. You should now be
and it works better sometimes). able to see a bunch of little green dots. Those are the
cameras it captured. And in the lower left there's a
So I use Global. field that tells you how many cameras were captured
out of the total. Usually ~80/90% or more is enough.
As to the other options, some match a few more
cameras than others, but they didn't make much of a
From your triangulation click Create dense Threshold : Increasing this can help reduce artifacts.
pointcloud....
Cell size : Related to the resolution, works similar to
Here you basically have two options `CMVS/PMVS` `Level`.
and `MVE`.
Min. image num: If a point only appeared in 2
CMVS/PMVS images but this is set to 3 it won't use it, so I suggest
Use visibility information : Uncheck this if you don't lowering this to 2 for the amount of photos I
have that many images (~70 is not many) can recommended.
produce better results because it will use more
cameras. Now I prefer MVE because I could not get Level 1 to
work for me, only Level 2 and it looks worse than the
Levels : This is like the resolution. With a lower defaults for MVE which do work for me.
number being a higher resolution.
This one does take a lot less time though (couple of
minutes). And it seems to produce nicer point clouds very powerful you might get out of memory errors. Try
with less artifacts but the end model did not look as closing all your programs and just leaving it to run for
nice as with MVE. a while or overnight, sometimes it will recover and
finish.
BUT you loose the option later to do a Floating
Surface Reconstruction. But it does allow you do do Floating Surface
Reconstructions later.
MVE
Scale: The resolution with a lower number being a The Dense Point Cloud
higher resolution. The view might lag quite a bit at this point. You
should see something that looks like your object with
The problem with MVE is that anything but the a few artifacts close to the surface depending on what
defaults seems to create a lot of weird artifacts and method you chose. As long as there isn't a large
nothing but the defaults seemed to work. cloud of them, you can still get good results. For my
case MVE at defaults turned out the better result.
It also takes a lot longer (2-3h) Edit: On my new
computer it's now 10-30min. If your computer isn't
We get the two options, one I already mentioned, Possion Surface Reconstruction
Floating Surface Reconstruction PS: Sorry for the mispronunciation in the video, I
literally read this as Poison.
Floating Surface Reconstruction
Levels: Like the resolution except now a higher value This is my preferred method.
= more resolution.
Depth: Like the resolution except now a higher value
This one can take ~1h sometimes for Level 0 which is = more resolution. Don't go too high (9-10) or you'll
the lowest so I was not able to try it out much and am get a lot of artifacts.
not 100% confident as to what some of the other
parameters do. I do know though that if you get blobs Samples per Node: Turning this up helps get rid of
floating around the model, turning Confidence artifacts.
Threshold and Minimum Component Size up a bit
As for the other two settings, the defaults work well, image textures, while `Colored Vertices` depends on
turning them up just seems to make the base a bit the resolution of the mesh but it also a bit faster.
neater.
Now the bug is fixed I do not recommend Colored
Colorization Vertices unless you don't care about the textures at
As part of the surface reconstruction textures are all. unfortunately you can't preview the surface
created. without the textures if you used Colored Vertices so
it kind of negates that instance too.
There used to be a bug with the `Textures` option,
the newest version has fixed it. If you use Textures you can toggle them off in the
sidebar to the right.
Textures are more detailed since it will produce
From here we'll need to export our model for cleanup Blender
in other programs. You can use either Meshlab, it's
free (you can also do the surface reconstruction of If your object is particularly small I recommend you
point clouds from there) but it's very hard to look at this part of the tutorial I wrote on magic lantern
understand and the newest version does not work for (you don't need it to apply the concepts described but
me (Edit: it now does), or Blender. it's helpful if you have an DSLR camera).
I could not record the cleanup because the mesh was PS: To give you an idea of the type how long it might
so huge and freezing my computer, but at the end of take on your computer, or what type of computer you
the video I try to illustrate the basic steps I took with a need, I'm using a laptop with an Intel i5, 8GB of RAM,
simple sphere. It does not translate well to text. and a NVIDIA 650M GPU.
Thanks for sharing Alansartlog! Very detailed and very interesting. I will play around with this for
3D printing.