% load a VMR vmr = xff('new:vmr'); % create a copy (does NOT YET double the allocated memory!) smoothed = vmr.CopyObject; % smooth VMRData smoothed.VMRData = uint8(floor(smoothdata3(double(vmr.VMRData), [2, 2, 2]))); % histogram of differences hist(vmr.VMRData(vmr.VMRData ~= 0) - smoothed(vmr.VMRData ~= 0), 100);