I want to save images to a new file on each iteration:
str1='vid_result'
str2=str1+str(ret)
cv2.imwrite(str(str2),im)
Where ret
is a counter.
But I receive the error:
Could not find a writer for the specified extension in function cv::imwrite_.
Actually, cv2.imwrite('vid_result',im)
works fine, so I need to find a proper way to send a filename as a first argument.
P.S. The str2
is a string and its output is vid_result1
.