A confidence prior for image dehazing