Skip to content

Commit cda943d

Browse files
authored
Create globalmatting.md
1 parent 0af5e5f commit cda943d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
### A Global sampling method for Alpha Matting ###
2+
3+
The Global sampling based method uses all known samples(from a trimap), Unlike other sampling based methods
4+
which collect only nearby samples.<br/>
5+
It first estimates the foreground and background color and then computes the alpha matte.
6+
7+
Input to the model is the Image and the trimap, and the output is the alpha matte.
8+
9+
This [blog post](https://medium.com/vedacv/paper-summary-a-global-sampling-method-for-alpha-matting-490a4217eb2) gives a summary of the paper.
10+
11+
### Results ###
12+
13+
After evaluating this implementation on alphamatting.com, the results are almost as good as the original implementation.
14+
15+
Following were the results:
16+
17+
| Error type | Original implementation | This implementation |
18+
| ----------- | ------------------------ | ------------------- |
19+
| Sum of absolute differences | 31 | 31.3 |
20+
| Mean square error | 28.3 | 29.5 |
21+
| Gradient error | 25 | 26.3 |
22+
| Connectivity error | 28 | 36.3 |
23+
24+
25+
Some of the outputs with of this implementation are as follows :
26+
27+
| Image | Trimap | Alpha matte(this implementation) |
28+
| -------------- | -------------- | ------------------------ |
29+
|![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Input/doll.png "img1" ) |![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Trimap/doll.png "trimap1" ) |![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Results/doll.png "results1" ) |
30+
|![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Input/troll.png "img2" ) |![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Trimap/troll.png "trimap2" ) |![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Results/troll.png "results2" ) |
31+
|![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Input/donkey.png "img1" ) |![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Trimap/donkey.png "trimap1" ) |![alt text](https://raw.githubusercontent.com/Nerdyvedi/GSOC-Opencv-matting/master/Global-Sampling-Method-for-Alpha-Matting/Results/donkey.png "results1" ) |

0 commit comments

Comments
 (0)