STACK3d Three-dimensional Macrophotography Scanner

by cluistorresc in Craft > Photography

6441 Views, 87 Favorites, 0 Comments

STACK3d Three-dimensional Macrophotography Scanner

FullSizeRender.jpg
Imagen 1.png
ezgif.com-gif-maker.gif

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

yongnuo-marco-60-mm-destacada.jpg
HIWIN-HGR-Linear-Guide-Rail-2x-Rail-Blocks-CNC-HGR-15-20-25-30-152097511929-2-2.JPG
Captura de Pantalla 2022-01-31 a la(s) 00.44.32.png
All_V-Slot_for_Render_20x80_Black__52717.1553895428.png
51TteGNCzFL._SL1500_.jpg
s-l300.jpg
nikon_slr_d7200_body_black_1.jpg

These supplies are referential. You can use and adapt the design to the ones you have.

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

Captura de Pantalla 2022-01-31 a la(s) 20.10.09.png
IMG-20210209-WA0054.JPEG
IMG-20210209-WA0040.JPEG
IMG-20210209-WA0038.JPEG
IMG-20210209-WA0036.JPEG
IMG-20210205-WA0047.JPEG

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

pdc.png

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

Captura de Pantalla 2022-01-31 a la(s) 20.22.36.png

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.

http://www.bigmike.it/ircontrol/

HMI Control Process

nextion_box.jpg

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

IMG-20210317-WA0048.JPG
IMG-20210317-WA0038.JPG
IMG-20210317-WA0035.JPG

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.

Captura de imágenes para reconstrucción de modelos digitales 3D utilizando macrofotografía

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.