STACK3d Three-dimensional Macrophotography Scanner
by cluistorresc in Craft > Photography
6700 Views, 87 Favorites, 0 Comments
STACK3d Three-dimensional Macrophotography Scanner
Have you thought that it is possible to appreciate an insect in a bigger size and reconstructure it in a 3D Model?
This will be your challenge, after reading my new instructurable.
Don’t worry I will help you and show you some clues.
In this instructable I will show the reconstruction of Ecuadorian Condor handicraft of just 12 mm so you will get a better understanding of how to do it for reconstructing a 3D insect or any other models.
First, in this project we are going to make an automatic image capture system for reconstruction of 3D digital models. We will use macro photography by focusing with a DSLR camera. This system allows you to take pictures of objects up to 20mm in order to deduce the number of photographs necessary to perform a focus stacking and automatically perform both the camera movement and the capture of the photograph.
The number of images is calculated according to: the size of the object.
Another detail, the diaphragm aperture at which the greatest sharpness is obtained with an acceptable depth of field and the magnification factor and the circle of confusion. After taking these pictures, we proceed to perform focus stacking and then we do a three-dimensional reconstruction by photogrammetry to get the digital model of the studied object, its shape, color and texture. Finally, all components are controlled from a human-machine interface.
Supplies
These supplies are referential. You can use and adapt the design to the ones you have.
- Cámara DSLR
- Macro 1:1 Lens
- SD Card for Nextion Screen
- Z flex for camera
- Arca Swiss Plate
- Nextion Screen TFT NX4827T043
- Raill HG15CA x 20cm(2)
- Linear Block HG15CA(2)
- V Slot 2080x30cm
- 688 Bearing
- T8 Lead Screw 2mm Pitch, 8mm Lead with Copper Nut
- Cap Screw M5x20(8)
- Cap Screw M4x16(10)
- Cap Screw M4x12(8)
- T Screw serie 20 M4(10)
- Arduino 1
- DRV 8825(2)
- Magnetic switch sensor
- CNC shield v3
- Stepper motor Nema 17 0.4A 12V
- Led IR
- Transistor NPN 3904
- Condensador 47uF
- Resistencia 220ohm
- LED 12V(3)
- AC/DC Transformer 5A
- Fan
Software and online services.
- Software Reality Capture
- Software CombineZP
Good lighting is necessary for doing a 3D reconstruction because it needs uniform light on the object of study to get better results. In this project, three LED spotlights of 12V were used and connected to the Human Machine Interface System (HMI). Also, paper is used behind the object because it acts like a light diffuser and becomes the background of the photos.
Downloads
System Construction
The supplies of the automatic capture system are shown in the CAD picture, which were chosen based on the application. Besides, linear guides are used with the purpose of minimizing the vibrations in the motor and the reflex camera mirror that was used.
The dimensions of the reflex camera and the minimum focus distance of the lens are important to obtain the length of the rails. In this project I work with a Nikon d7200 camera and a YONGNUO YN60mm F2NE MF Macro Lens with a 0.8ft minimum focus distance, so the rail has a dimension of 25cm~0.9ft.
It is necessary to have an Arca Swiss plate to hold the camera to the frame.
In addition, there are two stepper motors:
The first one that moves the camera based on the depth of field.
The second one that rotates the plate where the object is. This allows us to achieve images around the object.
Finally, the power screw used is a T8 with a 2mm pitch thread which means when the motor makes one turn, the camera moves two millimeters. This combination with a nema 17 stepper motor of 200 steps per one turn makes that the camera moves 1mm every 100 steps.
Downloads
Movement of Motors
The motors must move in order that all dimensions of the object will be taken. The first motor should be moved by small steps depending on the depth of field (Pdc). We can calculate it by the Pdc formula:
f= the effective opening of the diaphragm lens;
m= the magnification factor of the lens;
c= the circle of confusion
Furthermore, the effective aperture of the diaphragm lens is the sweet spot of the lens. In this case it would be an F 5.6. Also, the lens magnification factor considered is 1:1, and the value of circle of confusion is usually a standard value depending on the camera. For instance, the Nikon d7200 value is 0.02
Then, you obtain with these values the depth of field which is 0.448mm, but trying to overlap all the images we are going to use 75% which is transformed into motor steps.
Automatic Photo Capture
Taking advantage of the fact that the camera has an infrared receiver, we are going to capture the circuit of an ML-L3, and connect it directly to the microcontroller so a photograph is taken after the stepping motor finishes the depth of field trajectory. This process will be repeated until covering the entire dimension of the object.
The plot of the ML-L3 circuit was taken from the next page, there you can get more information, and a controller output with an IR led was used.
HMI Control Process
The process is carried out from a Nextion screen where the system starts working.
First, the lighting is turned on, then the dimension of the object is registered and on the screen we will check the progress of the process.
Important to know that the process can be started from the computer as well, however for this example we work with a screen so the process can be carried out autonomously.
The code of the motors, the screen and all the elements is shared in the file code.pdf
Downloads
System Procedure
As I mentioned before, when the dimension of the object is registered in the system it will calculate automatically the number of photos to be taken, and proceed to capture the images. After a valid image capture sequence has been completed to perform focus stacking, the camera returns to the initial position, and the object rotates certain degrees to repeat the process until completing the object rotates certain degrees and then it repeats the process until completing the whole rotation of the object. The angle of rotation depends on the complexity of the object and it will be controlled from the HMI.
When we have all the pictures taken, we use the combineZM software to perform the focus stacking and obtain all the images from all angles of the object in order to obtain the three-dimensional reconstruction in the RealityCapture software.
It is recommended to take as many photos as possible and a lot of photos from all angles of the object to achieve a good quality stack. We can modify the number of pictures taken in the code which is shared in this instructable.
In conclusion, with these characteristic information we can reconstruct small objects such as an Ecuadorian Condor handicraft of just 12 mm, which was successfully reconstructed with a total of 36 photographs.
If might have any questions or need some information, don't hesitate to contact me. I will be glad to help you.