Here is a method that will undistort an image if you have no chessboard pattern but you know the distortion coefficients.
Since I dont know to which coefficients your barrel distortion parameters correspond (maybe have a look at http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html and http://docs.opencv.org/modules/imgproc/doc/geometric_transformations.html#initundistortrectifymap you will have to try it out or maybe someone else can help here.
Another point is that I'm not sure whether openCV will handle both, float and double automatically. If that's not the case there might be a bug in this code (I don't know whether double or single precision is assumed):
cv::Mat distCoeff;
distCoeff = cv::Mat::zeros(8,1,CV_64FC1);
// indices: k1, k2, p1, p2, k3, k4, k5, k6
// TODO: add your coefficients here!
double k1 = 0;
double k2 = 0;
double p1 = 0;
double p2 = 0;
double k3 = 0;
double k4 = 0;
double k5 = 0;
double k6 = 0;
distCoeff.at<double>(0,0) = k1;
distCoeff.at<double>(1,0) = k2;
distCoeff.at<double>(2,0) = p1;
distCoeff.at<double>(3,0) = p2;
distCoeff.at<double>(4,0) = k3;
distCoeff.at<double>(5,0) = k4;
distCoeff.at<double>(6,0) = k5;
distCoeff.at<double>(7,0) = k6;
// assume unit matrix for camera, so no movement
cv::Mat cam1,cam2;
cam1 = cv::Mat::eye(3,3,CV_32FC1);
cam2 = cv::Mat::eye(3,3,CV_32FC1);
//cam2.at<float>(0,2) = 100; // for testing a translation
// here the undistortion will be computed
cv::Mat map1, map2;
cv::initUndistortRectifyMap(cam1, distCoeff, cv::Mat(), cam2, input.size(), CV_32FC1, map1, map2);
cv::Mat distCorrected;
cv::remap(input, distCorrected, map1, map2, cv::INTER_LINEAR);