-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage.h
executable file
·37 lines (25 loc) · 979 Bytes
/
image.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
//image.h
#ifndef _image_h_
#define _image_h_
#include <gtk/gtk.h>
#include "adaboost.h"
#include "haar.h"
SDL_Surface* load_image(char *path);
SDL_Surface** load_image_array(char *path[], int nbExamples);
static inline
Uint8* pixelref(SDL_Surface *image, unsigned x, unsigned y);
void putpixel(SDL_Surface *image, unsigned x, unsigned y, Uint32 pixel) ;
Uint32 getpixel(SDL_Surface *image, unsigned x, unsigned y);
void ToGray(SDL_Surface *surface);
void Binarize(SDL_Surface *surface);
SDL_Surface integralImage(SDL_Surface *image);
//Matrix
void display_matrix(SDL_Surface* image, int** mat);
int** build_matrix_image(SDL_Surface *image);
int** matrix_integralImageL(int** mat, SDL_Surface *image);
int** matrix_integralImageC(int** mat, SDL_Surface *image);
int** matrix_integralImage(SDL_Surface *image);
char* copy_filename(char* image);
int copy_file(char* old_filename, char *new_filename);
void drawRect(haarRecord* haarTab, SDL_Surface *ecran);
#endif