Skip to content

Update tutorial for erosion / dilation#17839

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
malliaridis:master
Nov 18, 2020
Merged

Update tutorial for erosion / dilation#17839
opencv-pushbot merged 1 commit intoopencv:3.4from
malliaridis:master

Conversation

@malliaridis
Copy link
Copy Markdown
Contributor

@malliaridis malliaridis commented Jul 14, 2020

Demo page

PR Information

The tutorial for erosion and dilation lack on explanation for java and python. With this PR I want to improve the tutorial by modifying and expanding the information provided.

This PR addresses the following:

  • Add python explanation
  • Add java explanation
  • Restructure python tutorial code
  • Expand explanation texts for missing code sections
  • Provide a troubleshooting section for known errors (removed as discussed)
  • Discuss tutorial code refactoring (resulting window varies between languages)

Feedback and opinions about the changes are appreciated.

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 OpenCV (BSD) License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work (not a bug)
  • ~~There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.~ ((not applicable)
  • The feature is well documented and sample code can be built with the project CMake (not applicable)
force_builders=docs

@asmorkalov
Copy link
Copy Markdown
Contributor

@malliaridis Is the patch ready for review? Please change PR status, when you are done.

@malliaridis
Copy link
Copy Markdown
Contributor Author

@asmorkalov I have till next week a tight schedule. The java part is completely missing yet and I would like to add and test it before changing the status of the PR.

@asmorkalov asmorkalov added the category: documentation Documentation fix or update label Aug 5, 2020
@malliaridis
Copy link
Copy Markdown
Contributor Author

Because of vacation it takes more time to complete this PR. Sorry for the circumstances. If you have any feedback yet however let me know. I will read it when I return back to work.


Troubleshooting
---
@add_toggle_python
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure that function's tutorial is a right section for Python troubleshooting (both are about misused OpenCV version - samples assume OpenCV binaries from the same version and for right Python version)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alalek I know, that was my first thought too. However, I confronted a lot of issues while installing OpenCV for python under Ubuntu. I also have trouble for the java installation. The sites and tutorials found in docs and online are very error prune or are for older versions. Some tutorials aren't working at all or install OpenCV and the version is shown but nothing more (executing example code throws errors). That's why I though it would be useful to bring some clarification as a "troubleshooting" section. But of course I can remove the section.

What's your opinion about the other content (except the troubleshooting section now)?

P.S. I want to start also a discussion somewhere about simplifying the installation process by collecting some opinions and discuss various installation options and the problems beginners have while starting learning OpenCV. That way the troubleshooting section won't be necessary at all and the beginners can get started much faster. My experience for example wasn't that great and the installation process was too complicated for "just trying it out". Finding the right resources and explanations was quite difficult.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe this content should be contributed into this document instead: https://github.com/opencv/opencv/wiki/FAQ (maintained by @asmorkalov )
Please open a new issue with proposals for Wiki updates (GitHub doesn't support PRs for Wiki)

There is PR with updating of installation process: #18195
Feel free to discuss it there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@asmorkalov do you think we can fit somehow this kind of content in the FAQ?

And about the mentioned PR, I'll check it out, thanks. Looks like a lot of improvements are being made.

@asmorkalov
Copy link
Copy Markdown
Contributor

@malliaridis Friendly reminder.

malliaridis added a commit to malliaridis/opencv that referenced this pull request Sep 3, 2020
Remove troubleshooting section as discussed in PR opencv#17839.
@malliaridis malliaridis changed the title WIP: Update tutorial for erosion / dilation Update tutorial for erosion / dilation Sep 3, 2020
@malliaridis
Copy link
Copy Markdown
Contributor Author

I would like to mention that the code snippets that were found and reused are implemented with different resulting windows, preventing a comparison or squashing of the explanation texts.

Also, some optional parameters in functions from the python library seem to be required in java (no defaults).

@malliaridis malliaridis marked this pull request as ready for review September 3, 2020 17:08
@asmorkalov
Copy link
Copy Markdown
Contributor

@malliaridis I reviewed the PR and it looks good to me 👍 . Please squash commits and we can merge it.

@alalek
Copy link
Copy Markdown
Member

alalek commented Nov 16, 2020

This patch should go into 3.4 branch first.
We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@asmorkalov asmorkalov added the pr: needs rebase Rebase patch (and squash fixup commits) on the top of target branch label Nov 17, 2020
@malliaridis malliaridis changed the base branch from master to 3.4 November 18, 2020 12:04
- Add python explanation for erosion and dilation
- Add java explanation for erosion and dilation
- Restructure and reword specific sections
@malliaridis
Copy link
Copy Markdown
Contributor Author

This patch should go into 3.4 branch first.
We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

I hopefully followed all steps correctly. Let me know if I missed something. I also stashed the commits as requested.

@alalek
Copy link
Copy Markdown
Member

alalek commented Nov 18, 2020

Demo page for this PR.

@asmorkalov asmorkalov self-requested a review November 18, 2020 13:42
@asmorkalov asmorkalov self-assigned this Nov 18, 2020
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.

Well done!

@opencv-pushbot opencv-pushbot merged commit 87ed750 into opencv:3.4 Nov 18, 2020
This was referenced Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: documentation Documentation fix or update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants