在运行期间,程序在第 27 帧处触发

during runtime the program strucks at frame no 27

我编写了一个程序来计算捕获的视频中的汽车数量。我已经在 raspberry pi 上安装了 opencv 和 cvblob,raspbian wheezy OS 2. 我面临的问题是“在 运行 期间程序在某些迭代次数后挂在 cvLabel .

IplImage *labelImg =cvCreateImage(cvGetSize(greyImage), IPL_DEPTH_LABEL, 1); 
unsigned int result = cvLabel(greyImage, labelImg,blobs);

但是当我 运行 在笔记本电脑的虚拟机上运行相同的程序时,它会 运行 完全。这可能是什么原因..?请指教

我找到了问题的解决方案。 raspberry pi 2(armhf) 特别需要进行以下更改,以避免程序 运行 无限。

https://code.google.com/p/cvblob/issues/detail?id=23

转到/home/pi/cvblob/cvBlob

In cvLabel.h file

const char movesE ... const char movesI ...

const signed char movesE ... const signed char movesI ...

and in cvBlob/cvcontour.cpp , line 84:

改变

const char cvChainCodeMoves[8][2] = { { 0, -1},

const signed char cvChainCodeMoves[8][2] = { { 0, -1},