Gungnir Automatic Darts Scoring Instructions

Gungnir-LOGO

Gungnir Automatic Darts Scoring

Gungnir-Automatic-Darts-Scoring-PRODUCT

Specification

Specification Details
Product Name Gungnir Dartstracker
Product Type Automatic steel-tip darts scoring system
Accuracy 99.0–99.9%
Camera System 4 integrated cameras
Camera Placement Built into the surround; no external cameras protruding
Processing Local shot processing
Internet Required No
Wi-Fi Required for Scoring No
App Connection Bluetooth
Compatible App Gungnirdarts App
App Platforms Android and Windows
Game Types 501, 301, 1001, 170, Double In/Out, Cricket, Tactics, Shanghai, Round the Clock
Online Play Supported
Players / Teams Up to 8 teams, maximum 2 players per team
Statistics 3-dart average, first 6 average, highest checkout, scoring statistics
Checkout Suggestions Supported
Heatmaps / Hitmaps Supported
AI Opponents Supported
Score Correction One-touch intelligent score correction
Calibration Camera height, detection area, board and sector calibration
Modes Setup, Calibration, System, Configuration, Tracking, Detection
API Available with license
Default Camera Resolution 1280 × 720 pixels
Board Mounting Height Bull at 2.37 m
Reinforcement Learning Uses corrected scores to improve sector calibration

INSTRUCTION

General
The Gungnir Dartstracker is an automatic steeltip darts scoring system. After setup and calibration it will be able to detect darts in a range of 99.0 – 99.9% percent overall accuracy. Gungnir has 6 different modes: Setup, Calibration, System, Configuration, Tracking and Detection. The only mode which broadcasts detected throws is the Detection mode. It is also the default mode when the system is started.

Gungnir-Automatic-Darts-Scoring-FIG- (1)

Setup

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.

Gungnir-Automatic-Darts-Scoring-FIG- (2)

Calibration
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.

Gungnir-Automatic-Darts-Scoring-FIG- (3)

Complete. The complete calibration executes the camera height, detection area and board calibrations in order while resetting the values found by the Sector calibration.
Fast.

The fast calibration executes a special version of the detection area and center calibration to finetune the found calibrations with the regular calibration routines. It is meant to be executed after the dartstracker has been off for a while.

  • Camera Height. The camera height calibration checks if the position of the cameras relative to the board is ok.
  • Detection Area. The detection area calibration calibrates the settings in the camera specific pages. Like the ROI and board center. If for some reason these calibrations keep failing or give wrong results, the steps of this calibration can be enabled/disabled in the System…Calibration page. You can also configure these values manually for each camera. Board.The board calibration finds the default distances of the triples, doubles and singles for your board. The found values can be overridden per sector by the Sector calibration.
    Sector.
  • The sector calibration calibrates the distances of the triple, double and single for a specific sector. Due to lens distortion or other factors these settings can be of for specific sectors, causing wrong detections at the wire. The distances found by this calibration will overrule the default board settings found with the board calibration. When ‘Process corrections from client’ is enabled in the System..Detection page, these settings are automatically adjusted with every correction.

System – General 

  • 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.

Gungnir-Automatic-Darts-Scoring-FIG- (4)

  • 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.
  • Unlink. If one or more Gungnirdarts apps are linked to the dartstracker and the password to link/unlink is forgotten. You can use this button to reset the password and unlink all Apps.
  • Debug. Extra verbose logging, resets whenever system starts/stops.
  • 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.
  • Factory Reset. Removes the delta file making the original configuration that came on the sd-card the default again.

System – Network

  • 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).

Gungnir-Automatic-Darts-Scoring-FIG- (5)

Leave. Leave the current wifi network. Join. Join the wifi network.

System – Backup
This screen gives the options to download and upload configuration files for backup and restore purposes.

  • Upload. Upload a json formatted configuration file.
  • Download Current. Download the current configuration (including delta changes) in the form of a json formatted configuration file.
  • Download Delta. Download the current delta changes that are merged in memory with the default config when the system starts.
  • Merge Delta. MErge the delta changes into the default configuration, resulting in an empty delta file.
  • System – API
    To unlock the API for integration in third party client applications a license is required (see System – License). Contact support@gungnirdarts.com for more information. This screen defines the methods to retrieve the dartboard events.

System – Bluetooth

  • In this screen the devicename that is broadcasted through bluetooth is shown. The devicename is tied to the Raspberry Pi it’s running on. 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 Gungnirdarts 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 Gungnirdarts app connects to the first one available. The  ‘Scan’ option connects exactly to the dartstracker scanned with the QR-Code.

System – Board
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.
  • Show Calibration Values. Shows the calibration value for every sector. The screenshot is of an uncalibrated system, using default values.
  • System – Detection
    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.
  • Minimal number of cams for Removal Detection. Minimum nr of cams that require a removal contour before processed.
  • Minimal number of cams for Dart Detection. Minimum number of cams that require a dart contour, before processed.
  • System – Calibration
    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.Gungnir-Automatic-Darts-Scoring-FIG- (12)
  • Calibrate Camera Rotation (Method 1 or 2). Finds the ‘Rotation’ value of the “Cameras – Specific” configuration screen using 2 different methods.
  • 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
  • Board Dimensions Calibration Level. Choose how many sectors are used during Board calibration to calibrate the board.
  • Dart distance to wire. Default distance of the center of the dart point to the wire. Used to determine wire in calibration.
  • System – Test
    The System…Testmenu gives the option to generate the events the dartstracker generates manually for testing API interfaces.Gungnir-Automatic-Darts-Scoring-FIG- (13)
  • 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.
  • System – License
    To unlock the API for integration in third party client applications a license is required. Contact support@gungnirdarts.com for more information. Gungnir-Automatic-Darts-Scoring-FIG- (14)
  • Cameras – General
    In the general screen some camera configuration parameters are configured that count for all the configured camera’s. Gungnir-Automatic-Darts-Scoring-FIG- (15)
  • 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.
  • Target ROI height. Every ROI is stretched to this height, making darts in every roi equal sizes.
  • 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.
  • Focus Threshold
    The minimum value of the algorithm which determines if the camera view is out of focus. Below this value the camera is out of focus, equal or above the camera is in focus.
  • Cameras – Specific
    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.Gungnir-Automatic-Darts-Scoring-FIG- (16)
  • 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.
  • Below the image is shown if the camera is determined to be in or out of focus. The value 55 in this case is the value determined by the algorithm, the value 12 is the threshold value. This is set in the
  • Cameras..General settings.
  • Cameras – Distortion
    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.Gungnir-Automatic-Darts-Scoring-FIG- (17)
  • Enabled. Enable distortion correction for this camera. Default enabled.
    I-I 3-3: The intrinsic camera calibration matrix
    KI ,P2, 1<3: Lens distortion parameters.
    Upload: Upload a calibration file in the following format =>
    “Cameraparameters”: {
    “name”: “Camera”,
    ‘lid”: O,
    “type”: O,
    “resolution {
    “width”: 1280,
    “height”: 720
    “[I
    “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
  • Cameras – Color
    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.Gungnir-Automatic-Darts-Scoring-FIG- (18)
  • 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. Gungnir-Automatic-Darts-Scoring-FIG- (19)
  • Cameras – Post Process
    These settings adjust some values for postprocessing the image before it goes through the detection loop. Gungnir-Automatic-Darts-Scoring-FIG- (20)
  • 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.
  • ROI Diff Open Operations. Morphological operation used on diff image for removing small particles of dust from the image. Default is 1.

Tracking – Tracking
This screen shows the live camera feeds of the configured camera’s and the detected position of 1dart 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.

Gungnir-Automatic-Darts-Scoring-FIG- (21)

Detection – Detection 
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.

Gungnir-Automatic-Darts-Scoring-FIG- (22)

Documents / Resources

PDF thumbnailAutomatic Darts Scoring
Instructions · Automatic Darts Scoring, Darts Scoring, Scoring

References

Ask a Question

Use this section to ask about setup, compatibility, troubleshooting, or anything missing from this manual.

Ask a Question

Ask about setup, compatibility, troubleshooting, or anything missing from this manual. Name and email are optional.