1. A method for measuring a dimension of a device, the method including: receiving an image of a portion of the device, the image including lines of pixels, each pixel having a brightness level; receiving a first offset value associated with the image and a second offset value associated with the image; processing the image to define at least one graph of a line of pixels, the at least one graph including the brightness level of each pixel in a line of pixels; identifying a location of a first peak in the graph by scanning the at least one graph in a first direction; identifying a location of a second peak in the graph by scanning the at least one graph in a second direction opposite the first direction; defining a first exclusion area boundary as a function of the location of the first peak in the graph and the first offset value; defining a second exclusion area boundary as a function of the location of the second peak in the graph and the second offset value; setting the brightness level of the pixels between the first exclusion area boundary and the second exclusion area boundary to zero, so as to modify the image by creating a darkened exclusion area located between the first exclusion area boundary and the second exclusion area boundary; identifying a first portion of a feature of interest at least partially defined by the first peak and a second portion of the feature of interest at least partially defined by the second peak; finding a third peak in the graph, which is the highest peak in the graph, and is not the feature of interest; measuring a distance between the first portion of the feature of interest and the second portion of the feature of interest; and outputting the measured distance.