how can i use clarity factor with gaussian kernel in image processing
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Image Analyst
2021-9-18
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 个评论
Image Analyst
2021-9-23
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!