Skip to content

YellowFive5/OneHundredAndEighty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Contents

OneHundredAndEighty

  • [Archived], not deleted bacause of history =)
  • Manual darts score calculator with some cool stuff... (old project)

OneHundredAndEightyCore

  • All-in-one steel tip darts desktop app
  • Version 2.3 released
  • Main community, united this idea is here
  • ❗ Applies to automatic throw detection with [DartboardRecognition]
    • Please keep in mind, that all of this stuff is under heavy development now. Problems of performance and optimization stays not on first place for me now. So I can't guarantee perfect work of this stuff on your "piece of sh*t" notebook. On my system (4.2 Ghz, 6 cores, 16RAM) all works correctly

2020-09-06 09_42_55-OneHundredAndEighty

2020-06-07 10_43_46-

2020-09-06 09_45_22-

Release notes:

timeline ↓

  • Automatic throw detection using [DartboardRecognition]
  • Database storage
  • Single player free-throws/free-points game type
  • Double players free-throws/free-points game type
  • Single player free-throws/write off points game type
  • Double players free-throws/write off points game type

✅ [v.2.0 Release]

  • Database version check with maigrating to new versions
  • Some telemetry write
  • Full quick start guide

✅ [v.2.1 Release]

  • Classic game type
  • Runtime crossing debug mode
  • Resizable windows with position save
  • Cams checker

✅ [v.2.2 Release]

  • Big technical and architecture improvements of code
  • UI prettify
  • Throw manual correction
  • Throw undo

✅ [v.2.3 Release]

  • Player statistics browse
  • Players statistics comparison
  • Players lobby (web api)
  • ...

⭕ [v.2.4 Release]

  • Unsorted todo's:
  • CamCalibrator itegration
  • Player update / delete
  • Game pause / resume
  • Match information window
  • Sounds
  • Darts extraction process improve
  • Around the clock game type
  • Shanghai game type
  • Cricket game type
  • Killer game type
  • Training game types
  • Classic with more than 2 players game type
  • Leaderboards by statistic items
  • Player achieves
  • Detection performance improve
  • Detection accuracy improve
  • ...

P.S. - If you like this stuff and if you want you can donate me for some beer 🍻 (click 💜"Sponsor" button in the top of a page)

Quick start guide 🎯

1. General advices:

If you decided to build and run this stuff - you need some required things:

  1. Classic dartboard

  2. PC

    Please keep in mind, that all of this stuff is still under heavy development now. Problems of performance and optimization stays not on first place for me now. So, I can't guarantee perfect work of this stuff on your "piece of sh*t" notebook. On my system (4.2 Ghz, 6 cores, 16RAM) all works correctly

  3. Cams cams

You need 4 cams with same model. (In theory you can use only 2 or 3 cameras, but detection quality will be worse in nearly-sticked darts situations) Recommended resolution of cameras is 1280x720.

"What the best cams?" It is opened question. I'm not tried anything instead of OV2710 modules (2MP 1080P HD, 85 HFOW, distortionless). Many of people says that Logitech C920 is the best choice (you bet, with its price...)

  1. Lights

    I use 5 meters of 12V cold-light LED-strip. Enough for 2 rounds inside of cabinet.

  2. Usb hubs, extension cables

    I use x2 5 meters usb extension cables and x2 quad usb hubs without external power.

  3. Some materials and instruments

Cams setup scheme

Classic positions for cams setup:

Скриншот 2019-11-09 13 14 59

Cams connection scheme

Untitled Diagram

Notice, that it can be situation, when all your connected cams will not be work together at same time. It happens because there are not enough power in 1 PC usb port for working 2+ cams at same time. You can see all 4 cams connected via Control Panel but they don't work under load simultaneously. To check this situation go to Setup tab, check cams, and hit 'Check' button

2020-09-06 09_58_42-OneHundredAndEighty

When ERROR prints - you need to reconnect cams different way.

CamCalibrator is simple project to presetup camera when you fix it on stand. The idea is to stick dart into bull and run calibrator. You need to set camera like next screenshot. Blue line goes through dart, red line lies on dartboard surface. Then you fix camera tightly. Setup all your cameras this way.

Скриншот 2019-11-09 18 38 545

2. Some things to DIY:

You are free to choose materials and instruments to build necessary darts cabinet. So, I just post my photos and I hope you will understand concept and idea.

2020-04-11 21_03_09-Clipboard

IMG_2256

IMG_2258

IMG_2259

3. App setup

Now, when you build cabinet, you can setup remaining things in main app.

General Setup tab values:

  • Cameras HFOV - Horizontal field of view of your cameras [default is 85].
  • Cam resolution width - [default is 1028]
  • Cam resolution height - [default is 720]
  • Move detected sleep time - delay in seconds after moves on cam detected. Need to wait until dart fully sticks in dartboard after flight. [default is 0.25]
  • Threshold sleep time - delay in seconds after all cams working circle. [default is 0.25]
  • Extraction sleep time - delay in seconds to stop detection process, when you extract darts from dartboard. [default is 4]
  • Smooth gaussian value - value to smooth images in process of work. Not need to change it. [default is 5]
  • Minimal contour arc - value, with the help of which system search dart contour after throw detected. [default is 105]
  • Maximal contour arc - value, with the help of which system search dart contour after throw detected. [default is 265]
  • Minimal contour area - value, with the help of which system search dart contour after throw detected. [default is 336]
  • Maximal contour area - value, with the help of which system search dart contour after throw detected. [default is 3300]
  • Minimal contour width - value, with the help of which system search dart contour after throw detected. [default is 8]
  • Maximal contour width - value, with the help of which system search dart contour after throw detected. [default is 44]

Most of this values you don’t need to change, but if you want you can experiment.

Cams setup

2020-09-06 09_51_26-

  1. Set general values, (or leave dafault values )
  2. Set cams ID's (use 'Find cams' button to find cam ID)

2020-09-06 09_59_31-OneHundredAndEighty

Keep in mind one thing - when you plug off cams and plug it again, but in another usb - ID of cam will change. So, try to connect cams one way to not change setups every time.

  1. Set cams setup sectors (9-5-1-4 is classics)

91749790_2282946622009939_7528721286386679808_o

  1. Set distance to cams in cm.
  2. Click "Calibrate" button - X/Y will be calculated

Go to each cams tab

2020-09-06 10_02_03-OneHundredAndEighty

  1. Stick one dart in bull.
  2. Click "Start"
  3. Setup using sliders all like on image above. Red line surface, Center point, ROI region, Threshold. Also dont set ROI region close to surface. Use this image as ethalon.
  4. Click "Stop"
  5. Go to next cam
  6. Setup all cams this way

Then go to any cam tab. Click "Start". Stick dart into "Max point" and write down Arc/Area/Width values. Then stick dart into "Min point" and write down values.

1

This values you need to enter on main setup tab

2020-09-06 10_05_40-

Runtime crossing mode

This mode can help you to check and fix all setups you have done. You can check detection process with all of cams, or combination of some (at least 2) Check necessary cams and detection checkbox.

2020-09-06 10_38_27-OneHundredAndEighty

With manual sticking dart in dartboard you can see how detection works and check accuracy of your setups.

4. Database.db

All setup values and all information about player, game or each throw stores in database.

Database migration to new app version

Version of database must be same that version of app. In app development process it's clear that new versions of app releases sometimes. So, I add possibility for you to use your first database with all your collected information in new versions of app. When new version of app releases - copy your old version Database.db to new app folder with replace and run new version of app. App will offer you to migrate your database to new version. After that you can use new version of app with your old (now fresh) database.

5. Detection working process

...

  1. Cams taking pictures one by one and compare this image with previous taken images to find difference
  2. You throw next dart
  3. Dart flight captured by one of cams
  4. System calculates enough difference and understand, that dart-move detected
  5. Some delay for dart to fully sticks in dartboard
  6. Taking pictures from all 4 cams
  7. Calculating pictures difference with previous pictures with previous dart
  8. Finding new dart contour on each of 4 images
  9. Choosing 2 best dart contours
  10. Calculating point of impact on projection with line intersections
  11. Calculating and return throw data
  12. repeat

...

process

About

All-in-one steel tip darts desktop app with some cool stuff

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages