简体   繁体   English

在运行时,程序在第 27 帧处敲击

[英]during runtime the program strucks at frame no 27

I have written a program to count no of cars from the captured video.我编写了一个程序来从捕获的视频中计算汽车数量。 I have installed opencv and cvblob, raspbian wheezy OS on raspberry pi 2. The problem I am facing is "During run time the program hangs at cvLabel after certain no of iterations.我已经在 raspberry pi 2 上安装了 opencv 和 cvblob,raspbian wheezy OS。我面临的问题是“在运行期间,程序在某些迭代后挂在 cvLabel 上。

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

But when I run the same program on Virtual Machine in my laptop it will run completely.但是当我在笔记本电脑的虚拟机上运行相同的程序时,它会完全运行。 What might be the reason for this..?这可能是什么原因..? Please advice请指教

I got the solution for my issue.我得到了我的问题的解决方案。 The below changes are required specially for raspberry pi 2(armhf) which avoids the program to run infinite.树莓派 2(armhf) 特别需要以下更改,以避免程序无限运行。

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

go to /home/pi/cvblob/cvBlob转到/home/pi/cvblob/cvBlob

In cvLabel.h file在 cvLabel.h 文件中

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

to

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

and in cvBlob/cvcontour.cpp , line 84:在 cvBlob/cvcontour.cpp 中,第 84 行:

change改变

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

to

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM