image manipulation csc361/661 – digital media spring 2002 burg/wong

10
Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Upload: ralph-charles

Post on 17-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Image Manipulation

CSC361/661 – Digital MediaSpring 2002Burg/Wong

Page 2: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Adjusting Color and Contrast

In Photoshop, go to Image->Adjust->Levels to see histogram.

Left end of slider controls pixel value mapped to black.

Right end of slider controls pixel value mapped to white.

You can do the same thing with Image->Adjust->Curves.

Page 3: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Mapping Functions

The “curve” represents a function that maps the original pixel value to a new value.

A steeper slope represents greater contrast. Moving the beginning point up the y axis

means your darkest color is not pure black. Moving the end point down vertically

parallel to the y axis means your lightest color is not pure white.

You can adjust the R, G, and B components separately in a color image.

Page 4: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Convolutions

An n x n convolution mask computes a weighted sum of neighboring pixels across an image.

It can be used to blur or sharpen an image.

Try the examples from pages 142 and 145 in your book.

A Gaussian blur looks more natural.

Page 5: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Unsharp Mask

A technique for sharpening an image.

You specify How much two pixels must differ by in

order to be considered an edge (the threshold).

The radius of the region in which each pixel is compared.

The percentage increase in contrast between pixels.

Page 6: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Unsharp Mask

Unsharp masking proceeds as follows: A Gaussian blur is applied to a copy of

the original image. The pixels in the original image are

multiplied by a scaling factor. The blurred image is subtracted from

the scaled original image.

Page 7: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Indexed Color

Uses 1 byte for each pixel, allowing up to 256 colors.

A palette is associated with each image, showing which colors are used.

The palette maps each number between 0 and 255 with a 3-byte color from over 16 million possibilities.

Page 8: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Indexed Color

You can edit your color table so that it uses even fewer than 256 colors.

If your original image actually has more than 256 colors, one of two things can be done with the colors not in your palette: Choose the closest one. Dither

Page 9: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Dithering

Dithering simulates a color not in the palette by placing different colors close together so that the eye mixes them – they are chosen so that, when blended by the eye, they look like the missing color.

You can use diffusion, pattern, or noise dithering. Diffusion usually works best.

Page 10: Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong

Web-Safe Palette

If you choose the Web-Safe palette, you know exactly what your picture is going to look like on someone else’s computer if it’s accessed through the Web. (The picture won’t be dithered any further.)

There are 216 colors in the Web-safe palette.