The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

raspberrypi.org/magpi The Official Raspberry Pi Projects Book 83


3D BODY SCANNER Projects


Above Eight cross
joints and four
T-junctions were
3D printed using
an Ultimaker 2+

Cardboard engineering
Inspired by Richard Garsthagen
(magpi.cc/2xVr3Vr), Poppy then
looked at making the scanner
affordable and portable. “The idea
of having a portable rig that people
could step into and take a picture in
a few seconds was appealing,” she
says. By using Zero Ws, she hoped


the scanner could be replicated in
the future for less than £1000. To
keep costs low, and to make the
build easier for Poppy and the team,
twelve 3 mm–thick cardboard tubes
were used, on which the Pi Zero Ws
and their cameras were mounted.
Poppy says the cardboard proved
to be “a great material to cut and
make holes in.” As well as the
cardboard frame, a cardboard case
was designed for the Pi Zero Ws.
“It also helps hide the wires,” she
adds. Created to work within the
smallest possible diameter so that
it can remain portable, the idea
was to connect the Pi boards to a
laptop to trigger the photos, so
that all the cameras would take
a snap simultaneously.


>STEP-01
Code the Pi
Prior to her project, Poppy had only
used the Raspberry Pi once, at a
workshop at the Mozilla Festival in


  1. Arthur Guy wrote the actual
    code, which needs to run constantly.


>STEP-02
Connect the camera
After setting up the server so that the
cameras know which fixed IP address
to send the photos to, a computer
is connected. The cameras are then
hooked up to the Pi Zero Ws.

>STEP-03
House the Pis
The Pi Zero Ws and the cameras are
housed in these cardboard cases, which
are then placed around the structure. A
5 V power regulator can be connected to
up to three Pi boards.

PREPARING THE PIS


Coding challenges
“The photos are sent wirelessly
to the laptop and they are
automatically saved in a new
folder,” Poppy explains. Raspbian
Jessie Lite is installed on the Pi Zero
Ws, and the main server runs a node
application. Another friend, Arthur
Guy, wrote the code for the scanner

in JavaScript, building it up week by
week, and adding features such as
getting the Pis to look for updates on
startup so that they all use the latest
version of the software.
There were still some issues
along the way, and a fair bit
of trial and error, especially in
positioning the cameras so that
the photogrammetry software
could digitally stitch the images
together. There was also a problem
with Poppy’s shiny long hair, which
became apparent when she stood
inside the structure. “I looked
online, and it suggests putting
powder on anything shiny, but I
haven’t tried it yet.”
Some problems proved easy
to overcome. Figuring out which

cameras weren’t working was
solved by assigning them names,
and Arthur also learned to change
the white balance on the cameras
to improve the image quality. Yet
there are problems with time lag.
“Some Pis take a photo instantly,
and others take a few seconds, so we
have to stay still until all the photos
have been taken,” Poppy says.
Nevertheless, she is excited about
future applications for the project.
“It opens up new possibilities,
such as of scans of children who
won’t stay still long enough for the
single camera method; building a
personal database of scans taken at
regular intervals to see the effects
of aging; and making avatars for
VR environments.”

Twelve 3 mm thick cardboard


tubes were used, on which the Pis


and their cameras were mounted

Free download pdf