JWS C Library
C language utility library
|
00001 /* 00002 * This work is licensed under a Creative Commons 00003 * Attribution-Noncommercial-Share Alike 3.0 United States License. 00004 * 00005 * http://creativecommons.org/licenses/by-nc-sa/3.0/us/ 00006 * 00007 * You are free: 00008 * 00009 * to Share - to copy, distribute, display, and perform the work 00010 * to Remix - to make derivative works 00011 * 00012 * Under the following conditions: 00013 * 00014 * Attribution. You must attribute the work in the manner specified by the 00015 * author or licensor (but not in any way that suggests that they endorse you 00016 * or your use of the work). 00017 * 00018 * Noncommercial. You may not use this work for commercial purposes. 00019 * 00020 * Share Alike. If you alter, transform, or build upon this work, you may 00021 * distribute the resulting work only under the same or similar license to 00022 * this one. 00023 * 00024 * For any reuse or distribution, you must make clear to others the license 00025 * terms of this work. The best way to do this is by including this header. 00026 * 00027 * Any of the above conditions can be waived if you get permission from the 00028 * copyright holder. 00029 * 00030 * Apart from the remix rights granted under this license, nothing in this 00031 * license impairs or restricts the author's moral rights. 00032 */ 00033 00034 00046 #ifndef TWOD_H 00047 #define TWOD_H 00048 00049 00050 #include <jwsc/config.h> 00051 00052 #include <stdlib.h> 00053 #include <inttypes.h> 00054 00055 #include "jwsc/base/error.h" 00056 #include "jwsc/matrix/matrix.h" 00057 00058 00059 #ifdef __cplusplus 00060 namespace jwsc { 00061 extern "C" { 00062 #endif 00063 00064 00073 void create_sobel_x_filter_f(Matrix_f** sobel_out); 00074 00076 void create_sobel_x_filter_d(Matrix_d** sobel_out); 00077 00091 void create_sobel_y_filter_f(Matrix_f** sobel_out); 00092 00094 void create_sobel_y_filter_d(Matrix_d** sobel_out); 00095 00109 Error* create_LoG_filter_f(Matrix_f** LoG_out, float sigma); 00110 00112 Error* create_LoG_filter_d(Matrix_d** LoG_out, double sigma); 00113 00129 Error* create_auto_2d_gaussian_filter_f 00130 ( 00131 Matrix_f** h_out, 00132 float row_sigma, 00133 float col_sigma 00134 ); 00135 00139 Error* create_auto_2d_gaussian_filter_d 00140 ( 00141 Matrix_d** h_out, 00142 double row_sigma, 00143 double col_sigma 00144 ); 00145 00161 Error* create_2d_gaussian_filter_f 00162 ( 00163 Matrix_f** h_out, 00164 float row_sigma, 00165 float col_sigma, 00166 uint32_t num_rows, 00167 uint32_t num_cols 00168 ); 00169 00173 Error* create_2d_gaussian_filter_d 00174 ( 00175 Matrix_d** h_out, 00176 double row_sigma, 00177 double col_sigma, 00178 uint32_t num_rows, 00179 uint32_t num_cols 00180 ); 00181 00199 Error* create_auto_2d_gaussian_dx_filter_f 00200 ( 00201 Matrix_f** h_out, 00202 float row_sigma, 00203 float col_sigma 00204 ); 00205 00210 Error* create_auto_2d_gaussian_dx_filter_d 00211 ( 00212 Matrix_d** h_out, 00213 double row_sigma, 00214 double col_sigma 00215 ); 00216 00233 Error* create_2d_gaussian_dx_filter_f 00234 ( 00235 Matrix_f** h_out, 00236 float row_sigma, 00237 float col_sigma, 00238 uint32_t num_rows, 00239 uint32_t num_cols 00240 ); 00241 00246 Error* create_2d_gaussian_dx_filter_d 00247 ( 00248 Matrix_d** h_out, 00249 double row_sigma, 00250 double col_sigma, 00251 uint32_t num_rows, 00252 uint32_t num_cols 00253 ); 00254 00272 Error* create_auto_2d_gaussian_dy_filter_f 00273 ( 00274 Matrix_f** h_out, 00275 float row_sigma, 00276 float col_sigma 00277 ); 00278 00283 Error* create_auto_2d_gaussian_dy_filter_d 00284 ( 00285 Matrix_d** h_out, 00286 double row_sigma, 00287 double col_sigma 00288 ); 00289 00306 Error* create_2d_gaussian_dy_filter_f 00307 ( 00308 Matrix_f** h_out, 00309 float row_sigma, 00310 float col_sigma, 00311 uint32_t num_rows, 00312 uint32_t num_cols 00313 ); 00314 00319 Error* create_2d_gaussian_dy_filter_d 00320 ( 00321 Matrix_d** h_out, 00322 double row_sigma, 00323 double col_sigma, 00324 uint32_t num_rows, 00325 uint32_t num_cols 00326 ); 00327 00331 #ifdef __cplusplus 00332 } 00333 } 00334 #endif 00335 00336 00337 #endif