[英]How to normalize a multidimensional histogram
I need to calculate the normalized colour histigram (in HSV colourspace) of an image. 我需要计算图像的归一化颜色直方图(在HSV色彩空间中)。 Using histcn in Matlab with 8 bins for Hue and 4 bins for each of Saturation and Value I get a 8x4x4 histogram.
在Matlab中使用histcn ,色相为8个bin,饱和度和值分别为4个bin,我得到一个8x4x4的直方图。 How could I normalize it?
我该如何规范它?
Yes, @ASantosRibeiro is right, you just need to divide by number of elements like 是的,@ ASantosRibeiro是正确的,您只需要除以诸如
HSV_hist ./ length(InitialData);
or 要么
HSV_hist ./ sum(HSV_hist(:)); % To count the number of element use to create your hist.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.