0

当我运行 opencv 来显示图像时,我得到了一个类似图像的错误。

字符串索引超出范围:-8

代码来自 Opencv 网站: http ://docs.opencv.org/doc/tutorials/introduction/display_image/display_image.html

4

1 回答 1

0

Like it is mentioned in the tutorial, you need to call your program by command line with an argument which is the path to your image :

./DisplayImage HappyFish.jpg //From the tutorial

The arguments you pass to an application are stored in argv and counted by argc. The first parameter is always the path of your own application.


If this don't helps you, you'll need to show us some codes and logs (what is the exact error message, etc.)

于 2013-06-28T08:21:24.680 回答