bottom middle, the long line should be removed even though it is a perpendicular.
What you really need is a medial axis (aka, skeleton of your shape in question. You use that polyline which would be between the other two lines, to shoot your perpendiculars from, one set towards the outer line and one set towards the inner.
In the first instance, you could approximate this from doing a Delaunay triangulation of the shape and connect the barycenters of the triangles to form the skeleton. Of course, the triangulation within the hole needs to be removes as do any triangles on the outer shell that have no left neighbors (those are part of the convex hull and can be removed.