Ask Your Question

Revision history [back]

The toughest question in image processing

HELLO

I have a problem regarding contouring

image description

A sample test image, as shown in Figure 1, is a treasure map, represented by a 5*5 grid, containing gold mines separated by black lines. However, as shown in figure, some of the black lines are missing.

The cells are numbered 1 to 25 as shown in Figure 2.

Figure 3 represents the same test image being numbered as per Figure 2. We will be using the numbering convention shown in Figure 3 for all the test images.

Each cell in the grid surrounded by black lines on all four sides is considered as one mine.

For example, cells 3, 4, 5, etc are considered as one mine each.

If black lines are missing between two or more cells, they should be considered as one mine.

For example, cells 8, 9, 10, 15 and 20 are considered as one mine. This mine is represented as: [8, 9, 10, 15, 20].  Note that the cells are arranged in ascending order. 

Problem Statement: For each image you need to answer the following:

o Mines containing gold coins

Mines containing bombs and o

Mine/s containing maximum number of gold coins and NO BOMB S

For all the above three answers, the output needs to be arranged in ascending order: o For example, consider the mines [8, 9, 10, 15, 20], [1, 6] and [5]. U need to consider the cells “8”, “1” and “5” for arranging the mines in ascending order. o The final arrangement will be [1, 6], [5] and [8, 9, 10, 15, 20]. Example: If the above test image (Figure 1) is given as input, the output should be:

Mines containing gold coins:
[[1,6],[2,7],[4],[5],[8,9,10,15,20],[11,12,16],[13],[17],[18],[19],[21],[22,23],[24],[25]]
Mines containing bombs:
[[1,6],[8,9,10,15,20],[11,12,16],[18],[22,23],[25]]
Mine/s containing maximum number of gold coins and NO BOMBS:
[[2,7],[4],[13]]

If anyone knows it plz answer

The toughest question in image processing

HELLO

I have a problem regarding contouring

image description

A sample test image, as shown in Figure 1, is a treasure map, represented by a 5*5 grid, containing gold mines separated by black lines. However, as shown in figure, some of the black lines are missing.

The cells are numbered 1 to 25 as shown in Figure 2.

Figure 3 represents the same test image being numbered as per Figure 2. We will be using the numbering convention shown in Figure 3 for all the test images.

Each cell in the grid surrounded by black lines on all four sides is considered as one mine.

For example, cells 3, 4, 5, etc are considered as one mine each.

If black lines are missing between two or more cells, they should be considered as one mine.

For example, cells 8, 9, 10, 15 and 20 are considered as one mine. This mine is represented as: [8, 9, 10, 15, 20].  Note that the cells are arranged in ascending order. 

Problem Statement: For each image you need to answer the following:

o Mines containing gold coins

Mines containing bombs and o

Mine/s containing maximum number of gold coins and NO BOMB S

For all the above three answers, the output needs to be arranged in ascending order: o For example, consider the mines [8, 9, 10, 15, 20], [1, 6] and [5]. U need to consider the cells “8”, “1” and “5” for arranging the mines in ascending order. o The final arrangement will be [1, 6], [5] and [8, 9, 10, 15, 20]. Example: If the above test image (Figure 1) is given as input, the output should be:

Mines containing gold coins:
[[1,6],[2,7],[4],[5],[8,9,10,15,20],[11,12,16],[13],[17],[18],[19],[21],[22,23],[24],[25]]
Mines containing bombs:
[[1,6],[8,9,10,15,20],[11,12,16],[18],[22,23],[25]]
Mine/s containing maximum number of gold coins and NO BOMBS:
[[2,7],[4],[13]]

If anyone knows it plz answer