Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: ROC curve of target and source images
Replies: 10   Last Post: Mar 14, 2014 6:46 AM

 Messages: [ Previous | Next ]
 Tony Kittler Posts: 109 Registered: 2/5/11
Re: ROC curve of target and source images
Posted: Mar 2, 2013 1:56 PM

"Alan B" <monguin61REM@OVETHIS.yahoo.com> wrote in message <kgqn0c\$8pv\$1@newscl01ah.mathworks.com>...
> "Carl S." wrote in message <kgjuaj\$6d3\$1@newscl01ah.mathworks.com>...
> > "Alan B" <monguin61REM@OVETHIS.yahoo.com> wrote in message <kgjkn4\$b5j\$1@newscl01ah.mathworks.com>...
> > > > "Carl S." wrote in message <kgfk3g\$9i5\$1@newscl01ah.mathworks.com>...
> > > > I have performed the following process:
> > > > 1) I have applied Dice similarity measurement for automatically segmented images and obtained the following similarity coefficients

> > >
> > > ROC curves are more generally applicable than just your application, so it is not clear what you expect your function to do. If you want help, you might want to try explaining what you are trying to do in more detail.

> >
> > Thanks Alan,
> > I would like to compare different segmentation algorithms. I have obtained segmented images from these algorithms. I have manually segmented images. I want to draw ROC curve. To draw ROC curve, I need some values such as positive true, negative true values. When I searched matlab functions to obtain these values, the functions ask Label and Scores. But I dont know how can I decide the labels and scores. Think that you have segmented brain image. How can you decide ?
> >
> > Shortly, I have automatically segmented images obtained from different algorithms. And manually segmented reference images. Now, I need an application that gets these images as input and draws ROC curves.
> > Help me pls

>
> This isn't a matlab-specific question; there are several different ways you might do that. If you can explain exactly what algorithm you are trying to implement, then you can expect an answer here. If you aren't sure what algorithm is appropriate to use for your problem, then your teacher/boss/reference paper is a better place to get that information.

Thanks Alan,
I have implemented an algorithm to draw ROC curves and to obtain accuracy value by using grayscale test and target images. But I think, the results are not ture since it give %90 accuracy when the test image seems very different. Could you please help me where the mistake is in the following codes:

FPcounts = sum(FPimg);
FP = sum(FPimg(:))

TPcounts = sum(TPimg);
TP = sum(TPimg(:))

FNcounts = sum(FNimg);
FN = sum(FNimg(:))

TNimg = 1- FPimg
TNcounts = sum(TNimg);
TN =sum(TNimg(:))

FP_TNcounts = FPcounts + TNcounts;
TP_FNcounts = FNcounts + TPcounts;

FP_TNcounts(find(FP_TNcounts==0))=1e-10; % to solve divide by zero error
TP_FNcounts(find(TP_FNcounts==0))=1e-10; % to solve divide by zero error

FPrate(:,:,i) = FPcounts./FP_TNcounts; % 1-specifisity
TPrate(:,:,i) = TPcounts./TP_FNcounts; % sensitivity

Date Subject Author
2/25/13 Tony Kittler
2/25/13 Tony Kittler
2/26/13 Tony Kittler
2/26/13 Alan
2/26/13 Tony Kittler
3/1/13 Alan
3/2/13 Tony Kittler
3/4/13 Tony Kittler
3/4/13 Tony Kittler
9/24/13 Ashraful Alam
3/14/14 Anitha Alex