Skip to content

Improving the project with opencv_contrib#6

Merged
kalwalt merged 17 commits intomainfrom
webarkit-testing-feature
Sep 23, 2023
Merged

Improving the project with opencv_contrib#6
kalwalt merged 17 commits intomainfrom
webarkit-testing-feature

Conversation

@kalwalt
Copy link
Copy Markdown
Member

@kalwalt kalwalt commented Sep 18, 2023

I will works in this PR on this tasks:

  • improving the script to compile opencv with the external module opencv_contrib
  • adding as submodules our opencv and opencv_contrib forks
  • provide an github action script to compile and make a new relase with uploaded the libs, headers and all required to compile webarkit.

For more informations see PR webarkit/WebARKitLib#19

- using webarkit opencv and opencv_contrib forks as submodules
@kalwalt kalwalt added the enhancement New feature or request label Sep 18, 2023
@kalwalt kalwalt self-assigned this Sep 18, 2023
@kalwalt
Copy link
Copy Markdown
Member Author

kalwalt commented Sep 21, 2023

Now the script sohould be capable to build the emscripten and standard (linux) static libs. I will try to set up a github action to test the script and eventually make an automatic release, so everyone can download the zipped static libs.

@kalwalt
Copy link
Copy Markdown
Member Author

kalwalt commented Sep 21, 2023

The build script fails creating the opencv_java shared lib, on my local machine doesn't happens ( maybe because i have not the required libs for java?), so i will force to disable the java module and rerun the build script.

@kalwalt
Copy link
Copy Markdown
Member Author

kalwalt commented Sep 21, 2023

Ok now all the libs are built but the action script fails with this message:

Opencv.js and static libs successfully built!
Packagings libs and includes in a .zip file...
rsync: [sender] change_dir "/home/runner/work/opencv-em/opencv-em/opencv_js" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at flist.c(2244) [sender=3.2.7]
rsync error: received SIGUSR1 (code 19) at main.c(1613) [Receiver=3.2.7]
Error: Process completed with exit code 3.

I will fix soon.

@kalwalt
Copy link
Copy Markdown
Member Author

kalwalt commented Sep 22, 2023

Now the script is succesful, but i discovered that the xfeatures2d module is not built.

Comment thread build.sh Outdated
OPENCV_EXTRA_MODULES_EXCLUDE="-DBUILD_opencv_bgsegm=OFF -DBUILD_opencv_bioinspired=OFF -DBUILD_opencv_fuzzy=OFF -DBUILD_opencv_hfs=OFF -DBUILD_opencv_img_hash=OFF -DBUILD_opencv_intensity_transform=OFF -DBUILD_opencv_line_descriptor=OFF -DBUILD_opencv_optflow=OFF -DBUILD_opencv_phase_unwrapping=OFF -DBUILD_opencv_plot=OFF -DBUILD_opencv_rapid=OFF -DBUILD_opencv_reg=OFF -DBUILD_opencv_rgbd=OFF -DBUILD_opencv_saliency=OFF -DBUILD_opencv_stereo=OFF -DBUILD_opencv_structured_light=OFF -DBUILD_opencv_surface_matching=OFF -DBUILD_opencv_tracking=OFF -DBUILD_opencv_ximgproc=OFF -DBUILD_opencv_xobjdetect=OFF -DBUILD_opencv_xphoto=OFF"
OPENCV_EXTRA_MODULES_INCLUDE="-DBUILD_opencv_xfeatures2d=ON "
OPENCV_EXTRA_MODULES_PATH="-DOPENCV_EXTRA_MODULES_PATH=../../libs/opencv_contrib/modules"
OPENCV_CONF="${OPENCV_DEFINES} ${OPENCV_EXCLUDE} ${OPENCV_INCLUDE} ${OPENCV_MODULES_EXCLUDE} ${OPENCV_EXTRA_MODULES_INCLUDE} ${OPENCV_EXTRA_MODULES_EXCLUDE} ${OPENCV_MODULES_INCLUDE} ${OPENCV_EXTRA_MODULES} -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_IPP_IW=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_WITH_DEBUG_INFO=OFF -DWITH_PTHREADS_PF=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was providing the wrong path and i haven't added the command to cmake, (see OPENCV_EXTRA_MODULES does not exist... it should be instead OPENCV_EXTRA_MODULES_PATH)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the OPENCV_EXTRA_MODULES_INCLUDE="-DBUILD_opencv_xfeatures2d=ON " is not needed with OPENCV_EXTRA_MODULES_PATH=" -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules/xfeatures2d ../ "

@kalwalt
Copy link
Copy Markdown
Member Author

kalwalt commented Sep 22, 2023

Now because the github action script is succesful i will try to add the .zip files to every new release, so an user can download the pre-built libs.

@kalwalt
Copy link
Copy Markdown
Member Author

kalwalt commented Sep 23, 2023

I have tested the compiled files, all is fine, tested WebARKitLib/tests with this gist

@kalwalt kalwalt merged commit b9f2707 into main Sep 23, 2023
@kalwalt kalwalt deleted the webarkit-testing-feature branch March 11, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant