csci 1101b
play

CSCI 1101B Advanced Image Manipulation Techniques Mohammad T . - PDF document

3/12/2014 CSCI 1101B Advanced Image Manipulation Techniques Mohammad T . Irfan 3/6/14 Red-eye reduction Write a function for red-eye reduction Parameters: picture file name (jenny - red.jpg) and coordinates for the box Show


  1. 3/12/2014 CSCI 1101B Advanced Image Manipulation Techniques Mohammad T . Irfan 3/6/14 Red-eye reduction  Write a function for red-eye reduction  Parameters: picture file name (“jenny - red.jpg”) and coordinates for the box  Show and return the modified picture object 1

  2. 3/12/2014 Pseudocode for every x coordinate within the box for every y coordinate within the box px = pixel at (x, y) if distance(red, px’s color) < 165 change px’s color to black/gray show the modified picture return the modified picture Edge detection 2

  3. 3/12/2014 Tracking moving objects How to detect edges?  What is an edge?  There is an abrupt change of color  Psueodocode for each x coordinate for each y coordinate if the luminance of (x, y) pixel is very different from that of neighboring pixels, (x, y) is part of an edge  In addition to the above, we want to create a new picture that shows the edges 3

  4. 3/12/2014 Practice problems (class participation homework)  Due on Tuesday, March 11  Blurring a picture (program 42)  The filename parameter of the blur function must be the file name with complete path. Only “flower1.jpg” for filename will not work. Write the following in command area to get the complete path:  setMediaPath()  filename = getMediaPath (“flower1.jpg”)  blur(filename) #call the blur function with the proper argument  Did you understand why the ranges in for loops started at 1 and ended 2 short of width/height? class participation homework (cont.)  Chromakey (Program 47)  Here, the source and bg parameters are picture objects. File names as arguments will not work. You will need to create the picture objects from the command area first. You can then supply those picture objects to the chromakey function. Here’s an example for creating these picture objects (type the following in command area):  file = getMediaPath (“blue - mark.jpg”) #assuming setMediaPath() done previously  source = makePicture(file)  file = getMediaPath (“moon - surface.jpg”)  bg = makePicture(file)  chromakey(source, bg) #call the chromakey function with proper arguments 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend