[Github Result]
다음과 같은 opencv library들을 포함: imgcodecs, highgui, stitching
  #include <iostream>
  #include <fstream>
        
  // Time duration related
  #include <chrono>
        
  // stitching related
  #include "opencv2/imgcodecs/imgcodecs.hpp"
  #include "opencv2/highgui/highgui.hpp"
  #include "opencv2/stitching.hpp"
        
  // Original Image Size: width * height = 4032 * 1908
  bool RESIZE = false;
        
  int main()
  {
  	// To check time
  	auto start = std::chrono::high_resolution_clock::now();
        
  	// Define mode for stitching as panorama
  	cv::Stitcher::Mode mode = cv::Stitcher::PANORAMA;
        
  	// Road images
  	cv::Mat left = cv::imread("/home/sj/iros2022/image/left.jpg", 1);
  	cv::Mat front = cv::imread("/home/sj/iros2022/image/front.jpg", 1);
  	cv::Mat right = cv::imread("/home/sj/iros2022/image/right.jpg", 1);
        
    // Check image read correctly
  	if(left.cols != 0)
  		std::cout << "Correctly read left image !!" << std::endl;
  	if(front.cols != 0)
  		std::cout << "Correctly read front image !!" << std::endl;
  	if(right.cols != 0)
  		std::cout << "Correctly read right image !!" << std::endl;
        
  	// Resize image 
  	double height = left.cols / 4;
  	double width = left.rows / 4;
        
  	// Combine three images in one vector 
  	std::vector<cv::Mat> imgs;
  	imgs.push_back(left);
  	imgs.push_back(front);
  	imgs.push_back(right);
        
  	// Initialization output image
  	cv::Mat panorama;
        
  	// Make panorama image using cv::Stitcher 
  	cv::Ptr<cv::Stitcher> stitcher = cv::Stitcher::create(mode, false);
    cv::Stitcher::Status status = stitcher->stitch(imgs, panorama);
        	
  	// If we want to change image size, then please change variable "RESIZE" **false** to **true** !!
  	if(RESIZE)
  		cv::resize(panorama, panorama, cv::Size(height, width), CV_INTER_LINEAR);
        
  	// Check time duration
  	auto finish = std::chrono::high_resolution_clock::now();
  	auto duration = std::chrono::duration_cast<std::chrono::microseconds>(finish - start);
  	std::cout << "Time duration: " << (double)duration.count() / 1000000 << " sec" << std::endl;
        
  	// Write and show result image 
    cv::imwrite("/home/sj/iros2022/image/result.jpg", panorama);
  	cv::imshow("Result", panorama);
          
  	// Wait image not auto cancel
    cv::waitKey(0);
        
  	return 0;
  }
C++을 사용하였고 3개의 라이브러리를 포함하고 있으므로 stitching 이라는 이름을 가진 exeutive file을 만들어줌
  g++ stitching.cpp -L/usr/local/include/opencv2 -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_core -lopencv_stitching -o stitching
해당 파일에 다음과 같이 작성해주면 컴파일한 코드를 빌드 및 실행
  # Example of current path: /home/sj/iros2022/src/Stitching
  ./stitching
 
   
   
   
  