I have a morphological problem i am attempting to solve using OpenCV. I have two images.
- Mask
- Seed
In the mask image am trying to retain only the blobs marked by a seed image and to remove the rest.
Underneath I am posting the mask and seed image
Mask Image :
Seed Image :
To further illustrate a the problem I have zoomed into the image and created a subplot.
In this example the plot on your right is the seed image, the plot your left is the mask image. At the end of the operation I would like to have the elephant trunk shaped blob on the left as the result as it is marked by the seed coordinates(left).
Bit-wise operations will give me only overlapping regions between seed and mask (result is the same square shaped blob). One possible solution is to use opening by reconstruction, however OpenCV doesn't have an implementation of it.
OpenCV - Is there an implementation of marker based reconstruction in opencv
Any pointers are appreciated!