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));endAk = 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
Best Answer