User:TheLarry/Notebook/Larrys Notebook/2009/11/18

From OpenWetWare
Jump to navigationJump to search
Owwnotebook icon.pngGenerating Data Report.pngMain project page
Resultset previous.pngPrevious entry      Next entryResultset next.png


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.

The top left is the lower res dot. I have now scaled everything to what a Rhoadime 6-g should be in my head. Radius of 10 nm. The intensity is not right just adjusted by eye. Anyway...Top right has Poisson Noise added to the image. Bottom Right is a larger image with more pixels added. If you look below it says the pixel is now located at 345,256 not 62,64 so that shows i added a ton of pixels around that to match the images from the camera. And finally bottom right has Gaussian noise added to the background. This looks pretty good.

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.

Here's the microtubule with the code that doesn't add the Gaussian noise to already bright pixels. See how the splotchiness stays in the microtubule. This microtubule was made just by convoluting a rectangle with the PSF not by placing dyes at random points on a rectangle.

Next Steps

  1. I still have a problem putting the pixel exactly where i want. Nothing is wrong in the code i just am getting confused. I wrote this last week which is why it doesn't match my new thinking perfectly. so i have to set it straight in my head and then code a bit to make it easier for new users.
  2. Use this and a .vi to randomly put dyes on a rectangle and calculate that image.
  3. Make many of those images to form a movie
  4. Track it.

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.