Index in position 1 exceeds array bounds
Mostrar comentarios más antiguos
Hi, I am running the Circular Hough Transform code (from Matlab) with different image inputted. However there is an error popping out mentioned that "Index in position 1 exceeds array bounds". I don know what is the reason behind it. Please help me on this !
A = imread('circle.png');
imshow(A);
[centers, radii, metric] = imfindcircles(A,[15 30]);
centersStrong5 = centers(1:5,:);
radiiStrong5 = radii(1:5);
metricStrong5 = metric(1:5);
viscircles(centersStrong5, radiiStrong5,'EdgeColor','b');
2 comentarios
What line is causing the error?
Sharing the error message is helpful but you should share the entire copy-pasted error message and indicate which line is causing the error.
"Index in position 1 exceeds array bounds" is quite informative. It means you're asking for values that don't exist. Here's an example:
a = [1 2 3 4 5]
a(6) % But there is only 5 values! Error!
Teik Jin Lim
el 5 de Nov. de 2019
Editada: Teik Jin Lim
el 5 de Nov. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Hough Transform en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!