Пример #1
0
        public IHistogram <byte> Merge(IHistogram <byte> other)
        {
            if (Normalized || other.Normalized)
            {
                throw new HistogramException("Normalized histogram can not be merged");
            }

            HueHisto h = new HueHisto();

            for (byte i = 0; i < Dimension; i++)
            {
                h[i] = hhisto[i] + other[i];
            }

            return(h);
        }
Пример #2
0
        public HueHisto GetCumHueHisto()
        {
            if (!Normalized)
            {
                this.Norm();
            }

            HueHisto h = new HueHisto();

            h[0] = hhisto[0];
            for (byte i = 1; i < Dimension; i++)
            {
                h[i] = h[(byte)(i - 1)] + hhisto[i];
            }

            return(h);
        }