I pass the image name as a parameter to this function:
def main(imageName):
image = cv2.imread(imageName)
cv2.imshow('color_image', image)
gray_image = grey(image)
cv2.imshow("gray_image", gray_image)
cv2.waitKey(0)
clahe_image = clahe(gray_image,0)
cv2.imshow("clahe_image", clahe_image)
cv2.waitKey(0)
dst_img = denoise(clahe_image)
cv2.imshow("dst_img", dst_img)
cv2.waitKey(0)
binary_img = threshld(dst_img,0)
cv2.imshow("binary_img", binary_img)
cv2.waitKey(0)
skiw_img = deskew(binary_img)
cv2.imshow("skiw_img", skiw_img)
cv2.imwrite("skiw_img.png", skiw_img)
cv2.waitKey(0)
then i get that error.but when i execute it without parameter
def main():
image = cv2.imread('e2nn.png')
cv2.imshow('color_image', image)
gray_image = grey(image)
cv2.imshow("gray_image", gray_image)
cv2.waitKey(0)
clahe_image = clahe(gray_image,0)
cv2.imshow("clahe_image", clahe_image)
cv2.waitKey(0)
dst_img = denoise(clahe_image)
cv2.imshow("dst_img", dst_img)
cv2.waitKey(0)
binary_img = threshld(dst_img,0)
cv2.imshow("binary_img", binary_img)
cv2.waitKey(0)
skiw_img = deskew(binary_img)
cv2.imshow("skiw_img", skiw_img)
cv2.imwrite("skiw_img.png", skiw_img)
cv2.waitKey(0)
i did not get that error and it execute well.