Example image:

I would like rows with less than roughly-5% of black pixels to be whited-out. My end goal is to trim to the first row that has a greater percentage of black pixels. Ideas? Thanks much!
Windows version - ImageMagick-7.0.1-6-portable-Q16-x64. Currently doing all my testing through a batch file.
(also curious about the same thing for columns of pixels - may help separate characters with handwriting on top)