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

dice similarity index between segmented image and ground truth

Asked by Tabish Raza on 26 Mar 2013

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

0 Comments

Tabish Raza

1 Answer

Answer by Anand on 26 Mar 2013
Edited by Anand 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 on 26 Mar 2013

but how to put segIm image value is that whole image

Image Analyst 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

Contact us