aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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)