フィルターのクリア

need to extract the road segment part , but don't know which filter is good for removing the noise

2 ビュー (過去 30 日間)
he=imread('r15.jpg'); figure, imshow(he);
if ndims(he)==3 I1=rgb2gray(he); else I1=double(he); end
cform = makecform('srgb2lab');
lab_he = applycform(he,cform);
ab = double(lab_he(:,:,2:3)); nrows = size(ab,1); ncols = size(ab,2); ab = reshape(ab,nrows*ncols,2);
nColors = 3; % repeat the clustering 3 times to avoid local minima [cluster_idx, cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ... 'Replicates',3); pixel_labels = reshape(cluster_idx,nrows,ncols); figure,imshow(pixel_labels,[]), title('image labeled by cluster index');
segmented_images = cell(1,3); rgb_label = repmat(pixel_labels,[1 1 3]);
for k = 1:nColors color = he; color(rgb_label ~= k) = 0; segmented_images{k} = color;
end a= segmented_images{1}; c=rgb2gray(a); %I=imcomplement(a); %b = bwareaopen(c,10); figure,imshow(c), title('objects in cluster 1');
  1 件のコメント
shantanu shukla
shantanu shukla 2014 年 4 月 24 日
編集済み: shantanu shukla 2014 年 4 月 24 日
output of the code is. plz suggest me appropriate solution to get the good quality output

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCluster Analysis and Anomaly Detection についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by