Hi can any one please tell me how to remove some pixels from the image which defined D4 below. basically I want to remove all pixels from D4 which lying below a threshold ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
A=imread('image.png'); g=A(:, :, 2); % subplot(3,3,1); % imshow(g); % title('green'); g2=adapthisteq(g); subplot(3,3,1); imshow(g2); title('equal1') g3=adapthisteq(g2); subplot(3,3,2); imshow(g3); title('equal2') I=rgb2gray(A); J = imadjust(I,[],[],0.25); subplot(3,3,3); imshow(J); title('brighten') bw1 = edge(g2,'canny',0.1); subplot(3,3,4); imshow(bw1); title ('canny1') bw2 = edge(J,'canny',0.1); subplot(3,3,5); imshow(bw2); title ('canny2') se=strel('disk',1,0); erode=imerode(bw2,se); % subplot(3,3,7); % imshow(erode); % title('erode') dilate=imdilate(bw2,se); d1=dilate-erode; subplot(3,3,6); imshow(d1); title('difference') d2=bw1-d1; subplot(3,3,7); imshow(d2); title('d2'); d3=imfill(d2,'holes'); subplot(3,3,8); imshow(d3); title('d3'); d4= im2bw(d3,0.5) - im2bw(d2,0.5); subplot(3,3,9); imshow(d4); title('d4');
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Custom Toolchain Registration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!