Unsuccessfully trying to solve a seemingly simple problem: get dimensions of the image located in a folder using cv2.imread. The folders structure as follow:
Main Folder
-- ...
-- input
-- Data1
-- 001
100.png
101.png
102.png
-- VP_code
-- test.py
Run from within "Main Foder" :
python VP_code/test.py --input_video_url ./input
from "test.py" following codes:
## Detect original image dimention
input_clip_url = os.path.join(opts.input_video_url, test_clip_par_folder, clip_name)
image_folder_path=input_clip_url
image_subfolder_path=os.listdir(image_folder_path)
image_path=cv2.imread(image_subfolder_path[0])
print ("Folder path_"+str(image_folder_path))
print ("Image subfolder path_"+str(image_subfolder_path))
print ("Image path_"+str(image_subfolder_path[0]))
print ("Image read_"+str(image_path))
## End of detect original image dimention
As result it properly detects everything but "imread" :
Folder path_./input/data_1/001
Image subfolder path_['100.png','101.png','102.png']
Image path_100.png
Image read_None
I tried image.open (PIL) - no luck. So,it looks like there is a problem with "path" but I couldn't manage to resolve it. My great appreciation for any suggestions.from test,py