aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinweiClarkChao <[email protected]>2015-08-25 12:27:20 +0800
committerJinweiClarkChao <[email protected]>2015-08-25 16:49:49 +0800
commitf07885c1eb4c98dc52704517623b2e7df1ed616d (patch)
treeacc14792523ff5bbb464882e548b96752c2d6886 /DCP/dcp.cpp
parentde74f5fa499b82390bce432251609d18d9ce5fd8 (diff)
downloadDehaze-f07885c1eb4c98dc52704517623b2e7df1ed616d.tar.gz
initial complete
Diffstat (limited to 'DCP/dcp.cpp')
-rw-r--r--DCP/dcp.cpp15
1 files changed, 13 insertions, 2 deletions
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 @@
1#include "dcp.h" 1#include "dcp.h"
2 2
3#include <iostream>
4using namespace std;
5
3void dehaze(IplImage *recover, IplImage *input) 6void dehaze(IplImage *recover, IplImage *input)
4{ 7{
5 int height = input->height; 8 int height = input->height;
@@ -11,8 +14,16 @@ void dehaze(IplImage *recover, IplImage *input)
11 14
12 int darkchannelradius = MIN(width, height) * 0.02; 15 int darkchannelradius = MIN(width, height) * 0.02;
13 16
14 CalcDarkChannel(darkchannel, input, darkchannelradius); 17
15
16 18
19 double Airlight[3] = { 0.0, 0.0, 0.0 };
20 CalcDarkChannel(darkchannel, input, darkchannelradius);
21
22 CalcAirlight(darkchannel, input, Airlight);
23
24 CalcTransmission(transmission, input, Airlight, darkchannelradius);
25 GuidedFilterColor(refine_transmission, input, transmission, 1e-6, 60);
26 CalcRecover(recover, input, refine_transmission, Airlight);
17 27
28
18} 29}
Powered by cgit v1.2.3 (git 2.41.0)