I need to calculate the normalized colour histigram (in HSV colourspace) of an image. Using histcn in Matlab with 8 bins for Hue and 4 bins for each of Saturation and Value I get a 8x4x4 histogram. How could I normalize it?
Yes, @ASantosRibeiro is right, you just need to divide by number of elements like
HSV_hist ./ length(InitialData);
or
HSV_hist ./ sum(HSV_hist(:)); % To count the number of element use to create your hist.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.