I did two methods: Method 1: invert binary image, start from left and go to right to find border and draw vertical line, from left edge move towards the right to find white/black border and draw other vertical line. Measure width between two vertical lines Method 2: invert binary image, crop image to middle to focus on band, start at top row and find black/white pixel border, then go across row to find right edge of border and measure width storing all values. Track each row and values, then display horizontal line on shortest width.