Borrar filtros
Borrar filtros

How to solve Index exceeds matrix dimensions probelm ?

1 visualización (últimos 30 días)
sufian ahmed
sufian ahmed el 11 de Ag. de 2017
Comentada: sufian ahmed el 12 de Ag. de 2017
I am using ind2sub for connected component.but problem is that when i run multiple images and pass on each connected component into ind2sub function, it shows error. It is ok when i run only single image.But creates problem for multiple images. I dont understand what the problem is ? how can i solve it ?
ERROR: Index exceeds matrix dimensions.
Error in try5 (line 214) [yyy,xxx] = ind2sub(CC.ImageSize,CC.PixelIdxList{id});
  2 comentarios
Chad Greene
Chad Greene el 11 de Ag. de 2017
What is the size of CC.PixelIdxList? And what is the value of id?
sufian ahmed
sufian ahmed el 12 de Ag. de 2017
it changes based on image

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Ag. de 2017
You are using a value of id that is greater than the number of connected components .

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by