-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAssignment_Main.m
36 lines (24 loc) · 1018 Bytes
/
Assignment_Main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%/////////////////////////////////////////////////////////////////////////%
% %
% - Name : Assignment_Main.m %
% - Implementation of mean shift clustering algorithm %
% %
% - Created by S. Lambert, 19/01/2024 %
% %
%/////////////////////////////////////////////////////////////////////////%
%.. Matlab setup
close all; clc;
%.. Code
I = imread("Assignment data\data\images\test\2018.jpg");
I = im2double(I);
img = hsv2rgb(I);
bandWidth = 2;
size(img)
size(img(:,:,1))
[clustCent,data2cluster,cluster2dataCell] = MeanShiftCluster(img(:,:,1),bandWidth);
size(clustCent)
size(data2cluster)
size(cluster2dataCell)
image(data2cluster)
% image(groundTruth{1,1}.Segmentation)
% colorbar