Hangul syllable composition is systematic enough that you could have just used some thresholding and flood fill instead. There are only 9 distinct layouts [1] possible after all, all of which can be determined via a simple decision tree, so you collect syllables for each layout and determine the optimal horizontal or vertical line to split them. That alone wouldn't fully segment, say, 고 where a bounding box for ㄱ typically overlaps with that for ㅗ, but you can then assume that no path doesn't belong to multiple segments (which is true for most non-novelty fonts). You can also add more branches to your decision tree if your font is too atypical to be cleanly segmented.<p>[1] <a href="https://en.wikipedia.org/wiki/Hangul#Letter_placement_within_a_block" rel="nofollow">https://en.wikipedia.org/wiki/Hangul#Letter_placement_within...</a>