A few questions about ImageAnalyseParticles
daggaz
Apropos Stats: The syntax is not well explained. From reading the entry, it seems if I include it, I will automatically get information (listed waves) pertaining to the particles found and limited by the /A flag. The example then shows the trailing M_ImageThresh wavename. Is it necessary to follow with a specific wavename, or is it optional to limit the stats generation? As well, the example does not use the /A flag. Isnt it required? Confusion abounds for this beginner programmer..
Lastly (for now), I am curious about the difference between particle area and particle boundary. I am assuming that all contiguous zero-valued pixels in the thresholded image are included in the particle(s) area(s). Is the boundary just an option to "grow" the particle outwards by one (or more?) pixel, or is there a special difference that remains in place in later processing steps? For example, the code I am trying to understand uses the /M=3 flag to quantify particles. When stats is called, will the particle areas include the boundary and be larger than if /M=2 had been used, or was it just a small waste of processing power? What about in conjunction with the /E flag? Does the boundary add to the major axes?
Thanks for your help, you guys are great with the responses on this forum. I've been telling everyone in my department about Wavemetrics.
I think you might benefit from the Image Processing Tutorial which you can find under File Menu->Example Experiments->Tutorials->Image Processing Tutorial. After you open the tutorial search for and click on the link to Particle Analysis. The example in this section takes you step-by-step through the process and should clarify the reason for the reason behind using M_ImageThresh.
In the context of ImageAnalyzeParticles a boundary consists of pixels which belong to the object but have one or more neighboring pixels that are outside the particle.
Depending on your application you may not even need to use the /M flag. To be clear: this flag has absolutely no effect on the "measured" results. It is normally used for preparing data for subsequent analysis by marking pixels in a bitmap. It gives you the choice of marking the whole area of the particle or just its boundary. To see an example, run the code in the Image Processing Tutorial, i.e.,
NewImage root:images:blobs
ImageThreshold/I/Q/M=1 root:images:blobs
ImageAnalyzeParticles /Q/A=2/E/W/M=2 stats M_ImageThresh
AppendToGraph/T W_BoundaryY vs W_BoundaryX
and then execute from the command line:
NewImage/K=0 M_ParticlePerimeter
AppendToGraph/T W_BoundaryY vs W_BoundaryX
ModifyImage M_ParticlePerimeter explicit=1,eval={64,3,52428,1}
As you can see, the boundary waves match the boundary pixels set by the /M=1 flag.
I hope this helps,
A.G.
WaveMetrics, Inc.
September 11, 2012 at 10:13 am - Permalink