I think the main problem is indeed how to distinguish a “proper” slit from an array of segments that happens to be arranged in a “slit-like” configuration, but are not a slit
I would define a general case by taking into account points (Pi, Pi+1, …), vectors (Va, Vb, Vc) and segments (Sa, Sb, Sc)
the first thing I would account is geometrical features
a slit is done of straight segments, so if amplitude of each Va, Vb, Vc is different from length of respective Sa, Sb, Sc, then that is not a slit
then I would account for angles, Va and -Vc must be parallel & Va and Vb must be perpendicular
last thing, depending if the point order of the boundary is clockwise or counterclockwise, I would expect the vectors to move a certain way, for instance in this case Va is a “left turn” from the previous vector on the boundary, then Vb is a right turn from Va, Vc is a right turn again from Vb, and then from Vc to go back to the original boundary left turn (if order of points is reversed, also lefts/rights are reversed, but still this is a pattern)
about lengths, slits are more deep than wide, so Length of Sa >> Length Sb
a big help would of course come if we know for sure the width of the slit, Length of Sb
I think this would cover most cases, but of course if you have very complex boundaries then it’s a nightmare anyway