I am trying to find each particle area and each particle intensity through matlab.

11 ビュー (過去 30 日間)
Tharun
Tharun 2025 年 3 月 19 日
編集済み: Image Analyst 2025 年 6 月 20 日
I am trying to find each particle area and each particle intensity through matlab. I am using image processing techniques like regionprops, grey image and for intensity i am getting mean intensity. I want to calculate individual or each particle intensity not the mean intensity of partcle. can anyone have anyleads. I am attaching a photo of gold particles for your refernce.

回答 (2 件)

TED MOSBY
TED MOSBY 2025 年 3 月 27 日
Hi Tharun,
To measure particle area and total intensity you can follow the below steps:
  • Load your image into MATLAB using 'imread'.
  • Convert to grayscale if it’s an RGB image (e.g., rgb2gray).
  • Use a thresholding function to segment particles from the background.
  • Perform morphological operations ('bwareaopen', etc.) to clean up the binary mask.
  • Convert the binary mask to a labeled image using 'bwlabel'.
  • Each connected particle will have a unique label.
  • Use 'regionprops' with both the labeled image and the grayscale image. This gives you each particle’s area, mean intensity, and a list of its pixel values.
  • For each particle, the total (integrated) intensity is:
TotalIntensity=MeanIntensity×Area OR TotalIntensity=summation(Pixelvalues)
I have written an example code for the same:
I = imread('image.jpeg');
if size(I, 3) == 3
Igray = rgb2gray(I); % Convert to grayscale if it is an RGB image
else
Igray = I;
end
level = graythresh(Igray);
BW = imbinarize(Igray, level);
% If needed, remove small noise or fill holes
BW = bwareaopen(BW, 5); % remove objects smaller than 5 pixels (example)
BW = imfill(BW, 'holes');
L = bwlabel(BW);
stats = regionprops(L, Igray, ...
'Area', ...
'MeanIntensity', ...
'PixelValues');
numParticles = numel(stats);
areas = zeros(numParticles,1);
totalIntensities = zeros(numParticles,1);
for k = 1:numParticles
areas(k) = stats(k).Area;
totalIntensities(k) = sum(stats(k).PixelValues);
end
% Display results
table( (1:numParticles)', areas, totalIntensities, ...
'VariableNames', {'ParticleID','Area','TotalIntensity'})
Hope this helps!
  3 件のコメント
Walter Roberson
Walter Roberson 2025 年 4 月 3 日
編集済み: Walter Roberson 2025 年 6 月 19 日
stats = regionprops(L, Igray, ...
'Area', ...
'MeanIntensity', ...
'PixelValues', ...
'Circularity');
stats = stats([stats.Circularity] > THRESHOLD);
Circular objects have a circularity of 1 (which is the maximum possible for the measurement.) You need to decide on some threshold THRESHOLD beyond which objects are to be consider "close enough" to circular to count.
Tharun
Tharun 2025 年 6 月 19 日
Actually the above is image is of gold nanoparticle. Do anyone know how to find intensity of every individual particle by Guassian method that can show the peak intensity and low intensity of particle irrespective of particle shape?

サインインしてコメントする。


Image Analyst
Image Analyst 2025 年 6 月 19 日
編集済み: Image Analyst 2025 年 6 月 20 日
Not sure what you mean by "Gaussian method" or by "I want to calculate individual or each particle intensity not the mean intensity of partcle." but regionprops can give you the min and max intensity in each blob. It looks at the actual pixel values inside each blob in your mask, once you've determined your mask.
props = regionprops(mask, grayImage, 'MaxIntensity', 'MinIntensity');
allMax = [props.MaxIntensity]
allMin = [props.MinIntensity]

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by