Image Enhancement Christoph Lampert / Chris Wojtan Some slides adapted from Selim Aksoy, Bilkent University.

Slides:



Advertisements
Similar presentations
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Advertisements

Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 4 – Digital Image Representation Klara Nahrstedt Spring 2009.
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Chapter 3 Image Enhancement in the Spatial Domain.
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Image Processing A brief introduction (by Edgar Alejandro Guerrero Arroyo)
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Data Types in Java Data is the information that a program has to work with. Data is of different types. The type of a piece of data tells Java what can.
Image Histograms Cumulative histogram
Intensity Transformations (Chapter 3)
Course Website: Digital Image Processing Image Enhancement (Histogram Processing)
ECE 472/572 - Digital Image Processing
6. Gray level enhancement Some of the simplest, yet most useful, image processing operations involve the adjustment of brightness, contrast or colour in.
Image Enhancement in the Spatial Domain
BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement.
Image Enhancement by Modifying Gray Scale of Individual Pixels
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Histogram Manipulation
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
Image Processing : Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, and Gonzalez et al.
1 Vladimir Botchko Lecture 4. Image Enhancement Lappeenranta University of Technology (Finland)
CS 376b Introduction to Computer Vision 02 / 25 / 2008 Instructor: Michael Eckmann.
Image Enhancement.
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
Binary Image Analysis. YOU HAVE TO READ THE BOOK! reminder.
Lecture 2. Intensity Transformation and Spatial Filtering
Chapter 3 Image Enhancement in the Spatial Domain.
Image processing Lecture 4.
Digital Image Processing Lecture 4 Image Restoration and Reconstruction Second Semester Azad University Islamshar Branch
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Chapter 3 Image Enhancement in the Spatial Domain.
Image Processing Image Histogram Lecture
Digital Image Processing
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Digital Image Processing Image Compression
CS654: Digital Image Analysis Lecture 18: Image Enhancement in Spatial Domain (Histogram)
Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 2
8-1 Chapter 8: Image Restoration Image enhancement: Overlook degradation processes, deal with images intuitively Image restoration: Known degradation processes;
Last updated Heejune Ahn, SeoulTech
CH2. Point Processes Arithmetic Operation Histogram Equalization
Digital Image Processing
Image Enhancement in Spatial Domain Presented by : - Mr. Trushar Shah. ME/MC Department, U.V.Patel College of Engineering, Kherva.
©Soham Sengupta,
Lecture 02 Point Based Image Processing Lecture 02 Point Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
Digital Image Processing Image Enhancement in Spatial Domain
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 3. Time Complexity Calculations.
Lecture 10 Chapter 5: Image Restoration. Image restoration Image restoration is the process of recovering the original scene from the observed scene which.
Image Enhancement in the Spatial Domain.
Digital Image Processing
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
Digital Image Fundamentals
Image Enhancement in the Spatial Domain
Image Enhancement in the
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Histogram Probability distribution of the different grays in an image.
Digital Image Processing
Digital Image Processing
Digital Image Procesing Introduction to Image Enhancement Histogram Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL PROCESSING IMPERIAL.
Digital Image Processing
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
Intensity Transform Contrast Stretching Y ← u0+γ*(Y-u)/s
Image Enhancement in Spatial Domain: Point Processing
Presentation transcript:

Image Enhancement Christoph Lampert / Chris Wojtan Some slides adapted from Selim Aksoy, Bilkent University

Representing an Image in Code 2D matrix of values, starting from the upper left (start counting at zero) Integer, floating point, …, ? boolean (0=black, 1=white) floating point (0.0=black, 1.0=white) 8-bit integer (0=black, 255=white) – most common Whatever is convenient Floating point is good for continuous math (exponentiation, division, …) Integers are useful for dividing up values into discrete sets (histograms, segmentation, …) 2 Pixel [1][3]

ImageJ You will write some code for homework Accessing and writing in an image image.get(10,15); tells us the pixel value at row 10, column 15 image.set(10, 25, 0); sets that pixel value to black Repeating an operation for every pixel for (int y=0; y<yMax; y++) for (int x=0; x<xMax; x++) image.set(x, y, 0); 3

Beware – “casting” between int and double Most images need ints in the end, but intermediate computation should be in doubles. int always rounds to an integer. This is usually undesired. int y = 0.9;// y=0 int y = 128/255;// y=0 int y = sin(x);// y=0 “Cast” between the two types (double) will treat a number like a real value (int) will treat a number like an integer int x = 100; int num_pixels = 1024; double f = (double) x / (double) num_pixels; int output_value = (int) (f * 255.0); 4

ImageJ Demos Black.java Linear.java SineWave.java Checker.java Circle.java Max.java Template.java Compute_Histogram.java 5

6 Image enhancement The principal objective of enhancement is to process an image so that the result is more suitable than the original for a specific application. Enhancement can be done in Spatial domain, Frequency domain. Common reasons for enhancement include Improving visual quality, Improving machine recognition accuracy.

7 Image enhancement First, we will consider point processing where enhancement at any point depends only on the image value at that point.

8 Image enhancement First, we will consider point processing where enhancement at any point depends only on the image value at that point. For gray level images, we will use a transformation function of the form s = T(r) where “r” is the original pixel value and “s” is the new value after enhancement.

Thresholding if image.get(x,y) < T image.set(x,y,0); else image.set(x,y,255); Images from

10 Image enhancement

11 Image enhancement

12 Image enhancement

13 Image enhancement

14 Image enhancement

15 Image enhancement Contrast stretching:

16 Image enhancement

17 Histogram processing

18 Histogram processing

19 Histogram processing

20 Histogram processing

21 Histogram processing Intuitively, we expect that an image whose pixels tend to occupy the entire range of possible gray levels, tend to be distributed uniformly will have a high contrast and show a great deal of gray level detail. It is possible to develop a transformation function that can achieve this effect using histograms.

22 Histogram equalization

23 Histogram equalization

CS 484, Fall 2012©2012, Selim Aksoy 24 Histogram equalization Adapted from Wikipedia

CS 484, Fall 2012©2012, Selim Aksoy 25 Histogram specification whatever the heck you want The math is similar, but your new image has a histogram close to any p(y), instead of a uniform distribution.

26

CS 484, Fall 2012©2012, Selim Aksoy 27 Histogram equalization Original RGB imageHistogram equalization of each individual band/channel Histogram stretching by removing 2% percentile from each individual band/channel

Enhancement using logical operations Boolean operations

Enhancement using logical operations Boolean operations

Enhancement using logical operations Boolean operations NOT AND OR XOR INPUTOUTPUT ABNOT AA AND BA OR BA XOR BA AND NOT B

31 Enhancement using arithmetic operations Addition/Subtraction

Enhancement using arithmetic operations Multiplication

Enhancement using arithmetic operations Masking, alpha channel = arithmetic operations

34 Geometric Transformations

35 Geometric Transformations

36 Geometric Transformations

37 Geometric Transformations in Code