| |
BGonline.org Forums
A few thoughts and ideas I had over the past couple years
Posted By: Michael Petch In Response To: Camera App--It's happening -- I'm doing it with my partner (phil simborg)
Date: Tuesday, 28 July 2015, at 12:25 a.m.
I guess my issue with this would be the flow of the game being interrupted. I might take a different approach. To prototype a system I could go and buy some low powered hardware like this single board computer. This is just a stock little device with wifi, a couple USB ports and takes an SD card. Buy any Linux compatible USB camera (there are a lot out there) and external USB flash.
The external USB flash could be used (if big enough) to capture an entire match for later video playback if need be.
Using Linux I would turn this little device into a private Wifi router with a web server and would act as a DHCP server so that anyone connecting a device to it will get an automatic IP address(Like a tablet, phone, etc). It would then use iptables(or something similar) to redirect all web traffic to the internal web server. This has the effect that anyone who connect to this device will have their webbrowser go to the internal web server.
The webserver could have authorization to allow people in. Once logged in a tablet, smartphone, any other wifi connectable device can be used to control the "application"(server software). The web interface could use HTML5, ecmascript, websockets etc. Ultimately the webbrowser ishow you control the server with the camera on it.
I guess if you are trying simplify recording a match you might have a simple interface that works well with smartphones and touch screen that allows a user to:
1) setup match parameters (Starting position - nackgammon, hypergammon, regular); the number of points the game is to; the starting score; whether it is a money session or not etc. 2) Allow user to tap a button to captures the current state of the table(from the overhead camera). On the back end you write a piece of software on the Linux device that screen grabs the current frame from the camera feed and then uses something like OpenCV to analyse the frame for dice/doubling cube, position of the checkers. You could display a screen capture right into the webbrowser of the smarthphone/tablet. If it can't make something out you could screen grab it again and/or allow the user to fill in the pieces that can't be identified automatically. 3) Allow the user to denote the end of a game/match etc with a button. 4) Allow for illegal moves (or not)
If you can maintain current game state as you go along you should be able to create a MAT file (or an XG file if you are so inclined) with all the moves in it at the end, and have a large video file. You could save all the individual screen captures too and their time stamp so it can be correlated with the raw video.
The idea here is that some software on a Linux server, a webbrowser on a smartphone/tablet, and screen grab/analysis software (need to be developed) for the server could allow someone to use many off the shelf components to help record matches.
Of course this isn't the same thing as analyzing a raw feed automatically and having the computer figure it all out (without error) by itself. But it doesn't appear Phil's solution will be doing that either (at least not right away).
The question is what problems are we trying to solve?
a) Create a completely automated system that takes raw video and automatically converts it to a XG file (or a MAT file etc) b) create a device that doesn't require a full laptop, but is able to help record a match without a lot of grueling monkey work later on with minimal impact on the flow of the game c) create a device that requires a change in the flow of the game to facilitate similar automation as "b" d) Play the game on a tablet or PC with your favorite bot software.
I think "a" is the future and what would be ideal. I think "b" is probably a more realistic stepping stone. The problem with "c" IMHO at least in the short term is that it might not be easily adoptable because it requires the flow of the game to be altered. "d" just saves a lot of hassle (obviously)
Please note that you could use an off the shelf device but once you know what you need you could go out and source a system on a chip with required peripheral chips (wifi/usb/memory etc), and design a circuit board and enclosure to fit it all into and then have the schematics sent out to a company to manufacture it.
| |
BGonline.org Forums is maintained by Stick with WebBBS 5.12.