SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- For each pixel{
- if it's pixel value is >= oldThreshold
- sumOfObjectValues = sumOfObjectValues + pixel's value
- numberOfObjectPixels++
- else
- sumOfBackgroundValues = sumOfBackgroundValues + pixel's value
- numberOfBackgroundPixels++
- }
- uO = sumOfObjectValues / numberOfObjectPixels
- uB = sumOfBackgroundValues / numberOfBackgroundPixels
- 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.