/* Internal methods */
    private void renderTexture(ColourUtility.RGBColour[,] rgbPixelMap)
    {
        int width = rgbPixelMap.GetLength (0);
        int height = rgbPixelMap.GetLength (1);

        Texture2D texture = new Texture2D (width, height);

        for (int x = 0; x < width; x++) {
            for (int y = 0; y < height; y++) {
                ColourUtility.RGBColour pixelColour = rgbPixelMap[x, y];
                texture.SetPixel(x, y, new Color(pixelColour.red, pixelColour.green, pixelColour.blue, 1));
            }
        }

        Rect backgroundSize = backgroundImage.pixelInset;
        backgroundSize.width = width;
        backgroundSize.height = height;
        backgroundImage.pixelInset = backgroundSize;
        //apply the texture to the background
        texture.Apply();
        backgroundImage.texture = texture;
    }