ImageVerifierCode 换一换
格式:DOCX , 页数:49 ,大小:49.53KB ,
资源ID:23249044      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/23249044.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(VIBE算法源码.docx)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

VIBE算法源码.docx

1、VIBE算法源码VIBE算法源码这是源代码,经过稍微的修改,可完美运行。测试环境为vs2015+opencv3.4.6无任何预处理,直接运行效果图:vibe-background-sequential.h/* file vibe-background-sequential.h brief Interface for the ViBe library author Marc Van Droogenbroeck date July 2014 details Full documentation is available online at: http:/www.ulg.ac.be/telecom/

2、research/vibe/doc All technical details are available in the following paper:O. Barnich and M. Van Droogenbroeck. ViBe: A universal background subtraction algorithm for video sequences. IEEE Transactions on Image Processing, 20(6):1709-1724, June 2011.verbatimBiBTeX information articleBarnich2011ViB

3、e, title = ViBe: A universal background subtraction algorithm for video sequences, author = O. Barnich and M. Van Droogenbroeck, journal = IEEE Transactions on Image Processing, volume = 20, number = 6, pages = 1709-1724, month = June, year = 2011, keywords = ViBe, Background, Background subtraction

4、, Segmentation, Motion, Motion detection, pdf = http:/orbi.ulg.ac.be/bitstream/2268/145853/1/Barnich2011ViBe.pdf, doi = 10.1109/TIP.2010.2101613, url = endverbatimSeecite Barnich2011ViBe*/#ifndef _VIBE_SEQUENTIAL_H_#define _VIBE_SEQUENTIAL_H_#ifdef _cplusplusextern C#endif#include #include #include

5、#include #define COLOR_BACKGROUND 0 /*! Default label for background pixels */#define COLOR_FOREGROUND 255 /*! Default label for foreground pixels. Note that some authors chose any value different from 0 instead */* * typedef struct vibeModel_Sequential_t * brief Data structure for the background su

6、btraction model. * * This data structure contains the background model as well as some paramaters value. * The code is designed to hide all the implementation details to the user to ease its use. */typedef struct vibeModel_Sequential vibeModel_Sequential_t;/* * Allocation of a new data structure whe

7、re the background model will be stored. * Please note that this function only creates the structure to host the data. * This data structures will only be filled with a call to ref libvibeModel_Sequential_AllocInit_8u_C1R. * * result A pointer to a newly allocated ref vibeModel_Sequential_t * structu

8、re, or NULL in the case of an error. */vibeModel_Sequential_t *libvibeModel_Sequential_New();/* * ViBe uses several parameters. * You can print and change some of them if you want. However, default * value should meet your needs for most videos. * * param model The data structure with ViBes backgrou

9、nd subtraction model and parameters. * return */uint32_t libvibeModel_Sequential_PrintParameters(const vibeModel_Sequential_t *model);/* * Setter. * * param model The data structure with ViBes background subtraction model and parameters. * param numberOfSamples * return */int32_t libvibeModel_Sequen

10、tial_SetNumberOfSamples( vibeModel_Sequential_t *model, const uint32_t numberOfSamples);/* * Setter. * * param model The data structure with ViBes background subtraction model and parameters. * return */uint32_t libvibeModel_Sequential_GetNumberOfSamples(const vibeModel_Sequential_t *model);/* * Set

11、ter. * * param model The data structure with ViBes background subtraction model and parameters. * param matchingThreshold * return */int32_t libvibeModel_Sequential_SetMatchingThreshold( vibeModel_Sequential_t *model, const uint32_t matchingThreshold);/* * Setter. * * param model The data structure

12、with ViBes background subtraction model and parameters. * return */uint32_t libvibeModel_Sequential_GetMatchingThreshold(const vibeModel_Sequential_t *model);/* * Setter. * * param model The data structure with ViBes background subtraction model and parameters. * param matchingNumber * return */int3

13、2_t libvibeModel_Sequential_SetMatchingNumber( vibeModel_Sequential_t *model, const uint32_t matchingNumber);/* * Setter. * * param model The data structure with ViBes background subtraction model and parameters. * param updateFactor New value for the update factor. Please note that the update facto

14、r is to be understood as a probability of updating. More specifically, an update factor of 16 means that 1 out of every 16 background pixels is updated. Likewise, an update factor of 1 means that every background pixel is updated. * return */int32_t libvibeModel_Sequential_SetUpdateFactor( vibeModel

15、_Sequential_t *model, const uint32_t updateFactor);/* * Getter. * * param model The data structure with ViBes background subtraction model and parameters. * return */uint32_t libvibeModel_Sequential_GetMatchingNumber(const vibeModel_Sequential_t *model);/* * Getter. * * param model The data structur

16、e with ViBes background subtraction model and parameters. * return */uint32_t libvibeModel_Sequential_GetUpdateFactor(const vibeModel_Sequential_t *model);/* * brief Frees all the memory used by the model and deallocates the structure. * * This function frees all the memory allocated by ref libvibeM

17、odel_SequentialNew and * ref libvibeModel_Sequential_AllocInit_8u_C1R or ref libvibeModel_Sequential_AllocInit_8u_C3R. * param model The data structure with ViBes background subtraction model and parameters. * return */int32_t libvibeModel_Sequential_Free(vibeModel_Sequential_t *model);/* * The two

18、following functions allocate the required memory according to the * model parameters and the dimensions of the input images. * You must use the C1R function for grayscale images and the C3R for color * images. * These 2 functions also initialize the background model using the content * of *image_dat

19、a which is the pixel buffer of the first image of your stream. */ - Single channel images -/* * * param model The data structure with ViBes background subtraction model and parameters. * param image_data * param width * param height * return */int32_t libvibeModel_Sequential_AllocInit_8u_C1R( vibeMo

20、del_Sequential_t *model, const uint8_t *image_data, const uint32_t width, const uint32_t height);/* These 2 functions perform 2 operations: * - they classify the pixels *image_data using the provided model and store * the results in *segmentation_map. * - they update *model according to these result

21、s and the content of * *image_data. * You must use the C1R function for grayscale images and the C3R for color * images. */* * * param model The data structure with ViBes background subtraction model and parameters. * param image_data * param segmentation_map * return */int32_t libvibeModel_Sequenti

22、al_Segmentation_8u_C1R( vibeModel_Sequential_t *model, const uint8_t *image_data, uint8_t *segmentation_map);/* * * param model The data structure with ViBes background subtraction model and parameters. * param image_data * param updating_mask * return */int32_t libvibeModel_Sequential_Update_8u_C1R

23、( vibeModel_Sequential_t *model, const uint8_t *image_data, uint8_t *updating_mask);/ - Three channel images -/* * The pixel values of color images are arranged in the following order * RGBRGBRGB. (or HSVHSVHSVHSVHSVHSV.) * * param model The data structure with ViBes background subtraction model and

24、 parameters. * param image_data * param width * param height * return */int32_t libvibeModel_Sequential_AllocInit_8u_C3R( vibeModel_Sequential_t *model, const uint8_t *image_data, const uint32_t width, const uint32_t height);/* These 2 functions perform 2 operations: * - they classify the pixels *im

25、age_data using the provided model and store * the results in *segmentation_map. * - they update *model according to these results and the content of * *image_data. * You must use the C1R function for grayscale images and the C3R for color * images. */* * The pixel values of color images are arranged

26、 in the following order * RGBRGBRGB. (or HSVHSVHSVHSVHSVHSV.) * * param model The data structure with ViBes background subtraction model and parameters. * param image_data * param segmentation_map * return */int32_t libvibeModel_Sequential_Segmentation_8u_C3R( vibeModel_Sequential_t *model, const ui

27、nt8_t *image_data, uint8_t *segmentation_map);/* * The pixel values of color images are arranged in the following order * RGBRGBRGB. (or HSVHSVHSVHSVHSVHSV.) * * param model The data structure with ViBes background subtraction model and parameters. * param image_data * param updating_mask * return *

28、/int32_t libvibeModel_Sequential_Update_8u_C3R( vibeModel_Sequential_t *model, const uint8_t *image_data, uint8_t *updating_mask);#ifdef _cplusplus#endif#endifvibe-background-sequential.cpp/* file vibe-background-sequential.c brief Implementation of vibe-background-sequential.h author Marc Van Droog

29、enbroeck date May 2014*/*There are a few implementation tricks by Marc Van Droogenbroeck.Please note that THEY DONT AFFECT THE BEHAVIOR OF ViBe but help speeding up the implementation; they are described hereafter.1. Swapping values in order to bring best matching candidates in the first places of t

30、he memoryThe idea is that ViBe only needs two matches to classify a pixel into the background; to some extent, the 18 other pixels (out of N=20 pixels) are then useless. In addition, most of the time, there are no big changes between pixels located at the same place from successive images (90% of the pixels are in the background on average). Ther

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1