How to convert cell to logical?

3 次查看(过去 30 天)
Dear all. I have the image grountruth as attached. the image categorical.
Anyone know how to convert it into logical?

采纳的回答

KSSV
KSSV 2022-6-27
编辑:KSSV 2022-6-27
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 个评论
KSSV
KSSV 2022-6-27
There is a typo error....string should be 'tumor' not 'tumour'. Edited the answer.....check it now.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by