Re: image analysis help (diffusion)
Posted by
Gabriel Landini on
May 06, 2015; 11:16pm
URL: http://imagej.273.s1.nabble.com/image-analysis-help-diffusion-tp5012746p5012747.html
On Wednesday 06 May 2015 16:18:40 Adam Huttenlocker wrote:
> a script that can randomly pick out 1000 black pixels in a black & white
> thresholded image and calculate the distance of each to its closest white
> pixel, and then output a frequency diagram showing the distribution of
> distances between black and white points.
Hi,
You can do what you want by computing the Euclidean distance of the
background. So depending on what colour are the foreground and background you
might need to invert the image.
The command that does that is Distance map.
http://rsbweb.nih.gov/ij/docs/guide/146-29.html#toc-Subsection-29.8A histogram of the result image gives your the frequency of shortest distances
to foreground pixels.
If you want 1000 points, then you will need to get the values of those points
in the distance map, instead of getting them all.
Hope this helps
Gabriel
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html