title: Error when try to get undistorted images after camera calibration and adding camera matrix and distortion coefficients
body: <p>I've used the sample OpenCV program to calculate the camera matrix and distortion coefficients from my camera and produced an xml file with the relevant data.
  No I would like to correct distortion in some images taken from the same camera. So I create the program but still got some error. I'm trying to use it to get undistort image. </p>
  
  <p>Here is my code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt;
  #include &lt;ctime&gt;
  #include &lt;cstdio&gt;
  #include &lt;opencv2/core.hpp&gt;
  #include &lt;opencv2/core/utility.hpp&gt;
  #include &lt;opencv2/imgproc.hpp&gt;
  #include &lt;opencv2/calib3d.hpp&gt;
  #include &lt;opencv2/imgcodecs.hpp&gt;
  #include &lt;opencv2/videoio.hpp&gt;
  #include &lt;opencv2/highgui.hpp&gt;
  #include "cameracalibrator.h"
  
  CameraCalibrator::CameraCalibrator() :
      flag(0),
      mustInitUndistort(true)
  {
  }
  
  using namespace cv;
  using namespace std;
  
  int main(){
  Mat src,gray,image;
  
  Mat cameraMatrix = (Mat1d(3, 3) &lt;&lt;  8.5033354550764898e+002, 0, 640, 0, 8.5033354550764898e+002, 360, 0, 0, 1);
  Mat distortionCoefficients = (Mat1d(1, 5) &lt;&lt; -4.2796890539434634e-001, 2.8770882755049054e-001, 0, 0, -1.4405356460809188e-001);
  
  // remove distortion in an image (after calibration)
  cv::Mat CameraCalibrator::remap(const cv::Mat &amp;image) {
  
      cv::Mat undistorted;
      cv::Mat image=imread("C:/Users/NTU/Desktop/Test/im4.png");
  
      if (mustInitUndistort) { // called once per calibration
  
          cv::initUndistortRectifyMap(
              cameraMatrix,  // computed camera matrix
              distCoeffs,    // computed distortion matrix
              cv::Mat(),     // optional rectification (none) 
              cv::Mat(),     // camera matrix to generate undistorted
  //          cv::Size(640,480),
              image.size(),  // size of undistorted
              CV_32FC1,      // type of output map
              map1, map2);   // the x and y mapping functions
  
          mustInitUndistort= false;
      }
  
      // Apply mapping functions
      cv::remap(image, undistorted, map1, map2, 
          cv::INTER_LINEAR); // interpolation type
  
      return undistorted;
  
  imshow("gg",undistorted);
  while(uchar(waitKey(1))!='Q');
  //return 0;
  }
  }
  </code></pre>
  
  <p>when run got this error : </p>
  
  <pre><code>error: qualified-id in declaration before '(' token
   cv::Mat CameraCalibrator::remap(const cv::Mat &amp;image) {
  </code></pre>
  
  <p>Any help?</p>