Detecting nonzero matrix elements in a rectangle
Mostrar comentarios más antiguos
I have an image that I performed Sobel Edge Detection on. I am planning on drawing rectangles on top of the edge detected image and counting the number of nonzero matrix elements within those rectangles using the nnz command.
My question is how exactly do I use the nnz command to work only within those rectangles? I have the 4 corner coordinates of the rectangle already, and I will be performing this calculation on at at least 5 rectangles within the image.
Thank you for any help in advance.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Object Analysis 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!