I am wondering if there's a simple way to obtain the adjacency matrix of the morphological components of a segmented image. Consider the following example (originally, from this question):
(*Import binary image*)
image = Import["https://i.stack.imgur.com/iab6u.png"];
(Obtain the distance transform)
disT = DistanceTransform[ColorNegate[image]];
(Visualize the watershed morphological components)
wComp = WatershedComponents[disT];
morphoComp = MorphologicalComponents[wComp];
imgMorphoC = Dilation[morphoComp // Colorize, 1];
ImageMultiply[imgMorphoC, ColorNegate[image]]
Is there a simple way to obtain the adjacency matrix of the resulting components? I suspect there's a way to transform morphoComp into an adjacency matrix, or a graph/network, but I'm not sure where to start. Any help would be appreciated.
Thanks!
Edit 1: I tried to simply do ComponentMeasurements[image, "Neighbors"], but it retrieves an empty list of neighbors. From the documentation it is unclear what is meant by "Neighbors", are these only touching components?
Edit 1.1: Doing ComponentMeasurements[MaxFilter[morphoComp, 1], "Neighbors"] works:
{1 -> {3, 4, 5, 7}, 2 -> {5, 6}, 3 -> {1, 7, 8}, 4 -> {1, 5, 6, 7, 8},
5 -> {1, 2, 4, 6}, 6 -> {2, 4, 5, 8, 9}, 7 -> {1, 3, 4, 8},
8 -> {3, 4, 6, 7}, 9 -> {6}}
Edit 2: Could this be done so that only neighbors up to a certain distance are considered adjacent? Say, that from the original morphological components, they are grown n number of pixels around their border (with Dilation[], for instance), and only these components coming in contact after this dilation would be considered neighbors.

ComponentMeasurements-> Application section -> last example. That might help. – Henrik Schumacher Dec 14 '20 at 12:30ComponentMeasurementsis because of the0's separating each component inmorphoComp. UseMaxFilter[morphoComp, 1]and it should work. – thorimur Mar 18 '21 at 00:06a = ComponentMeasurements[MaxFilter[morphoComp, 1], "Neighbors"]; SparseArray[Join @@ (Thread@*List @@@ a) -> 1]would construct the adjacency matrix, right? – Henrik Schumacher Mar 20 '21 at 10:12DistanceMatrix[ ComponentMeasurements[MaxFilter[morphoComp, 1], "Centroid"][[All, 2]]]? to select by criteria? little clunky though – Teabelly Mar 21 '21 at 19:02