Skip to content

added ximgproc edgedrawing to opencvjs, #25656

Closed
geroldmeisinger wants to merge 1 commit intoopencv:4.xfrom
geroldmeisinger:4.x
Closed

added ximgproc edgedrawing to opencvjs, #25656
geroldmeisinger wants to merge 1 commit intoopencv:4.xfrom
geroldmeisinger:4.x

Conversation

@geroldmeisinger
Copy link
Copy Markdown

@geroldmeisinger geroldmeisinger commented May 27, 2024

fixed external constructor from function which returns a Ptr

The problem was that Ptr< EdgeDrawing > createEdgeDrawing () gets base_class_name="EdgeDrawing" where the self.classes are added with namespace prefixed ximgproc_EdgeDrawing.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders=Custom
build_image:Docs=docs-js
build_image:Custom=javascript
buildworker:Custom=linux-1,linux-4,linux-f1

@geroldmeisinger
Copy link
Copy Markdown
Author

this pull request also requires a change in contrib:

opencv_contrib/modules/ximgproc/CMakeLists.txt:

ocv_define_module(ximgproc opencv_core opencv_imgproc opencv_calib3d opencv_imgcodecs opencv_video WRAP python java objc)
=> add js at end

Copy link
Copy Markdown
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

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

Main repo should not know specific detail of opencv_contrib.
Integration should be done through modules/<name>/misc/javascript instead.

white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, photo, calib3d])
ximgproc = { '': ['createEdgeDrawing'], 'ximgproc_EdgeDrawing': ["setParams", "detectEdges", "getEdgeImage"], 'ximgproc_EdgeDrawing_Params': ["Params", "PFmode"] }

white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, photo, calib3d, ximgproc])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not the right place for opencv_contrib modules details.

There is no JS wrapper enabled for ximgproc: https://github.com/opencv/opencv_contrib/blob/baaeb68b3d6b557536f95b527c0dd87c8f1ce80d/modules/ximgproc/CMakeLists.txt#L2

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i followed the example of opencv_contrib aruco which is also defined in opencv/platforms/js/opencv_js.config.py. there is no javascript directory for any module.

asmorkalov added a commit that referenced this pull request Aug 23, 2024
Split Javascript white-list to support contrib modules #25986

Single whitelist converted to several per-module json files. They are concatenated automatically and can be overriden by user config.

Related to #25656

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
@asmorkalov
Copy link
Copy Markdown
Contributor

@geroldmeisinger I split JS whitelist file by modules in #25986. Now You can place contrib related part to contrib repo.

thewoz pushed a commit to CobbsLab/OPENCV that referenced this pull request Feb 13, 2025
Split Javascript white-list to support contrib modules opencv#25986

Single whitelist converted to several per-module json files. They are concatenated automatically and can be overriden by user config.

Related to opencv#25656

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
@asmorkalov
Copy link
Copy Markdown
Contributor

Replaced by #27828 and opencv/opencv_contrib#4007

@asmorkalov asmorkalov closed this Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants