How to Find Performance Ratio (PR)? If we have one image from BSD (The Berkeley Segmentation Dataset and Benchmark) and for this images Ground truth, how to calculate PR?

PR is the ratio of true to false edges and can be calculated by the formula:


  PR = True Edges (Edge pixels identified as Edges)/False Edges (Non
  edge pixels identified as edges) + (Edge pixels identified as Non-Edge
  pixels)


How to find those arguments in formula?
When you segment an image you have boundaries between segments.
Those boundary pixels (Just between 2 different segments) are the edge pixels above.