how can i use clarity factor with gaussian kernel in image processing
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
chang hoon oh
le 16 Sep 2021
Commenté : Image Analyst
le 23 Sep 2021
i apply the gaussian gradient kernel to image for bubble detection
after that i trying to find the clarity of image and remove out of focused bubble. like this article
at the part 3.2.
but i can't find the code for clarity in matlab. so i use the binarize fuction and threshold but it didn't work perfectly so i want to find how i can use
clarity of the image
can anyone help me?
this is my cord
C=imread('30130170023.jpg');
C2=imread('back.jpg');
C1=C2-C;
C3 = imcomplement(C1);
[gx,gy]=gaussgradient(C1,2.0);
[gx1,gy1]=gaussgradient(C3,2.0);
M=abs(gx)+abs(gy);
M1=abs(gx1)+abs(gy1);
MU=M+M1;
Bi=imbinarize(MU,0.3);
BWdfill = imfill(Bi,'holes');
% imshow(MU);
si=imread('sisi.jpg');
si=si(:,:,1:3);
si=im2gray(si);
si=imbinarize(si);
BWdfill=BWdfill-si;
BWdfill=imcrop(BWdfill,[299 0 687 796]);
% imshow(BWdfill);
se = strel('disk',2);
ie = imerode(BWdfill,se);
ie = imerode(ie,se);
ie = imerode(ie,se);
% ie = imerode(ie,se);
% ie = imerode(ie,se);
id =imdilate(ie,se);
id =imdilate(id,se);
id =imdilate(id,se);
% id =imdilate(id,se);
% id =imdilate(id,se);
imshow(id);
[centers,radii] = imfindcircles(id,[3 80],'ObjectPolarity','bright','Sensitivity',0.85);
viscircles(centers, radii,'Color','b');
0 commentaires
Réponse acceptée
Image Analyst
le 18 Sep 2021
Looks like they define clarity as the max of the gradient in each floc blob:
"The maximum value of Ig associated with each floc i is a
quantitative measure of how close to the plane of focus a given
floc is, and this value is defined here as the ‘‘clarity value’’ a
a(i) = max(Ig(ROI(i))
A threshold......"
2 commentaires
Image Analyst
le 23 Sep 2021
It's possible expecially if the bubble had a smooth exterior boundary and is smooth inside. I'd try adjusting parameters like the window side and threshold level.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!