I have images like this:

where all objects are connected through a horizontal line. all the symbols have different widths so can't extract all shapes using a fixed width or splitting points like when we split an array.
In this image, there are 4 symbols but in some other cases it can be more or less than 4 so here also I can't perform something like "4 symbols so divide the input image width vertically into 4 different widths. so I don't know how to extract whatever symbols the image might have efficiently like this output I want
.
Can you guys help me with this?

to


Then, in order to find local min:
Finally if we consider a threshold (for example 50 filled pixel in columns):
Edit:
To split picture you need