Unable to perform assignment because the induces on the left side are not compatible with the size of the right side
Ältere Kommentare anzeigen
I am working on fingerprint minutiae algorithm and i get this error when i work on some fingerprint images. the error says Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 2-by-2 and this is my code which concerned with the error :
for ind=1:length(CentroidTermX)
Klocal=K(CentroidTermY(ind)-2:CentroidTermY(ind)+2,CentroidTermX(ind)-2:CentroidTermX(ind)+2);
Klocal(2:end-1,2:end-1)=0;
[i,j]=find(Klocal);
OrientationTerm(ind,1)=Table(i,j);
end
dxTerm=sin(OrientationTerm)*5;
dyTerm=cos(OrientationTerm)*5;
figure
imshow(K)
this part of code which find the orientation of the termination
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 23 Sep. 2018
0 Stimmen
Evidently the (badly-named) i and j are vectors, not single numbers.
If you had remembered to attach your variables in a .mat file, we could have done more for you.
4 Kommentare
Mahmoud Hassan
am 23 Sep. 2018
Bearbeitet: Mahmoud Hassan
am 23 Sep. 2018
Image Analyst
am 23 Sep. 2018
No, it's your source code. Try this
save('fingerprint.mat', 'CentroidTermX', 'CentroidTermY', 'K', 'Table');
Then attach fingerprint.mat with the paper clip icon.
Mahmoud Hassan
am 23 Sep. 2018
Walter Roberson
am 23 Sep. 2018
Saving the file and attaching it would allow other people to examine your variables and test your code.
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!