spot diameter in imported image
Show older comments
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 Comments
KALYAN ACHARJYA
on 9 Sep 2020
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
on 9 Sep 2020
Accepted Answer
More Answers (1)
KALYAN ACHARJYA
on 9 Sep 2020
Edited: KALYAN ACHARJYA
on 9 Sep 2020
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 Comments
adi
on 9 Sep 2020
KALYAN ACHARJYA
on 9 Sep 2020
Edited: KALYAN ACHARJYA
on 9 Sep 2020
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
on 9 Sep 2020
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!