libvibe++ : a generic C++ library for the ViBe algorithm
ViBeTemplateBase.t
Go to the documentation of this file.
1 /* Copyright - Benjamin Laugraud <blaugraud@ulg.ac.be> - 2016
2  * Copyright - Marc Van Droogenbroeck <m.vandroogenbroeck@ulg.ac.be> - 2016
3  *
4  * ViBe is covered by a patent (see http://www.telecom.ulg.ac.be/research/vibe).
5  *
6  * Permission to use ViBe without payment of fee is granted for nonprofit
7  * educational and research purposes only.
8  *
9  * This work may not be copied or reproduced in whole or in part for any
10  * purpose.
11  *
12  * Copying, reproduction, or republishing for any purpose shall require a
13  * license. Please contact the authors in such cases. All the code is provided
14  * without any guarantee.
15  */
16 
17 /**
18  @file ViBeTemplateBase.t
19  @brief
20 
21  @author Benjamin Laungraud and Marc Van Droogenbroeck
22 
23  @date June 2016
24 */
25 
26 #ifdef _LIB_VIBE_XX_COMMON_VIBE_TEMPLATE_BASE_H_
27 
28 /* ========================================================================== *
29  * ViBeTemplateBase *
30  * ========================================================================== */
31 
32 template <class Derived>
33 ViBeTemplateBase<Derived>::ViBeTemplateBase(
34  int32_t height,
35  int32_t width,
36  int32_t channels,
37  const uint8_t* buffer
38 ) :
39  Base(
40  height,
41  width,
42  channels,
43  buffer
44  ) {}
45 
46 /******************************************************************************/
47 
48 template <class Derived>
49 inline void ViBeTemplateBase<Derived>::segmentation(
50  const uint8_t* buffer,
51  uint8_t* segmentationMap
52 ) {
53  static_cast<Derived*>(this)->_CRTP_segmentation(buffer, segmentationMap);
54 }
55 
56 /******************************************************************************/
57 
58 template <class Derived>
59 inline void ViBeTemplateBase<Derived>::update(
60  const uint8_t* buffer,
61  uint8_t* updatingMask
62 ) {
63  static_cast<Derived*>(this)->_CRTP_update(buffer, updatingMask);
64 }
65 
66 #endif /* _LIB_VIBE_XX_COMMON_VIBE_TEMPLATE_BASE_H_ */

License/Copyright

This code is copyrighted by the University of Liège, Belgium. 
It is only shared for research purposes. Please do not distribute it. 
B. Laugraud and M. Van Droogenbroeck, May 2016.