% Minkowski summation temporal pooling method
% omtp = temppool_minkowski(om, p)
% om vector of objective metric scores for each frame
% p Minkowski exponent
% High values of p emphasize the influence of the highest frame scores on
% overall quality. For VQM, MSE ans sqrtMSE this means that the most
% distorted frames have the highest influence.
function omtp = temppool_minkowski(om, p)
    if ~isvector(om)
        error('Input om must be a vector')
    end
    if ~isscalar(p) || p <= 0
        error('Input p must be a positive scalar')
    end
    [a,b] = size(om);
    if a > b
        om = om';
    end
    omtp = nthroot(1/length(om)*sum(om.^p), p);