text: #include <iostream>
  #include <vector>
  #include <string>
  #include <opencv2/opencv.hpp>
  
  using namespace cv;
  using namespace std;
  
  void showImage(Mat image) {
    // Present imagem on the screen
    imshow("image", image);
    waitKey(0);
  }
  
  Mat unifyImages(vector<Mat> images, int orientation) {
    // Put images with same pattern on one unique image
    Mat output;
    images[0].copyTo(output);
    switch(orientation) {
      case 0:
      // Vertical
        for(int i = 1; i < images.size(); i++) {
          vconcat(output, images[i], output);
        }
      break;
      case 1:
      // Horizontal
        for(int i = 1; i < images.size(); i++) {
          hconcat(output, images[i], output);
        }
      break;
    }
    
    return output;
  }
  
  int main(int argc, char ** argv) {
    string path = argv[1];
    int kernel_size = stoi(argv[2]);
    
    // Load OpenCV image withou change anything on their color pattern
    Mat image = imread(path, cv::IMREAD_UNCHANGED);
    
    // Get image dimensions
    int cols = image.cols;
    int rows = image.rows;
    
    // Apply erosion/dilation filter
    Mat erosion_mat, dilation_mat;
    Mat kernel = Mat::ones(Size(kernel_size, kernel_size), CV_32F);
    
    erode(image, erosion_mat, kernel);
    dilate(image, dilation_mat, kernel);
    
    showImage(unifyImages({image, erosion_mat, dilation_mat}, 1));
    
    return 0;
  }
  