Presentation is loading. Please wait.

Presentation is loading. Please wait.

2004/03/23 Image Analysis 1 Image Processing & Analysis Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.

Similar presentations


Presentation on theme: "2004/03/23 Image Analysis 1 Image Processing & Analysis Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information."— Presentation transcript:

1 2004/03/23 Image Analysis 1 Image Processing & Analysis Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University

2 22004/03/23Image Analysis Outline Introduction Image Processing Image Analysis

3 32004/03/23Image Analysis Introduction Image-to-image transform To reduce irrelevant information or noise To reduce irrelevant information or noise To enhance the image properties To enhance the image properties Image-to-feature transformation Extract a small number of features Extract a small number of features Feature-to-decision transformation Use one or more features to classify the image or objects in it Use one or more features to classify the image or objects in it

4 42004/03/23Image Analysis Introduction Gray level histogram A graph showing the frequency of occurrence of each gray level in the image A graph showing the frequency of occurrence of each gray level in the image

5 52004/03/23Image Analysis Histogram

6 62004/03/23Image Analysis Image Processing Inverse Reverse light and dark Reverse light and dark g 2 (x,y) = K – 1 – g 1 (x,y) (K=256, for example) g 2 (x,y) = K – 1 – g 1 (x,y) (K=256, for example)

7 72004/03/23Image Analysis Image Processing Threshold T – called a threshold value T – called a threshold value Set each gray level that is less or equal to some prescribed value T to 0. Set each gray level that is less or equal to some prescribed value T to 0. Set each gray level that is greater than T to 1. Set each gray level that is greater than T to 1. g 2 (x,y) = 0 if g 1 (x,y) <= T g 2 (x,y) = 0 if g 1 (x,y) <= T g 2 (x,y) = K-1 if g 1 (x,y) > T g 2 (x,y) = K-1 if g 1 (x,y) > T

8 82004/03/23Image Analysis Threshold

9 92004/03/23Image Analysis Threshold

10 102004/03/23Image Analysis Divide or segment an image into a number of regions Nonbackground regions are sometimes called objects. Nonbackground regions are sometimes called objects. Threshold is one the most simplest way. Threshold is one the most simplest way.

11 112004/03/23Image Analysis 4-connected Share a side Share a side8-connected Share either a side or a corner 848 404 848

12 122004/03/23Image Analysis

13 132004/03/23Image Analysis Labeling Algorithm Thresholding Dividing an image into two or more regions Dividing an image into two or more regions Identify which pixels belong to each of these specific regions Measure various properties Measure various propertiesSizeShapeLocationColor

14 142004/03/23Image Analysis Labeling Algorithm Replaces each pixel by a negative number Uses a list to keep track of pixels that are yet to be labeled Insert(s,t) Insert(s,t) insert pixel (s,t) at the end of the list (s,t) <- remove() (s,t) <- remove() remove the pixel from the front

15 152004/03/23Image Analysis Region-Labeling Algorithm L <- -1 (Initialize label.) Scan the image from left to right and top to bottom for all (x,y) If g(x.y)>0 the insert(x,y) If g(x.y)>0 the insert(x,y) While list is not empty do While list is not empty do (s,t) <- remove() (s,t) <- remove() For each 4-neightbor (u,v) of (s,t) do For each 4-neightbor (u,v) of (s,t) do If (u,v) is unlabeled and g(u,v)=g(x,y) then If (u,v) is unlabeled and g(u,v)=g(x,y) then Insert(u,v) Insert(u,v) End if End if End for End for End while End while L <- L-1 (Get new label.) L <- L-1 (Get new label.) End scan

16 162004/03/23Image Analysis Bounding Box (Xmin, Ymin) (Xmax, Ymax)

17 172004/03/23Image Analysis list Include #include #include using namespace std; using namespace std;Declaration list listPoint; list listPoint;Add push_back, push_front push_back, push_frontRemove pop_back, pop_front pop_back, pop_front

18 182004/03/23Image Analysis list Iterate list ::iterator i; list ::iterator i; for (i = listPoint.begin(); i != listPoint.end(); ++i) for (i = listPoint.begin(); i != listPoint.end(); ++i)Miscel size() size() clear() clear() front() front() back() back()


Download ppt "2004/03/23 Image Analysis 1 Image Processing & Analysis Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information."

Similar presentations


Ads by Google