Particle Analysis help

Hello,

I am analyzing some STEM pictures of nano particles using Igor Pro. I have successfully removed the background, enhanced the contrast and used the ImageAnalyzeParticles in order to identify the particles' area, number, boundaries and so on. I have also approximated the particles using the ellipse option.

My question is: is there a way in which I can obtain all of the intensity values of the pixels inside the boundaries of each ellipse ("particle")? I want to integrate over these values or perform other operations such as adding them or plotting etc.

Thank you.
ImageAnalyseParticles does not provide this data since it take a binary wave as input, and therefore knows nothing about the underlying intensities.

The most direct solution I can think of is to set up a loop over all the detected particles, where you create a masking image for each of the particles. This can be done using the "mark" keyword to ImageAnalyzeParticles. Then simply sum all the pixels that belong to the mask.

Here's the solution in pseudocode:
wave M_MyRealData       // raw or background subtracted data
wave M_MySegmentedImage // result of thresholding

for (i = 0; i < numParticles; i+=1)
    variable xx = W_SpotX[i]
    variable yy = W_SpotY[i]
   
    ImageAnalyzeParticles /L=(xx, yy) mark M_MySegmentedImage
    wave M_ParticleMarker
    M_ParticleMarker = (M_ParticleMarker[p][q] == 0) ? 1 : 0    
    // M_ParticleMarker now contains 1 if this pixel belongs to this particle, 0 otherwise
   
    MatrixOP W_SummedIntensities = sum(M_MyRealData * M_ParticleMarker)  
    // W_SummedIntensities[0] now contains the summed intensity for particle i
endfor


I assume my code may fail if you have funny-looking particles (e.g. ring-shaped) where the pixel at (W_SpotX, W_SpotY) may not be part of the object. That can be overcome but takes a bit more work.
Hello Catalin,

You can get the integrated values from ImageAnalyzeParticles if you use the (somewhat obscure) /D flag. For example, if your original image is in wave1 and your thresholded image is in wave2 then:
ImageAnalyzeParticles/E/A=5/D=wave1 stats wave2

This will create for you (among other things) the waves W_IntAvg and W_ImageObjArea. If you multiply the respective entries you get the integrated intensities, i.e.,
MatrixOP/O integratedInt=W_IntAvg*W_ImageObjArea


I hope this helps,

A.G.
WaveMetrics, Inc.
A.G.

Would these be the integrated intensities for each individual particle?

C
ctmckee wrote:
A.G.

Would these be the integrated intensities for each individual particle?

C


Yes.

Each entry in W_IntAvg corresponds to a particle's average intensity which is computed from the integrated intensity divided by the number of pixels in each particle. If you now multiply these entries by the corresponding number of pixels (stored in W_ImageObjArea) you should get the integrated intensity for each particle.

AG