SHARE
TWEET

Untitled

a guest Jan 17th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. For each pixel{
  4.     if it's pixel value is >=  oldThreshold
  5.         sumOfObjectValues = sumOfObjectValues + pixel's value
  6.         numberOfObjectPixels++
  7.     else
  8.         sumOfBackgroundValues = sumOfBackgroundValues + pixel's value
  9.         numberOfBackgroundPixels++
  10. }
  11. uO = sumOfObjectValues / numberOfObjectPixels
  12. uB = sumOfBackgroundValues / numberOfBackgroundPixels
  13.  
  14. newThreshold = (uO + uB) / 2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top