I have following code to create histogram, but it gave wrong output. In the program input_vector read 100 double numbers. I want to create a histogram with bin size=5. Output is [0;0;0;0;0]. Can anybody help me to figure out the problem?
The problem comes from calcHist or your values (are you sure the vector is not empty ?).
Besides, this function should not even compile because its return type is vector<double> but you don't return anything.
Here is the solution:
Function prototype would be vector<double>three_dimensional_shape_retreival_Hough_Transform:: histogram_creation(vector<float> input_vector) instead of vector<double>three_dimensional_shape_retreival_Hough_Transform:: histogram_creation(vector<double> input_vector)