Not terribly, AFAIK. Selling the POWs to slavery was probably much more readily profitable, as most of them cannot have had the kinds of connections and background needed to scrape together a decent ransom payment (or were an important enough resource to their masters to be worth ransoming with their money).
OTOH, didn't at least Hannibal end up with quite a bit of ex-Roman infantry ?