I see, this precomputation of the min/max y values to use (and later, the min/max x for a given y) makes sense, rather than blindly computing rho2 for all pixels and then checking whether it's small enough.  Very nice change.