-
Notifications
You must be signed in to change notification settings - Fork 1
/
VIBE.h
47 lines (39 loc) · 1.21 KB
/
VIBE.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Author(s): BeS 2013
*/
#ifndef __CV_VIBE_H__
#define __CV_VIBE_H__
#include <stdint.h>
#include <time.h>
#include <stdlib.h>
#include <omp.h>
#include <iostream>
typedef struct
{
unsigned char *samples;
unsigned int numberOfSamples;
unsigned int sizeOfSample;
}pixel;
typedef struct
{
pixel *pixels;
unsigned int width;
unsigned int height;
unsigned int stride;
unsigned int numberOfSamples;
unsigned int matchingThreshold;
unsigned int matchingNumber;
unsigned int updateFactor;
}vibeModel;
typedef vibeModel vibeModel_t;
static unsigned int *rnd;
static unsigned int rndSize;
static unsigned int rndPos;
vibeModel *libvibeModelNew();
unsigned char getRandPixel(const unsigned char *image_data, const unsigned int width, const unsigned int height, const unsigned int stride, const unsigned int x, const unsigned int y);
int32_t libvibeModelInit(vibeModel *model, const unsigned char *image_data, const unsigned int width, const unsigned int height, const unsigned int stride);
int32_t libvibeModelUpdate(vibeModel *model, const unsigned char *image_data, unsigned char *segmentation_map);
int32_t libvibeModelFree(vibeModel *model);
void initRnd(unsigned int size);
unsigned int freeRnd();
#endif /*__CV_VIBE_H__*/