[工学]Image Segmentation 图像分割——数字图像处理.pptVIP

  • 9
  • 0
  • 约7.5千字
  • 约 35页
  • 2018-02-15 发布于浙江
  • 举报

[工学]Image Segmentation 图像分割——数字图像处理.ppt

[工学]Image Segmentation 图像分割——数字图像处理

Chapter 5 Image Segmentation Image segmentation, a process of pixel classi?cation, aims to extract or segment objects or regions from the background. 5.1 Thresholding Thresholding is based on different intensities or colors in the foreground and background regions of an image. Thresholding If the intensity of foreground is quite distinct from that of background,it will be clear to apply thresholding for image segmentation. Thresholding Thresholding The algorithm of calculating global threshold: step1:Choose an initial threshold n0 or calculate the mean value of the image as the initial; step2:Calculate the two mean values m1 and m2 within the two groups of pixels after thresholding at n. And calculate the new threshold valuel n1=0.5*(m1+m2) step3:If n1(new value)has a little change or even no any change comparing with n(the last value), then the threshold selection is done; otherwise, go back to step 2. Thresholding example: compute the average gray value of the image:n0=2.5781. calculate the mean values of the two sections: n1=0.5*(m1+m2)= 4.5312. calculate the new threshold value with threshold n1: n2=0.5*(m1+m2)=4.5312. Since n1=n2, the best threshold value is 4.5312. 5.2 Detection of Isolated Point Point detection mask: The intensity of an isolated point will be quite different from its surroundings, so it can be easily detected by the mask. Detection of Isolated Point Detection of Isolated Point clc;clear all; h1=[1 1 1;1 -2 1;1 1 1]; h2=[1 1 1;1 -5 1;1 1 1]; h3=[1 1 1;1 -7 1;1 1 1]; I=imread(D:\images\point_detection.png); I1=rgb2gray(I); J1=conv2(I1,h1); J2=conv2(I1,h2); J3=conv2(I1,h3); subplot(221),imshow(I);title(original image); subplot(222),imshow(J1);title(point detection with -2); subplot(223),imshow(J2);title(point detection with -5); subplot(224),imshow(J3);title(point detection with -7); Detection of Isolated Point 5.3 Line Detection 4 mask of line detection: Line Detect

文档评论(0)

1亿VIP精品文档

相关文档