Optimization – Combining Object Tracking With Colour Tracking

At the moment the colour tracker is coming on, however to further optimize the engine I will be looking into object tracking as well. This will allow the engine to scan priority areas first. Although this will slow down the engine in general it will speed up the processing of where the balls actually are. I have recently done some tests with both engines and believe that combining them will give me a visually faster and therefore more accurate tracker.

More



Code + Time + More Code + Lots More Time = This!

I have finally got to a point where I have a reasonable tracking system. It’s good but not amazing, when you take away the video it runs at a smooth 90 FPS even on my laptop. It features tweener to handle position updates smoothly and also Chunker to multi-thread my functions. You can now track as many points as your CPU can manage all at the same time. At the moment is tracking a single colour out of sixteen million, so if the demo seems a bit laggy it is because the same precise colour has not been detected. Next I have to find an efficient way of adding a tolerance to the set colours.
A demo is below but if you want to change any of the settings you will have to grab the swf file. Just to the right of the default scene view is some settings you can change to play with. I have also made the FLA source file very easy to understand and have commented most lines of code. At the top of the action script there is a ‘Setup’ section will default values, these cover anything that you would like to change.

[Hit The More Link For The Demo]

More



90 FPS Should Do It!

My previous version of colour tracking in AS3 worked but was very slow at drawing my video data. So with some optimization, multi-threading and a high frame rate camera I am now getting processing at 90fps. The screen recording software dragged it down to 80 fps but as the video shows still a great outcome. I altered the cameras internal post-processing settings to show just high saturated colours to get better tracking. At the moment the program only tracks a single Hex value that is defined by clicking on a colour you wish to set. I will be looking into different methods of taking a tolerance from my colour to allow it to track faster when in a controlled environment.

[Hit The More Button For A Demo Video]

More



Video to Bitmap Data

Today I successfully captured my webcam onto a BitmapData object. What does this mean? Well it means that I can periodically read the colour of each pixel my camera outputs and therefor I can draw the values and also scan them against preset values. At the moment it is rather slow however I know that it is not anywhere as near optimized as it could be.

[Hit The More Link For A Demo - Requires Webcam]

More



Research – Tracking Colour In AS3!

During my research process I decided that the table will support up to four players in games. I also decided that solid colour balls would be more easily tracked and therefor tracked faster. I will use a red, yellow black and white ball in four player games. I am looking into different exsisting methods of tracking colours in Action Script 3.

One such method is shown above and can be found on Chris Tesos’ blog. This works by capturing the camera data to a BitmapData class. When you click it defines the current hex value of the pixel you have clicked and saves it as a variable. Every frame the program searches for that hex value in the BitmapData object. This is a very efficient way of tracking and I will continue to research this more. The environment will be controllable in the interactive pool table, for instance there will only be one object that is of a red colour ect. Due to this I can increase the tolerance of tracking my colours which will allow me to track the ball with much better consistency than in the demo shown here.

More



Project Planning & Managment Session

I went to Bath Universities Innovation Center today to go see Stephen Davies, for a Project Planning workshop, and I must say it was excellent. We focused on methods and documents to not only help you reduced down the time of your project but to also avoid any problems. I am now arranging to see him one to one to focus on the fundamentals of my pool table project.

More



So How Am I Going To Mount The Projector?

The original plan to mount the projector during development was to build a frame that I could take in and out of the room. However due to its height requirement being at least 285cm and a frame is going to be signifigantly annoying putting up, pulling down and getting in the way! So this doesn’t seem like the most practical solution.

So what do I do about it?
I have come up with a solution which involves mounting the projector to the roof with a special bracket! I have submitted the proposal to the head of school and am awaiting approval!

[Find The Proposal Document Here]

More



My Project!

Today I took detailed measurments of the Pool Table and then created a to scale top view render of the pool table. This allows me to accuratly check for any projection distortions and also work out exactly how far above the pool table the projector will have to be. I am using the InFocus XS-1 projector as it has a very short throw allowing me to project from just 185cm above the pool table to cover the full surface area including boarders.

[Pictures of The Scale Model And Set-Up After The More Link]

More



Well The Students Seem To Love It!

Today I collected the pool table from a little unknown village up near Birmingham called Bromyard. I rented a van and with the help of my good friends James and Charles we had a little road trip to get this beautiful slate bed pool table which is now featured in our refractory at the Bath Spa Universitys sion hill campus. The table I am using is 7×4 ft and has a 1 inch slate. The table cost me £250 and came with the pool balls, I had to buy the cues separately but were not expensive. The cloth is green and best of all the table is free to use by anyone!

[More Pictures After The Break]

More



Concept Art!

Everyone love concept art. The package that I will be developing will come as a replacement lighting kit. The kit will consist of two lights and a projector and tracking system. Here are a few renders I designed in Google Sketch Up demonstraiting how the system will look.

More



Older