Position: 鄭文昌 > 程式設計
by 鄭文昌 2017-11-17 14:40:21, Reply(7), Views(3457)
Step 1 : 讀入Lena影像。
Step 2 : 建構一張與Lena相同列數但有兩倍行數的空白影像。
Step 3 : 設定一張暫時影像,並讓暫時影像利用ROI設定指向合併影像邊ROI,複製lena到暫時影像。
Step 4 : 接著設定暫時影像指向合併影像的邊ROI,複製lena到暫時影像。
Step 5 : 顯示結果。

#include <opencv2\opencv.hpp>

using namespace cv;

void main()
Mat img = imread("C:\\opencv\\sources\\samples\\cpp\\lena.jpg");
Mat newimg = Mat(img.rows, img.cols*2, CV_8UC3);

Mat tmpimg;
tmpimg = newimg(Rect(0, 0, img.rows, img.cols));

tmpimg = newimg(Rect(img.cols, 0, img.rows, img.cols));

imshow("image", img);
imshow("new_image", newimg);


1. result.jpg (312 KB)
Tag: opencv2
Many people don't know how to change wifi password, although it's very easy, just looking at tutorials on 192.168.l.l and you can change in one minute.
Thank you so much for this excellent Post and all the best for your future. I hope you and we will be sharing more thoughts and keep writing more like this one. 

or software which requires you t office 365 product key pay a certain amount, you are provided with its product key. The product key of any software ensures that you have bought it from the licensed means and you have not forged it. – To prevent ransomware from attacking your system, look into security software like Norton Security. With Norton’s Ransomware Shield, you can ward off almost every online threat. The antivirus can be installed on all of your devices.
Microsoft has been actively present in providing us with all the needed tools, applications and platforms for us to read, edit, compose and manage all our vital office documents at,
We live in the technological world all digital modes have become the most convenient ways to communicate. At present, around the world, people are heavily dependent on the internet. An antivirus program is designed in order to protect your device from corrupt software programs