This sounds like it is likely a missing DLL problem. The cvtColor
function is contained in the opencv_imgproc231.dll
library. You'll either need to place this DLL in the same directory as the executable, or append the OpenCV DLL path (e.g., %OPENCV_ROOT%\install\bin
) to the Path
variable. Also note, if you changed your Path
variable while Visual Studio was open, you will need to restart Visual Studio for it to see the change.
If the above fails, and you used the binary distribution, consider rebuilding OpenCV from source. If a binary distribution was built for VS2008, it will not work with VS2010 and vice versa. Here is a tutorial on how to build OpenCV from source on Windows.