compute the histogram representation as the final represenatation of
images