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

回答(1 个)

Image Analyst
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;
  4 个评论
daniel adegbeleji
daniel adegbeleji 2020-6-30
编辑:Image Analyst 2020-6-30
Yes sir, you are right. How do I go about the simulation? I don't know the blocks to put together. The spot will be moved across the sensor i.e from left to right.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by