21
Pixels

Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Pixels

Page 2: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

PixelA Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images)

Page 3: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

PixelIn most digital imaging systems, Color is represented by a number of components, such as Red, Green and Blue.

Page 4: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

PixelIn most imaging software applications, such as Photoshop, the Red, Green and Blue components are known as Channels

Channels in Photoshop

Page 5: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Color Bit Depth

Each channel of a pixel contains an intensity value between black and white.

Ideally, there would be infinite number of possible intensity value. But a computer can only store a finite number of values. Therefore, a number of schemes have emerged.

Chapter 15 Image Processing Basics 409

Note: These examples of 1-bit, 2-bit, and 3-bit images are not supported by Shake, but are used for demonstration purposes. In Shake, you ordinarily work with 8-bit, 16-bit, or 32-bit float (floating point) images.

At 1-bit resolution, the graph shows the harsh difference between black and white.

At 2-bit resolution, the graph is still harsh, but there are more colors between.

1 bit, 2 values total Graph of 1-bit image

2 bits, 4 values total Graph of 2-bit image

3 bits, 8 values total Graph of 3-bit image

410 Chapter 15 Image Processing Basics

At 3-bit resolution, you begin to see a gradient from black to white, although the graph is still choppy.

Finally, at 8 bits, you can see a smooth transition, and the graph line is almost straight.

These graphs demonstrate that more bits used to represent an image results in finer color transitions. Digital film compositing refers to bit depth on a per-channel basis, so 8 bits refers to 8 bits per channel, or 32 bits total for an RGBA (Red, Green, Blue, and Alpha) image. Shake can calculate up to 32 bits per channel, or 128 bits total in an RGBA image. To complicate things, because 8 bits equals 1 byte, images in Shake are set with a byte value of 1 (8 bits), 2 (16 bits), or 4 (32 bits, or float).

Ultimately, the color depth you decide to work in depends on the destination of the end result. For example, because of the responsiveness of film and the size of the screen, an image that looks fine at 8 bits on video can look terrible on film. On the other hand, higher bit depths are more processor-intensive. You need to strike a balance between quality and speed.

Avoiding Color BandingMost non-film composites work fine at 8 bits, which is typically the standard output of most 3D renderers and paint packages. However, there are times when you need to use a higher bit depth to process your images—requiring you to increase an image’s bit depth to 16 bits, or a whopping 65,000 (more or less) values per channel.

A typical example of when higher bit depths are better is whenever you process a ramp of similar color values (for example, the light-to-medium blue found within an image of the sky) across a wide screen space. An 8-bit image, though sometimes indiscernible from 16 bits on a computer monitor, will probably exhibit color banding when printed to film. If your sky image is generated in 8 bits in a different software package, there is no immediate improvement if you bump it up to 16 bits in Shake. In this example, the ramp needs to be generated in 16 bits to take advantage of the extra precision of 16 bits (for example, using the Shake Ramp or RGrad node).

8 bits, 256 values total Graph of 8-bit image

Color Bit Depths in Photoshop

Page 6: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Number of bits Levels of Brightness per channel Number of possible colors (RGB combinations)

1 21 = 2 2 x 2 x 2 = 8

2 22 = 4 4 x 4 x 4 = 64

3 23 = 8 8 x 8 x 8 = 512

8 28 = 256 256 x 256 x 256 = 1677216

16 216 = 65536 65536 x 65536 x 65536 = 281474976710656

Color Bit Depth

Page 7: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Dynamic Ranges

Page 8: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

“Dynamic Range” is the range between the minimum and the maximum light intensities.

From the camera sensor to the display monitor, and to the printer, each device has their own dynamic range.

Page 9: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Camera Sensor

Display Monitor

Printer

Dynamic Ranges

Page 10: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Image File Formats

File formats in Photoshop

The file format describes how pixels are stored in files.

Some key differences between formats:

• Number of Layers • Number of Channels • Compression schemes

Page 11: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Compression Schemes

Number of bytes required to store a 1000 x1000 pixels 8bits/channel image :

1000 x 1000 x 3 = 3,000,000 bytes or about 3 Mb

To store a typical 4000 x 3000 Raw 16bits/channel image:

4000 x 3000 x 3 x 2 = 72,000,000 bytes or about 72 Mb

These are big numbers!! They would occupy too much disk space and affect computer performance!!

Page 12: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Compression Schemes

Therefore, compression is usually applied to make image file sizes smaller.

It happens when you save an image to a file.

When you open the file, the computer expands the file back to its original glory… well, sort of.

Page 13: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Compression Schemes

With some compression schemes, the expansion gives you back 100% original glory, but many other schemes degrade the original image. Jpeg is a good example

So there are roughly 2 kinds of compression schemes • Lossless - retains 100% quality after expansion • Lossy - quality is lost after expansion

Page 14: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

original quality before saving into a file

Page 15: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

JPEG Compression at 50%

Page 16: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

JPEG Compression at 25%

Page 17: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Image Formats

Format Extension Bit-depth Channel Compression

Bmp .bmp .rle .dib 8-bit RGB None, Lossless (RLE)

Cineon .cin 10-bit RGB None

OpenEXR .exr 16/32-bit Arbitray None, Lossless (RLE, ZIP) & Lossy (PIZ)

GIF .gif 1–8 bit N/A Lossless (LZW)

JPEG .jpg .jpeg .jpe 8-bit RGB/G Lossy (JPEG)

Maya IFF .iff 8/16-bit RGBAZ Lossless

Mac PICT .pict .pic .pct 8-bit RGBA None, Lossless (RLE) & Lossy (QuickTime)

Softimage PIC .pic 8-bit RGBA None, Lossless (RLE)

Alias PIX .pix .als 8-bit RGB Lossless (RLE)

PCX .pcx 8-bit RGBA Lossless

PNG .png 8-bit RGBA Lossless

Photoshop .psd 8-bit RGBA None, Lossless (RLE)

Pixar .pxr 8-bit RGB/G None

SGI .rgb .sgi 8/16-bit RGBA None, Lossless (RLE)

TIFF .tif .tifff 8/16-bit RGBA None, Lossless (RLE, LZW, ZIP) & Lossy (JPEG)

Targa .tga .tpic 8/16-bit RGBA None, Lossless (RLE)

Quantel YUV .yuv 8-bit RGB None

Video Formats

Format Extension Bit-depth Channel Codec

QuickTime .mov .qt 8-bit RGB None, Lossy

AVI .avi 8-bit RGB Lossy

Windows Media .wmv .asf 8-bit RGB Lossy

MPEG-1,2,4 .mpg .mpeg 8-bit RGB Lossy

Avid OMF .omf 8-bit RGB Lossy

Resolutions

Format Aspect Ratio Resolution Pixel Ratio

NTSC 720x486 0.9 D1

PAL 1.33:1 (4:3)

720x576 1.066

HD720 1280x720 HD

HD1080 1.77:1 (16:9)

1920x1080 1

1.33:1 (4:3)

1.77:1 (16:9)

1.85:1 Film

2.35:1

2K, 4K 1

Page 18: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Exposure, Brightness, Contrast

Page 19: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Curves

Page 20: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Cloning

Page 21: Pixels - sm1702vdi.files.wordpress.com · Pixels. Pixel A Pixel is the most smallest element of a digital image. It stores a single color or an intensity (for B&W images) Pixel In

Layers