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

3 visualizaciones (últimos 30 días)
%% 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 comentarios
Fatih Nurcin
Fatih Nurcin el 30 de Jul. de 2019
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 el 30 de Jul. de 2019
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.

Iniciar sesión para comentar.

Respuestas (0)

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by