Skip to content

Commit

Permalink
move homgraphyValid after findHomography
Browse files Browse the repository at this point in the history
- rebuilding libs and improved github actions scripts
  • Loading branch information
kalwalt committed May 15, 2024
1 parent 904d90e commit de1bfc8
Show file tree
Hide file tree
Showing 9 changed files with 1,178 additions and 1,652 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
node:
- 16.x
- 20.x

# Packages 'firefox' and 'chromium' are pre-installed.
#
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_opencv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -27,7 +27,7 @@ jobs:
${{ runner.os }}-node-
- run: git submodule update --init
- run: npm install
- run: docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) -e "EMSCRIPTEN=/emsdk/upstream/emscripten" emscripten/emsdk:2.0.10 emcmake python3 ./opencv/platforms/js/build_js.py opencv_js --config="./opencv.webarkit_config.py" --build_wasm --cmake_option="-DBUILD_opencv_dnn=OFF" --cmake_option="-DBUILD_opencv_objdetect=OFF" --cmake_option="-DBUILD_opencv_photo=OFF" --build_flags="-s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0"
- run: docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) -e "EMSCRIPTEN=/emsdk/upstream/emscripten" emscripten/emsdk:3.1.26 emcmake python3 ./opencv/platforms/js/build_js.py opencv_js --config="./opencv.webarkit_config.py" --build_wasm --cmake_option="-DBUILD_opencv_dnn=OFF" --cmake_option="-DBUILD_opencv_objdetect=OFF" --cmake_option="-DBUILD_opencv_photo=OFF" --build_flags="-s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0"
- run: cp -r opencv_js/bin/opencv_js.js build
- uses: actions/upload-artifact@v3
with:
Expand Down
2,779 changes: 1,154 additions & 1,625 deletions dist/build/opencv_js.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/build/opencv_js.js.map

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions dist/src/Workers/Worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/Workers/Worker.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions dist/webarkitCV.js

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions src/Workers/Worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,16 @@ const track = async (msg: any) => {

if (template_keypoints.length >= ValidPointTotal) {
var homography = cv.findHomography(templateMat, frameMat, cv.RANSAC);
var valid;
if (homographyValid(homography) === true) {
var out = fill_output(cv, homography, valid);
console.log('output from', out);
}
homography_transform = homography.data64F;
} else {
homography_transform = null;
}

var valid;

if (homographyValid(homography) == true) {
var out = fill_output(cv, homography, valid);
console.log(out);
}

noArray.delete();
orb.delete();
frame_keypoints_vector.delete();
Expand Down
2 changes: 1 addition & 1 deletion types/build/opencv_js.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export default cv;
declare function cv(cv: any, ...args: any[]): any;
declare function cv(cv: any): any;

0 comments on commit de1bfc8

Please sign in to comment.