how to find the number of atoms at different peak positions automatically?

조회 수: 1 (최근 30일)
sowmya
sowmya 2019년 1월 4일
댓글: Image Analyst 2019년 1월 10일
I have a set of maximum positions and there are some number of atoms at each position. I get the number of atoms by manually pointing at each peak position. But how can I find a way that automatically counts the number of atoms at each max position?
  댓글 수: 3
sowmya
sowmya 2019년 1월 9일
I have another question, but not related to it I guess. I have a microsocopy image which i am attaching. I have both .tif and .mat file for the image. I want the positions of all the bright spots there which correspond tot he atoms.
I think i should fit gaussian to find the peaks. Please comment and help.
Thank you!
Image Analyst
Image Analyst 2019년 1월 10일
Find each individual spot, find it's centroid and second central spatial moment (demo attached), then use fspecial().

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2019년 1월 4일
You could try findpeaks() if you have the Signal Processing Toolbox.
Attach 'cube.mat' and a screenshot of the signal if you need more help.
  댓글 수: 5
Image Analyst
Image Analyst 2019년 1월 4일
What I would do is to threshold, then call
props = regionprops(mask, 'WeightedCentroid');
Then get the y locations
xy = vertcat(props.WeightedCentroid);
y = xy(:, 2);
Then you need to count the number in each "Band" but the spots may not be perfectly aligned. So you can take a mean across the image and threshold then use regionprops() again this time to find the centroid of the black bands in between the spots bands.
meanVerticalProfile = mean(mask);
binaryImage = meanVerticalProfile < someDarkThreshold;
props2 = regionprops(binaryImage, 'WeightedCentroid');
xy = vertcat(props.WeightedCentroid);
edges = xy(:, 2);
etc.
Now you can use those black band centers as "edges" in histogram() or histcounts() to get the count in each spots band
counts = histcounts(y, edges);
It's all untested since I don't have your data, so adapt it if it doesn't work.
sowmya
sowmya 2019년 1월 4일
Okay. I will try it out. Thank you!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by