Thanks to an absolutely beautiful paper, I now have center detection working.