Created
February 16, 2017 08:15
-
-
Save squm/51838c8df48cce9e56cdd432e2b513fb to your computer and use it in GitHub Desktop.
Mat bitwise
This file contains hidden or 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
void | |
bitwise() { | |
const uchar X = 0; | |
Mat mask = (Mat_<uchar>(1, 2) << | |
1, X | |
); | |
threshold(mask, mask, X, 255, THRESH_BINARY); | |
cout << mask << endl; | |
Mat rgb = | |
Mat(1, 2, CV_8UC3, Scalar(1, 11, 111)); | |
cout << rgb << endl; | |
bitwise_and(rgb, rgb, rgb, mask); | |
cout << rgb << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment