Go to the documentation of this file.00001 #ifndef vil_orientations_h_
00002 #define vil_orientations_h_
00003
00004
00005
00006
00007
00008 #include <vil/vil_image_view.h>
00009 #include <vxl_config.h>
00010 #include <vil/algo/vil_sobel_3x3.h>
00011
00012
00013
00014
00015 void vil_orientations(const vil_image_view<float>& grad_i,
00016 const vil_image_view<float>& grad_j,
00017 vil_image_view<float>& orient_im,
00018 vil_image_view<float>& grad_mag);
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 void vil_orientations(const vil_image_view<float>& grad_i,
00029 const vil_image_view<float>& grad_j,
00030 vil_image_view<vxl_byte>& orient_im,
00031 vil_image_view<float>& grad_mag,
00032 unsigned n_orientations=256);
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 void vil_orientations_at_edges(const vil_image_view<float>& grad_i,
00045 const vil_image_view<float>& grad_j,
00046 vil_image_view<vxl_byte>& orient_im,
00047 vil_image_view<float>& grad_mag,
00048 float grad_threshold,
00049 unsigned n_orientations=255);
00050
00051
00052
00053 template <class T>
00054 inline void vil_orientations_from_sobel(const vil_image_view<T>& src_image,
00055 vil_image_view<float>& orient_im,
00056 vil_image_view<float>& grad_mag)
00057 {
00058 vil_image_view<float> grad_i,grad_j;
00059 vil_sobel_3x3(src_image,grad_i,grad_j);
00060 vil_orientations(grad_i,grad_j,orient_im,grad_mag);
00061 }
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 template <class T>
00072 inline void vil_orientations_from_sobel(const vil_image_view<T>& src_image,
00073 vil_image_view<vxl_byte>& orient_im,
00074 vil_image_view<float>& grad_mag,
00075 unsigned n_orientations=256)
00076 {
00077 vil_image_view<float> grad_i,grad_j;
00078 vil_sobel_3x3(src_image,grad_i,grad_j);
00079 vil_orientations(grad_i,grad_j,orient_im,grad_mag,n_orientations);
00080 }
00081
00082 #endif // vil_orientations_h_