1-Introduction (Computing the image histogram).

Slides:



Advertisements
Similar presentations
Point Processing Histograms. Histogram Equalization Histogram equalization is a powerful point processing enhancement technique that seeks to optimize.
Advertisements

Bison Management Suppose you take over the management of a certain Bison population. The population dynamics are similar to those of the population we.
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Image Data Representations and Standards
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Computational Biology, Part 23 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
Topic 4 - Image Mapping - I DIGITAL IMAGING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
EE663 Image Processing Histogram Equalization Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(rk)=nk, where: rk is the kth gray level nk.
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
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
What's a histogram? The Histogram shows the total tonal distribution in the image – global quality. It's a bar-chart of the count of pixels of every tone.
Chapter 4: Image Enhancement
CS324e - Elements of Graphics and Visualization Color Histograms.
Modeling Pixel Process with Scale Invariant Local Patterns for Background Subtraction in Complex Scenes (CVPR’10) Shengcai Liao, Guoying Zhao, Vili Kellokumpu,
CS 376b Introduction to Computer Vision 02 / 25 / 2008 Instructor: Michael Eckmann.
Image Enhancement.
Computing IV Chapter Three: imgproc module Image Processing Xinwen Fu.
Computer Vision Lecture 3: Digital Images
College Algebra Fifth Edition James Stewart Lothar Redlin Saleem Watson.
Copyright © Cengage Learning. All rights reserved. 6 Normal Probability Distributions.
Spectral contrast enhancement
Computer vision.
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.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Point Operations – Chapter 5. Definition Some of the things we do to an image involve performing the same operation on each and every pixel (point) –We.
September 5, 2013Computer Vision Lecture 2: Digital Images 1 Computer Vision A simple two-stage model of computer vision: Image processing Scene analysis.
Digital Image Processing CCS331 Relationships of Pixel 1.
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - IMAGES. Processing digital Images digital images are often processed using “digital filters” digital images are.
Feature based deformable registration of neuroimages using interest point and feature selection Leonid Teverovskiy Center for Automated Learning and Discovery.
UNIT 5.  The related activities of sorting, searching and merging are central to many computer applications.  Sorting and merging provide us with a.
Learning to Detect Faces A Large-Scale Application of Machine Learning (This material is not in the text: for further information see the paper by P.
Digital Image Processing Part 2 Contrast processing.
Wonjun Kim and Changick Kim, Member, IEEE
Image Processing Intro2CS – week 6 1. Image Processing Many devices now have cameras on them Lots of image data recorded for computers to process. But.
Coin Recognition Using MATLAB - Emad Zaben - Bakir Hasanein - Mohammed Omar.
(Project) by:- ROHAN HIMANSHU ANUP 70282
Lecture Six Figures from Gonzalez and Woods, Digital Image Processing, Second Edition, Copyright 2002.
Chapter 7. Classification and Prediction
- photometric aspects of image formation gray level images
An Adept Edge Detection Algorithm for Human Knee Osteoarthritis Images
IMAGE SEGMENTATION USING THRESHOLDING
Chapter 15 QUERY EXECUTION.
Saliency, Scale and Image Description (by T. Kadir and M
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.
Image Processing – Contrast Enhancement
Computer Vision Lecture 3: Digital Images
Image Segmentation Techniques
Computer Vision Lecture 16: Texture II
Chapter IX Bump Mapping
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Histogram Probability distribution of the different grays in an image.
Multimedia Information Retrieval
Digital Image Processing
Noah Snavely.
Digital Image Processing
Digital Image Processing Week III
Histogram Equalization
Digital Image Processing
Magnetic Resonance Imaging
Grey Level Enhancement
CIS 4350 Image ENHANCEMENT SPATIAL DOMAIN
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
IT523 Digital Image Processing
A Parallel Algorithm for Hardware Implementation of Inverse Halftoning
Histogram The histogram of an image is a plot of the gray _levels values versus the number of pixels at that value. A histogram appears as a graph with.
Lecture 15: Structure from motion
Random Neural Network Texture Model
Presentation transcript:

...Presentation Content of Chapter 4 (Counting the Pixels with Histograms)..... 1-Introduction (Computing the image histogram). 2-Applying look-up tables to image appearance. 3-Equalizing the image histogram. 4-Back_projecting a histogram to detect specific image content. 5-Using the mean shift algorithm to find an object. 6-Retrieving similar images using histogram comparison. 7-Questions. #Galaxy_Flutes_Time :) ;) :)

Introduction (Computing the image histogram) An image is composed of pixels of different values (colors). An image is made of pixels, each of them having different values. For example, in a 1-channel gray-level image, each pixel has a value between 0 (black) and 255 (white). Depending on the picture content The distribution of pixels values across the image constitutes an important characteristic of this image.

...Presentation Content..... 1-Introduction (Computing the image histogram). 2-Applying look-up tables to image appearance. 3-Equalizing the image histogram. 4-Back_projecting a histogram to detect specific image content. 5-Using the mean shift algorithm to find an object. 6-Retrieving similar images using histogram comparison. 7-Questions. #Galaxy_Flutes_Time :) ;) :)

Introduction (Computing the image histogram) A histogram is a simple table that gives the number of pixels that have a given value in an image (or sometime a set of images). The histogram of a gray-level image will therefore have 256 entries (or bins). Bin 0 gives the number of pixels having value 0, bin 1 the number of pixels having value 1, and so on. Obviously, if you sum all of the entries of a histogram, you should get the total number of pixels. Histograms can also be normalized such that sum of the bins equals 1. In that case, each bin gives the percentage of pixels having this specific value in the image.

Computing a histogram in OpenCV Computing a histogram with OpenCV can be easily done by using the cv::calcHist function. This is a general function which can compute the histogram of multiple channel images of any pixel value type.

Apply coding in Page (90&91)

Output of previous code

Output of previous code

Apply code in page(92&93)

Output of previous code

Apply code in page(93&94)

Output of previous code

Apply code in page(94&95&96)

Output of previous code

Applying look-up tables to image appearance Image histograms capture the way a scene is rendered using the available pixel intensity values. By analyzing the distribution of the pixel values over an image, it is possible to use this information to modify and possibly improve an image. This recipe explains how one can use a simple mapping function, represented by a look-up table, to modify the pixel values of an image.

Applying look-up tables to image appearance A look-up table is a simple one-to- one (or many-to-one) function that defines how pixel values are transformed into new values. It is a 1D array with, in the case of regular gray-level images, 256 entries. Entry i of the table gives the new intensity value of the corresponding gray level, that is: newIntensity= lookup[oldIntensity];

Apply LUT in OpenCV Function cv::LUT in OpenCV applies a look-up table to an image in order to produce a new image. We can add this function to our Histogram1D class: cv::Mat applyLookUp(const cv::Mat& image, // input image const cv::Mat& lookup) { // 1x256 uchar matrix // the output image cv::Mat result; // apply lookup table cv::LUT(image,lookup,result); return result; }

Apply code in pages(97&98&99)

Output of previous code

Code in page with output(99&100)

Equalizing the image histogram The histogram shown in the first recipe of this chapter is a good example of this phenomenon. The middle-gray intensities are indeed heavily represented, while darker and brighter pixel values are rather rare. In fact, one can think that a good- quality image should make equal use of all available pixel intensities. This is the idea behind the concept of histogram equalization, that is making the image histogram as flat as possible.

Histogram Equalization in OpenCV OpenCV offers an easy-to-use function that performs histogram equalization. It can be called as follows: cv::Mat equalize(const cv::Mat &image) { cv::Mat result; cv::equalizeHist(image,result); return result; }

Apply code in page with output (101&102)

Back_Projecting A histogram is an important characteristic of an image's content. If you look at an image area showing a particular texture or a particular object, then the histogram of this area can be seen as a function giving the probability that a given pixel belongs to this specific texture or object. In this recipe, you will learn how the image histogram can be advantageously used to detect specific image content.

Back_Projection in OpenCV cv::Mat imageROI; imageROI= image(cv::Rect(360,55,40,50)); // Cloud region You then extract the histogram of this ROI. This is easily accomplished using the Histogram1D class defined in the first recipe of this chapter: Histogram1D h; cv::MatND hist= h.getHistogram(imageROI); By normalizing this histogram, we obtain a function that gives the probability of a pixel of a given intensity value to belong to the defined area: cv::normalize(histogram,histogram,1. 0);

Steps of algorithm

Main techniques

Apply code in page(103-107)

Output of code

Using the mean shift algorithm to find an object. The result of a histogram backprojection is a probability map that expresses the probability that a given image content is found at a specific image location. Suppose we now know the approximate location of an object in an image, the probability map can be used to find the exact location of the object. The most probable will be the one that maximizes this probability inside a given window. Therefore, if we start from an initial, location and iteratively move around, it should be possible to find the exact object location. This is what is accomplished by the mean shift algorithm.

Histogram comparison Content-based image retrieval is an important problem in computer vision. It consists of finding a set of images presenting content similar to a given query image. Since we have learned that histograms constitute an effective way to characterize an image's content, it makes sense to think that they can be used to solve the content-based retrieval problem. The key here is to be able to measure the similarity between two images by simply comparing their histograms. A measurement function which will estimate how different, or how similar, two histograms are will need to be defined. Various such measures have been proposed in the past, and OpenCV proposes few of them in its implementation of the cv::compareHist function.

First technique of histogram comparison(Metrics)

First technique of histogram comparison(Earth Mover)

Apply code in page(113&114)

Output of previous code What does this program do? 1-Loads a base image and 2 test images to be compared with it. 2-Generate 1 image that is the lower half of the base image. 3-Convert the images to HSV format 4-Calculate the H-S histogram for all the images and normalize them in order to compare them. 5-Compare the histogram of the base image with respect to the 2 test histograms, the histogram of the lower half base image and with the same base image histogram. 6-Display the numerical matching parameters obtained.

Another code running

Output of previous code

Questions Time #enjoy 1. In _______ image we notice that the components of histogram are concentrated on the low side on intensity scale. a) bright b) dark c) colourful d) All of the Mentioned 2. What is Histogram Equalisation also called as? a) Histogram Matching b) Image Enhancement c) Histogram linearisation d) None of the Mentioned

Notes:: if u solve 4 questions correctly u win a galaxy flutes …... Questions time #enjoy 3. Histogram Equalisation is mainly used for _________________________. a) Image enhancement b) Blurring c) Contrast adjustment d) None of the Mentioned 4. The type of Histogram Processing in which pixels are modified based on the intensity distribution of the image is called _______________. a) Intensive b) Local c) Global d) Random Notes:: if u solve 4 questions correctly u win a galaxy flutes …...

Answers 1. In _______ image we notice that the components of histogram are concentrated on the low side on intensity scale. a) bright b) dark c) colourful d) All of the Mentioned View Answer Answer: b 2. What is Histogram Equalisation also called as? a) Histogram Matching b) Image Enhancement c) Histogram linearisation d) None of the Mentioned View Answer Answer: c

Answers 3. Histogram Equalisation is mainly used for _________________________. a) Image enhancement b) Blurring c) Contrast adjustment d) None of the Mentioned View Answer Answer: a 4. The type of Histogram Processing in which pixels are modified based on the intensity distribution of the image is called _______________. a) Intensive b) Local c) Global d) Random View Answer Answer: c

Members of Group: Yasmin Salah Ibrahim(Leader Of Group). Mona Mahmoud Sabry Ashour. Maha Abd-Elnasir El-rayes.