System information (version)
- OpenCV => 3.*
- Operating System / Platform => Windows x64
Detailed description
In python 3.6.8 using the cv2 library, when using cv2.imwrite as:
cv2.imwrite('path/to/image/myi_image.jpg', my_image)
cv2 does not report an error if the user running the script does not have write permissions to the directory '/path/to/image' as in the above code segment.
imwrite just returns false and the error is extremely hard to debug due to no stderr output.
In addition, the existence of the directory is also not validated.