One approach:
% Generate a grid of 0's to begin with.
m = zeros(300, 400, 'uint8');
% Generate 1000 random pixels.
numRandom = 9;
linearIndices = randi(numel(m), 1, numRandom);
% Assign a radius value of 1-5 for each pixel
m(linearIndices) = randi(5, [numel(linearIndices) 1]);
%%
buffer = false(size(m));
for radius =1:5 % update to actual range
im_r = m==radius;
se = strel('disk',radius);
im_rb = imfilter(im_r, double(se.getnhood()));
buffer = buffer | im_rb;
end
imshowpair(m,buffer,'montage');