Detection Mode - Default Runmode
The setup screen takes you through the required steps configuring the system. To get to this screen you will have to get the system on your wifi. You can do this through the Dartstrainer app in the Settings..Gungnir Dartstracker...Network menu. Then you can use a browser to connect to the dartstracker by pointing it to the IP address of the dartstracker.
When connected go to the Setup menu to start configuring the dartstracker for the first time. First the hardware will be setup then the software will be calibrated. In step 1 you can upload a configuration file to use as a base configuration for the system. In the next steps the system will be setup and finally calibrated. Mind that calibration can be done best through the dartstrainer app, it will show the precise position where to put the calibration darts.
There are 5 calibration routines to help setting up the system. The complete, camera height, detection area, board and sector calibration. Below a description of each of these routines.
The general screen shows information about the current version and current temperature of the system. A log is shown of the most recent events. It also contains a few buttons described below.
Start & Stop. With the Stop and Start buttons the dartstracker can be stopped and started if it is stuck in an error state.
Refresh Log. Refreshes the log shown on the screen.
Full Log. Downloads the log to your machine. This log contains more details then showns on the screen.
Diagnostics. Download a PDF with the current state of the system.
Shutdown. Shuts the tracker down.
Reboot. The Reboot button reboots the whole Raspberry Pi.
Update. The Update button downloads the latest version of the Dartstracker and installs it after which the system is rebooted. This won't affect your configuration. This only works on early images which have the Readonly FS disabled. To make the Update button work, login to the pi and use raspi-config to disable it.
The network screen shows the current network state and the available wifi networks to connect to. It is also shown when connected to a wired network. Mind that if you leave a wifi network you will have to join a wifi network again with the app via bluetooth or using LAN (wired network).
Leave. Leave the current wifi network.
Join. Join the wifi network.
This screen gives the options to download and upload configuration files for backup and restore purposes.
Upload. Upload a json formatted configuration file.
Download. Download the current configuration in the form of a json formatted configuration file.
Restore Last. Restore the last configuration before the current.
A license is required to use the API. This screen defines the methods to retrieve the dartboard events.
In this screen the devicename that is broadcasted through bluetooth can be configured. Based on this name a QR-Code is generated which can be printed and put on the dartstracker. The QR-Code has the following functions:
- When a user doesn't have the dartstrainer app installed on their phone, the user is directed to the playstore page for download. After installing the app, it will open and connect directly to the dartstracker.
- When a user has the app installed and scans the QR-Code the app will open and connect directly to the dartstracker.
-When a user has the app installed and started. Pressing the scan button will open the camera and after scanning the app will connect directly to the dartstracker.
Mind that this is especially handy when multiple dartstrackers are placed next to each other. The 'Search' option in the dartstrainer connects to the first one available. The 'Scan' option connects exactly to the dartstracker scanned with the QR-Code.
In the board configuration screen you can enter the dimensions of the triple double and bull regions of the board. Some people use training boards which have dimensions that differ a bit from standard boards. These can be adjusted here. If the calibration step 'Calibrate board dimensions' is enabled these can't be changed manually.
Double Bull Radius. The radius of the double bull in mm measured from the center of the board. Default is 7 mm.
Single Bull Radius. The radius of the single bull in mm measured from the center of the board. Default is 17 mm. (so single bull default has radius of 17-7 = 10 mm = 1 cm)
Triple radius start. The radius of the start of the triple in mm measured from the center of the board. Default is 97 mm.
Triple radius end. The radius of the end of the triple in mm measured from the center of the board. Default is 107 mm. (so the triple default has a radius of 107-97=10 mm=1 cm)
Double radius start. The radius of the start of the double in mm measured from the center of the board. Default is 159mm.
Double radius end. The radius of the end of the double in mm measured from the center of the board. Default is 169mm. (so the double default has a radius of 169-159=10 mm=1 cm)
Distance to wire (mm). The average distance of a dart point to the wire when a dart is placed exactly against a wire. This is used when calibrating the board settings.
Board rotation (radian). The current boardrotation in radians. When corrections from the client are processed, this value is changed according to the corrections.
Process corrections from client. Should corrections from the client be used as reinforcement learning data to adjust the sector specific calibration automatically.
The detection settings are used for determining where there is a dart in the image or when darts are extracted from the board. These settings are dependent on the used camera resolution. If the camera resolution is not default, these probably should be changed proportionally.
Minimal contour arc.The minimal contour arc in the image to be seen as a dart. (When the camera resolution has changed this probably also has to be adjusted).
Maximal contour arc. The maximal contour arc in the image to be seen as a dart. (When the camera resolution has changed this probably also has to be adjusted).
Minimal contour area. The minimal contour area in the image to be seen as a dart. (When the camera resolution has changed this probably also has to be adjusted).
Maximal contour area. The maximal contour area in the image to be seen as a dart. (When the camera resolution has changed this probably also has to be adjusted).
Minimal contour width. The minimal contour width in the image to be seen as a dart. Default 15. (When the camera resolution has changed this probably also has to be adjusted).
Maximal contour width. The maximal contour arc in the image to be seen as a dart. (When the camera resolution has changed this probably also has to be adjusted).
Grab loop delay slowmode. Delay in ms waiting for the first dart.
Grab loop delay fastmode. Delay in ms when waiting for more darts.
Detection loop delay. General detection loop delay.
Pre detection delay. Waiting time after the first contour of a dart is detected.
Post detection delay. Waiting time after a dart is detected to get a stable image for the next dart.
Removal detection delay. Waiting time before processing after removal is detected.
Ray intersections range (mm). The maximum distance to a cluster of ray intersections that is seen as one cluster.
Stable Background (ms). The number of milliseconds before an object or distortion is added to the background image.
Max parallel cams. The maximum number of parallel threads processing the streams from the camera.
The System...Calibration menu gives the option to disable calibration steps in the wizard if they don't give the right results. You should set the values manually then.
Calibrate Camera Rotation. Finds the 'Rotation' value of the "Cameras - Specific" configuration screen.
Calibrate Camera ROI. Finds the 'ROI Height' value of the "Cameras - Specific" configuration screen.
Calibrate Camera Center. Finds the 'Surface Center' value of the "Cameras - Specific" configuration screen
The System...Testmenu gives the option to generate the events the dartstracker generates manually for testing API interfaces.
Removal Start. Generates the removal start event.
Removal End. Generates the removal end event.
Detected throw. Generates a random detected throw event.
Refresh Log. Refreshes the log shown on the page.
To use the dartstracker in custom builds for commercial purposes and unlock the API for integration in third party client applications a license is required. A license per dartstracker can be acquired in the webshop.
In the general screen some camera configuration parameters are configured that count for all the configured camera's.
Camera 1-4. A dropdown from which the camera's to use by the system can be selected. The defaults are 0,2,4 and 6.
Enabled 1-4. Enable/Disbable the camera for processing.
Resolution width/height
The resolution of the videostreams used by all camera's specified in pixels. The default is 1280 x 720 pixels. A higher resolution tends to stress the RPI too much, so be cautious using higher resolutions.
Processing zoomfactor
If running the camera's on a high resolution this factor is used to reduce the image size with the given factor to reduce the image processing load. The system is tuned for processing images of 1280 width. So make sure the horizontal camresolution * zoomfactor = 1280.
FOV Angle - Horizontal Field Of View
The horizontal field of view of the camera's as defined by the manufacturer specified in degrees. The default camera's have a FOV of about 65.5 degrees.
This screen shows a live view of the camera, which can be used to align the camera with the side of the board. Some settings are for the specified camera only, a few are shared with the other camera's.
Flip Vertical. Flip the image 180 degrees. In case the camera is upside down.
Setup Sector. The sector where the camera is placed.
Sector Offset. If there was a construction error so the camera is not exactly in the middle of the sector, or the build just has a default offset, you can specify it here. Use values ranging from -9.0 to 9.0 degrees.
Distance. The distance of the front of the camera to the bull. Mind that although it is specified in cm it is very important to specify this in 1 decimal behind the comma. (So in mm).
Rotation. The rotation of the camera relative to the dartboard in degrees. To manually change this field disable the 'Calibrate Rotation' step in Calibration Settings.
ROI Height. The height of the ROI. To manually change this field disable the 'Calibrate ROI' step in Calibration Settings.
Board Surface. The Y value of the box for checking darts it should be equal to the edge of the board. (Where the darts enter the board). To manually change this field disable the 'Calibrate Board Surface' step in Calibration Settings.
Surface center. The horizontal position of the bull's eye on the Surface vertical position line. This field is disabled for manual configuration if it's part of the calibration wizard steps. To manually change this field disable the 'Calibrate Center' step in Calibration Settings.
If your using cameras with fisheye lenses or other cameras with lens distortion you need to find the camera calibration parameters first. With a camera calibration tool you can find these parameters and then enter them manually in this screen or upload a file that contains them. A calibration tool and a description of the calibration routine can be found here.
Enabled. Enable distortion correction for this camera. Default enabled.
1-1 .... 3-3: The intrinsic camera calibration matrix
K1,K2,P1,P2, K3: Lens distortion parameters.
Upload: Upload a calibration file in the following format =>
{
"CameraParameters": {
"name": "Camera",
"id": 0,
"type": 0,
"resolution": {
"width": 1280,
"height": 720
},
"intrinsic": [
1027.5303955078125,
0.0,
685.58251953125,
0.0,
1027.0186767578125,
385.26263427734375,
0.0,
0.0,
1.0
],
"distortion": [
-0.5185481905937195,
0.32503053545951843,
0.0025660181418061256,
0.0016927189426496625,
-0.1125984713435173
]}
}
In this tab the camera settings can be changed. Usually it's used for changing color settings, but if your camera has other specific settings these can be changed here probably too.
Clicking the "Show Current Setting" button shows a dialog with the current v4l2 information for this camera. The camera defaults can also be found here if you want to change the settings back to default.
Current Camera Settings
These settings adjust some values for postprocessing the image before it goes through the detection loop.
Smooth gaussian value. Blurs the image so the most prominent contours stay visible. Default value is 7.
Close Iterations. Morphological operation used for removing gaps in contours. (For example the grip structures on the dart shaft). The value specifies the nr of iterations. Default is 1.
Open Iterations. Morphological operation used for removing small particles of dust from the image. Default is 2.
ROI Threshold. The threshold level at which the dart is separated from the background. Default value is about 23.
This screen shows the live camera feeds of the configured camera's and the detected position of 1 dart on the board. Mind this is a memory heavy process. If the ROI's of the cameras are not completely black when no dart is in the board. Press the 'Calibrate Background' button to reset it.
The detection screen shows information about the default runmode of the system. It shows a log of the last events and also the resulting images it was based on. A gray line is drawn through the last detected darts. Mind that this page refreshes every second and doesn't reflect the true speed of darts detecting, which is much faster communicated via bluetooth.