video we will consider how electronic pictures (monochrome) are made up. consider some important...

24
Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are represented in a computer. Appreciate compromises and limitations. Finally you will be able to edit individual picture elements and change the brightness, contrast and of an image, as say Photoshop may do.

Upload: alice-trivitt

Post on 01-Apr-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Video

• We will consider how electronic pictures (monochrome) are made up.

• Consider some important characteristics of electronic images.

• See how image are represented in a computer.

• Appreciate compromises and limitations.

• Finally you will be able to edit individual picture elements and change the brightness, contrast and of an image, as say Photoshop may do.

Page 2: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

The television picture

• Consider monochrome first.

• The image that we see on our monitors is composed of a series of horizontal lines.

• So it is sampled in the vertical direction.

Page 3: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

The television picture

Original image (1)is represented by a series of lines (2)

(1)

(2)

Page 4: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

How many lines (samples)/Spatial

resolution. • Spatial resolution is finest

detail in the vertical and horizontal direction we can resolve (see).

• If the television picture is to have good spatial resolution we must have a minimum number of lines (vertical samples).

Page 5: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

How many lines (samples)/Spatial

resolution. • That is, the lines must be

spaced such that there are two for every change in the finest detail (sampling theory).

• So reducing the number of lines (samples) will limit resolution and cause aliasing.

Page 6: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

How many lines (samples)/Spatial

resolution. • For television there are 625 lines

in the European television picture, not all of these lines are used to transmit the picture. They are used and reserved for other purposes.

• In the American NTSC standard there are nominally 525 lines per frame, but only approximately 480 lines make up the actual picture.

Page 7: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Aspect ratios

• The maximum angle that our eyes can see (without moving them) is greater in the horizontal direction.

• Therefore square televisions are out.

• Television screens are larger horizontally than vertically.

• The ratio of the wide to the height is called the aspect ratio.

• Two common television aspect ratios are:– 4:3– 16:9

Page 8: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

The digital picture and pixels.

• In the computer we cannot represent television’s horizontal line.

• We need to store it as a sequence of numbers in the computer.

• So we sample the brightness values at many points along the television line and convert the brightness value to a numerical value.

• So a sample point now exists in both the horizontal and vertical directions. Called a pixel (Picture element).

Page 9: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

How many horizontal samples?

• There is no real reason to make the horizontal resolution much better (or worse) than the vertical resolution. (Although the eye’s response it not exactly equal).

Page 10: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

How many horizontal samples?

• There are effectively therefore 480 samples in the vertical direction.

• If we:– keep the spatial resolution in the

horizontal and vertical directions equal.

– Have square pixels.– Maintain a 4:3 (Width : Height)

aspect ratio.

• How many samples do we need in the horizontal direction?

Page 11: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

How many samples?

• Answer:– 4/3 x 480 = 640

• The NTSC television based 640 x 480 resolution has become a standard for computers.

• Other higher (we view computer monitors more closely than television) computer standard resolutions exist :– 800 x 600– 1024 x 768

• All 4:3 aspect ratio.

Page 12: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Sampling in vertical and horizontal

directions

Image is sampled to produce640 x 480 samples (typically) at the intersection of the horizontal and vertical lines.

480 rows(lines)

Each line is sampled 640 times

Page 13: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Total number of samples, physical

significance • We can consider a block of 640

horizontal samples (in a 640 x 480 image) as a television line or a row of a 2 dimensional matrix.

• The full picture is made up of 480 such lines stacked on top of each other.

• Any given position in each horizontal block (line) forms a column (vertical line) with that same position in those blocks above and beneath any given line.

• We can consider our digital picture as a horizontal matrix, therefore called a bitmap.

Page 14: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

The digital picture/ Pixel values.

• We allow 256 values (typically) for each pixel value (8 bit).

• Each sample from our television line must be quantised.

• That is we must find the nearest value in the range 0-255 to represent it.

Page 15: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Brightness variation and

sampling/quantisation.

Possible sample point will lie between two levels,But nearer to 239

Distance along the line

Brightness

BrightMax 255

DarkMin 0

239238

A single line, showing brightness variations.

Sample point

Page 16: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Total number of samples, physical

significance

480 rows(lines)

640 columns

63

240

480 x 640 matrix

Each pixel point is represented by a corresponding value in a matrix. Bitmap

By changing the value in the matrix the correspondingpixel will be changed.

Page 17: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Matrices and pictures

• But the matrix doesn’t have to be so large.

• We can make up an image by putting values into a 3 x 3 matrix.

• The values at each point in the matrix represent the brightness of a pixel.

• The position (in terms of rows and columns) in the matrix will correspond directly to the position on the screen.

Page 18: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Matrices and pictures

• Make a 3 x 3 matrix with ones in all the rows and columns.– Im=ones(3,3)

• Set up Matlab to respond to “normal range of intensities (0-255)for i=1:256

grey(i, 1:3)=(i-1)/255endcolormap(grey)

Page 19: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Matrices and pictures

• Make all values maximum (and view)

Im=Im*255

image(Im)

• Change values and see the effect

Im(1, 2)=127

image(Im)

Page 20: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Brightness and contrast

• The value of each point in this two dimensional matrix represents the brightness of a pixel.

• In other words brightness is the absolute value of a pixel.

• Contrast is the difference between the brightest pixel and the darkest pixel in an image.

Page 21: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Changing Brightness and contrast

• The above implies that we must add or subtract to change the brightness of a pixel, and multiply or divide the change the contrast of an image.

• We can try it on our simple image, but it will work with larger images.

Page 22: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Changing Brightness

• Our image is full brightness in most parts so lets decrease the brightness and view it. Im=Im-127

image(Im)

• We can increase it againIm=Im+127

image(Im)

• If we increase/decrease values below 0 or above 255 we lose information in the image, try it.

Page 23: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Changing Contrast

• Lets make a low contrast image and have a look.Imlc= ones(3,3)*124

Imlc(2,2)= 100

image(Imlc)

• Now use multiplication to increase the contrast, note that the difference between the values now increase.Imhc=Imlc*2

image(Imhc)

Page 24: Video We will consider how electronic pictures (monochrome) are made up. Consider some important characteristics of electronic images. See how image are

Changing Contrast and brightness

• If we now reduce the brightness to restore the higher levels to their previous values, the contrast change is demonstrated more clearly.Imhc=Imhc-124

image(Imhc)