SkillAgentSearch skills...

ScAnt

open-source 3D scanning and processing pipeline

Install / Use

/learn @evo-biomech/ScAnt
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

scAnt - Open Source 3D Scanner

scAnt is an open-source, low-cost macro 3D scanner, designed to automate the creation of digital 3D models of insects of various sizes in full colour. scAnt provides example configurations for the scanning process, as well as scripts for stacking and masking of images to prepare them for the photogrammetry software of your choice. Some examples of models generated with scAnt can be found on http://bit.ly/ScAnt-3D as well as on our Sketchfab Collection!

The scAnt paper can be found here:

Plum F, Labonte D. 2021. scAnt—an open-source platform for the creation of 3D models of arthropods (and other small objects) PeerJ 9:e11155 https://doi.org/10.7717/peerj.11155

All structural components of the scanner can be manufactured using 3D-printing and laser cutting; the required files are available for download in .ipt, .iam, .stl, and .svg format on our thingiverse page.

Updates

  • scAnt 1.3 New faster stacking method and updated GUI with added post-processing functionality. We also combined post-processing steps into one file accessed through GUI and command line.
  • scAnt 1.2 Significantly improved image capture speed for FLIR cameras. As this increases the hardware demand during scanning, it may be advisable to run stacking and masking separately (see provided python cli scripts), instead of during scanning. We also updated the respective stacking, masking, and meta data scripts to accomodate a wider range of applications.

[!TIP] When using Max Simon's wonderful scAnt reconstruction protocol, use THIS v1.2 release instead!

  • scAnt 1.1 Now supports the use of DSLR cameras on Windows 10, in combination with DigiCamControl. Please refer to the official documentation to check whether your camera model is currently supported. Ubuntu support will be added soon. An updated version of the scanner construction files will be made available on our Thingiverse page.

Installation

scAnt is supported by 64 bit versions of Windows 10 and Ubuntu 18.04 (newer releases of Ubuntu will likely work but have not been tested). The pipeline and GUI have been designed specifically for use with FLIR Blackfly cameras, and Pololu USB Stepper drivers. We have now added support for DSLR cameras for Windows operating systems as well. Please refer to our Thingiverse page for a full list of components.

The easiest way to get your scanner up and running is through installation of our pre-configured anaconda environment:

for Ubuntu 18.04

cd conda_environment
conda env create -f scAnt_UBUNTU.yml

for Windows 10

cd conda_environment
conda env create -f scAnt_WINDOWS.yml

After the environment has been created successfully, re-start the terminal, and run the following line to activate the environment, and to continue the installation.

conda activate scAnt

If you do not wish to install the pre-configured environment, here are the dependencies:

  • python >= 3.6
  • pip
  • numpy
  • matplotlib
  • opencv >= 4.1.0
  • pyqt 5
  • imutils
  • pillow
  • scikit-image

Additional drivers and libraries for the camera and stepper drivers need to be installed, as described for both Ubuntu and Windows below.


Ubuntu 18.04

FLIR setup


NOTE The latest version (3.0 and above) of Spinnaker & PySpin causes the scAnt application to freeze for some capture commands. For now, we reccomend using a legacy version (1.29 - 2.7) of Spinnaker & PySpin to avoid this issue! These versions can be found under FLIR Support / Spinnaker / archive. In there, you will find both Ubuntu as well as Windows files, so be sure to double check you are using the version appropriate to your system and python installation.


Download the drivers and python bindings for Spinnaker & Pyspin from the official FLIR page: FLIR - Spinnaker & PySpin

Spinnaker has recently moved their API and driver files into a new repository and you will need to create an account in order to access them. Once you have created an account head to the bottom of the download page to the section Archive and download the 2.7.0.128 version for your respective operating system. (We are in the process of providing support for later Spinnaker & Spinview versions, see #30) Unpack the folder and you should find both the Spinakker API installation, as well as the required python package inside.

Unpack all files in a folder of your choice. Then proceed with the following steps:

  1. Install all required dependencies
sudo apt-get install libavcodec57 libavformat57 libswscale4 libswresample2 libavutil55 libusb-1.0-0 libgtkmm-2.4-dev
  1. Install spinnaker from its extracted folder. During installation, ensure to add your user to the user-group and accept increasing allocated USB-FS memory size to 1000 MB in order to increase the video stream buffer size.
sudo sh install_spinnaker.sh
  1. Reboot your computer

In some cases the installer will not be able to update the allocated memory automatically. Check that the memory is set to at least 1000 MB by running:

cat /sys/module/usbcore/parameters/usbfs_memory_mb

In case the memory allocation has not been updated, you can either increase it temporarily by running

sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'

or permanently, by following the instructions outlined in the README file of the downloaded Spinnaker installation folder.

  1. Launch spinview and connect your FLIR camera to verify your installation (if the application is already launched when plugging in your camera, refresh the list)

  2. Next, install the downloaded .whl file for your python environment. Ensure you activate your python environment before running the pip install command below.

pip install spinnaker_python-2.7.x.x-cp37-cp37m-linux_x86_64.whl
  1. To verify everything has been installed correctly, run Live_view_FLIR.py from the GUI folder.
cd scant/GUI
python Live_view_FLIR.py

If a live preview of the camera appears for a few seconds and an example image is saved (within the GUI folder), all camera drivers and libraries have been installed correctly.

Stepper driver setup

  1. The Pololu stepper drivers can be controlled and set up via a console. Download the drivers specific to your system from pololu.com, which also provides additional information regarding installation and a list of supported commands. All drivers are open-source, and the respective code can be found on Pololu's Git.

  2. Unpack the downloaded .tar.xy file and install the driver:

sudo pololu-tic-*/install.sh
  1. Next, reboot your computer to update your user privileges automatically, otherwise you will have to use sudo to access your USB stepper drivers.

  2. If one or all of the stepper controllers were previously plugged into your computer re-plug them, so they are recognised correctly by your computer. Now, open the terminal and run:

ticcmd --list

This should output a list of all connected USB stepper drivers.

  1. To test which ID corresponds to which stepper, launch the Tic Control Center application and move the sliders. You can use this application to test each motor and set up turning speeds and assign pins for the connected endstops.

Double check your end-stop cables are connected to the correct pins on the pololu-tic board:

  • GND: Black
  • TX: Green
  • RX: Red

Then the setup should be:

for the Z-axis (camera slider)

The TX of the limit switch of the Z-axis (camera slider) needs to be set to "limit switch forward" and to "limit switch reverse" for the X-axis (gimbal).

From /scripts, open the Scanner_Controller.py script in an editor of choice and add the IDs of each the stepper to the corresponding axes:

self.stepperX_ID = "XXXXXXXX"
self.stepperY_ID = "YYYYYYYY"
self.stepperZ_ID = "ZZZZZZZZ"

Image Processing

A number of open source tools are used for processing the RAW images captured by the scanner. For a detailed explanation of each, refer to the official hugin and exiftool documentation. The following lines will install all the good stuff:

sudo add-apt-repository ppa:hugin/hugin-builds
sudo apt-get update
sudo apt-get install hugin enblend
sudo apt install hugin-tools
sudo apt install enfuse
sudo apt install libimage-exiftool-perl

Windows 10

FLIR setup

(Optional: you only need to install the software required for your respective camera)

(Instructions for using DSLR cameras in the

Related Skills

View on GitHub
GitHub Stars242
CategoryDevelopment
Updated3d ago
Forks46

Languages

Python

Security Score

95/100

Audited on Mar 28, 2026

No findings