2/14/2017

OpenCV Lecture, and, or, xor, not example using bitwise_and, bitwise_or, bitwise_xor, bitwise_not (2)



gist start
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



1 comment:

  1. http://cvlecture.marearts.com/2017/02/opencv-lecture-4-6.html

    ReplyDelete