Add adaptive ring background estimation #719
cdeil left a comment
I've left a bunch of inline comments.
Overall the code looks clean and nice, most comments are suggestions for consideration and it'd also be OK to leave as-is if you prefer.
I didn't review the core algorithm, it would be nice to have a few more asserts that show that the ring enlarges as it should by the algorithm definition (by looking at ring parameters and total pixels as well as pixels outside exclusion in the ring, for two positions (a. where the ring doesn't adapt, b. where it does adaptively enlarge).