First time here? Check out the FAQ!
answered 2012-07-14 15:56:51 -0600
Without checking your code I can suggest you to have a look at example codes of Learning OpenCV book here because it contains a hue-saturation backprojection example.