Pixel size = 5.45 um Gap size = 100 nm Spot size = 200 um Full well capacity = 10,500 electron how do i plot the COG of a spot imaged on a sensor with some photon noise
3 次查看(过去 30 天)
显示 更早的评论
As a beginner in matlab programming how do I compute Pixel size = 6.45 um Gap size = 100 nm Spot size = 500 um Full well capacity = 10,300 electron to plot the COG of a spot imaged on a sensor with some photon noise
0 个评论
回答(1 个)
Image Analyst
2020-6-29
I don't see how any of those numbers matter. If you have a digitized image, you can just call regionprops
[rows, columns, numberOfColorChannels] = size(grayImage);
if numberOfColorChannels == 3
grayImage = rgb2gray(grayImage);
end
mask = true(rows, columns);
props = regionprops(mask, grayImage, 'WeightedCentroid');
xCentroid = props.WeightedCentroid(1);
yCentroid = props.WeightedCentroid(2);
That's the weighted centroid of the whole image. If you want the centroid of only a portion where the spot is brighter than some value, you can make a mask for that.
mask = grayImage > someValue;
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!