Dimension problem with Kirsch oprerator.
이전 댓글 표시
I just can't find the collision between formats in my vectors.Here's the code, basic kirsch operator in which I get error
"??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts" in the for loop
function ks = Kirsch(A)
A = imread(A);
A = im2double(A);
m = zeros(3,3,8);
m(:,:,1) = [-3 -3 5; -3 0 5; -3 -3 5];
m(:,:,2) = [-3 5 5; -3 0 5; -3 -3 -3];
m(:,:,3) = [5 5 5; -3 0 -3; -3 -3 -3];
m(:,:,4) = [5 5 -3; 5 0 -3; -3 -3 -3];
m(:,:,5) = [5 -3 -3; 5 0 -3; 5 -3 -3];
m(:,:,6) = [-3 -3 -3; 5 0 -3; 5 5 -3];
m(:,:,7) = [-3 -3 -3; -3 0 -3; 5 5 5];
m(:,:,8) = [-3 -3 -3; -3 0 5; -3 5 5];
Am=zeros(size(A,1), size(A,2),8);
for i=1:8
Am(:,:,i) = imfilter(A,m(:,:,i));
end
Ak = max(Am,[],3);
n = 255 / (max(Ak(:)) - min(Ak(:)));
pic = uint8(n * Ak);
figure, imshow(pic);
*********************************************************************************
error is in for loop where Am(:,:,i) = imfilter(A,m(:,:,i));
Please help, im looking into code for several hours, ive tried several source images, for loops etc, but error ist still here
Tomislav
댓글 수: 1
amit srivastava
2016년 3월 30일
Hey, Can You tell me what you did after Ak..ASAP
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!