Recover your problem so you don't need segmentation.
Indeed, for this scale, I think you are better off investing in other approaches. For example, if you recognize text (you?), You can use line information (character height). There are not many fonts that can be used for small (but readable) characters. My approach is an algorithm that scans lines in scan lines (from left to right, takes pixels from top to bottom) and tries to find correlations between trained text and scan points (n, n-1 ... nx)
And you probably need the information that I also get in shades of gray, so it's better not to create threshold values.
Robau
source share