![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/718509/image.jpeg)
i want to detecting bubble in the image and measuring the size
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
chang hoon oh
le 23 Août 2021
Commenté : chang hoon oh
le 24 Août 2021
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/718489/image.bmp)
i used imbinarize,strel,wiener2,bwareafilt,medfilt2,filter2 and dipimage fuction
but i can't get a satisfied picture
and if i want to ftltering the range of dark (90~100) what fuction do i have to use?
0 commentaires
Réponse acceptée
Wan Ji
le 23 Août 2021
Use DCT transformation and with a critical bw value
I=double(imread ('image.bmp'));
I = -(I-min(I(:)))/(min(I(:))-max(I(:)));
%DCT transformation
[m,n]=size(I);
Y=dct2(I);
I=zeros(m,n);
I(1:floor(m/10),1:floor(n/10))=1;
Ydct=Y.*I;
Y=(idct2(Ydct));
I = -(Y-min(Y(:)))/(min(Y(:))-max(Y(:)));
I (I>0.83) = 0;
I (I~=0) = 1;
imshow(I)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/718509/image.jpeg)
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!