How to segment image using SOM?
조회 수: 1 (최근 30일)
이전 댓글 표시
Matlab has SOM function
selforgmap
Does anyone know how can use this function to segment the below image, for example, to 3 classes?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160646/image.png)
I tried to do this using the below code:
clear;
fix = zeros(500,500);
i = ones(500,100);
fix = double( mat2gray( [fix(:,1:200) i(:,:)*255 fix(:,1:100) i*125]));
%%SOM
net = selforgmap([500,1],100,3,'gridtop','dist');
net = train(net,fix);
y = net(fix);
classes = vec2ind(y);
Actually, I do not fully understand it.
Thanks
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!