1.74k likes | 3.31k Views
DIGITAL IMAGE PROCESSING. Dr J. Shanbehzadeh S . S. Nobakht. DIGITAL IMAGE PROCESSING. Chapter 12 – Object Recognition. Dr J. Shanbehzadeh Shanbehzadeh@gmail.com S . S. Nobakht. Road map of chapter 8. 12.3. 12.2. 12.2. 12.1. 12.3. 12.1. Some Basic Compression Methods.
E N D
DIGITAL IMAGE PROCESSING • Dr J. Shanbehzadeh • S. S. Nobakht ( J.Shanbehzadeh S. S. Nobakht)
DIGITAL IMAGE PROCESSING Chapter 12 – Object Recognition • Dr J. Shanbehzadeh • Shanbehzadeh@gmail.com • S. S. Nobakht ( J.Shanbehzadeh S. S. Nobakht)
Road map of chapter 8 12.3 12.2 12.2 12.1 12.3 12.1 • Some Basic Compression Methods • Structural Methods • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods • Patterns and Pattern Classes ( J.Shanbehzadeh S. S. Nobakht)
12.1 Patterns and Pattern Classes ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Recognition: Background Objects ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Recognition: • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Human have developed a highly sophisticated skills for sensing their surroundings and recognizing what they observed, e.g., distinguishing insect from leaves, understanding spoken words, recognizing a face. We would like to develop a machine having similar capability. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Pattern Recognition? • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods • A pattern is a set of consistent, characteristic form, style of an object, each individual or group, such as • Fingerprints • Pattern of queen’s behavior • Color • shape • Pattern recognition is a study of how machines can • Observe its environments • Learn to distinguish patterns of interest • Make sound decisions and reasonable assignments of patterns to possible classes. Pattern class is a family of patterns that share some common properties. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Pattern Recognition • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods • A abstract representation of pattern recognition system. World Observations Class Space Pattern Space ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Pattern Recognition • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods • “Sorting incoming Fishes on a conveyor according to species using optical sensing”. Sea bass Species Salmon ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Problem Analysis • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods • What are steps in the process? • What would cause problems during the sensing? • What kind of information can distinguish one species from the other? • Taking pictures • Isolating a fish • Taking some measurements • Classifying it. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Problem Analysis • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods • What would cause problems during the sensing? • Lighting, position of the fish, etc. • What kind of information can distinguish one species from the other? • Suggested features: length, lightness, width, number and shape of fins, etc… • Prior knowledge: • Sea bass is generally longer than salmon. This gives us a tentative model. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Pattern Recognition System • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Pattern Recognition System • Preprocessing • Use a segmentation operation to isolate fishes from one another and from the background • May apply some noise reductions prior the segmentation. • Information from a single fish is sent to a feature extractor whose purpose is to reduce the data by measuring certain features. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Pattern Recognition System • The features are passed to a classifier • Select the length of the fish as a possible feature for discrimination • Classification • Design which class the fish is based on the selected features and its threshold value. How Can We Choose The Threshold ? ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Selecting Features • Features are any extractable measurements used. • Often contains noises, which leads to misclassification errors. • Feature selection is then required to choose and extract features that • - Are computationally feasible • - Lead to good pattern recognition success. • -Reduce the problem data (e.g. raw measurements) into manageable amount of information without discarding valuable information. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Selecting Features • From training data, we obtained histogram of the length of the two types of fishes. • How to choose a threshold value that can make reliable decision? • -The length is a poor feature alone! ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Selecting Features • Try out another feature, average lightness of the fishes. • It is much better separate, so it is easier to choose the threshold value. • However, can we obtain a perfect decision? ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Cost of Error • Moving decision boundary affects cost of error. • Another prior knowledge • Salmon is a lot more expensive than sea bass. • Customer who buy salmon will object vigorously if they see sea bass in their cans. • Customers who buy sea bass will be happy if they occasionally see some expensive salmon in their can. • How does this knowledge affect our decision? ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Threshold decision boundary and cost relationship • Move our decision boundary toward smaller values of lightness in order to minimize the cost (reduce the number of sea bass that are classified salmon!) • Task of decision theory ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Multiple Features • Adopt the lightness and add the width of the fish • Each fish is now represented as a point using feature vector, xT. Fish Width Lightness ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Multiple Features • Features are often arranged into a d-dimensional feature space. A plot of feature vectors into feature space is called scatter plot. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Boundary • Can we do better using another decision theory? • How about using more complex model for more complex boundary? ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Performance to Unknown Sample • However, our satisfaction is premature because the central aim of designing a classifier is to correctly classify novel input? • Issue of generalization ! ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Performance to Unknown Sample ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Training Data Physical Environment • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Data Acquisition / Sensing Pre-Processing Pre-Processing Feature Extraction / Selection Feature Extraction Features Features Model Learning / Estimation Model Classification Post-Processing Decision ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Start • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Collect Data The Design Cycle Choose Features • Data Collection • Feature Choice • Model Choice • Training • Evaluation • Computational Complexity Prior Knowledge Choose Model Train Classifier Evaluate Classifier End ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods The Design Cycle • Data Collection • Is the collected data large enough to represent the system? • - To assume good performance of the system, large data is required. • Feature Choice • Is the collected data large enough to represent the system • -Simple to extract, invariant to irrelevant transformation insensitive to noise. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods The Design Cycle • Model Choice • Parametric or non-parametric model • Template, decision-theoretic, neural, structural or hybrid model. • Training • Training is a process of using data to determine the classifier. Many different procedures for training classifiers. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Computational Complexity • Evaluation • Measure the error rate (or performance) of the system. • This to measure the system performance and to identify the need for improvements in its components. • Computation Complexity • What is the trade-off between computational ease and performance? • (How an algorithm scales as a function of the number of features, patterns or categories? ) ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Three Pattern Recognition Approaches • Statistical PR • Syntactic PR • Neural PR ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Statistical PR • May be called decision-theoretic PR • Classifying is based on statistic basis. • Underlying model is of a state of probabilities and/or probability density function. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Statistical PR • Classifying is based on structural information. • Underlying model is of defining primitive and a set of grammars or rules. Class 1 Structure Class 2 Structure Class N Structure . . . Structural Analysis Structural Matcher Relevant Match ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Statistical PR ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Statistical PR ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Neural PR • Classification is done based on knowledge of how biological neural system store and manipulate information. ( J.Shanbehzadeh S. S. Nobakht)
Patterns and Pattern Classes Comparison • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods ( J.Shanbehzadeh S. S. Nobakht)
12.2 Recognition Based on Decision-Theoretic Methods ( J.Shanbehzadeh S. S. Nobakht)
Matching Matching • Optimum Statistical Classifiers • Neural Networks • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods • Pattern : Mathematical Representation • X is Pattern Features Vector • Pattern classes is a family of patterns that share some common properties • Patter classes is denoted by 𝜔_1, 𝜔_2, …, 𝜔_𝑀 where M is the number of classes ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory • Discriminant Function • x is n-dimentional pattern vector • Decision rule for class 𝜔_𝑖 ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory ( J.Shanbehzadeh S. S. Nobakht) Linearly Separable
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory ( J.Shanbehzadeh S. S. Nobakht) Nonlinearly Separable
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory ( J.Shanbehzadeh S. S. Nobakht) Non-Separable
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Minimum Distance Classifier ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Minimum Distance Classifier ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory For decision boundary classes and : ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory ( J.Shanbehzadeh S. S. Nobakht) For decision boundary classes and : Decision Boundary
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory • If 𝑑_12 (𝑥)>0 , x belongs to class 𝜔_1 • If 𝑑_12 (𝑥)<0 , x belongs to class 𝜔_2 ( J.Shanbehzadeh S. S. Nobakht)
Matching • 12.1 Patterns and Pattern Classes • 12.2 Recognition Based on Decision-Theoretic Methods • 12.3 Structural Methods Decision Theory ( J.Shanbehzadeh S. S. Nobakht)