0

This is a graph theory problem (connected components in graph theory (Wikipedia)) and I'd like to apply it on the image processing problem.

Suppose we have a binary image which contains a set of (e.g., 100) regions (i.e., vertex). The target is to find out a set of clusters (subgraphs) of regions, where any pair of regions in the same cluster has the distance (counted by number of pixels ) less than a pre-defined value (e.g., 10 pixels).

Can you guys please have any idea on this?

Zhi Lu
  • 527
  • 5
  • 22
  • you have several issues here (1) given a binary image, how do you compute the distance between pairs of regions (2) given all pair-wise distances, how to cluster them. Can you focus your question: what issues *exactly* are you having? – Shai Oct 08 '15 at 06:22
  • Hi @Shai , thanks for your comments! (1) the "distance" here means the Euclidean distance which is counted by the number of pixels between the centroids of the two regions; (2) the "cluster" here does NOT mean the clustering in machine learning; instead, it means "a group of regions" here. Thanks! – Zhi Lu Oct 08 '15 at 06:30
  • It would be nice to see a sample image. At best, you might be able to use morphological closing, or something similar. At worst, the problem can be reduced to the [clique problem](https://en.wikipedia.org/wiki/Clique_problem), which is NP-complete. – beaker Oct 08 '15 at 15:24
  • Hi @beaker , thanks! I think my previous statement of problem is not clear. Could you please have a look at the new version of problem? Thanks! – Zhi Lu Oct 08 '15 at 23:29
  • Alright, let's try connected components. Say you have 3 vertices, `A, B, and C`. The pre-defined distance is 10. The distance from `A to B = 10`. The distance from `B to C = 10`. The distance from `A to C = 20`. Are all 3 of these vertices considered to be in the same component? – beaker Oct 08 '15 at 23:35
  • Hi @beaker , no. That will be formed 2 sub-graphs, because we need any pair of vertex in the same sub-graph has distance less than 10. So the possible output may be (A,B) and C, or another possible output A, (B,C). The non-stable result is also what I feel the problem is hard. – Zhi Lu Oct 09 '15 at 01:21
  • Which is why it's the clique problem and not simply connected components. – beaker Oct 09 '15 at 01:53

0 Answers0