Closed bmabir17-asj closed 3 years ago
You are right. There is a mistake in the documentation. I have corrected the mistake. You should be using a color image, and not a grayscale image
@Utkarsh-Deshmukh Okey, thanks. But what about this?
That is we are using the color image and calculating Transmission Airlight and then passing those values to removeHaze(HazeImg, Transmission, A, 0.85)
is this being calculated internally in pip package?
On Further Inspection i found that it does calculate internally
def remove_haze(HazeImg, airlightEstimation_windowSze=15, boundaryConstraint_windowSze=3, C0=20, C1=300, regularize_lambda=0.1, sigma=0.5, delta=0.85):
Dehazer = image_dehazer(airlightEstimation_windowSze=airlightEstimation_windowSze,
boundaryConstraint_windowSze=boundaryConstraint_windowSze, C0=C0, C1=C1,
regularize_lambda=regularize_lambda, sigma=sigma, delta=delta)
HazeCorrectedImg = Dehazer.remove_haze(HazeImg)
Thanks for the awesome package :smile:
Hi, why must it take color image but not a single channel image as input? @Utkarsh-Deshmukh
because in order to compute the airlight(which is later used to compute the haze transmission), we compute the dynamic range of the pixel within all the color channels
In the readme it show the implementation of the dehazing as follows
That means we are loading the image as grayscale and simply passing that image in
remove_haze
function.But in
example.py
we are doing the following https://github.com/Utkarsh-Deshmukh/Single-Image-Dehazing-Python/blob/393a51439a56f90f78aba50d6ba5b8e7a9a184a6/src/example.py#L14-L40That is we are using the color image and calculating
Transmission
Airlight
and then passing those values toremoveHaze(HazeImg, Transmission, A, 0.85)
Is the pip documentation wrong/outdated? or
image_dehazer.remove_haze(HazeImg)
function calculates them internally? If so why we are using grayscale image?