Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Python wrapping and documentation for alphamat module #2729

Merged
merged 3 commits into from
Nov 13, 2020

Conversation

sunitanyk
Copy link
Contributor

@sunitanyk sunitanyk commented Oct 28, 2020

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 other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to 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=linux,docs

@sunitanyk sunitanyk marked this pull request as ready for review October 28, 2020 02:53
@alalek
Copy link
Member

alalek commented Oct 28, 2020

Please rebase patch. Use something like:

git fetch upstream
git rebase -i upstream/master

@alalek
Copy link
Member

alalek commented Nov 2, 2020

Merge pull request from opencv/master

Do not use PRs for updating forks.

This way can't remove trash from patches:

wants to merge 13 commits


Use git rebase -i upsteam/master with dropping already "handled" commits instead.

@sunitanyk
Copy link
Contributor Author

Rebased my local branch to upstream/master and then force pushed to origin master.

Input Trimap: ![](samples/trimaps/plant.png)
Output alpha Matte: ![](samples/output_mattes/plant_result.jpg)
Input Image: ![](../samples/input_images/plant.jpg)
Input image should be preferably a RGB image.
Copy link
Member

Choose a reason for hiding this comment

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

Please check images and formation of the result documentation page here.

See also #2743

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the image links. The local files image in the same directory as the markdown file are showing fine in GitHub, while the first three ones with path starting from alphamat folder are not. How to check if all image references are working in the final OpenCV doc page?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just refreshed in the test url you gave. All images look good now. 👍

Copy link
Member

Choose a reason for hiding this comment

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

It is OK to keep images in samples, which can be used as sample's input.

Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you 👍

Possible next steps are:

  • adding Python sample
  • adding test for Python (as misc/python/test/test_alphamat.py)
  • also there is a way to improve tutorial by adding multiple languages support (example)

Input Trimap: ![](samples/trimaps/plant.png)
Output alpha Matte: ![](samples/output_mattes/plant_result.jpg)
Input Image: ![](../samples/input_images/plant.jpg)
Input image should be preferably a RGB image.
Copy link
Member

Choose a reason for hiding this comment

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

It is OK to keep images in samples, which can be used as sample's input.

@sunitanyk
Copy link
Contributor Author

@alalek I can do the Python example and test file changes you suggested above in this PR, if you leave it open. Or I can create a new one, if you need to close this one.

@alalek
Copy link
Member

alalek commented Nov 13, 2020

This PR is merged.
Please update your fork (rewrite master branch), create new branch (avoid using "master" branch name for patches), prepare changes and open a new PR.

@alalek alalek mentioned this pull request Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The link to image file of alphamat tutorial seems to be broken
2 participants