在MATLAB中使用模糊c方法从分段图像中提取特定类 [英] Extract specific class from segmented image using fuzzy c means in MATLAB

查看:66
本文介绍了在MATLAB中使用模糊c方法从分段图像中提取特定类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我寻找使用模糊c方法提取特定分段图像聚类的最简单方法。



例如,我将灰度图像划分为两个6簇,然后我只想保留图像的第4个簇,并将其他簇更改为黑色。



提前感谢您提供解决方案。

解决方案

首先,您需要决定如何表示此提取。由于群集的归属是模糊的,归属度或群集的每个点都是0到1之间的某个值,提取不是完全定义的操作。



例如,你可以1)通过这个模糊集归属度值引入一些阈值划分提取和暗淡点子集; 2)通过与该归属度值成比例的某个因子暗淡每个像素,因此度为0的像素值全黑,而具有归属度1的像素值完全不受影响; 3)制定一些其他标准,用于表示归属度大于0但小于1的像素。



参见:



http://en.wikipedia.org/wiki/Fuzzy_clustering#Fuzzy_c- means_clustering [ ^ ],

http://home.deib.polimi.it/matteucc/Clustering/ tutorial_html / cmeans.html [ ^ ]。



所有必需的数据均可从Matlab获得 fcm ;请了解文档: http://www.mathworks.com/help/fuzzy/fcm.html [ ^ ]。



-SA


uv包含唯一值,n包含每个唯一值的出现。

 [uv,〜,indx] =唯一(fuzzy_img); 



 n = accumarray(indx( :),1); 


Hello, I look for the easiest way for extracting specific cluster of segmented image using fuzzy c means.

For example I divided my gray image two 6 clusters, then I just want to keep 4th cluster of the image, and change other clusters to black color.

Thank you in advance for providing the solution.

解决方案

First of all, you need to decide how to represent "this extraction". As the belonging to the cluster is fuzzy, "degree of belonging" or each point to a cluster is some value between 0 to 1, "extraction" is not a fully defined operation.

For example, you can 1) introduce some threshold dividing "extracted" and "dimmed" subset of points by this fuzzy-set "degree of belonging" value; 2) "dim" each pixel by some factor proportional to this "degree of belonging" value, so the pixel value with degree of 0 was totally black, and those with degree of belonging 1 was totally untouched; 3) formulate some other criterion for representing the pixels with the "degree of belonging" more than 0 but less than 1.

See also:

http://en.wikipedia.org/wiki/Fuzzy_clustering#Fuzzy_c-means_clustering[^],
http://home.deib.polimi.it/matteucc/Clustering/tutorial_html/cmeans.html[^].

All required data is available from Matlab fcm; please learn the documentation: http://www.mathworks.com/help/fuzzy/fcm.html[^].

—SA


"uv" contains unique values, "n" contains occurrences of each unique value.

[uv,~,indx] = unique (fuzzy_img);


n = accumarray(indx(:),1);


这篇关于在MATLAB中使用模糊c方法从分段图像中提取特定类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆