**Image Processing**

**Why?!**

Computer Vision

VS

Image Processing

Focus on syntax and low-level architectures.

Primitive operations such as to reduce noise, contrast enhancement and image sharpening.

Research area within Electrical engineering/ Signal processing.

Both inputs and outputs are images.

Computer

Vision

Segmentation, descriptions of partitioned objects and classification of individual objects.

Research area within Computer science/ Artificial intelligence.

Inputs are generally images,

But its outputs are

attributes, measurements or description

extracted from those images.

Image

Processing

Visualization

- Observe the objects that are not visible by human eye.

Image sharpening and restoration

-create a better image.

Image retrieval

-seek for the image of interest

X-ray mammogram

Measurement of pattern

-measures various objects in an image

Image Recognition

-distinguish the objects in an image

**What is a Digital Image?**

discrete samples f [x,y] representing continuous image f (x,y)

Intensity Transformation and Spatial Filtering

Image Domains

spatial

frequency

Spatial means place so spatial domain is simply the plane which describes the place of a pixel.

it is usually drawn like x,y coordinates

Spatial domain OPs

The general expression of the spatial operations is

g(x , y)=T[f(x , y)]

Where

f(x , y) is the input image

g(x , y) is the output image

T is the operator

the most important operation is the intensity transformation

s=T(r)

Where

s is the intensity of single pixel in output image

r is the intensity of single pixel in input image

T is now the intensity transformation operator

Intensity Transformation Functions

The basic intensity transformation functions are as follows:

Identity

Negative

Logarithmic (log and anti log)

Power law

Matlab Function

g = imadjust (f, [low_in high_in], [low_out high_out], gamma)

(low_in, high_in, low_out, high_out). are values between 0 and 1 and are proportional to the minimum and maximum value of the pixel, i.e. [0 255] in case of 8 bit

(F) Is the input image variable

(gamma). Is a given parameter discussed later

Identity

It is a trivial function where it just outputs the same value of the pixel

Example: pixel p(40,100) of intensity value r=100 when the operator T which is the identity is operated on this pixel the output value of the same pixel is s=100 also

Negative

Say we have a pixels of range of intensities of [0 L-1] the negative of this values is obtained by

s=L-1-r

Negative

Log transform

The general form is

s=clog(1+r)

Where

c is some const. And 1+r is just to avoid case of r=0

This function is used to expand the pixels in the dark region and compressing light regions. it is used when we are interested in dark areas

Log transform

Power law (gamma)

The general form is

s=c(r)^gamma

Where (gamma) and c are const.

This function operates as the log function in case of gamma is of fraction value but with wide applications

if c=gamma=1 that is identity!

Increasing gamma will be like using inverse log

gamma=2

gamma=0.5

Image Histogram

What Is Contrast ??

Low Contrast Images

High Contrast Images

Histogram Stretching

I = imread('pout.tif');

J = imadjust(I);

imshow(I), figure, imshow(J)

Histogram Equalization

Histogram Matching

Sampling

Quantization

Analog

Digital

Bits per pixel

Concept of Pixel