Dimension problem with Kirsch oprerator.
Mostra commenti meno recenti
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 Commento
amit srivastava
il 30 Mar 2016
Hey, Can You tell me what you did after Ak..ASAP
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!