Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

dice similarity index between segmented image and ground truth

Asked by Tabish Raza

Tabish Raza (view profile)

on 26 Mar 2013
Latest activity Commented on by Anand

Anand (view profile)

on 24 Oct 2014
Accepted Answer by Anand

Anand (view profile)

Helo I have an segmented image , trying to find dice similarity index between the segmented image and ground truth.

0 Comments

Tabish Raza

Tabish Raza (view profile)

2 Answers

Answer by Anand

Anand (view profile)

on 26 Mar 2013
Edited by Anand

Anand (view profile)

on 26 Mar 2013
Accepted answer

How about this:

dice = 2*nnz(segIm&grndTruth)/(nnz(segIm) + nnz(grndTruth))

This expects segIm and grndTruth to be of the same size. They must also be numeric or logical.

2 Comments

Tabish Raza

Tabish Raza (view profile)

on 26 Mar 2013

but how to put segIm image value is that whole image

Image Analyst

Image Analyst (view profile)

on 26 Mar 2013

I don't understand. segIm is what he called your final segmented image - your final binary image after all processing has been done. What do you mean by "how to put is that whole image"? There is nothing to put, it is just a variable. And you stick the variable into the equation.

Anand

Anand (view profile)

Answer by APOORVA SAFAI

APOORVA SAFAI (view profile)

on 17 Oct 2014

how to make the two images of same size if they differ?

1 Comment

Anand

Anand (view profile)

on 24 Oct 2014

Use imresize.

APOORVA SAFAI

APOORVA SAFAI (view profile)

Contact us