Is it possible to make K-means clustering algorithm avoid some intensities

조회 수: 1 (최근 30일)
Fatih Nurcin
Fatih Nurcin 2019년 7월 3일
댓글: Hari Krishna Ravuri 2019년 7월 30일
%% kmeans clustering
pixel_labels= imsegkmeans(maskedimage,2);
B = labeloverlay(maskedimage,pixel_labels);
This is code but it takes dark area of mask as group of pixels and segmenates it and makes rest of the image background, i only want it to segment image into 2 part without taking dark part into consideration (without zeros) I have to use k-value as 2, because some images don't have mask thank you
  댓글 수: 3
Fatih Nurcin
Fatih Nurcin 2019년 7월 30일
k-means clustering is applied to series of images, some images have mask and some not, this mask is applied before k-means in case of a specific color present in the image .
for k-means
Idea is to seperate image into 2 part without considering the dark pixels (which are masked due specific color present in the image, and not all the image have this color)
so i want k-means to ignore dark pixels, because if it doesn't ignore then k-means output will be same, it will not make any difference, segmentation will be mask (that was there before) and pixels
I want to ignore mask, and segment other pixels into two park as black and white
Hari Krishna Ravuri
Hari Krishna Ravuri 2019년 7월 30일
Can you provide some sample normal images,sample images for which you want to apply mask before k-means and the images after applying the mask.

댓글을 달려면 로그인하십시오.

답변 (0개)

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by