Ask Your Question

Revision history [back]

You are writing the image to the relative path and reading the image from an explicit path. Some development environments actually create seperate debug folders, like visual studio, resulting in another relative location, combined to the source code. Do your cvSaveImage to the exact path of your imwrite.

BTW, why use C -style for reading and C++ - style for writing? Just use imread in stead of cvSaveImage. It could be that there are dangling pointers screwing up your code.