91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 11.63MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-07-27
  • 語言: 其他
  • 標(biāo)簽: OPENCV??VIBE??GMM??

資源簡介

包括常用的前景提取算法,有GMM,VIBE,幀差法等,方便實用

資源截圖

代碼片段和文件信息

/*=================================================================
?*?Calculate?Background?Model?of?a?list?of?frames(Normally?a?video?stream)?in?the
?*?method?of?Background?Difference?Method?&?OTSU?Algorithm?By?OpenCV.
?*
?*?Copyright?(C)?2017?Chandler?Geng.?All?rights?reserved.
?*
?*?????This?program?is?free?software;?you?can?redistribute?it?and/or
?*?modify?it?under?the?terms?of?the?GNU?General?Public?License?as?published
?*?by?the?Free?Software?Foundation;?either?version?2?of?the?License?or?(at
?*?your?option)?any?later?version.
?*
?*?????This?program?is?distributed?in?the?hope?that?it?will?be?useful?but
?*?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of?MERCHANTABILITY
?*?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.?See?the?GNU?General?Public?License?for
?*?more?details.
?*
?*?????You?should?have?received?a?copy?of?the?GNU?General?Public?License?along
?*?with?this?program;?if?not?write?to?the?Free?Software?Foundation?Inc.?59
?*?Temple?Place?Suite?330?Boston?MA?02111-1307?USA
===================================================================
*/
#include?“BGDifference.h“

/*===================================================================
?*?函數(shù)名:BackgroundDiff
?*?說明:背景差分算法;
?*?參數(shù):
?*???Mat?src:??源圖像
?*???Mat&?imgForeground:?前景圖像
?*???Mat&?imgBackground:?背景圖像
?*???int?nFrmNum:?當(dāng)前幀數(shù)
?*???int?threshold_method:?閾值方法
?*??????-?CV_THRESH_OTSU:???????使用OpenCV自帶OTUS方法
?*??????-?CV_THRESH_BINARY:???使用該類中的OTSU方法
?*???double?updateSpeed:?背景更新速度
?*?返回值:void
?*------------------------------------------------------------------
?*?Function:?BackgroundDiff
?*
?*?Summary:
?*???Background?Difference?Algorithm;
?*
?*?Arguments:
?*???Mat?src?-?source?image
?*???Mat&?imgForeground?-?Foreground?Image
?*???Mat&?imgBackground?-?Background?Image
?*???int?nFrmNum?-?Current?frame?Number
?*???int?threshold_method?-?the?method?of?getting?Threshold?Value
?*??????-?CV_THRESH_OTSU:???????Using?OpenCV‘s?OTSU?method
?*??????-?CV_THRESH_BINARY:???Using?this?class‘s?OTSU?method
?*???double?updateSpeed?-?the?Speed?of?Background?Update
?*
?*?Returns:
?*???void
=====================================================================
*/
void?BGDiff::BackgroundDiff(Mat?src?Mat?&imgForeground?Mat&?imgBackground?int?nFrmNum?int?threshold_method?double?updateSpeed)
{
????//?源圖像的灰度圖像
????//?Gray?Image(uchar)?of?Source?Image
????Mat?src_gray;

????//?單通道浮點圖像,用于背景建模
????//?Gray?Image(float)?of?Source?Image?and?will?be?used?to?model?background
????Mat?src_grayf;

????//?前景、背景的浮點圖像
????//?Gray?Image(float)?of?Foreground?&?Background?Images
????Mat?imgForegroundf?imgBackgroundf;

????//?前景圖像緩存
????//?temp?Image?of?ForeGround?Image
????Mat?imgForeground_temp;

????//?初始化浮點圖像
????//?Init?float?Images
????imgBackgroundf.create(src.size()?CV_32FC1);
????imgForegroundf.create(src.size()?CV_32FC1);
????src_grayf.create(src.size()?CV_32FC1);

????//?視頻流第一幀,前景與背景都初始化為第一幀的灰度圖
????//?if?it?is?in?the?first?frame?of?Video?stream?Foreground?&?Background?Image?will?be?inited?as?Gray?I

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\
?????文件????????1568??2017-12-27?12:21??BackgroundSplit-OpenCV-master\CMakeLists.txt
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\Image\
?????文件??????291642??2017-12-27?12:21??BackgroundSplit-OpenCV-master\Image\frameDifference.png
?????文件??????508651??2017-12-27?12:21??BackgroundSplit-OpenCV-master\Image\GaussBG_Difference.png
?????文件??????181950??2017-12-27?12:21??BackgroundSplit-OpenCV-master\Image\ViBe+.jpg
?????文件??????336626??2017-12-27?12:21??BackgroundSplit-OpenCV-master\Image\ViBe.png
?????文件????????3744??2017-12-27?12:21??BackgroundSplit-OpenCV-master\README?-?中文.md
?????文件????????4179??2017-12-27?12:21??BackgroundSplit-OpenCV-master\README.md
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\Video\
?????文件????10960524??2017-12-27?12:21??BackgroundSplit-OpenCV-master\Video\Camera?Road?01.avi
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\BGDifference\
?????文件???????11592??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\BGDifference\BGDifference.cpp
?????文件????????1709??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\BGDifference\BGDifference.h
?????文件????????3182??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\BGDifference\main.cpp
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\framesDifference\
?????文件????????3288??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\framesDifference\main.cpp
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe+\
?????文件???????38449??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe+\ViBePlus.cpp
?????文件????????5568??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe+\ViBePlus.h
?????文件?????????856??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe+\ViBePlusMacro.h
?????文件????????2685??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe+\main.cpp
?????目錄???????????0??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe\
?????文件???????14498??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe\Vibe.cpp
?????文件????????3141??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe\Vibe.h
?????文件????????2786??2017-12-27?12:21??BackgroundSplit-OpenCV-master\src\ViBe\main.cpp

評論

共有 條評論