gist start
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
http://study.marearts.com/2017/02/opencv-lecture-and-or-xor-not-example_14.html | |
http://cvlecture.marearts.com/2017/02/opencv-lecture-4-6.html | |
//실제 영상에서 | |
Mat img = imread("empireofthesun.jpg"); | |
Mat img_mask = img.clone(); // imread("empireofthesun_mask.jpg"); | |
img_mask.setTo(0); | |
circle(img_mask, Point(1000 / 5 * 2, 500 / 2), 250, CV_RGB(255, 255, 255), CV_FILLED); | |
Mat res; | |
//bitwise_and(img, img_mask, res); | |
bitwise_and(img, img_mask, res); imshow("AND", res); | |
bitwise_or(img, img_mask, res); imshow("OR", res); | |
bitwise_xor(img, img_mask, res); imshow("XOR", res); | |
bitwise_not(img, res); imshow("NOT", res); | |
imshow("img_mask", img_mask); | |
imshow("img", img); | |
waitKey(0); | |
gist end
http://cvlecture.marearts.com/2017/02/opencv-lecture-4-6.html
ReplyDelete