Last active
December 25, 2015 16:39
-
-
Save alfredplpl/7007944 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cv::Mat image=cv::imread("./image.png",-1); | |
cv::Mat trans=cv::imread("./trans.png",0); | |
cv::Rect rect1(startColumn1,startRow1,trans.cols,trans.rows); | |
cv::Mat subdst1=dst(rect1); | |
trans.convertTo(subdst1,subdst1.type(),alpha);//double alphaは透過率[0.0, 1.0] | |
cv::Rect rect2(startColumn2,startRow2,image.cols,image.rows); | |
cv::Mat subdst2=dst(rect2); | |
image.copyTo(subdst2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment