Cardiff City have confirmed the arrival of Peter Odemwingie from West Bromwich Albion on a two-year contract.