bg discovery via gray and smooth