function hods = computeHOD(x, y, z, config)
% return nLevels X nBins hod for one joint
    nLevels = config.nLevels;
    nBins = config.nBins;
    
    nParts = (2 ^ nLevels) - 1;
    
    nProjections = 3;
    hods = zeros(nParts, nProjections * nBins);
    
    pInd = 1;
    for l = 1:nLevels
        nMats = 2 ^ (l - 1);
        timeFracPerMat = length(x) / nMats;
        step = timeFracPerMat;
        startFrameTimes = step * (0:(nMats-1));
        for i = 1:length(startFrameTimes)
            startTime = startFrameTimes(i) + 1;
            endTime = startFrameTimes(i) + timeFracPerMat;
            sliceInds = int32(startTime:endTime);
            hods(pInd, :) = hod(x(sliceInds), y(sliceInds), z(sliceInds), config);
            pInd = pInd + 1;
        end
    end
end

