|Generating Data||Main project page|
Previous entry Next entry
So Cheezum uses each pixel intensity as the mean for his Poisson Distribution. He says that it goes as photons captured which is his intensity in each pixel. My problem is if i add this noise after i make the image 8 bit then most of the pixels will have intensity of 255. But that doesn't mean they only had the equivalent of 255 photons (or whatever factor is needed to form that). They could have had a lot more, but anything that goes above 255 just gets scaled as 255. If i add this noise while its complex may be a better idea. that is a 64 bit image. It might not matter in the end because of the scaling i did but it is worth a look.
I started to think it was more important to apply the noise to the lower resolved image than for the high res complex image, plus it would be faster with less pixels. So that lower res image is the 8 bit. So i went with that one.
Background noise--i'm thinking about how to do it now. Originally i just took a histogram of an image and copied the Guassian Noise from that. Now i am thinking that a poisson may be good--but each pixel there is zero so the Poisson would have a standard deviation of zero and a mean of zero so that probably wont' work. So i can just choose Gaussian noise for this. That'll work well.
I can't think of a good way to make Background Noise because if i add to every pixel that has an intensity of 0 what do i do with the pixels from the dot that has an intensity of 10? So I decided to just add Gaussian Noise to every pixel. Wait i think i am good because the Poisson is added to the dot because it is emitting and i don't know the spread of it easily. But the Gaussian background is well described by looking at another image. For example i checked one of Andy's images and it had a mean background noise of 60.9 and a standard deviation of 7.05. So if i modeled it like Poisson--assuming the mean is the same, the standard deviation would be 7.74 which is close enough. So I think it is fair just to add the background noise to every pixel including the ones the dot is in since if the dot wasn't there the noise would be anyways. So I am convinced myself--hooray.
Wait a second and i'll upload the finished dye picture.
Adding the Guassian noise to everything gets rid of some of the splotches that came from the Poisson noise so i put in some code that only adds it if the pixel intensity is lower than 200. This keeps the Poisson noise and also hides some of the fringe pixels well. Now i'm back to being happy.
Ok i am getting ahead of myself but it seems like i am making good progress.
Placing down dots
What's the best way to do this?
I am thinking I should increase the super high res image so that it can fit the entire microtubule i'll want to create. Then make an array of centers of each dot along the microtubule. This may take a long time to do since every 13 nm of the microtubule, it can have up to 8 dots. So a microtubule that takes up 50 low res pixels (9,225 nm) has about 5,600 places to put this dot. At 17% this makes something like 965 dots put down. This procedure will be extremely slow.
Is making the microtubule from convoluting the rectangle the best idea? It would seem so. It would be way faster. Cheezum does something like this for his cell sized object. So with precedent I'll try it.
The major confusion i have with placing centers where i want them is that the PSF has a maximum at 0,0 but the image's pixels go from 0,0 in the top left corner to maximum at the bottom right. So to put the PSF at the center I have to run through -max/2 to max/2 if the image has max pixels. So there is constantly a switch between an origin at 0,0 for PSF or an origin at max/2,max/2 for the image. It is kind of confusing. I need to run through this program and set it all the same.
I made a movie where the microtubule moves but unfortunately i moved in the wrong direction. So horizontal microtubule moves in the vertical direction. It is interesting looking. I'll do it again tomorrow. It isn't that hard. I just don't have it automated yet but that won't be tough either. Until i put in the ability for a microtubule to turn. I am thinking that i won't make it probabilistic. I'll just make it follow a path. A determined path since this isn't a simulation that will make this easier.
OK I fixed the movie. Now the microtubule moves in the right direction. I'll see what i can do about loading it here.
there embedded and sweet.