how can i use a Gaussian gradient routine for remove the out of focused section in image processing
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
chang hoon oh
il 9 Set 2021
Risposto: Constantino Carlos Reyes-Aldasoro
il 9 Set 2021
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/733354/image.bmp)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/733359/image.bmp)
i read that Gaussian gradient routine can remove that part. but i didn't use that . help me~!
0 Commenti
Risposta accettata
Constantino Carlos Reyes-Aldasoro
il 9 Set 2021
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 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!