Automatic Thresholding

Slides:



Advertisements
Similar presentations
CMPUT 615 Applications of Machine Learning in Image Analysis
Advertisements

Image Segmentation Longin Jan Latecki CIS 601. Image Segmentation Segmentation divides an image into its constituent regions or objects. Segmentation.
Digital Image Processing Lecture 3: Image Display & Enhancement
Chapter 3 cont’d. Adjacency, Histograms, & Thresholding.
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
E.G.M. PetrakisImage Segmentation1 Segmentation is the process of partitioning an image into regions –region: group of connected pixels with similar properties.
Clustering & image segmentation Goal::Identify groups of pixels that go together Segmentation.
Intensity Transformations (Chapter 3)
Automatic Histogram Threshold Using Fuzzy Measures 呂惠琪.
1 Video Processing Lecture on the image part (8+9) Automatic Perception Volker Krüger Aalborg Media Lab Aalborg University Copenhagen
Image Segmentation Image segmentation (segmentace obrazu) –division or separation of the image into segments (connected regions) of similar properties.
图像处理技术讲座(2) Digital Image Processing (2) 灰度直方图和二值化操作 Gray-level Histogram and Threshold 顾 力栩 上海交通大学 计算机系
Lecture 07 Segmentation Lecture 07 Segmentation Mata kuliah: T Computer Vision Tahun: 2010.
Copyright © 2012 Elsevier Inc. All rights reserved.. Chapter 4 Thresholding Techniques.
電腦視覺 Computer and Robot Vision I Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih-Shinh Huang 1.
Computer Vision Lecture 16: Region Representation
Otsu’s Thresholding Method Based on a very simple idea: Find the threshold that minimizes the weighted within-class variance. This turns out to be the.
Medical Imaging Mohammad Dawood Department of Computer Science University of Münster Germany.
Lecture 6 Image Segmentation
Medical Imaging Mohammad Dawood Department of Computer Science University of Münster Germany.
EE 7730 Image Segmentation.
Course Website: Digital Image Processing Image Segmentation: Thresholding.
MRI Image Segmentation for Brain Injury Quantification Lindsay Kulkin 1 and Bir Bhanu 2 1 Department of Biomedical Engineering, Syracuse University, Syracuse,
Segmentation Divide the image into segments. Each segment:
Image Segmentation. Introduction The purpose of image segmentation is to partition an image into meaningful regions with respect to a particular application.
7. Neighbourhood operations A single pixel considered in isolation conveys information on the intensity and colour at a single location in an image, but.
CS 376b Introduction to Computer Vision 04 / 04 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 25 / 2008 Instructor: Michael Eckmann.
Computer Vision Basics Image Terminology Binary Operations Filtering Edge Operators.
Segmentation (Section 10.3 & 10.4) CS474/674 – Prof. Bebis.
Binary Image Analysis. YOU HAVE TO READ THE BOOK! reminder.
Thresholding Thresholding is usually the first step in any segmentation approach We have talked about simple single value thresholding already Single value.
DIGITAL IMAGE PROCESSING Instructors: Dr J. Shanbehzadeh M.Yekke Zare M.Yekke Zare ( J.Shanbehzadeh M.Yekke Zare )
Computer Vision - A Modern Approach Set: Segmentation Slides by D.A. Forsyth Segmentation and Grouping Motivation: not information is evidence Obtain a.
Image Processing David Kauchak cs458 Fall 2012 Empirical Evaluation of Dissimilarity Measures for Color and Texture Jan Puzicha, Joachim M. Buhmann, Yossi.
Entropy and some applications in image processing Neucimar J. Leite Institute of Computing
CS 376b Introduction to Computer Vision 04 / 02 / 2008 Instructor: Michael Eckmann.
Lecture 16 Image Segmentation 1.The basic concepts of segmentation 2.Point, line, edge detection 3.Thresh holding 4.Region-based segmentation 5.Segmentation.
CS 6825: Binary Image Processing – binary blob metrics
University of Kurdistan Digital Image Processing (DIP) Lecturer: Kaveh Mollazade, Ph.D. Department of Biosystems Engineering, Faculty of Agriculture,
Texture. Texture is an innate property of all surfaces (clouds, trees, bricks, hair etc…). It refers to visual patterns of homogeneity and does not result.
CS 376b Introduction to Computer Vision 02 / 22 / 2008 Instructor: Michael Eckmann.
Segmentation.
Medical Imaging Dr. Mohammad Dawood Department of Computer Science University of Münster Germany.
Binarization of gray-scale hologram Fan Jiang Fall 2006.
© by Yu Hen Hu 1 ECE533 Digital Image Processing Image Segmentation.
Digital Image Processing Lecture 18: Segmentation: Thresholding & Region-Based Prof. Charlene Tsai.
Chapter 10, Part II Edge Linking and Boundary Detection The methods discussed in the previous section yield pixels lying only on edges. This section.
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
Pixel Connectivity Pixel connectivity is a central concept of both edge- and region- based approaches to segmentation The notation of pixel connectivity.
Image Segmentation and Edge Detection Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng.
CS654: Digital Image Analysis
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
Image Segmentation by Histogram Thresholding Venugopal Rajagopal CIS 581 Instructor: Longin Jan Latecki.
Image Segmentation Dr. Abdul Basit Siddiqui. Contents Today we will continue to look at the problem of segmentation, this time though in terms of thresholding.
主講者 : 陳建齊. Outline & Content 1. Introduction 2. Thresholding 3. Edge-based segmentation 4. Region-based segmentation 5. conclusion 2.
Digital Image Processing
Machine Vision ENT 273 Regions and Segmentation in Images Hema C.R. Lecture 4.
Image Segmentation Nitin Rane. Image Segmentation Introduction Thresholding Region Splitting Region Labeling Statistical Region Description Application.
Medical Image Analysis Dr. Mohammad Dawood Department of Computer Science University of Münster Germany.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Thresholding Foundation:. Thresholding In A: light objects in dark background To extract the objects: –Select a T that separates the objects from the.
Point and interval estimations of parameters of the normally up-diffused sign. Concept of statistical evaluation.
IMAGE SEGMENTATION USING THRESHOLDING
DIGITAL SIGNAL PROCESSING
Fall 2012 Longin Jan Latecki
Chapter 10 – Image Segmentation
Image Segmentation.
Presentation transcript:

Automatic Thresholding

Review: Image Quantization

Basic Idea of Image Segmentation Segmentation is often considered to be the first step in image analysis. The purpose is to subdivide an image into meaningful non-overlapping regions, which would be used for further analysis. It is hoped that the regions obtained correspond to the physical parts or objects of a scene (3-D) represented by the image (2-D). In general, autonomous segmentation is one of the most difficult tasks in digital image processing. As an example, you can see how segmentation can be integrated into an intelligent application. Above are two screenshots: a noisy image taken with a mobile phone (converted to greyscale), and the segmented using the threshold selection algorithm detailed later. Finally, data collected via border tracing (which requires a binary image) can be used to count the number of fingers in the image. Example

Basic Idea of Image Segmentation All the image segmentation methods assume that: 1. the intensity values are different in different regions, and, 2. within each region, which represents the corresponding object in a scene, the intensity values are similar. im=imread('tools.bmp'); » imshow(im) » figure(2); im1=imshow(double(im)>50); » figure(3); im1=imshow(double(im)>80);

Choosing a threshold: Review Image thresholding classifies pixels into two categories: – Those to which some property measured from the image falls below a threshold, and those at which the property equals or exceeds a threshold. – Thesholding creates a binary image à binarization e.g. perform cell counts in histological images Choosing a threshold is something of a “black art”: n=imread(‘nodules1.jpg’); figure(1); imshow(n); n1=im2bw(n,0.35); n2=im2bw(n,0.75); figure(2), imshow(n1); figure(3), imshow(n2);

Fixed Thresholding • In fixed (or global) thresholding, the threshold value is held constant throughout the image: – Determine a single threshold value by treating each pixel independently of its neighborhood. • Fixed thresholding is of the form: g(x,y) = 0 f(x,y)<T 1 f(x,y)>=T Assumes high-intensity pixels are of interest, and low- intensity pixels are not.

Threshold Values & Histograms • Thresholding usually involves analyzing the histogram – Different features give rise to distinct features in a histogram – In general the histogram peaks corresponding to two features will overlap. The degree of overlap depends on peak separation and peak width. • An example of a threshold value is the mean intensity value

Automatic Thresholding Algorithm: Iterative threshold selection 1 Select an initial estimate of the threshold T. A good initial value is the average intensity of the image. 3. Calculate the mean grey values and of the partitions, R1, R2 . 2. Partition the image into two groups, R1, R2 , using the threshold T. 4. Select a new threshold: 5. Repeat steps 2-4 until the mean values and in successive iterations do not change.

Matlab Implementation Matlab function opthr addpath C:\Zhang\scm3511\week3\matlab im = imread('boy.jpg'); I = rgb2gray(im); I=double(I); T=opthr(I); bim=(I>T); subplot(1,2,1), imshow(I, gray(256)); subplot(1,2,2), imshow(bim)

Possible Variations Pick an initial threshold value, t (say 128). Calculate the mean values in the histogram below (m1) and above (m2) the threshold t. Calculate new threshold. tnew = (m1 + m2) / 2. If the threshold has stabilized (t = tnew), this is your threshold level. Otherwise, t become tnew and reiterate from step 2.

Optimal Thresholding Histogram shape can be useful in locating the threshold. – However it is not reliable for threshold selection when peaks are not clearly resolved. – A “flat” object with no discernable surface texture,and no colour variation will give rise to a relatively narrow histogram peak. Choosing a threshold in the valley between two overlapping peaks, and inevitably some pixels will be incorrectly classified by the thresholding. The determination of peaks and valleys is a non-trivial problem

Optimal Thresholding • In optimal thresholding, a criterion function is devised that yields some measure of separation between regions. – A criterion function is calculated for each intensity and that which maximizes this function is chosen as the threshold. Otsu’s thresholding chooses the threshold to minimize the intraclass variance of the thresholded black and white pixels. Formulated as discriminant analysis: a particular criterion function is used as a measure of statistical separation.

Otsu’s Methold Otsu’s thresholding method is based on selecting the lowest point between two classes (peaks). Frequency and Mean value: Frequency: N: total pixel number Mean: ni: number of pixels in level i Analysis of variance (variance=standard deviation2) Total variance:

Otsu’s Methold between-classes variance (b2 ): The variation of the mean values for each class from the overall intensity mean of all pixels: b2 = 0 (0 - t ) 2 + 1(1 - t ) 2, Substituting t = 0 0 + 11, we get: b2 = 01(1 - 0 )2 0, 1, 0, 1 stands for the frequencies and mean values of two classes, respectively. The between classes variance is the separability measure for the two classes

Otsu’s Method The criterion function involves between-classes variance to the total variance is defined as:  = b2 / t2 All possible thresholds are evaluated in this way, and the one that maximizes  is chosen as the optimal threshold

Matlab function for Otsu’s method function level = graythresh(I) GRAYTHRESH Compute global threshold using Otsu's method. Level is a normalized intensity value that lies in the range [0, 1]. >>n=imread('nodules1.tif'); >> tn=graythresh(n) tn = 0.5804 >> imshow(im2bw(n,tn))

r=imread('rice.tif'); graythresh; subplot(211); imshow; subplot(212); imshow(im2bw(r,tr))