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 opencv project : The Fast Bilateral Filter #1317

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3c790dd
fbs_filter v1.0 has been contributed
kuan-wang Aug 1, 2017
56f1fde
use boost unordered_map
kuan-wang Aug 10, 2017
e21e084
add brief description for fbs_filter
kuan-wang Aug 10, 2017
4f12bed
fix format
kuan-wang Aug 10, 2017
b27afd5
fix channels bug
kuan-wang Aug 10, 2017
c3d72c1
modify doc for fbs_filter
kuan-wang Aug 10, 2017
1523669
check c++ 11
kuan-wang Aug 12, 2017
e8bb01f
asDiagonal -> diagonal
kuan-wang Aug 12, 2017
f0a08cb
rosolve warning
kuan-wang Aug 12, 2017
3f255a3
fix eigen3 dependency
kuan-wang Aug 12, 2017
b14b1be
Eigen/Core
kuan-wang Aug 12, 2017
bbbaa68
test HEAV_EIGEN
kuan-wang Aug 12, 2017
0549356
setZero bug
kuan-wang Aug 12, 2017
9b31eec
unordered_map test
kuan-wang Aug 13, 2017
fec8d77
Merge remote-tracking branch 'upstream/master' into gsoc_opencv
kuan-wang Aug 13, 2017
d94a39c
fix macro bug
kuan-wang Aug 13, 2017
1ee1bfb
fix boost not found
kuan-wang Aug 13, 2017
42af098
fix eigen macro bug
kuan-wang Aug 13, 2017
efb2828
fix eigen macro bug
kuan-wang Aug 13, 2017
2395b4c
fix eigen macro bug
kuan-wang Aug 13, 2017
4b4d47f
fix eigen macro bug
kuan-wang Aug 13, 2017
2a0f215
add test file
kuan-wang Aug 13, 2017
da08655
fix test macro
kuan-wang Aug 13, 2017
d5dc0a3
fix test macro
kuan-wang Aug 14, 2017
5ed98c7
add test
kuan-wang Aug 14, 2017
d57f0e1
add test
kuan-wang Aug 14, 2017
f41755d
add sample colorize
kuan-wang Aug 14, 2017
e390d9c
fix macro
kuan-wang Aug 15, 2017
813a9fb
fix colorize.cpp
kuan-wang Aug 15, 2017
e8298bf
fix colorize.cpp
kuan-wang Aug 15, 2017
5d962d3
fix colorize.cpp
kuan-wang Aug 15, 2017
ac7cd48
fix colorize.cpp
kuan-wang Aug 15, 2017
498a94a
add fbs filter demo
kuan-wang Aug 15, 2017
8a5534c
add fbs filter demo
kuan-wang Aug 15, 2017
4dbe504
add fbs filter demo
kuan-wang Aug 15, 2017
f863264
use fgsfilter for guess
kuan-wang Aug 20, 2017
14bdda5
add parameter num_iter and max_tol
kuan-wang Aug 20, 2017
ae9128d
add a option for colorize sample
kuan-wang Aug 20, 2017
0717530
add bibtex
kuan-wang Aug 27, 2017
6b44558
add bibtex
kuan-wang Aug 27, 2017
4220524
fix a colorize demo bug
kuan-wang Sep 8, 2017
9bf69c2
size optimize
kuan-wang Sep 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/ximgproc/doc/ximgproc.bib
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,10 @@ @inproceedings{Khurshid2009
year={2009},
organization={International Society for Optics and Photonics}
}

@article{BarronPoole2016,
author = {Jonathan T Barron and Ben Poole},
title = {The Fast Bilateral Solver},
journal = {ECCV},
year = {2016},
}
61 changes: 61 additions & 0 deletions modules/ximgproc/include/opencv2/ximgproc/edge_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,67 @@ void rollingGuidanceFilter(InputArray src, OutputArray dst, int d = -1, double s
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////

/** @brief Interface for implementations of The Fast Bilateral Solver.

For more details about this solver see @cite BarronPoole2016 .
*/
class CV_EXPORTS_W FastBilateralSolverFilter : public Algorithm
{
public:
/** @brief Apply smoothing operation to the source image.

@param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.

@param confidence confidence image with unsigned 8-bit or signed 16-bit or floating-point 32-bit confidence and 1 channel.

@param dst destination image.
*/
CV_WRAP virtual void filter(InputArray src, InputArray confidence, OutputArray dst) = 0;
};

/** @brief Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.

@param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.

@param sigma_spatial parameter, that is similar to spatial space sigma in bilateralFilter.

@param sigma_luma parameter, that is similar to luma space sigma in bilateralFilter.

@param sigma_chroma parameter, that is similar to chroma space sigma in bilateralFilter.

@param num_iter number of iterations used for solving, 25 is usually enough.

@param max_tol solving tolerance used for solving, 25 is usually enough.

For more details about the Fast Bilateral Solver parameters, see the original paper @cite BarronPoole2016.
*/
CV_EXPORTS_W Ptr<FastBilateralSolverFilter> createFastBilateralSolverFilter(InputArray guide, double sigma_spatial, double sigma_luma, double sigma_chroma, int num_iter = 25, double max_tol = 1e-5);


/** @brief Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
guide then use FastBilateralSolverFilter interface to avoid extra computations.

@param guide image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.

@param src source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.

@param confidence confidence image with unsigned 8-bit or signed 16-bit or floating-point 32-bit confidence and 1 channel.

@param dst destination image.

@param sigma_spatial parameter, that is similar to spatial space sigma in bilateralFilter.

@param sigma_luma parameter, that is similar to luma space sigma in bilateralFilter.

@param sigma_chroma parameter, that is similar to chroma space sigma in bilateralFilter.

@param num_iter number of iterations used for solving, 25 is usually enough.

@param max_tol solving tolerance used for solving, 25 is usually enough.
*/
CV_EXPORTS_W void fastBilateralSolverFilter(InputArray guide, InputArray src, InputArray confidence, OutputArray dst, double sigma_spatial = 8, double sigma_luma = 8, double sigma_chroma = 8, int num_iter = 25, double max_tol = 1e-5);
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////

/** @brief Interface for implementations of Fast Global Smoother filter.

Expand Down