how can i use a Gaussian gradient routine for remove the out of focused section in image processing

1 次查看(过去 30 天)
first of all i remove the background and using a threshold for detecting bubble.
but i can't remove only out of focused bubble cuz that threshold is similar with focused bubble
i read that Gaussian gradient routine can remove that part. but i didn't use that . help me~!

采纳的回答

Constantino Carlos Reyes-Aldasoro
You could refine your processing using bwlabel to assign unique labels to the regions you have already detected. Then use regionprops to detect the size (with Area) and the average intensity, assuming your second image is called image_thresholded, you could do the following:
image_labelled = bwlabel(image_thresholded);
image_properties = regionprops(image_thresholded,original,'Area','MeanIntensity');
the properties would look like this
image_properties
image_properties =
75×1 struct array with fields:
Area
MeanIntensity
[image_properties.Area]
ans =
Columns 1 through 4
269962 34 2 2
Columns 5 through 8
122 116 25 65
etc.
[image_properties.MeanIntensity]
ans =
Columns 1 through 5
27.7029 87.3529 58.5000 60.0000 124.5984
Columns 6 through 10
122.6983 87.0800 79.6923 71.2500 72.3750
etc.
Then you can select only those that comply with a combination of area (to remove the ring) and intensity (to remove the blurred) using find and ismember, e.g. if you only want those that are below 100 of intensity:
spots = ismember(image_labelled,find([image_properties.MeanIntensity]<100));
Hope this has answered your question

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by