DREAM PLAN IDEA IMPLEMENTATION 1. 2 3 Introduction to Image Processing Dr. Kourosh Kiani

Slides:



Advertisements
Similar presentations
1 Radio Maria World. 2 Postazioni Transmitter locations.
Advertisements

Números.
1 A B C
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
AGVISE Laboratories %Zone or Grid Samples – Northwood laboratory
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
PDAs Accept Context-Free Languages
/ /17 32/ / /
AP STUDY SESSION 2.
Reflection nurulquran.com.
1
EuroCondens SGB E.
Worksheets.
Slide 1Fig 26-CO, p.795. Slide 2Fig 26-1, p.796 Slide 3Fig 26-2, p.797.
Slide 1Fig 25-CO, p.762. Slide 2Fig 25-1, p.765 Slide 3Fig 25-2, p.765.
Select from the most commonly used minutes below.
Sequential Logic Design
STATISTICS INTERVAL ESTIMATION Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National Taiwan University.
Addition and Subtraction Equations
David Burdett May 11, 2004 Package Binding for WS CDL.
1 When you see… Find the zeros You think…. 2 To find the zeros...
Create an Application Title 1Y - Youth Chapter 5.
Add Governors Discretionary (1G) Grants Chapter 6.
CALENDAR.
CHAPTER 18 The Ankle and Lower Leg
Summative Math Test Algebra (28%) Geometry (29%)
ASCII stands for American Standard Code for Information Interchange
The 5S numbers game..
突破信息检索壁垒 -SciFinder Scholar 介绍
A Fractional Order (Proportional and Derivative) Motion Controller Design for A Class of Second-order Systems Center for Self-Organizing Intelligent.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Break Time Remaining 10:00.
The basics for simulations
PP Test Review Sections 6-1 to 6-6
Frequency Tables and Stem-and-Leaf Plots 1-3
1 Prediction of electrical energy by photovoltaic devices in urban situations By. R.C. Ott July 2011.
Dynamic Access Control the file server, reimagined Presented by Mark on twitter 1 contents copyright 2013 Mark Minasi.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Progressive Aerobic Cardiovascular Endurance Run
Adding Up In Chunks.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
TCCI Barometer September “Establishing a reliable tool for monitoring the financial, business and social activity in the Prefecture of Thessaloniki”
When you see… Find the zeros You think….
2011 WINNISQUAM COMMUNITY SURVEY YOUTH RISK BEHAVIOR GRADES 9-12 STUDENTS=1021.
Before Between After.
2011 FRANKLIN COMMUNITY SURVEY YOUTH RISK BEHAVIOR GRADES 9-12 STUDENTS=332.
Subtraction: Adding UP
: 3 00.
5 minutes.
Numeracy Resources for KS2
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Static Equilibrium; Elasticity and Fracture
ANALYTICAL GEOMETRY ONE MARK QUESTIONS PREPARED BY:
Converting a Fraction to %
Resistência dos Materiais, 5ª ed.
Clock will move after 1 minute
Physics for Scientists & Engineers, 3rd Edition
Select a time to count down from the clock above
Copyright Tim Morris/St Stephen's School
A Data Warehouse Mining Tool Stephen Turner Chris Frala
1 Dr. Scott Schaefer Least Squares Curves, Rational Representations, Splines and Continuity.
Chart Deception Main Source: How to Lie with Charts, by Gerald E. Jones Dr. Michael R. Hyman, NMSU.
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Introduction Embedded Universal Tools and Online Features 2.
Schutzvermerk nach DIN 34 beachten 05/04/15 Seite 1 Training EPAM and CANopen Basic Solution: Password * * Level 1 Level 2 * Level 3 Password2 IP-Adr.
Presentation transcript:

DREAM PLAN IDEA IMPLEMENTATION 1

2

3 Introduction to Image Processing Dr. Kourosh Kiani Web: Present to: Amirkabir University of Technology (Tehran Polytechnic) & Semnan University

Lecture 02 Histogram 4

5

6

7

8

9

10

11

 H(k) specifies the # of pixels with gray-value k  Let N be the number of pixels:  P(k) = H(k)/N defines the normalized histogram  defines the accumulated histogram Occurrence (# of pixels) Gray Level 12

Histogram Normalized Histogram Accumulated Histogram 13

 The image histogram does not fully represent the image P(I) I I H(I) I 0.1 H(I) I 0.1 Pixel permutation of the left image 14

x4 image Gray scale = [0,9] histogram No. of pixels Gray level 15

Gray Level(j) No. of pixels / / / 16 / 16 / 16 / 16 / 16 / 16 s x   

Grayscale Histogram 17

(3, 8, 5) 18

19

image histogram 20

valuecount … … PARTIAL IMAGE INFO: 21

Plot of Pixel Count as a Function of Gray Level Value 22

The histogram of an image shows us the distribution of grey levels in the image Massively useful in image processing, especially in segmentation Grey Levels Frequencies 23

24

25

26

OriginalDark Light 27

28

An image has low contrast when the complete range of possible values is not used. Inspection of the histogram shows this lack of contrast. 29

30

rgbI = imread('kourosh.jpg'); grayI = rgb2gray(rgbI); %get image histogram [counts bins]=imhist(grayI); %show histogram bar(bins,counts); 31

rgbI = imread('kouroshdark.jpg'); grayI = rgb2gray(rgbI); %get image histogram [counts bins]=imhist(grayI); %show histogram bar(bins,counts); 32

rgbI = imread('kouroshbright.jpg'); grayI = rgb2gray(rgbI); %get image histogram [counts bins]=imhist(grayI); %show histogram bar(bins,counts); 33

I = imread('pic01.png'); %get image histogram [counts bins]=imhist(I); %show histogram bar(bins,counts); 34

I = imread('pic03.png'); %get image histogram [counts bins]=imhist(I); %show histogram bar(bins,counts); 35

 The image shows the spatial distribution of gray values.  The image histogram discards the spatial information and shows the relative frequency of occurrence of the gray values. 36

 The histogram typically plots the absolute pixel count as a function of gray value: For an image with dimensions M by N I max 37

 The graph of relative frequency of occurrence as a function of gray value is also called a histogram:  Interpreting the relative frequency histogram as a probability distribution, then:  P(I(x,y) = i) = H(i)/(MxN) 38

 Interpreting the relative frequency histogram as a probability distribution, then:  Curve is called the cumulative distribution function Gray Value P(I(x,y) = i) = H(i)/(MxN) 39

 Image histograms consist of peaks, valleys, and low plains  Peaks = many pixels concentrated in a few grey levels  Plains = small number of pixels distributed over a wider range of grey levels 40

 The goal is to modify the gray levels of an image so that the histogram of the modified image is flat.  Expand pixels in peaks over a wider range of gray-levels.  “Squeeze” low plains pixels into a narrower range of gray levels.  Utilizes all gray values equally  Example Histogram:  Note low utilization of small gray values 41

 All gray levels are used equally.  Has a tendency to enhance contrast. 42

How are the gray levels in the original image changed to produce the enhanced image? Method 1. Choose points randomly. Method 2. Choice depends on the graylevels of their neighboring points. Computationally expensive. Approximations. 43

 Mapping from one set of grey-levels, , to a new set, .  Ideally, the number of pixels, N p, occupying each grey level should be:  To approximate this, apply the transform  Where CH is the cumulative histogram (see next slide)  j is the gray value in the source image  i is the gray value in the equalized image N p = M*N G i = MAX 0, round CH(j) NpNp 44

ideal G=8 MxN=2400 N p =300 jH(j)CH(j)i CH(j) =  H(i) i=0 j

rgbI = imread('ship1.png'); J = histeq(rgbI); imshow(rgbI) figure, imshow(J) %get image histogram [counts bins]=imhist(rgbI); %show histogram figure(3) bar(bins,counts); %get image histogram [counts bins]=imhist(J); %show histogram figure(4) bar(bins,counts); 46

47

48

Histogram Equalization: Example 49

50

COLOR IMAGE 51

52

clc; % Clear the command window. close all; % Close all figures (except those of imtool.) imtool close all; % Close all imtool figures. clear; % Erase all existing variables. workspace; % Make sure the workspace panel is showing. fontSize = 20; % Read in standard MATLAB color demo image. rgbImage = imread('peppers.png'); [rows columns numberOfColorBands] = size(rgbImage); figure (1) imshow(rgbImage, []); redPlane = rgbImage(:, :, 1); greenPlane = rgbImage(:, :, 2); bluePlane = rgbImage(:, :, 3); % Let's get its histograms. [pixelCountR grayLevelsR] = imhist(redPlane); figure(2) %show histogram bar(grayLevelsR,pixelCountR,'r'); xlim([0 grayLevelsR(end)]); % Scale x axis manually. title('Histogram of red plane', 'Fontsize', fontSize); grid on; [pixelCountG grayLevelsG] = imhist(greenPlane); figure(3) %show histogram bar(grayLevelsG,pixelCountG,'g'); xlim([0 grayLevelsG(end)]); % Scale x axis manually. title('Histogram of green plane', 'Fontsize', fontSize); grid on; [pixelCountB grayLevelsB] = imhist(bluePlane); figure(4) %show histogram bar(grayLevelsB,pixelCountB,'b'); xlim([0 grayLevelsB(end)]); % Scale x axis manually. title('Histogram of blue plane', 'Fontsize', fontSize); grid on; 53

54

Questions? Discussion? Suggestions ? 55

56