c++ - 未指定的错误找不到作者

标签 c++ opencv image-processing computer-vision

我正在尝试运行并检查来自 here 的示例程序并执行其 sample.c .我给出它的参数,第一个是 facefinder 的路径,第二个是输入图像,第三个是输出图像等等。但是当我给出所有路径时,它会显示以下错误并关闭。我正在使用 Visual Studio 2015 和 opencv 2.4.10

错误:

enter image description here

命令行参数

enter image description here

路径

// command line options
        printf("Mandatory arguments to long options are mandatory for short options too.\n");
        printf("  -i,  --input=PATH          set the path to the input image\n");
        printf("                               (*.jpg, *.png, etc.)\n");
        printf("  -o,  --output=PATH         set the path to the output image\n");
        printf("                               (*.jpg, *.png, etc.)\n");
        printf("  -m,  --minsize=SIZE        sets the minimum size (in pixels) of an\n");
        printf("                               object (default is 128)\n");
        printf("  -M,  --maxsize=SIZE        sets the maximum size (in pixels) of an\n");
        printf("                               object (default is 1024)\n");
        printf("  -a,  --angle=ANGLE         cascade rotation angle:\n");
        printf("                               0.0 is 0 radians and 1.0 is 2*pi radians\n");
        printf("                               (default is 0.0)\n");
        printf("  -q,  --qthreshold=THRESH   detection quality threshold (>=0.0):\n");
        printf("                               all detections with estimated quality\n");
        printf("                               below this threshold will be discarded\n");
        printf("                               (default is 5.0)\n");
        printf("  -c,  --scalefactor=SCALE   how much to rescale the window during the\n");
        printf("                               multiscale detection process (default is 1.1)\n");
        printf("  -t,  --stridefactor=STRIDE how much to move the window between neighboring\n");
        printf("                               detections (default is 0.1, i.e., 10%%)\n");
        printf("  -u,  --usepyr              turns on the coarse image pyramid support\n");
        printf("  -n,  --noclustering        turns off detection clustering\n");
        printf("  -v,  --verbose             print details of the detection process\n");
        printf("                               to `stdout`\n");

        //
        printf("Exit status:\n");
        printf(" 0 if OK,\n");
        printf(" 1 if trouble (e.g., invalid path to input image).\n");

我的总体观点

E:\\pico-master\\rnt\\cascades\\facefinder -i E:\\1.jpg -o E:\\ -m 128 -M 1024 -a 0.0 -q 5.0 -c 1.1 -t 0.1

最佳答案

OpenCV 找不到写入器将图像写入磁盘,因为您没有在 -o 选项中指定图像路径。

使用-o path_to_image 来保存输出图像,例如:

-o E:\\img.jpg

关于c++ - 未指定的错误找不到作者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34215202/

相关文章:

c++ - 将特征复矩阵返回到 mex 函数中的 matlab,无需额外复制

c++ - 类数组不起作用

python - Windows 10 上的 opencv python 相机权限问题

linux - 仅在linux中发生的opencv undefined reference 错误

image-processing - 从图像中去除背景噪音

image-processing - 图像中的自动菌群检测

c++ - rdtsc 计时器在 linux 中不准确吗?

c++ - std::unique_ptr 试图引用已删除的函数

python - 我无法在 open cv 中克服这个错误

python - 与在OpenCV Python中创建RGB图像的 mask 有关的问题