Skip to content

Application

Julien-Haudegond edited this page May 9, 2020 · 6 revisions

ScanRig App

Table of Contents

Dependencies Installation

Ubuntu

To run our application, you will need Python, version >= 3.6. Depending of your Ubuntu version, you will maybe need the "deadsnakes" team PPA. Just make a small research to know exactly how to install Python on your OS.

sudo apt update
sudo apt install python3.6

Then, you will need some python packages. You can install them globally or in a virtual environment (recommanded). If you are using a virtual environment, make sure to activate it before doing the next commands:

pip install numpy opencv-python PySide2 serial

If you want to use USBCAM API (highly recommanded), go inside the folder ScanRig/usbcam and type:

pip install .

Now, you are ready for launching the application!

Windows

DISCLAIMER: At this time, our application does not work well on Windows.

Launching Application

If you are using a virtual environment, make sure to activate it before doing the next command.

In a shell opened inside the root folder, type:

python3.6 src/main.py [--api]

The option [--api] can take two different values: usbcam or opencv. By default, the value is usbcam. If you do not specify the API without having installed usbcam, you will get an error.

How to use it

Global Overview

The interface is made up of two tabs : Camera Preview and Multicamera View. At this time, only the first tab is usable. The Multicamera View tab is not coded yet.

So, in the first tab, we retrieve three main windows: Camera Preview, Camera Settings and Engine Configuration.

We also have an indication of the API we are currently using.

Camera Preview

Here, we can see what the camera sees. By default, no device are selected. You can open a camera with the scroll-down menu below the preview.

Once a camera is opened, you can change the preview quality (what you are currently seeing).

The last button of this window permits to add the camera to the acquisition devices. By doing that, the camera will be used doing the acquisition. If you do not add the camera to the acquisition devices and you change the camera preview, this camera will be shut down.

Camera Settings

Here, we can tweak each camera setting.

The following settings concern exclusively the current opened camera:

  • Resolution: the acquisition resolution
  • Exposure
  • Brightness
  • Contrast
  • Saturation
  • White Balance
  • Gamma
  • Gain
  • Sharpness

The button Apply To All permits to give those settings to every camera in the acquisition devices list AND the future opened cameras.

The button Choose destination folder works the same way: it is common to every camera.

Engine configuration

DISCLAIMER: At this time, even if the UI is ready to configure the engine, none of these buttons are currently linked to the "backend" engine (due to Covid-19, we could not test it in real life). Normally, there is not so much to do to make it work.

The first thing you will need to do is to start the engine.

You now have access to all the settings.

  • Total Angle: the number of degrees to be covered during acquisition.
  • Step Angle: the number of degrees which separates two consecutive captures.
  • Direction: clockwise or counterclockwise direction.
  • Acceleration: the number of degrees used by the arm to accelerate before starting the acquisition. 45° is pretty good.
  • Time for 360°: this is actually the speed of the rotation. This value is the required time for a complete revolution. Around 45 seconds is good.

Photometric Stereo

DISCLAIMER: At this time, even if the UI is ready to configure the photometric stereo, the "backend" is not ready at all (due to Covid-19, we could not test it in real life).

If you want to enable the Photometric Stereo option, you just need to check it out.

The Photometric Stereo Angle represents the number of degrees which separates two consecutive Photometric Stereo captures.

Start Acquisition

When you are ready (you added all the wanted cameras to the acquisition devices, the destination folder is good, etc), you can press the Start button and watch the magic happen.

Clone this wiki locally