Slight Overkill Part Two, Plus AI

Background Removal

Right, further refinement to my thought process has come up with the following idea:

Forget using HashMap<Point, Integer> – since every pixel will need to be stored, it makes more sense to use a pre-dimensioned 2D int array, ie. new int[352][288].

The code for creating the backgroundPixelsArray will be roughly as follows:

    for (int y = 0; y < height; y++){
        for (int x = 0; x < width; x++){
            if (backgroundPixelsArray[x][y] != null){
                backgroundPixelsArray[x][y] =
                NumberUtils.doubleToInt(((double)backgroundPixelsArray[x][y] +
                (double)bitmap.getPixel(x,y)) / 2);
            else {
                backgroundPixelsArray[x][y] = bitmap.getPixel(x,y);

And the code for actually removing the background will be something similar to:

    for (int y = 0; y < bitmap.getHeight(); y++){
        for (int x = 0; x < bitmap.getWidth(); x++){
            int pixelInt = bitmap.getPixel(x, y);
            if (closeEnoughMatch(pixelInt, backgroundPixelsArray[x][y])){
                bitmap.setPixel(x, y, zeroAlpha);


AI Stuff

Right, quick one. Here’s a basic diagram of how we will initially pick the target move to base the aiHashMap on:


I thought I’d make it nice and blurry for you. This second image is a basic overview of the new AI-integrated logic that needs to be applied during automated selection of moves:


Even more illegible! Awesome!

Anyway, just understand that I’ve got it all mapped out now, so only an unprecedented disaster – or the continued exposure of my Android ignorance – can prevent the finished implementation of AI v1.0 being rolled out real soon.


Image Sequences

It’s all booked and confirmed, the 16th and 23rd March (a week apart, giving ample time to rest and get all the clothes etc. washed), I’ll be tentatively venturing back into Birkenhead to get these damn images done at last.

I’m 90% excited, 10% worried about the whole thing.

It’ll be alright on the night.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s