I can't save an image when the file path has special character (like "é" for example).
Here is a test from Python 3 shell :
>>> cv2.imwrite('gel/test.jpg', frame)
True
>>> cv2.imwrite('gel/ééé/test.jpg', frame)
False
>>> cv2.imwrite('gel/eee/test.jpg', frame)
True
Any ideas how to do it?
Thanks!
EDIT :
Unfortunately, all suggestions proposed by @PM2Ring and @DamianLattenero don't seem to work :(
So, I use the @cdarke's solution, here's my final code :
destination = 'gel/ééé/'
gel = 'test.jpg'
script_path = os.getcwd()
os.chdir(destination)
cv2.imwrite(gel, frame)
os.chdir(script_path)