Presentation is loading. Please wait.

Presentation is loading. Please wait.

Line Segment Experiment Instructor: Professor Henderson, Thomas. Student: Chun-Kai Wang.

Similar presentations


Presentation on theme: "Line Segment Experiment Instructor: Professor Henderson, Thomas. Student: Chun-Kai Wang."— Presentation transcript:

1 Line Segment Experiment Instructor: Professor Henderson, Thomas. Student: Chun-Kai Wang

2 Outline The line-segment program The line-segment program –Prototype –The architecture –Meaning of each option Examples Examples –How to read a pixel region picture in examples –Examples of binary image –Examples of gray-tone image Issue of performance evaluate Issue of performance evaluate

3 The line-segment program

4 Prototype function segments = lineSegs(img, mag_thres, zero_thres, len, varargin) function segments = lineSegs(img, mag_thres, zero_thres, len, varargin) % input: img - The input image. It is a binary image or a gray-tone image. Here we assume the foreground color is black and background color is white. mag_thres - The threshold value that determines the foregrounds and the backgrounds. zero_thres - The threshold value that determines how many variances from the zero degree can be tolerated. len - The len value for mark-seeds algorithm. varargin - Options. Those are strings. % output: segments - List of begin and end points of line segments. Example call: Example call: segs = lineSegs(im00, 0.49, 0.01, 9, ‘thin’, ‘sobel’);

5 The architecture

6 Meaning of each option (1) Pre- edge detecting Pre- edge detecting –‘ thres ’ : Convert the input image to binary by Otsu ’ s method. This option is automatically enable when the option ‘ thin ’ is enable. The default value is disable. –‘ thin ’ : Thinning the image with Matlab built-in thinning algorithm (from “ Thinning Methodologies-A Comprehensive Survey, ” Louisa Lam, Seong-Whan Lee, and Ching Y. Wuen, IEEE TrPAMI, vol. 14, no. 9, pp. 869-885, 1992). This is design for the binary image only. The default value is disable.

7 Meaning of each option (2) Edge detecting Edge detecting –‘ sobel ’ : Use Sobel edge detector. One and only one of options ‘ sobel ’ and ‘ markseeds ’ must be set enable. The default value is enable. –‘ sobelmerge ’ : Merge the two directions of edges that are detected by Sobel edge detector into one. This option is meaningful only when the option ‘ sobel ’ is enable. The default value is disable. –‘ markseeds ’ : Use Mark-Seeds edge detector. One and only one of options ‘ sobel ’ and ‘ markseeds ’ must be set enable. The default value is disable.

8 Examples

9 How to read a pixel region picture A pixel region picture is a picture that shows values of each pixel in some region of a image. A pixel region picture is a picture that shows values of each pixel in some region of a image. If a pixel region picture is for displaying line segments, each 1-pixel wide horizontal line or vertical line is a line segment. For example, there are eight line segments in the following pictures, each with a unique color. If a pixel region picture is for displaying line segments, each 1-pixel wide horizontal line or vertical line is a line segment. For example, there are eight line segments in the following pictures, each with a unique color.

10 Examples of binary image (1) The binary image and the region that we will use in the following examples. The binary image and the region that we will use in the following examples.

11 Examples of binary image (2) Line segments with Sobel edge detector. Line segments with Sobel edge detector.

12 Examples of binary image (3) Line segments with Sobel edge detector and edge merging. Line segments with Sobel edge detector and edge merging.

13 Examples of binary image (4) Line segments with thinning algorithm and Sobel edge detector. Line segments with thinning algorithm and Sobel edge detector.

14 Examples of binary image (5) Line segments with thinning algorithm, Sobel edge detector, and edge merging. Line segments with thinning algorithm, Sobel edge detector, and edge merging.

15 Examples of binary image (6) Line segments with mark-seeds edge detector. Line segments with mark-seeds edge detector.

16 Examples of binary image (7) Line segments with thinning algorithm and mark-seeds edge detector. Line segments with thinning algorithm and mark-seeds edge detector.

17 Examples of gray-tone image (1) The binary image and the region that we will use in the following examples. The binary image and the region that we will use in the following examples.

18 Examples of gray-tone image (2) Line segments with Sobel edge detector. Line segments with Sobel edge detector.

19 Issue of performance evaluate Original image MINUS Segments image. Original image MINUS Segments image. –But not all of lines in the original image are one-pixel wide. It is hard to find a automatic line segment program performance evaluating tool because we need to know line segments at the first hand to evaluate such a program, but how can we find a perfect line segment program at the first hand? It is hard to find a automatic line segment program performance evaluating tool because we need to know line segments at the first hand to evaluate such a program, but how can we find a perfect line segment program at the first hand? The dependable method that I can think of is to evaluate the performance manually. The dependable method that I can think of is to evaluate the performance manually.


Download ppt "Line Segment Experiment Instructor: Professor Henderson, Thomas. Student: Chun-Kai Wang."

Similar presentations


Ads by Google