How to find true positive and true negative of a segmented image?

4 views (last 30 days)
Hello everyone. I am working on "Retinal Blood Vessel Segmentation". I want to draw ROC using matlab. I am confused about how to find the TP and FP of a segmented image. After that how to plot ROC? I am clear about the definitions of all three. But how actually for a segmented image I can calculate true positives and true negatives?

Accepted Answer

Walter Roberson
Walter Roberson on 29 Jun 2017
In order to calculate true positive and false positive and the like, you need to have a reference telling you what each pixel really is. True positive would count the places that you predict that a region is part of a segment and the reference tells you that Yes, the region really is part of a segment. False positive counts the places that you predict that a pixel is part of a segment but the reference tells you that it is not part of the segment. True negative counts the places that you predict that a pixel is not part of a segment, and the reference tells you that indeed the pixel is not part of a segment.
Any kind of segmentation like that almost always has a parameter whose value can be moved through a range of values, and the segmentation regenerated, and the positive/negative counts recalculated. You can generate a data point on a curve for each of the four different combinations for each distinct parameter value you try out, so you can plot those with changes in value.
But you need a reference of what each pixel really is -- you need a "ground truth" to calculate this.
You might wonder why you would bother doing any of this if you already have a reference image. The point is that you would have a number of images with known results that you would use to "train" the routine to get the best overall results. Once you have that, you can apply it to images for which the results are not known, and you would have an idea of how good you should expect the outcome to be based upon how well it did on the known images.
  13 Comments
Image Analyst
Image Analyst on 2 Apr 2018
You have to define what a true positive is. No one or no algorithm is going to know what "truth" is unless you tell it. In your case that might be you hand painting the image to identify what pixels you consider to be "true" vessels. If you paint an image and say that's a vessel, then that's a vessel. Who's to argue with you? I mean some trusted expert (you or your ophthalmologist) has to be the one with expert knowledge as to what is a true vessel pixel or not.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!