Q:

Getting the thickness of a contours

I have a program that uses findContours function and this is the result  that I get:

My question is: Is there any way to get the thickness of those bars without using the houghlines method? 

A:

You also can use cv::reduce method for summing up all nonzero pixels along rows, and the same for cols.  You'll get two histograms.  The max values will have coords of your lines.  
http://docs.opencv.org/modules/core/doc/operations_on_arrays.html#reduce
you need use it with flag CV_REDUCE_SUM or CV_REDUCE_AVG.