Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test alphamatte#2247

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
muskaankularia wants to merge82 commits intoopencv:4.x
base:4.x
Choose a base branch
Loading
frommuskaankularia:test_alphamatte
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
82 commits
Select commitHold shift + click to select a range
17207fa
Add files via upload
muskaankulariaSep 2, 2019
41ceff9
Add files via upload
muskaankulariaSep 2, 2019
5e3e999
Add files via upload
muskaankulariaSep 2, 2019
0847836
Delete doll.png
muskaankulariaSep 2, 2019
c67a32f
Delete donkey.png
muskaankulariaSep 2, 2019
d782987
Delete elephant.png
muskaankulariaSep 2, 2019
158e938
Delete net.png
muskaankulariaSep 2, 2019
2477942
Delete pineapple.png
muskaankulariaSep 2, 2019
3fe589e
Delete plant.png
muskaankulariaSep 2, 2019
b056e35
Delete plasticbag.png
muskaankulariaSep 2, 2019
f994020
Delete troll.png
muskaankulariaSep 2, 2019
4359adc
Delete elephant.png
muskaankulariaSep 2, 2019
491b51f
Delete net.png
muskaankulariaSep 2, 2019
fac36ae
Delete pineapple.png
muskaankulariaSep 2, 2019
0b06ed5
Delete plant.png
muskaankulariaSep 2, 2019
8cb8c13
Delete plasticbag.png
muskaankulariaSep 2, 2019
8dca8a5
Delete alphamat.bib
muskaankulariaSep 2, 2019
1a38add
Delete summary_Information_Flow.docx
muskaankulariaSep 2, 2019
2727519
Update README.md
muskaankulariaSep 2, 2019
9b2e395
Update README.md
muskaankulariaSep 2, 2019
09db622
Update README.md
muskaankulariaSep 2, 2019
c5056ca
Update README.md
muskaankulariaSep 2, 2019
0e55f0e
Update README.md
muskaankulariaSep 2, 2019
7a775a7
Create CMakeLists.txt
muskaankulariaSep 2, 2019
08d9f30
removed bits/stdc++.h header
muskaankulariaSep 3, 2019
f13088e
updated headers in precomp.h
muskaankulariaSep 3, 2019
f22a069
edit headers
muskaankulariaSep 3, 2019
db41d5b
updated header
muskaankulariaSep 3, 2019
4127d49
updated infoflow
muskaankulariaSep 3, 2019
b6b2c49
Delete alphac.cpp
muskaankulariaSep 3, 2019
0c38534
Eigen added for compiling
muskaankulariaSep 3, 2019
d7a2ef9
Merge branch 'test_alphamatte' of https://github.com/muskaankularia/o…
muskaankulariaSep 3, 2019
c16e565
test file header updated
muskaankulariaSep 3, 2019
c5cd238
test file header updated
muskaankulariaSep 3, 2019
2459b38
code changed acc to codeing style
muskaankulariaSep 3, 2019
6fba3df
added include and doc
muskaankulariaSep 3, 2019
2b90c69
edit in namespace
muskaankulariaSep 3, 2019
3e49d7c
namespace added
muskaankulariaSep 3, 2019
5035eb9
cv::cv - corrected, dim - corrected
muskaankulariaSep 3, 2019
95a8c8c
compilation errors removed
muskaankulariaSep 3, 2019
2146461
header file incl in .hpp
muskaankulariaSep 3, 2019
18b14b2
path to Eigen added
muskaankulariaSep 3, 2019
0f8fcf2
test error function added
muskaankulariaSep 3, 2019
18b248e
edit in test file
muskaankulariaSep 3, 2019
504533c
test update
muskaankulariaSep 3, 2019
93db368
edit test
muskaankulariaSep 3, 2019
0ceff2e
edit test
muskaankulariaSep 3, 2019
cb59bf0
edit test
muskaankulariaSep 3, 2019
873beb2
edit test
muskaankulariaSep 3, 2019
5d30eaa
edit cmake
muskaankulariaSep 3, 2019
0cf5ae8
cv removed
muskaankulariaSep 3, 2019
46e66ae
warning in KtoU removed
muskaankulariaSep 4, 2019
66e80cb
warnings removed
muskaankulariaSep 4, 2019
1be1340
remove warnings and errors
muskaankulariaSep 4, 2019
f5b51b9
ifndef conditions addded
muskaankulariaSep 4, 2019
7be17ed
globals moved from header to cpp
muskaankulariaSep 4, 2019
aefdf7e
typedef moved to header
muskaankulariaSep 4, 2019
3ca82b1
error in test resolved
muskaankulariaSep 4, 2019
26cfa9c
added path to opencv_extra
muskaankulariaSep 4, 2019
0509d25
comment last 4 lines
muskaankulariaSep 4, 2019
b02c158
Eigen removed
muskaankulariaSep 4, 2019
77f5ac4
cmake updated
muskaankulariaSep 4, 2019
cd9d3ee
include Eigen updated
muskaankulariaSep 4, 2019
26458a6
Removed whitespaces and updated CMakeLists.txt
sunitanykSep 4, 2019
00c1b87
Removed empty line at EOF of CMakeLists.txt
sunitanykSep 5, 2019
d2d2f97
Merge pull request #2 from sunitanyk/test_alphamatte_sn
muskaankulariaSep 5, 2019
9232b73
added samples and tutorials
sunitanykSep 6, 2019
3de7d53
included opencv.hpp
sunitanykSep 6, 2019
e7e793b
included headers
sunitanykSep 6, 2019
0ea3bce
included headers
sunitanykSep 6, 2019
db50a05
edited cpp sample
sunitanykSep 6, 2019
2c0b495
edited markdown files
sunitanykSep 6, 2019
61d2b18
Merge pull request #3 from sunitanyk/test_alphamatte_sn
muskaankulariaSep 6, 2019
0c16f1e
uncommented test_infoflow
muskaankulariaSep 6, 2019
22ae638
tutorials update
sunitanykSep 6, 2019
ea342d6
removed blank line
sunitanykSep 7, 2019
a39bd46
included tutorial images
sunitanykSep 7, 2019
4551de6
removed whitespaces
sunitanykSep 7, 2019
07dafff
added paper info
sunitanykSep 8, 2019
393f752
Merge pull request #4 from sunitanyk/test_alphamatte_sn
muskaankulariaSep 8, 2019
ccb6c9e
Update README.md
muskaankulariaSep 10, 2019
bb477a2
Update README.md
muskaankulariaSep 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
tutorials update
  • Loading branch information
@sunitanyk
sunitanyk committedSep 6, 2019
commit22ae638f1c9f90f2baea94dcc9c8eec1bafded01
2 changes: 2 additions & 0 deletionsmodules/README.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,8 @@ $ cmake -D OPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -D BUILD_opencv_<r

- **aruco**: ArUco and ChArUco Markers -- Augmented reality ArUco marker and "ChARUco" markers where ArUco markers embedded inside the white areas of the checker board.

- **alphamat**: Computer Vision based Alpha Matting -- Given an input image and a trimap, generate an alpha matte.

- **bgsegm**: Background segmentation algorithm combining statistical background image estimation and per-pixel Bayesian segmentation.

- **bioinspired**: Biological Vision -- Biologically inspired vision model: minimize noise and luminance variance, transient event segmentation, high dynamic range tone mapping methods.
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,5 @@
Information Flow AlphaMatting {#tutorial_alphamat_information_flow}
======================

Goal
----

In this chapter,

- We will familiarize with the computer vision based alphamatting in OpenCV.

Basics
------

Alphamatting is the problem of extracting the foreground from an image. Given the input of image and its corresponding trimap, we try to extract the foreground from the background. Following is an example -

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">

This project is implementation of [[Information-Flow Matting](https://arxiv.org/pdf/1707.05055.pdf)] by Aksoy et al.[1]. It required implementation of some parts of other papers [2,3].

This is a pixel-affinity based alpha matting algorithm which solves a linear system of equations using preconditioned conjugate gradient method. Affinity-based methods operate by propagating opacity information from known opacity regions(K) into unknown opacity regions(U) using a variety of affinity definitions mentioned as -
* Color mixture information flow - Opacity transitions in a matte occur as a result of the original colors in the image getting mixed with each other due to transparency or intricate parts of an object. They make use of this fact by representing each pixel in U as a mixture of similarly-colored pixels and the difference is the energy term ECM, which is to be reduced.
* K-to-U information flow - Connections from every pixel in U to both F(foreground pixels) and B(background pixels) are made to facilitate direct information flow from known-opacity regions to even the most remote opacity-transition regions in the image.
* Intra U information flow - They distribute the information inside U effectively by encouraging pixels with similar colors inside U to have similar opacity.
* Local information flow - Spatial connectivity is one of the main cues for information flow which is achieved by connecting each pixel in U to its immediate neighbors to ensure spatially smooth mattes.

Using these information flow, energy/error(E) is obtained as a weighted local composite of E<sub>CM</sub>, E<sub>KU</sub>(K-to-U information flow), E<sub>UU</sub>(Intra U information flow), E<sub>L</sub>(Local information flow).
E represents the deviation of unknown pixels opacity or colour from what we predict it to be using other pixels. So, the algorithm aims at minimizing this error.

Results
-------
Input Image | Ouput Alpha matte
:-------------------------:|:-------------------------:
<img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/img/net.png" alt="alt text" width="200" height="155"> | <img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/Result/result_net.png" alt="alt text" width="200" height="155">
<img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/img/elephant.png" alt="alt text" width="200" height="155"> | <img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/Result/result_elephant.png" alt="alt text" width="200" height="155">
<img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/img/pineapple.png" alt="alt text" width="200" height="155"> | <img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/Result/result_pineapple.png" alt="alt text" width="200" height="155">
<img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/img/plasticbag.png" alt="alt text" width="200" height="155"> | <img src="https://github.com/muskaankularia/opencv_contrib/blob/alphamatting/modules/alphamat/Result/result_plasticbag.png" alt="alt text" width="200" height="155">

References
--------------------

[1] Yagiz Aksoy, Tunc Ozan Aydin, Marc Pollefeys, "Designing Effective Inter-Pixel Information Flow for Natural Image Matting", CVPR, 2017. [[link](http://people.inf.ethz.ch/aksoyy/ifm/)]

[2] Roweis, Sam T., and Lawrence K. Saul. "Nonlinear dimensionality reduction by locally linear embedding." science 290.5500 (2000): 2323-2326.[[link](https://science.sciencemag.org/content/290/5500/2323)]

[3] Ehsan Shahrian, Deepu Rajan, Brian Price, Scott Cohen, "Improving Image Matting using Comprehensive Sampling Sets", CVPR 2013 [[paper](http://www.cv-foundation.org/openaccess/content_cvpr_2013/papers/Shahrian_Improving_Image_Matting_2013_CVPR_paper.pdf)]

[4] Affinity Based Matting Toolbox by Yagiz Aksoy[[link](https://github.com/yaksoy/AffinityBasedMattingToolbox)]
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
Tutorials for alphamat module {#tutorial_table_of_content_alphamat}
===============================================================
Information Flow Alpha Matting {#tutorial_table_of_content_alphamat}
=======================

- @subpage tutorial_alphamat_information_flow

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp