Ask Your Question

Revision history [back]

To measure the width of the bands, you probably should used a connected component approach. You segment your bands into components, easily with the neighborhood search of black pixels. You keep only the biggest (with a threshold), and you can use statistical operations, like sum, average, ellipse fitting (in OpenCV), mean,... or use directly these components to find width and height (min in X and Y and max in X and Y). Additionally you may have to performed morphological math on your image (erode, dilate, Open/Close) to have better results.