EDIT Human walk motion Detect链接说明如何在Visual Studio 2010中检测人体运动与Opencv 2.3
与C++。我下载了源代码motemp9.c
以及文本文件walkImgs.txt
和output.txt
和标头filter.h
,但不明白以下内容。运动检测代码{编辑}
我很难执行此程序。有人能帮我澄清这些问题吗?
在
motiontemp9.c
文件中,主要文件中的行不存在。或者这些文件是否为walkImgs和输出?上运行的代码error C2660: 'cvGetSeqElem' : function does not take 3 arguments motemp9.cpp(186): error C2227: left of '->rect' must point to class/struct/union/generic type motemp9.cpp(189): error C2440: '=' : cannot convert from 'CvScalar' to 'int' 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called motemp9.cpp(218): error C2664: 'cvCircle' : cannot convert parameter 4 from 'int' to 'CvScalar' 1> No constructor could take the source type, or constructor overload resolution was ambiguous motemp9.cpp(220): error C2664: 'cvLine' : cannot convert parameter 4 from 'int' to 'CvScalar' 1> No constructor could take the source type, or constructor overload resolution was ambiguous ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
在需要做运行这段代码是什么请指导发生
if((ReadFP=fopen("walk2.txt", "r")) == NULL) ErrorExit(ER_READ_OPEN);
if((WriteFP=fopen("output2.txt", "w")) == NULL) ErrorExit(ER_WRITE_OPEN);
以下错误。
嘿,谢谢你的答复。第一个问题意味着网页中提供的文件是walkImgs.txt和output.txt,if语句检查if((ReadFP = fopen(“walk2.txt”,“r”))== NULL)ErrorExit( ER_READ_OPEN); if((WriteFP = fopen(“output2.txt”,“w”))== NULL)ErrorExit(ER_WRITE_OPEN);所以,我认为它应该是((ReadFP = fopen(“walkImgs.txt”,“r”))== NULL)ErrorExit(ER_READ_OPEN);如果((WriteFP = fopen(“output.txt”,“w”))== NULL)ErrorExit(ER_WRITE_OPEN);(B)我需要捕获&框架我自己的视频。如何将提取的图像的路径walkImgs.txt,而不是wakl2.txt。 – Chaitali
是的,你只需要改变你的价值即可。 – ThiS
这意味着代码中的if语句中提到的文件名是不正确的?我如何在文件中写入帧号?此外,使用CV_RGB时出现此错误>>“#define CV_RGB(r,g,b )cvScalar((b),(g),(r),0)错误:没有合适的从cvScalar到int的转换函数存在“。该怎么办?请多解释一下。 – Chaitali