Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何更改默认保存文件夹以存储具有不同名称的不同图像
如果我喜欢这个,它只存储一张图像,//从相机捕获
while(1) { sprint(buffer, "/folder", i++); }
并像这样正确存储但在不同的文件夹中
while(1) { sprint(buffer, "%d", i++); }
如何将它们结合起来?谢谢!
您可以使用以下代码执行此操作:
char fileName[500]; sprintf(fileName,"./folderyouwanttosaveto/nameofimage%u.png",i++); imwrite(fileName, imageToSave);