-
-
Save Praveen76/f67f7111636c3eec56626f5906d30799 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
blank=np.zeros((400,400),dtype='uint8') | |
rect=cv.rectangle(blank.copy(),(30,30),(370,370),255,-1) | |
circle=cv.circle(blank.copy(),(200,200),200,255,-1) | |
cv.imshow('Rectangle',rect) | |
cv.imshow('Circle',circle) | |
#BitWise And --> Intersection Region | |
bitwiseAND=cv.bitwise_and(rect,circle) | |
#BitWise OR | |
bitwiseOR=cv.bitwise_or(rect,circle) | |
#BitWise XOR --> Intersect- Union | |
bitwiseXOR=cv.bitwise_xor(rect,circle) | |
#BitWise NOT --> Invert the color | |
bitwiseNOT=cv.bitwise_not(rect,circle) | |
cv.imshow('bitwiseAND',bitwiseAND) | |
cv.imshow('bitwiseOR',bitwiseOR) | |
cv.imshow('bitwiseXOR',bitwiseXOR) | |
cv.imshow('bitwiseNOT',bitwiseNOT) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment