andrewssobral / andrewssobral/bgslibrary

short learning background first, without updating that

オープン
#185 コメント 2 件 リアクション 0 件 担当者 1 名 @andrewssobral が担当を希望しています GitHub で見る
help wanted question
主要言語
C++
スター
2.3k
フォーク
735
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi, thank for your amazing lib first

I have a factory rail that at first moments (first 10 second) i want to learn background and then extract objects on it,
for my video multicue was good but i found that it is updating background model in each frame
is there any other algorithm that just build bkg model base on first seconds?

I'm using c++,
this is process method of multicue, i have commented UpdateModel_Par(); but it made no difference

```
void MultiCue::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &img_bgmodel)
{
init(img_input, img_output, img_bgmodel);

//--STep1: Background Modeling--//
//IplImage* frame = &IplImage(img_input);
IplImage* frame = new IplImage(img_input);
IplImage* result_image = cvCreateImage(cvGetSize(frame), IPL_DEPTH_8U, 3);
cvSetZero(result_image);
if (g_iFrameCount <= g_iTrainingPeriod) {
BackgroundModeling_Par(frame);
g_iFrameCount++;
}
//--Step2: Background Subtraction--//
else {
g_bForegroundMapEnable = FALSE;

ForegroundExtraction(frame);
UpdateModel_Par();

//Get BGS Results
GetForegroundMap(result_image, NULL);
}
delete frame;

img_background = cv::Mat::zeros(img_input.size(), img_input.type());
img_foreground = cv::cvarrToMat(result_image, TRUE);
cvReleaseImage(&result_image);

#ifndef MEX_COMPILE_FLAG
if (showOutput)
cv::imshow(algorithmName + "_FG", img_foreground);
#endif

img_foreground.copyTo(img_output);
img_background.copyTo(img_bgmodel);

firstTime = false;
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。