Added err arguments

OpenCV functions now seem to return (err, val) style arguments. Updated example to handle