For a given array (as the one suggested below) and a given value (here, 0), I would like to count how many 0 can be associate at a same convex hull.
array :
1 2 4 5 8 9 7
4 0 0 7 5 6 8
6 5 0 4 3 5 2
1 0 0 5 7 0 6
2 3 5 7 8 9 4
For the array suggested, the solution should get : [5, 1] because a first "pattern" of five 0 can be identify between the second and fourth line and the second/third columns. A second pattern with only one 0 exist.
Have you any idea about how to get that ? I know how to count the number of 0. Maybe I can do something with the mask option of numpy array ?
Best regards and thank's for your help,