public static int[] objectRecognition(int[][] image) {
        int[] objects = {0, 0, 0, 0, 0, 0};
        for (int x = 0; x < image.length; x++) {
            for (int y = 0; y < image[x].length; y++) {
                if (image[x][y] == 0) {
                    objects[0]++;
                } else if (image[x][y] == 1) {
                    objects[1]++;
                } else if (image[x][y] == 2) {
                    objects[2]++;
                } else if (image[x][y] == 3) {
                    objects[3]++;
                } else if (image[x][y] == 4) {
                    objects[4]++;
                } else if (image[x][y] == 5) {
                    objects[5]++;
                }
            }
        }

        return objects;
    }