Skip to content

Commit f0e3632

Browse files
committed
addressed issues raised in the PR
1 parent 1a7ed31 commit f0e3632

21 files changed

+98
-58
lines changed

modules/alphamat/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ if(NOT HAVE_EIGEN)
55
ocv_module_disable(alphamat)
66
endif()
77

8-
cmake_minimum_required (VERSION 3.0)
9-
project (myproject)
10-
set (CMAKE_CXX_STANDARD 11)
11-
128
ocv_define_module(alphamat opencv_core
139
opencv_imgproc
1410
)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
By downloading, copying, installing or using the software you agree to this
3+
license. If you do not agree to this license, do not download, install,
4+
copy or use the software.
5+
License Agreement
6+
For Open Source Computer Vision Library
7+
(3-clause BSD License)
8+
Copyright (C) 2013, OpenCV Foundation, all rights reserved.
9+
Third party copyrights are property of their respective owners.
10+
11+
Redistribution and use in source and binary forms, with or without modification,
12+
are permitted provided that the following conditions are met:
13+
14+
* Redistributions of source code must retain the above copyright notice,
15+
this list of conditions and the following disclaimer.
16+
17+
* Redistributions in binary form must reproduce the above copyright notice,
18+
this list of conditions and the following disclaimer in the documentation
19+
and/or other materials provided with the distribution.
20+
21+
* Neither the names of the copyright holders nor the names of the contributors
22+
may be used to endorse or promote products derived from this software
23+
without specific prior written permission.
24+
25+
This software is provided by the copyright holders and contributors "as is" and
26+
any express or implied warranties, including, but not limited to, the implied
27+
warranties of merchantability and fitness for a particular purpose are
28+
disclaimed. In no event shall copyright holders or contributors be liable for
29+
any direct, indirect, incidental, special, exemplary, or consequential damages
30+
(including, but not limited to, procurement of substitute goods or services;
31+
loss of use, data, or profits; or business interruption) however caused
32+
and on any theory of liability, whether in contract, strict liability,
33+
or tort (including negligence or otherwise) arising in any way out of
34+
the use of this software, even if advised of the possibility of such damage.
35+
*/
36+
37+
/** Information Flow algorithm implementaton for alphamatting */
38+
39+
#ifndef _OPENCV_ALPHAMAT_HPP_
40+
#define _OPENCV_ALPHAMAT_HPP_
41+
42+
/**
43+
* @defgroup alphamat Alpha Matting
44+
* This module is dedicated to compute alpha matting of images, given the input image and an input trimap.
45+
* The samples directory includes easy examples of how to use the module.
46+
*
47+
* The implementation is based on Designing Effective Inter-Pixel Information Flow for Natural Image Matting by Yağız Aksoy, Tunç Ozan Aydın and Marc Pollefeys, CVPR 2019.
48+
*
49+
* This module has been originally developed by Muskaan Kularia and Sunita Nayak as a project
50+
* for Google Summer of Code 2019 (GSoC 19).
51+
*
52+
*/
53+
54+
namespace cv{ namespace alphamat{
55+
56+
CV_EXPORTS_W void infoFlow(Mat& image, Mat& tmap, Mat& result);
57+
58+
}}
59+
#endif

modules/alphamat/include/opencv2/infoflow.hpp

Lines changed: 0 additions & 21 deletions
This file was deleted.

modules/alphamat/samples/information_flow_matting.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
#include <iostream>
66
#include "opencv2/highgui.hpp"
7-
#include <opencv2/core/base.hpp>
8-
#include <opencv2/core/utility.hpp>
7+
#include <opencv2/core.hpp>
98
#include <opencv2/imgproc.hpp>
10-
#include <opencv2/infoflow.hpp>
9+
#include <opencv2/alphamat.hpp>
1110

1211
using namespace std;
1312
using namespace cv;
@@ -28,7 +27,7 @@ int main(int argc, char *argv[])
2827

2928
if (show_help)
3029
{
31-
printf("\nThis sample demonstrates Information Flow alpha matting\n"
30+
printf("\nThis sample demonstrates Information Flow Alpha Matting\n"
3231
"Call:\n"
3332
" %s -img=<string> -tri=<string> [-out=<string>]\n\n", argv[0]);
3433
return 0;
@@ -75,7 +74,6 @@ int main(int argc, char *argv[])
7574
imwrite(result_path, result);
7675
}
7776

78-
imshow("Result Matte", result);
7977
return 0;
8078

8179
}
-842 KB
Binary file not shown.
Loading
-677 KB
Binary file not shown.
Binary file not shown.
Loading
-3.66 KB
Binary file not shown.

0 commit comments

Comments
 (0)