您的位置:首页 > 运维架构

图像分割评价标准VO&DC的计算方法

2017-06-19 16:46 337 查看
1.DC  
Dice Coefficient
2.VO  
Volume Overlap
     The number of voxels in the intersection of segmentation and reference,
divided by the number of voxels in the union of segmentation and reference


// int main(int argc, char** argv)   

//{

//    char filename[100];

//    float sum,sum1;

//    

//    for(int i=0;i<=23;i++)

//

//    {

//    sprintf(filename,"F:/fighting/project/data/add_result/4-%d.png",i);// 将图片以数字命名:例如1.jpg 2.jpg等,放入D:/test/文件夹下

//    sum=sum1=0.00;

//    IplImage * img=cvLoadImage(filename);

//    CvScalar s;

//    for(int i=0;i<img->height;i++)

//       {

//          for(int j=0;j<img->width;j++)

//          {

//             s=cvGet2D(img,i,j); // get the (i,j) pixel value

//

//             if(s.val[0]==255)

//             {

//             sum++;

//             }

//             else if(s.val[0]>100 && s.val[0]<255)

//             {

//                 sum1++;

//             }

//         }

//       }

//    float DC=2*sum/(sum1+2*sum);

//    float VO=sum/(sum1+sum);

//    //printf("iou=%d",ratio);

//    //cout<<sum<<"  "<<sum1<<endl;

//    cout<<"DC is "<<DC<<";  "<<"VO is "<<VO<<endl;

//    }

//    cvWaitKey();

// }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  opencv DC VO