The toughest question in image processing [closed]

asked 2016-01-24 04:16:47 -0600

Vishal gravatar image

updated 2018-01-04 03:33:33 -0600

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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-12-08 18:17:20.141900

Comments

2

This seems a copy/paste of a school assignment... You don't even say what you've tried or what problems you've found in the way...

LorenaGdL gravatar imageLorenaGdL ( 2016-01-24 04:29:43 -0600 )edit

Ya i am sorry for the copy paste and ya i know it is assignment. Plz can anyone tell me what logic i should use to carry this out. Plz guys if i dont submit assignment it i might just fail

Vishal gravatar imageVishal ( 2016-01-24 04:33:43 -0600 )edit

I Dont require code just logic will do

Vishal gravatar imageVishal ( 2016-01-24 04:34:05 -0600 )edit

From the FAQ: the following types of questions are not allowed on this forum: 2. Questions about your homework and school projects

LorenaGdL gravatar imageLorenaGdL ( 2016-01-24 06:30:55 -0600 )edit

It is allowed if you at least post some trial code and want an explanation of your errors. But we will not get the grades for you ....

StevenPuttemans gravatar imageStevenPuttemans ( 2016-01-24 08:28:07 -0600 )edit
3

@Vishal, so, you had somewhat of a bad start here, it can only get better.

to make it more interesting for folks here to help you:

  • show, what you already tried to solve it
  • start a discussion, on how to solve the details(find mines and whatnot) and the concepts behind that
berak gravatar imageberak ( 2016-01-24 09:46:20 -0600 )edit