Cell detection algorithm revised