vil_line_filter.h
Go to the documentation of this file.
1 // This is core/vil/algo/vil_line_filter.h
2 #ifndef vil_line_filter_h_
3 #define vil_line_filter_h_
4 //:
5 // \file
6 // \brief Find line-like structures in a 2D image
7 // \author Tim Cootes
8 
9 #include <vil/vil_image_view.h>
10 
11 //: Find line-like structures in a 2D image
12 // Generates two images: line_str contains line strength at each pixel,
13 // essentially the difference between the average of the pixels on
14 // the line and the average of those nearby off the line.
15 // and line_dir contains value indicating direction [0,4]
16 // 0 = Undefined, 1 = horizontal, 2 = 45 degrees etc
17 
18 template<class Type>
20 {
21  public:
22  //: Find line like structures in image (light lines on dark backgrounds)
23  // On exit line_str contains line strength at each pixel,
24  // line_dir contains value indicating direction [0,4]
25  // 0 = Undefined, 1 = horizontal, 2 = 45 degrees etc
26  // This version looks for light lines on a dark background only.
28  vil_image_view<float>& line_str,
29  const vil_image_view<Type>& image,
30  float edge_thresh=0.1f);
31 
32  //: Find line like structures in image (dark lines on light backgrounds)
33  // On exit line_str contains line strength at each pixel,
34  // line_dir contains value indicating direction [0,4]
35  // 0 = Undefined, 1 = horizontal, 2 = 45 degrees etc
36  // This version looks for dark lines on a light background only.
38  vil_image_view<float>& line_str,
39  const vil_image_view<Type>& image,
40  float edge_thresh=0.1f);
41 
42  //: Find line like structures in image (light lines on dark backgrounds)
43  // On exit line_str contains line strength at each pixel,
44  // line_dir contains value indicating direction [0,4]
45  // 0 = Undefined, 1 = horizontal, 2 = 45 degrees etc
46  // This version looks for light lines on a dark background only
47  // using a 5x5 filter
49  vil_image_view<float>& line_str,
50  const vil_image_view<Type>& image,
51  float edge_thresh=0.1f);
52 
53  //: Find line like structures in image (dark lines on light backgrounds)
54  // On exit line_str contains line strength at each pixel,
55  // line_dir contains value indicating direction [0,4]
56  // 0 = Undefined, 1 = horizontal, 2 = 45 degrees etc
57  // This version looks for dark lines on a light background only
58  // using a 5x5 filter
60  vil_image_view<float>& line_str,
61  const vil_image_view<Type>& image,
62  float edge_thresh=0.1f);
63 };
64 
65 #endif
Find line-like structures in a 2D image.
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13
A base class reference-counting view of some image data.
void dark_lines_3x3(vil_image_view< vxl_byte > &line_dir, vil_image_view< float > &line_str, const vil_image_view< Type > &image, float edge_thresh=0.1f)
Find line like structures in image (dark lines on light backgrounds).
void light_lines_5x5(vil_image_view< vxl_byte > &line_dir, vil_image_view< float > &line_str, const vil_image_view< Type > &image, float edge_thresh=0.1f)
Find line like structures in image (light lines on dark backgrounds).
void light_lines_3x3(vil_image_view< vxl_byte > &line_dir, vil_image_view< float > &line_str, const vil_image_view< Type > &image, float edge_thresh=0.1f)
Find line like structures in image (light lines on dark backgrounds).
void dark_lines_5x5(vil_image_view< vxl_byte > &line_dir, vil_image_view< float > &line_str, const vil_image_view< Type > &image, float edge_thresh=0.1f)
Find line like structures in image (dark lines on light backgrounds).