LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

k mean:: how to find the clustred data;:: or how to assign number t0 each group of data

Solved!
Go to solution

hi member

i have download the LabVIEW Machine Learning Toolkit https://decibel.ni.com/content/docs/DOC-19328

i want to excute the K mean algorithem to cluster the image in two group or three or more


the problem is how to find the result i mean the clustred image', the image that contain 2 or three intesity value only

 

or how to aasign a 1 vlaue to all intesity that 

belong to cluster one and 255 to data that belong to cluster 2

so that the image look like binary image???

a my vi below

 

best regards

0 Kudos
Message 1 of 5
(3,287 Views)

Hello saliim,

 

From the k-mean vi we get two outputs, one of them is a 1d-array and the other is a 2-D array. I am trying to understand what are you trying to do with these outputs; are you trying to modify these arrays (Add elements, edit elements)? Could you explain how you are getting data  right now and how you want to get it? 

0 Kudos
Message 2 of 5
(3,246 Views)

dear
i try to applay the k mean to  2d image and find the result

shown below with k=2
please help

 

Untitled.jpg

0 Kudos
Message 3 of 5
(3,234 Views)

hi saliim,

 

have you tried an histogram?

 

Based on this, thats what I would do for k=2

 

2013-06-22_alternate2dhistogram_binary.png

 

 

2013-06-22_2dhistogram_binary_front.png

 

 

 

 

 

Alex

0 Kudos
Message 4 of 5
(3,215 Views)
Solution
Accepted by topic author saliim

my post before showed how to set the threshold manually using the graph's cursor.

 

here's the automated k-means version, using the toolkit's .vi

 

2013-06-22_k-means_detail.png

 2013-06-22_kmeans_front.png

 

 

Alex

Message 5 of 5
(3,199 Views)