How to assign a name to ROI in MATLAB?.

1 visualización (últimos 30 días)
Sudhanshu Goel
Sudhanshu Goel el 5 de Sept. de 2016
Comentada: Walter Roberson el 7 de Sept. de 2018
I have a gray scale image. I want to draw multiple ROIs (impoly, imrect etc.) in the image and I have two things to do.
(1) I need to assign a particular name (Eg; ROI1, ROI2 etc.) to each ROI which is supposed to be displayed in image along with ROI.
(2) I also want to display the number of pixels in each ROI and this number should be updated whenever the position or dimension of ROI is changed.
I am stuck at this step and would really appreciate any suggestions. Thanks
  2 comentarios
Walter Roberson
Walter Roberson el 5 de Sept. de 2016
Is it necessary to write the information into the image itself? For example are you using imwrite() to write the annotated images? Or is it enough that it is displayed on the screen?
Sudhanshu Goel
Sudhanshu Goel el 6 de Sept. de 2016
I atleast want to display the name of ROI (Eg: roi1, roi2) along with the ROI on the image. Rest of the information (No. of pixels etc.) need not be displayed in the image but it should get updated in the back end once the ROI position or dimension is changed.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Sept. de 2016
text() the string into place if you only need to affect the display.
If you need to create a new image that has the text embedded in it then vision insertText
  5 comentarios
Walter Roberson
Walter Roberson el 6 de Sept. de 2016
roi objects do not contain any kind of "this object has changed" information, so what you could do is createMask again and compare to the previous mask.
Walter Roberson
Walter Roberson el 7 de Sept. de 2018
Should have said poly2mask not roi2mask

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by