i am newbie to python. I am trying to create a Python Program to image dehazing using dcp. I have an image that need to view at console at first and need to do some dehazing method. unfortunately, here i unable to upload or view the image and it saying Image data cannot be converted to float. I am getting the following error when I try running it.
import cv2
import math
import numpy as np
import matplotlib.pyplot as plt
def DarkChannel(im,sz):
b,g,r = cv2.split(img)
dc = cv2.min(cv2.min(r,g),b)
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (sz,sz))
dark = cv2.erode(dc,kernel)
return dark
img = cv2.imread("C:/Users/User/Documents/sypder/img/bird.jpg", 1)
plt.imshow(img)