I need to obtain something like is shown on these pictures:
I think it's relative to medial axis transform, but I need vertical or horizontal lines only. any suggestions?
Thinning should work, though in standard implementations it's hard to enforce desired directions (vertical or horizontal here).