convolve.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;;; File: convolve.h
  4. ;;; Author: Simoncelli
  5. ;;; Description: Header file for convolve.c
  6. ;;; Creation Date:
  7. ;;; ----------------------------------------------------------------
  8. ;;; Object-Based Vision and Image Understanding System (OBVIUS),
  9. ;;; Copyright 1988, Vision Science Group, Media Laboratory,
  10. ;;; Massachusetts Institute of Technology.
  11. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12. */
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #define ABS(x) (((x)>=0) ? (x) : (-(x)))
  16. #define ROOT2 1.4142135623730951
  17. #define REDUCE 0
  18. #define EXPAND 1
  19. #define IS ==
  20. #define ISNT !=
  21. #define AND &&
  22. #define OR ||
  23. typedef int (*fptr)();
  24. typedef struct
  25. {
  26. char *name;
  27. fptr func;
  28. } EDGE_HANDLER;
  29. typedef double image_type;
  30. fptr edge_function(char *edges);
  31. int internal_reduce(image_type *image, int x_idim, int y_idim,
  32. image_type *filt, image_type *temp, int x_fdim, int y_fdim,
  33. int x_start, int x_step, int x_stop,
  34. int y_start, int y_step, int y_stop,
  35. image_type *result, char *edges);
  36. int internal_expand(image_type *image,
  37. image_type *filt, image_type *temp, int x_fdim, int y_fdim,
  38. int x_start, int x_step, int x_stop,
  39. int y_start, int y_step, int y_stop,
  40. image_type *result, int x_rdim, int y_rdim, char *edges);
  41. int internal_wrap_reduce(image_type *image, int x_idim, int y_idim,
  42. image_type *filt, int x_fdim, int y_fdim,
  43. int x_start, int x_step, int x_stop,
  44. int y_start, int y_step, int y_stop,
  45. image_type *result);
  46. int internal_wrap_expand(image_type *image, image_type *filt, int x_fdim, int y_fdim,
  47. int x_start, int x_step, int x_stop,
  48. int y_start, int y_step, int y_stop,
  49. image_type *result, int x_rdim, int y_rdim);