So I am trying to simulate some random circles on an image.
I am creating a white background of the appropriate resolution by:
xres = 2304;
yres = 3456;
img = ones(xres,yres);
Then generating a bunch of random circles using a custom function by:
randomDiam = lognrnd(mu,sigma,nBubbles);
randomX = yres*rand(nBubbles,1);
randomY = xres*rand(nBubbles,1);
for ii = 1:nBubbles
My generateCircle function simply uses plot to plot the cricles:
theta = 0:0.01:2*pi;
xp = (d/2)*cos(theta);
yp = (d/2)*sin(theta);
This works great and creates the following:
However, I need to do further analysis on this. How do I convert this to an actual logical matrix?
The way I'm doing it now, the circles don't actually register in my img matrix.