Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Jaccard similarity coefficient for image segmentation

`similarity = jaccard(BW1,BW2)`

`similarity = jaccard(L1,L2)`

`similarity = jaccard(C1,C2)`

computes the intersection of binary images `similarity`

= jaccard(`BW1`

,`BW2`

)`BW1`

and
`BW2`

divided by the union of `BW1`

and
`BW2`

, also known as the Jaccard index. The images can be
binary images, label images, or categorical images.

computes the Jaccard index for each label in label images `similarity`

= jaccard(`L1`

,`L2`

)`L1`

and `L2`

.

computes the Jaccard index for each category in categorical images
`similarity`

= jaccard(`C1`

,`C2`

)`C1`

and `C2`

.