Multimedia Programming 03: Point Processing Departments of Digital Contents Sang Il Park.

Slides:



Advertisements
Similar presentations
Image Processing Lecture 4
Advertisements

CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Digital Image Processing
Gavin S Page OpenCV Tutorial Part II Loading Images and Using Histograms 29 November 2005.
Course Website: Digital Image Processing Image Enhancement (Histogram Processing)
Multimedia Programming 08: Point Processing 4 Departments of Digital Contents Sang Il Park.
Digital Image Processing
Face Recognition and Biometric Systems 2005/2006 Filters.
Introduction to OpenCV Dr. Chung-Hao Chen Haole Guo Sep 2011.
Introduction to Digital Image Processing and Digital Image Analysis.
Point Processing : Computational Photography Alexei Efros, CMU, Fall 2011 Some figures from Steve Seitz, and Gonzalez et al.
Image Processing : Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, and Gonzalez et al.
Image Enhancement in the Spatial Domain (chapter 3) Math 5467, Spring 2008 Most slides stolen from Gonzalez & Woods, Steve Seitz and Alexei Efros.
Point Processing : Computational Photography Alexei Efros, CMU, Fall 2008 Some figures from Steve Seitz, and Gonzalez et al.
Lecture 2. Intensity Transformation and Spatial Filtering
Image Processing I : Rendering and Image Processing Alexei Efros …with most slides shamelessly stolen from Steve Seitz and Gonzalez & Woods.
L.
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
CSCE 441: Computer Graphics Image Filtering Jinxiang Chai.
Histograms- HPP. What is homogeneous? Homogeneous point process treats all pixels the same. p'=f(p); // homogeneous point processing does not care about.
Filtering (I) Dr. Chang Shu COMP 4900C Winter 2008.
OpenCV Open source C omputer V ision library By: Bahare Torkaman Fall 2010.
Detect Candle.  Open VC++ Directories configuration: Tools > Options > Projects and Solutions > VC++ Directories  Choose "Show directories for: Include.
Multimedia Programming 06: Image Warping Departments of Digital Contents Sang Il Park.
Multimedia Programming 02: Play with Images Departments of Digital Contents Sang Il Park.
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
This picture was taken on the banks of Sumatra Island (the height of waves was of approx. 32 m = 105 ft). It was found saved in a digital camera, 1 ½.
Point Processing (Szeliski 3.1) cs129: Computational Photography James Hays, Brown, Fall 2012 Some figures from Alexei Efros, Steve Seitz, and Gonzalez.
L. Akshay Masare Piyush Awasthi IMAGE PROCESSING AND OPENCV.
CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only.
CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Dr. Rolf Lakaemper.
Multimedia Programming 13: Review and term project Departments of Digital Contents Sang Il Park.
Introduction of OpenCV Alireza Shirani Researcher of Medical Image and Signal Processing M. S Electrical Engineering yahoo. com Spring.
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - IMAGES. Processing digital Images digital images are often processed using “digital filters” digital images are.
Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 2
Math – What is a Function? 1. 2 input output function.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
CS 691B Computational Photography
Multimedia Programming 04: 점, 선, 면
Multimedia Programming 10: Image Morphing
Digital Image Processing Part 3 Spatial Domain Processing.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter.
Digital Image Processing Lecture - 6 Autumn 2009.
Multimedia Programming 10: Mouse, Draw and Morphing Departments of Digital Contents Sang Il Park.
Multimedia Programming 12: Mouse, Draw and Morphing2 Departments of Digital Contents Sang Il Park.
Image Enhancement in the Spatial Domain.
Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic.
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Image Enhancement.
CIS 601 – 03 Image ENHANCEMENT SPATIAL DOMAIN Longin Jan Latecki
Image Processing - in short
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
Chapter 8, Exploring the Digital Domain
Image Enhancement in the Spatial Domain
Image Enhancement in the
Digital Image Processing
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain
Point Processing : Computational Photography
Point Processing cs195g: Computational Photography
Point Processing : Computational Photography
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/8
Digital Image Processing
Y/I/Q channel blurring with 5x5 mean filter
Point Processing cs129: Computational Photography
CIS 4350 Image ENHANCEMENT SPATIAL DOMAIN
Digital Image Processing
Intensity Transformations and Spatial Filtering
Intensity Transform Contrast Stretching Y ← u0+γ*(Y-u)/s
Presentation transcript:

Multimedia Programming 03: Point Processing Departments of Digital Contents Sang Il Park

Outline Review Image Processing –Brightness –Contrast –Gamma QnA for the program assignment #1

Review IplImage cvLoadImage (file_name) cvCreateImage (size, depth, channels) cvSaveImage (file_name, image) cvReleaseImage (image) cvNamedWindow (window_name) cvShowImage (window_name, image) cvDestroyWindow (window_name) int cvWaitKey (delay) Scalar cvGet2D (image, y, x) cvSet2D (image, y, x, Scalar)

Review: HelloCV2.cpp int main(int argc, CHAR* argv[]) { IplImage * img; img = cvLoadImage("d:\\test.jpg"); cvNamedWindow("window"); cvShowImage("window", img); cvWaitKey(); IplImage * img2; img2 = cvCreateImage(cvSize(300,300), IPL_DEPTH_8U, 3); int x,y; for(x=0; x<300; x++) for(y=0; y<300; y++) { CvScalar s = cvGet2D(img, y,x); s.val[0] +=80; s.val[1] +=80; s.val[2] +=80; cvSet2D(img2,y,x,s); } cvShowImage("window", img2); cvWaitKey(); cvDestroyWindow("window"); cvReleaseImage(&img); cvReleaseImage(&img2); return 0; }

Review: HelloCV2.cpp IplImage * img; img = cvLoadImage("d:\\test.jpg"); cvNamedWindow("window"); cvShowImage("window", img); cvWaitKey();

Review: HelloCV2.cpp int main(int argc, CHAR* argv[]) { IplImage * img; img = cvLoadImage("d:\\test.jpg"); cvNamedWindow("window"); cvShowImage("window", img); cvWaitKey(); IplImage * img2; img2 = cvCreateImage(cvSize(300,300), IPL_DEPTH_8U, 3); int x,y; for(x=0; x<300; x++) for(y=0; y<300; y++) { CvScalar s = cvGet2D(img, y,x); s.val[0] +=80; s.val[1] +=80; s.val[2] +=80; cvSet2D(img2,y,x,s); } cvShowImage("window", img2); cvWaitKey(); cvDestroyWindow("window"); cvReleaseImage(&img); cvReleaseImage(&img2); return 0; }

Review: HelloCV2.cpp IplImage * img2; img2 = cvCreateImage(cvSize(300,300), IPL_DEPTH_8U, 3); int x,y; for(x=0; x<300; x++) for(y=0; y<300; y++) { CvScalar s = cvGet2D(img, y,x); s.val[0] +=80; s.val[1] +=80; s.val[2] +=80; cvSet2D(img2,y,x,s); } cvShowImage("window", img2); cvWaitKey();

Review: HelloCV2.cpp int main(int argc, CHAR* argv[]) { IplImage * img; img = cvLoadImage("d:\\test.jpg"); cvNamedWindow("window"); cvShowImage("window", img); cvWaitKey(); IplImage * img2; img2 = cvCreateImage(cvSize(300,300), IPL_DEPTH_8U, 3); int x,y; for(x=0; x<300; x++) for(y=0; y<300; y++) { CvScalar s = cvGet2D(img, y,x); s.val[0] +=80; s.val[1] +=80; s.val[2] +=80; cvSet2D(img2,y,x,s); } cvShowImage("window", img2); cvWaitKey(); cvDestroyWindow("window"); cvReleaseImage(&img); cvReleaseImage(&img2); return 0; }

Review: HelloCV2.cpp cvDestroyWindow("window"); cvReleaseImage(&img); cvReleaseImage(&img2);

Image Processing 1 Point processing Alexei Efros

Images as functions Alexei Efros

Image Processing An image processing operation typically defines a new image g in terms of an existing image f. We can transform either the range of f. Or the domain of f: What kinds of operations can each perform? Alexei Efros

Image Processing image filtering: change range of image g(x) = h(f(x)) f x h f x f x h f x image warping: change domain of image g(x) = f(h(x)) Alexei Efros

Image Processing image filtering: change range of image g(x) = h(f(x)) image warping: change domain of image g(x) = f(h(x)) h fg h f g Alexei Efros

Point Processing The simplest kind of range transformations are these independent of position x,y: g = t(f) This is called point processing. What can they do? What’s the form of t? Important: every pixel for himself – spatial information completely lost! Alexei Efros

Basic Point Processing input output picture from g = Af + B A = 1 B = 0

Basic Point Processing input output Brightness + g = Af + B A = 1 B > 0

Basic Point Processing input output Brightness – g = Af + B A = 1 B < 0

Basic Point Processing input output Contrast + (brightness +) g = Af + B A > 1 B = 0

Basic Point Processing input output Contrast + g = Af + B A > 1 B < 0 Contrast + (brightness -)

Basic Point Processing input output Contrast – g = Af + B A < 1 B > 0

Basic Point Processing input output Contrast – (brightness +) g = Af + B A < 1 B > 0+++

A coding exercise Open image and adjust brightness/contrast by pressing keyboard example)1 : brightness up(+10) 2: brightness down(-10) 3 : contrast up(+0.1)4: contrast down(-0.1) input output g = Af + B g = input color value f = output color value A = contrast value ( 초기값 = 1) B = brightness value ( 초기값 = 0)

Hint for the exercise How to get the key input? –int cvWaitKey( int delay=0 ) waits for a pressed key. After waiting for the given delay, it proceeds. Zero delay means waiting forever until user input. Delay in milliseconds.

More functions?

Power-law transformations

Image Enhancement

Example: Gamma Correction

Contrast Stretching

Programming Assignment #1 How to compare R,G,B channels? No right answer –Sum of Squared Differences (SSD): –Will it be enough? Change in size Change in brightness

In the next class… Point Processing2: –Image Histogram –FILTER Blur Noise removal Unsharp –Pixelation