I have a question on about OpenCV when using imread()
I had successfully parse my path into a list
When running the function it will show as below TypeError: Can't convert object to 'str' for 'filename'
here is my code that show me the above error *some code i have to cover up due to privacy
import cv2
import numpy as np
from pytesseract import pytesseract
import glob
def parse_folder(path):
images = glob.glob(f'{path}/*.jpg') + glob.glob(f'{path}/*.png')
return images
path = "D:\\Path\\to\\100+images"
images = parse_folder(path)
def image_to_text(image_path):
# Opening the image & storing it in an image object
img = cv2.imread(image_path)
*the rest of the code*
arr_data = image_to_text(images)
parsing the whole folder path is fine
i'm able to see all the images in the list
Is there something that i'm not familiar with the imread() method ?