clear all;
image = uint8(zeros([300 300]));
imsize=size(image);
noOfGauss=10;
maxAmpGauss=160;
stdMax=15;
stdMin=3;
for i=1:noOfGauss
posn(:,:,i)=[ uint8(imsize(1)*rand()) uint8(imsize(2)*rand()) ];
std(i)=stdMin+uint8((stdMax-stdMin)*rand());
amp(i)= uint8(rand()* maxAmpGauss);
end
% draw the gaussians on blank image
for i=1:noOfGauss
[x,y] = ndgrid(1:imsize(1), 1:imsize(2));
xc = posn(1,1,i);
yc = posn(1,2,i);
gauss = amp(i)* exp(-((x-xc).^2 + (y-yc).^2)./(2*std(i)));
image = image + gauss;
end