How to convert cell to logical?

2 visualizaciones (últimos 30 días)
mohd akmal masud
mohd akmal masud el 27 de Jun. de 2022
Comentada: KSSV el 27 de Jun. de 2022
Dear all. I have the image grountruth as attached. the image categorical.
Anyone know how to convert it into logical?

Respuesta aceptada

KSSV
KSSV el 27 de Jun. de 2022
Editada: KSSV el 27 de Jun. de 2022
You can use ismember. Let L be your categorical data of size 128*128*64. I see that, there are two data background, tumour. You can have 0 in background and 1 in tumour, using:
idx = ismember(L,'tumor') ;
  5 comentarios
mohd akmal masud
mohd akmal masud el 27 de Jun. de 2022
Sorry, Its Solved. Thak you sir
KSSV
KSSV el 27 de Jun. de 2022
There is a typo error....string should be 'tumor' not 'tumour'. Edited the answer.....check it now.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Data Workflows 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