summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/MEX/convolve.h
blob: 48d55f7c78dc1a3d3a681603886efa8a07833488 (plain) (blame)
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
48
49
50
51
52
53
54
55
/* 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;  File: convolve.h
;;;  Author: Simoncelli
;;;  Description: Header file for convolve.c
;;;  Creation Date:
;;;  ----------------------------------------------------------------
;;;    Object-Based Vision and Image Understanding System (OBVIUS),
;;;      Copyright 1988, Vision Science Group,  Media Laboratory,  
;;;              Massachusetts Institute of Technology.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*/

#include <stdio.h>
#include <stdlib.h> 

#define ABS(x)	  (((x)>=0) ? (x) : (-(x)))
#define ROOT2 1.4142135623730951
#define REDUCE 0
#define EXPAND 1
#define IS    ==
#define ISNT  !=
#define AND &&
#define OR ||

typedef  int (*fptr)();

typedef struct 
  {
  char *name;
  fptr func;
  } EDGE_HANDLER;

typedef double image_type;

fptr edge_function(char *edges);
int internal_reduce(image_type *image, int x_idim, int y_idim, 
		    image_type *filt, image_type *temp, int x_fdim, int y_fdim,
		    int x_start, int x_step, int x_stop, 
		    int y_start, int y_step, int y_stop,
		    image_type *result, char *edges);
int internal_expand(image_type *image, 
		    image_type *filt, image_type *temp, int x_fdim, int y_fdim,
		    int x_start, int x_step, int x_stop, 
		    int y_start, int y_step, int y_stop,
		    image_type *result, int x_rdim, int y_rdim, char *edges);
int internal_wrap_reduce(image_type *image, int x_idim, int y_idim, 
			 image_type *filt, int x_fdim, int y_fdim,
			 int x_start, int x_step, int x_stop, 
			 int y_start, int y_step, int y_stop,
			 image_type *result);
int internal_wrap_expand(image_type *image, image_type *filt, int x_fdim, int y_fdim,
			 int x_start, int x_step, int x_stop, 
			 int y_start, int y_step, int y_stop,
			 image_type *result, int x_rdim, int y_rdim);