Linear algebra

K nearest neighbors for image segmentation in matlab

The following Matlab project contains the source code and Matlab examples used for k nearest neighbors for image segmentation. Script Exemple : ------------- % k of k-nearest neighbors k = 3 ; % generate a test image data , a matrix of 3 by 3, values are doubles that % range from 10 to 20 im_test_data = [10 20 30; 20 10 30; 20 10 30]; % generate a training/apprentissage data image from test data image im_tr_data = [10 0 30;0 10 0; 20 0 30]; % generate a truth image labels with 3 by 3 matrix, values are integers

Pages

Subscribe to RSS - Linear algebra