For all the Harry Potter and SiFi fan!! Now you can finally go completely INVISABLEQ !! Utilizing the power of OpenCV and python
CHECK OUT Final Output Below :) !!
Input
- Initial frame
- Background
- Live Video Frame
Output
- Harry's Invisable Cloak
- Capture an Initial frame, this will be the background
- Capture Live Video.
- Optimize it for processing: *Convert BGR to HSV , Apply GaussianBlur
- Calcualte HVS values of the Cloak
- Create a mask of the ROI(cloak)
- Inverse the mask utlizing cv2.Threshold type cv.THRESH_BINARY_INV
- Apply cv2.bitwise_and operation onto the frames
- LiveFrame = cv.bitwise_and(maskInv, frame)
- This will remove the ROI(cloak) area from the live frame.
- cloakArea = cv.bitwise_and(frameINT, mask)
- This will remove all non ROI(cloak) area from the Initial frame.
- LiveFrame = cv.bitwise_and(maskInv, frame)
- Apply cv2.bitwise_OR operation onto the frames
- FinalFrame = cv.bitwise_or(LiveFrame, cloakArea)
- This will mask the frames togeather.
- FinalFrame = cv.bitwise_or(LiveFrame, cloakArea)