Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Google search "OpenCV tutorial Javascript background subtraction". Following that example, you would also do bg.copyTo(dst, mask); The mask may need cv.bitwise_not(mask,mask) or cv.THRESHOLD_BINARY. You may use cv.copyMakeBorder() to allow for unequal mat size. Also, sometimes cv.cvtColor() in regard to bit depth or function output.

Usually a Python example can be followed by replacing cv2 or cv:: with cv. and moving the variable assignment into the function. Numpy and improc photo modules, if those are used, may prove difficult to migrate. Try typing something like cv.seamlessClone in the console to check availability... But the online tutorials output a VERY robust error message in the iframe.