How do I get the calculation of results column Max, Max row and max?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I do not understand how the calculation process to obtain column of max, max and maxR row of the radon transform. Where did these results came from? how the calculations?
The following piece of code:
% Do the Radon transform.
theta = 0:180;
[R,xp] = radon(grayImage,theta);
% Find the location of the peak of the radon transform image.
maxR = max(R(:));
[ *rowOfMax, columnOfMax*] = find(R == *maxR*)
% Display the Radon Transform image.
h3 = subplot(2, 3, [3,6]);



0 Commenti
Risposte (1)
dpb
il 16 Mag 2016
The major work is done by the <radon> function from the Image Processing Toolbox; the lines for the maximum and its location simply use those results. The "trick" if you don't follow is the use of the (:) as the array indexing expression to return the whole matrix R as a column so the max function will return a global maximum. Then the find locates that location and uses the actual array R in its original shape to return the matching location(s) that are that maximum value.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!