Skip to content

fix python sample code (tst_scene_render) #24116

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
chaebkimm:update-samples-python-tst_scene_render
Aug 9, 2023
Merged

fix python sample code (tst_scene_render) #24116
asmorkalov merged 2 commits intoopencv:4.xfrom
chaebkimm:update-samples-python-tst_scene_render

Conversation

@chaebkimm
Copy link
Copy Markdown
Contributor

Fix bug of python sample code (samples/python/tst_scene_render.py) when backGr or fgr is None (#24114)

  1. pass shape tuple to np.zeros arguments instead of integers
  2. change np.int to int

Pull Request Readiness Checklist

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

  • [o] I agree to contribute to the project under Apache 2 License.
  • [o] 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
  • [o] The PR is proposed to the proper branch
  • [o] There is a reference to the original bug report and related work
  • [o] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • [o] The feature is well documented and sample code can be built with the project CMake

… parameter for shape. 2) np.int is deprecated in NumPy 1.20
@chaebkimm chaebkimm changed the title fix python sample code (tst_scene_render) #24114 fix python sample code (tst_scene_render) Aug 7, 2023
Removed test codes
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov self-assigned this Aug 9, 2023
@asmorkalov asmorkalov added this to the 4.9.0 milestone Aug 9, 2023
@asmorkalov asmorkalov merged commit f834736 into opencv:4.x Aug 9, 2023
@asmorkalov asmorkalov mentioned this pull request Sep 11, 2023
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
…tst_scene_render

Fix python sample code (tst_scene_render) opencv#24116

Fix bug of python sample code (samples/python/tst_scene_render.py) when backGr or fgr is None (opencv#24114)

1) pass shape tuple to np.zeros arguments instead of integers
2) change np.int to int

### Pull Request Readiness Checklist

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

- [o] I agree to contribute to the project under Apache 2 License.
- [o] 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
- [o] The PR is proposed to the proper branch
- [o] There is a reference to the original bug report and related work
- [o] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [o] The feature is well documented and sample code can be built with the project CMake
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
…tst_scene_render

Fix python sample code (tst_scene_render) opencv#24116

Fix bug of python sample code (samples/python/tst_scene_render.py) when backGr or fgr is None (opencv#24114)

1) pass shape tuple to np.zeros arguments instead of integers
2) change np.int to int

### Pull Request Readiness Checklist

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

- [o] I agree to contribute to the project under Apache 2 License.
- [o] 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
- [o] The PR is proposed to the proper branch
- [o] There is a reference to the original bug report and related work
- [o] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [o] The feature is well documented and sample code can be built with the project CMake
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.

2 participants