There is a problem with the filter selection
4 ビュー (過去 30 日間)
古いコメントを表示
close all;
clear;
clc;
I1 = imread('test2.jpg');
figure;imshow(I1);
adimage = imadjust(I1,stretchlim(I1));
I2 = im2gray(adimage);
ml=mean2(I2);
G = fspecial('gaussian',[9,9],1);
GS = imfilter(I2,G);
I3=I2-GS+ml;
figure;imshow(I3);
sh = graythresh(I3);
bw = im2bw(I3,sh);
bw=~bw;
figure;imshow(bw);
BW_dilate = imdilate(bw,strel('disk',1));
BW_connect = bwmorph(BW_dilate,'bridge',inf);
figure;imshow(BW_connect);
My goal is to extract cracks, and in the process, the choice of filter causes differences in the results.
The article I referenced mentions the following formula:

Therefore, I follow his process (because I also use the data set)
I provide a picture ,text2.jpg
I3=I2-GS+ml;
figure;imshow(I3);
I found that when I use only Gaussian filter(That is, delete the above two lines of code), he works better than the nonlinear filter mentioned in the article, it makes me wonder,can anyone help me...
Since this article has been published in a journal, I have no reason to suspect that the formula he gave is wrong.
Is there something wrong with the picture I'm using?
I will upload a few more pictures for testing
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!