[問題] fcm對圖片分群運算問題
我想對圖片作FCM分群的影像處理如下:
clear;
clc;
data = imread('C:\ori.jpg');
data2= rgb2gray(data);
options = [2;100;1e-5;0];
[center,U,obj_fcn] = fcm(data2, 3, options);
然執行後一直跳
??? Error using ==> mtimes
Integers can only be combined with integers of the same class, or scalar
doubles.
Error in ==> stepfcm at 25
center = mf*data./((ones(size(data, 2), 1)*sum(mf'))'); % new center
Error in ==> fcm at 88
[U, center, obj_fcn(i)] = stepfcm(data, U, cluster_n, expo);
Error in ==> fcm_test at 8
[center,U,obj_fcn] = fcm(data2, 3, options);
去GOOGLE了一下發現這個錯誤是矩陣乘除法問題
但是此程式碼內並沒有相乘相除的運算
不知道是哪裡出了問題
請有使用過的大大給予幫助
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.137.186
推
12/09 20:17, , 1F
12/09 20:17, 1F
→
12/09 20:20, , 2F
12/09 20:20, 2F
→
12/09 20:21, , 3F
12/09 20:21, 3F
→
12/09 20:22, , 4F
12/09 20:22, 4F
謝謝您的幫助,按照您的建議已可使用
※ 編輯: william2961 來自: 140.112.4.194 (12/11 11:54)