PageRenderTime 76ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/CODE3/lib/env_channel.h

https://github.com/yianni/cappocacciaactivevision
C Header | 172 lines | 103 code | 20 blank | 49 comment | 0 complexity | 4958053efc782e4ad9cfa3b30ec667c9 MD5 | raw file
  1. /*!@file Envision/env_channel.h Base class for channels that will use integer math */
  2. // //////////////////////////////////////////////////////////////////// //
  3. // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005 //
  4. // by the University of Southern California (USC) and the iLab at USC. //
  5. // See http://iLab.usc.edu for information about this project. //
  6. // //////////////////////////////////////////////////////////////////// //
  7. // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
  8. // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
  9. // in Visual Environments, and Applications'' by Christof Koch and //
  10. // Laurent Itti, California Institute of Technology, 2001 (patent //
  11. // pending; application number 09/912,225 filed July 23, 2001; see //
  12. // http://pair.uspto.gov/cgi-bin/final/home.pl for current status). //
  13. // //////////////////////////////////////////////////////////////////// //
  14. // This file is part of the iLab Neuromorphic Vision C++ Toolkit. //
  15. // //
  16. // The iLab Neuromorphic Vision C++ Toolkit is free software; you can //
  17. // redistribute it and/or modify it under the terms of the GNU General //
  18. // Public License as published by the Free Software Foundation; either //
  19. // version 2 of the License, or (at your option) any later version. //
  20. // //
  21. // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope //
  22. // that it will be useful, but WITHOUT ANY WARRANTY; without even the //
  23. // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //
  24. // PURPOSE. See the GNU General Public License for more details. //
  25. // //
  26. // You should have received a copy of the GNU General Public License //
  27. // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write //
  28. // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, //
  29. // Boston, MA 02111-1307 USA. //
  30. // //////////////////////////////////////////////////////////////////// //
  31. //
  32. // Primary maintainer for this file: Rob Peters <rjpeters at usc dot edu>
  33. // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Envision/env_channel.h $
  34. // $Id: env_channel.h 8054 2007-03-07 00:47:08Z rjpeters $
  35. //
  36. #ifndef ENVISION_ENV_CHANNEL_H_DEFINED
  37. #define ENVISION_ENV_CHANNEL_H_DEFINED
  38. #include "env_config.h"
  39. #include "env_types.h"
  40. struct env_dims;
  41. struct env_image;
  42. struct env_math;
  43. struct env_params;
  44. struct env_pyr;
  45. struct env_rgb_pixel;
  46. #ifdef __cplusplus
  47. extern "C"
  48. {
  49. #endif
  50. typedef void (env_chan_status_func)(void* userdata,
  51. const char* tagName,
  52. const struct env_image* img);
  53. void env_chan_process_pyr(const char* tagName,
  54. const struct env_dims inputDims,
  55. const struct env_pyr* pyr,
  56. const struct env_params* envp,
  57. const struct env_math* imath,
  58. const int takeAbs,
  59. const int normalizeOutput,
  60. struct env_image* result);
  61. //! An intensity channel.
  62. void env_chan_intensity(const char* tagName,
  63. const struct env_params* envp,
  64. const struct env_math* imath,
  65. const struct env_dims inputdims,
  66. const struct env_pyr* lowpass5,
  67. const int normalizeOutput,
  68. env_chan_status_func* status_func,
  69. void* status_userdata,
  70. struct env_image* result);
  71. //! A double opponent color channel that combines r/g, b/y subchannels
  72. void env_chan_color(const char* tagName,
  73. const struct env_params* envp,
  74. const struct env_math* imath,
  75. const struct env_rgb_pixel* const colimg,
  76. const struct env_rgb_pixel* const prev_colimg /* or null is fine here */,
  77. const struct env_dims dims,
  78. env_chan_status_func* status_func,
  79. void* status_userdata,
  80. struct env_image* result);
  81. //REV: modified to take color biases
  82. void env_chan_color_bias(const char* tagName,
  83. const struct env_params* envp,
  84. const struct env_math* imath,
  85. const struct env_rgb_pixel* const colimg,
  86. const struct env_rgb_pixel* const prev_colimg /* or null is fine here */,
  87. const struct env_dims dims,
  88. env_chan_status_func* status_func,
  89. void* status_userdata,
  90. struct env_image* result,
  91. float red_bias, float green_bias, float blue_bias, float yellow_bias);
  92. //! An orientation filtering channel
  93. void env_chan_steerable(const char* tagName,
  94. const struct env_params* envp,
  95. const struct env_math* imath,
  96. const struct env_dims inputdims,
  97. const struct env_pyr* hipass9,
  98. const env_size_t thetaidx,
  99. env_chan_status_func* status_func,
  100. void* status_userdata,
  101. struct env_image* result);
  102. //! A composite channel with a set of steerable-filter subchannels
  103. void env_chan_orientation(const char* tagName,
  104. const struct env_params* envp,
  105. const struct env_math* imath,
  106. const struct env_image* img,
  107. env_chan_status_func* status_func,
  108. void* status_userdata,
  109. struct env_image* result);
  110. #ifdef ENV_WITH_DYNAMIC_CHANNELS
  111. //! A temporal flicker channel.
  112. void env_chan_flicker(const char* tagName,
  113. const struct env_params* envp,
  114. const struct env_math* imath,
  115. const struct env_image* prev,
  116. const struct env_image* cur,
  117. env_chan_status_func* status_func,
  118. void* status_userdata,
  119. struct env_image* result);
  120. //! A true multi-scale temporal flicker channel.
  121. void env_chan_msflicker(const char* tagName,
  122. const struct env_params* envp,
  123. const struct env_math* imath,
  124. const struct env_dims inputDims,
  125. const struct env_pyr* prev_lowpass5,
  126. const struct env_pyr* cur_lowpass5,
  127. env_chan_status_func* status_func,
  128. void* status_userdata,
  129. struct env_image* result);
  130. //! A motion sensitive channel with direction selectivity
  131. void env_chan_direction(const char* tagName,
  132. const struct env_params* envp,
  133. const struct env_math* imath,
  134. const struct env_dims inputdims,
  135. const struct env_pyr* unshiftedPrev,
  136. const struct env_pyr* unshiftedCur,
  137. const struct env_pyr* shiftedPrev,
  138. const struct env_pyr* shiftedCur,
  139. env_chan_status_func* status_func,
  140. void* status_userdata,
  141. struct env_image* result);
  142. #endif // ENV_WITH_DYNAMIC_CHANNELS
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146. // ######################################################################
  147. /* So things look consistent in everyone's emacs... */
  148. /* Local Variables: */
  149. /* indent-tabs-mode: nil */
  150. /* c-file-style: "linux" */
  151. /* End: */
  152. #endif // ENVISION_ENV_CHANNEL_H_DEFINED