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

[GSoC 2019] Final: Information Flow Alphamatting #2245

Closed
wants to merge 25 commits into from

Conversation

muskaankularia
Copy link

@muskaankularia muskaankularia commented Sep 2, 2019

Merge with extra: opencv/opencv_extra#668

when this pullrequest gets merged, it
resolves #2240

This pullrequest changes

Implementation of "Designing Effective Inter-Pixel Information Flow for Natural Image Matting"

opencv_extra=master

@alalek
Copy link
Member

alalek commented Sep 2, 2019

nanoflann

Why we can't use OpenCV's flann wrapper: https://github.com/opencv/opencv/tree/master/modules/flann ?

@muskaankularia
Copy link
Author

nanoflann

Why we can't use OpenCV's flann wrapper: https://github.com/opencv/opencv/tree/master/modules/flann ?

I found nanoflann to be the most efficient library for KDTree implementation compared to openCV's KDTree. I didnt know about flann. If flann wrapper gives comparable/better result. I can replace nanoflann with flann's function call.

@alalek
Copy link
Member

alalek commented Sep 3, 2019

Git stores whole history, so "Delete ..." commits doesn't decrease total patch size.
You need to "squash commits onto one" for removing of intermediate changes.

@sunitanyk
Copy link
Contributor

@alalek , This PR uses Eigen's Conjugate Gradient solver for sparse matrices. Is there anything in OpenCV for solving linear systems Ax=b using sparse matrices? Couldn't find any example or function for the same online in opencv docs. Please let me know.

namespace opencv_test
{

typedef std::tr1::tuple<Size, MatType, MatDepth> Size_MatType_OutMatDepth_t;
Copy link
Member

Choose a reason for hiding this comment

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


Input Image | Input trimap | Ouput Alpha matte
:-------------------------:|:-------------------------:|:-------------------------:
<img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/img/net.png" alt="alt text" width="300" height="200"> | <img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/trimap/net.png" alt="alt text" width="300" height="200"> | <img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/Result/result_net.png" alt="alt text" width="300" height="200">
Copy link
Member

Choose a reason for hiding this comment

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

  1. Try to use relative URLs for images.
  2. Use markdown for embedding images.

@alalek
Copy link
Member

alalek commented Oct 4, 2019

@sunitanyk I believe there is no solver for sparse matrices in OpenCV.

You can continue using Eigen implementation, but related code should be properly excluded if build configuration doesn't have Eigen (#ifdef HAVE_EIGEN).

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.

3 participants