[opencv.js] support for findHomography()

the homography didn’t work with AKAZE and knnMatch if you delete the objects at the end of the script

if you look at the console.log you will see the matrix as this:

h: 
Mat {$$: {…}}
cols: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.cols getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
data: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.data getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
data8S: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.data8S getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
data16S: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.data16S getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
data16U: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.data16U getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
data32F: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.data32F getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
data32S: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.data32S getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
data64F: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.data64F getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
matSize: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.matSize getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
rows: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.rows getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
step: [Exception: BindingError {name: "BindingError", message: "cannot call emscripten binding method Mat.step getter on deleted object", stack: "BindingError: cannot call emscripten binding metho…cv.js:30:7596785)↵    at Mat.o (<anonymous>:1:83)"}]
$$: {ptrType: RegisteredPointer, ptr: undefined, count: {…}, smartPtr: undefined}
__proto__: ClassHandle

however, if I don’t delete the objects at the end of the script, I don’t get errors in the matrix and the hemography matrix forms but it does not transform the image in warpPerspective()

commenting out:

            /*
            matches.delete();
            bf.delete();
            orb.delete();
            descriptors1.delete();
            descriptors2.delete();
            keypoints1.delete();
            keypoints2.delete();
            im1Gray.delete();
            im2Gray.delete();
            h.delete();
            image_B_final_result.delete();
            mat1.delete();
            mat2.delete();
             */

here is the 3x3 matrix that forms:

h: 
Mat {$$: {…}}
cols: 3
data: Uint8Array(72)
data8S: Int8Array(72)
data16S: Int16Array(36)
data16U: Uint16Array(36)
data32F: Float32Array(18)
data32S: Int32Array(18)
data64F: Float64Array(9)
matSize: Array(2)
rows: 3
step: Array(2)
$$: {ptrType: RegisteredPointer, ptr: 35449296, count: {…}}
__proto__: ClassHandle