Skip to content

Commit

Permalink
Merge pull request #558 from lipi17dpatnaik/patch-1
Browse files Browse the repository at this point in the history
Update brighten.cpp to match Python script output
  • Loading branch information
aditya-AI authored Mar 12, 2021
2 parents 75fd172 + 83d1812 commit 2bf2483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(Illuminate)

if(MSVC)
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
endif()

find_package(OpenCV REQUIRED)

include_directories(${OpenCV_INCLUDE_DIRS})
Expand Down
7 changes: 4 additions & 3 deletions Improving-Illumination-in-Night-Time-Images/cpp/brighten.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <iostream>
#include <bits/stdc++.h>
#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
Expand Down Expand Up @@ -273,8 +272,10 @@ cv::Mat dehaze(cv::Mat img, float tmin=0.1, int w = 15, float alpha=0.4, float o
int main() {
cv::Mat img = cv::imread("dark.png");
cv::Mat out_img = dehaze(img);

cv::imshow("im", out_img);
cv::Mat out_img2 = dehaze(img,0.1,15,0.4,0.75,0.1,1e-3,true);
cv::imshow("original",img);
cv::imshow("F_enhanced", out_img);
cv::imshow("F_enhanced2", out_img2);
cv::waitKey(0);
return 0;
}

0 comments on commit 2bf2483

Please sign in to comment.