From f07885c1eb4c98dc52704517623b2e7df1ed616d Mon Sep 17 00:00:00 2001 From: JinweiClarkChao Date: Tue, 25 Aug 2015 12:27:20 +0800 Subject: initial complete --- DCP/dcp.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'DCP/dcp.cpp') diff --git a/DCP/dcp.cpp b/DCP/dcp.cpp index df4aad9..4e100c6 100644 --- a/DCP/dcp.cpp +++ b/DCP/dcp.cpp @@ -1,5 +1,8 @@ #include "dcp.h" +#include +using namespace std; + void dehaze(IplImage *recover, IplImage *input) { int height = input->height; @@ -11,8 +14,16 @@ void dehaze(IplImage *recover, IplImage *input) int darkchannelradius = MIN(width, height) * 0.02; - CalcDarkChannel(darkchannel, input, darkchannelradius); - + + double Airlight[3] = { 0.0, 0.0, 0.0 }; + CalcDarkChannel(darkchannel, input, darkchannelradius); + + CalcAirlight(darkchannel, input, Airlight); + + CalcTransmission(transmission, input, Airlight, darkchannelradius); + GuidedFilterColor(refine_transmission, input, transmission, 1e-6, 60); + CalcRecover(recover, input, refine_transmission, Airlight); + } -- cgit v1.2.3