Finding assosiated groups of pixels in an image
I am trying to segment an object and its shadow in an greyscale image. The objects are light colored blobs while the shadow has darker colour. The background is typically somewhere between but there can be some random outcrops of low are high intensity pixels that would not calssify as objects. For example we have an original image with 2 visible white patches of lighter pixels and a perfect result would be to end up with all objects segmented but also associated with each other so that red patch is and actual object, blue patch is its “shadow” and yellow colour shows that both are associated.