spot diameter in imported image
显示 更早的评论
hello,
so i have an IR Laser spot image i captured and i want to calculate its diameter.
the diameter should be calculated from where pixels values are equal 13% from the max pixel value.
so the spot contains only pixels that their values are greater than 13%* max value
how can i do this?
here is an example of what i have:
Thank you!
2 个评论
KALYAN ACHARJYA
2020-9-9
That menas we can consider only those pixels having 13% from the max pixel value, suppose the centre pixel is maximum, which is 255, then outer boundary of the spot consider untill the pixel value greater than 255x13/100, right? Are that for all directions, or any one, which may satisfy the condition first one?
adi
2020-9-9
采纳的回答
更多回答(1 个)
KALYAN ACHARJYA
2020-9-9
编辑:KALYAN ACHARJYA
2020-9-9
Here are the all pixels, which are greater than 13%*max
image_data=rgb2gray(imread('image_test5.jpeg'));
max_pix=max(image_data(:));
dia_data=image_data>max_pix*0.13;
image_data(~dia_data)=255;
imshow(image_data);

What Next?
3 个评论
adi
2020-9-9
KALYAN ACHARJYA
2020-9-9
编辑:KALYAN ACHARJYA
2020-9-9
One way: 1. Get the Euclidian distance in multiple directions (Centre to Boundary)
2. Average the Distances
Can we consider that as the radius of the spot.
Note: It's just an appoximation, as there are no distinct boundaary which we can consider as the boundary of the of laser spot.
Please see the answer provided by @Image Analyst Sir
adi
2020-9-9
类别
在 帮助中心 和 File Exchange 中查找有关 Christmas / Winter 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
