フィルターのクリア

Error using + Matrix dimensions must agree.

2 ビュー (過去 30 日間)
Mahmoud Hassan
Mahmoud Hassan 2019 年 2 月 1 日
編集済み: Guillaume 2019 年 2 月 1 日
i have an error says Error using + Matrix dimensions must agree as showed in the pic and this is the part of code that have the error
for ind=1:length(CentroidBifX)
Klocal=K(CentroidBifY(ind)-2:CentroidBifY(ind)+2,CentroidBifX(ind)-2:CentroidBifX(ind)+2);
Klocal(2:end-1,2:end-1)=0;
[i,j]=find(Klocal);
if length(i)~=3
CentroidBifY(ind)=NaN;
CentroidBifX(ind)=NaN;
OrientationBif(ind)=NaN;
else
for k=1:3
OrientationBif(ind,k)=Table(i(k),j(k));
dxBif(ind,k)=sin(OrientationBif(ind,k))*5;
dyBif(ind,k)=cos(OrientationBif(ind,k))*5;
end
end
end
plot(CentroidBifX,CentroidBifY,'go','linewidth',2)
OrientationLinesX=[CentroidBifX CentroidBifX+dyBif(:,1);CentroidBifX CentroidBifX+dyBif(:,2);CentroidBifX CentroidBifX+dyBif(:,3)]';
OrientationLinesY=[CentroidBifY CentroidBifY-dxBif(:,1);CentroidBifY CentroidBifY-dxBif(:,2);CentroidBifY CentroidBifY-dxBif(:,3)]';
plot(OrientationLinesX,OrientationLinesY,'g','linewidth',2)
  2 件のコメント
Guillaume
Guillaume 2019 年 2 月 1 日
Well, what is
size(CentroidBifX)
size(dyBif)
As the error message tells you, they don't have the same number of rows.
Mahmoud Hassan
Mahmoud Hassan 2019 年 2 月 1 日
編集済み: Guillaume 2019 年 2 月 1 日
the whole code is provided in mathworks and its used to extract features from a fingerprint ... the code works with some images but not the others ... code is here : https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/16728/versions/5/previews/FingerPrint/html/fingerprint.html

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品


リリース

R2014b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by