Instead of measuring the brightness of a pixel, measure the contrast between two pixels. Your graph will then have two peaks, and the distance between those peaks will be the width of the wire.

More specifically, instead of graphing Brightness(x), graph Abs(Brightness(x - c) - Brightness(x + c)). If nothing else, it might be easier to analyze.