What does logical AND operator do with label matrices?

In this code, blobs are small blobs within a greater tissue (tissuemask). It's my understanding that the output of watershed, wsh, is a label matrix that labels over 400 different blobs.
wsh = watershed(~(blobs)); % separate any connected blobs
c = imdilate(blobs) & wsh & tissuemask;
c is another mask that contains all three here - my question is, how is wsh treated as a logical binary mask when it contains values from 1 to over 400? How does the AND operator treat a label matrix? Does it just include any nonzero value?

 채택된 답변

Gatech AE
Gatech AE 2021년 6월 8일

0 개 추천

The AND operator treats any nonzero value in "wsh" as true, so specific information about the labels is thrown out when creating "c"

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2021년 6월 8일

댓글:

2021년 6월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by