image processing rev02

Upload: bhupendra-karandikar

Post on 10-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Image Processing Rev02

    1/54

    IMAGE PROCESSING

    Bhupendra P.Karandikar

    Dept.of Instrumentation Science

    University of Pune

  • 8/8/2019 Image Processing Rev02

    2/54

    INTRODUCTION Image:An image is defined in real world as afunction of two variables, a(x,y)

    Where, a = amplitude(brightness)

    x,y= co-ordinate position

    An image frequently contains collections ofsub-images called as regions-of-interest(ROIs).

  • 8/8/2019 Image Processing Rev02

    3/54

    Image operations

    Digital technology has made it possible tomanipulate multi-dimensional signals withcomputer systems that can be divided into:

    Image Analysis

    Image Transformation

    Image understanding

  • 8/8/2019 Image Processing Rev02

    4/54

    Image operations

    Image analysis

    Input : Image

    Output : Measurement results

    Process: Comparison in under test sample with standard

    gauge or best fit circle.

    Example: a online inspection Detection & measurement ofdiameter of a rubber O rings manufactured.

    Advantages:

    Non-contact measurements.

    Human being not involved.

  • 8/8/2019 Image Processing Rev02

    5/54

    Image operations

    Image Transformation

    Input : Image

    Output : Image

    Process: Image morphing comparing each pixel of the

    image.

    Example: Digital image mixing, animation tool.

    Advantages:

    No series of picture frames are required.

    any type of image can be produced.

  • 8/8/2019 Image Processing Rev02

    6/54

    Image operations

    Image Understanding

    Input : Image

    Output : High level description

    Process: Collecting & arranging the Image information

    which can be compared with another image.

    Example: Finger print matching, Human Face recognition

    Optical character recognition.

    Advantages:

    Machine generated support to results by human being.

  • 8/8/2019 Image Processing Rev02

    7/54

    Objective of the seminar

    Featuring the mathematical operations

    used for these three operations to the

    image

    Image

    Grabbing

    tool

    Image

    Processing

    tool/s

    Operated

    Image/

    image

    information

  • 8/8/2019 Image Processing Rev02

    8/54

    Digital images

    Image representation:

    f(x,y) with origin as the upper left corner.

    Sampling :

    - measuring value of image at discrete intervals in space.- sampling rate

    - spatial resolution

    Quantization:- Grey scale image

    - Colour image, f(x,y) is a vector with three components R,G,B. This

    can be represented in RGB Colour cube.

  • 8/8/2019 Image Processing Rev02

    9/54

    Grey scale image

    Human tendency to average brightness over

    small areas, so that black dots and their white

    background merge and perceived as grey

    shade. Use of this in black & white printing technology

    Half toning:

    The process of generating a binary pattern of

    black and white dots from an image.

    Patterning Dithering

  • 8/8/2019 Image Processing Rev02

    10/54

    Digital Half toning technique

    Patterning:

    - replacing each pixel by a binary font

    - each grey level is assigned a value ofbinary font

  • 8/8/2019 Image Processing Rev02

    11/54

    Dithering

    thresholding the image against a dithermatrix.

    Each pixel is compared with dither matrix

    The pixel becomes white if value exceedsthe threshold or black otherwise.

    0 128

    D1=example for operations on 8 bit

    192 64 images

  • 8/8/2019 Image Processing Rev02

    12/54

    The Colour cube

    RED

    GREEN

    CYAN

    MAGENTA

    BLUE

    WHITE

    BLACK

    YELLOW1

    0

    1

    1

  • 8/8/2019 Image Processing Rev02

    13/54

    Simple image operations

    I. Addition & averaging:

    - addition of two images pixel by pixel

    - two images of identical dimensions- Noise removal by averaging no.of images

    - alpha blending, g(x,y) = f1(x,y)+(1- ) f2(x,y)

    - =0.5 gives evenly weighted average

  • 8/8/2019 Image Processing Rev02

    14/54

    Simple image operations

    Examples:

  • 8/8/2019 Image Processing Rev02

    15/54

    Simple image operations

    Subtraction:- subtraction of two images

    - change detection in two images

    - g(x,y) = I f1(x,y) - f2(x,y)I

    Division:- division of two images for meaningful results

    - ratio image can be formed featuring illumination &

    surface topography- remote sensing applications

  • 8/8/2019 Image Processing Rev02

    16/54

    Simple image operations

    Adjustments of brightness & contrast:

    - converting an image into interpretable form

    - image brightness, g(x,y) = f(x,y) + b

    - image contrast, g(x,y) = a f(x,y)

    where, [f1,f2] are grey levels

    g is the range(0-255).

  • 8/8/2019 Image Processing Rev02

    17/54

    Simple image operationsLinear mapping

    Map a particular range of grey levels [f1,f2] onto

    a new range [g1,g2].

    g(x,y) = g1 +(g2-g1 / f2-f1)[f(x,y)]

  • 8/8/2019 Image Processing Rev02

    18/54

    Simple image operationsLinear mapping

    f1 , here acts as a threshold up to and including

    which grey levels are mapped as 0 and values

    higher are mapped onto 255, hence this technique

    is called as Thresholding.

    This technique is used for image enhancement.

  • 8/8/2019 Image Processing Rev02

    19/54

    Simple image operationsNon-linear mapping

    Disadvantage of linear mapping: single valued

    function is necessary.

    Logarithmic mapping solves this problem, by

    logarithmic mapping of input grey level onto outputgrey level.

    Effective to enhance detail in the darker region of

    image

  • 8/8/2019 Image Processing Rev02

    20/54

    Simple image operationsNon-linear mapping

    Example:

  • 8/8/2019 Image Processing Rev02

    21/54

    Image histograms

    The histogram of an image records the

    frequency distribution of grey levels in that

    image.

    In bin 0, we record the number of times a greylevel of 0 occurs & similarly for other grey levels.

    Useful indication of relative importance of

    different grey levels in the image and judging the

    requirements of contrast & brightness

  • 8/8/2019 Image Processing Rev02

    22/54

    Histogram equalization

    Redistributes grey levels in an attempt to flatten

    the frequency distribution

    More grey levels are allocated where there are

    most pixels, fewer grey levels where there are

    fewer pixels.

  • 8/8/2019 Image Processing Rev02

    23/54

    Presentation for Seminar 3

    Morphological Image processing

    - Basic Concepts

    - Fundamental operations- Compound operations

    - Filtering

  • 8/8/2019 Image Processing Rev02

    24/54

    Review of 2nd seminar

    Digital images

    Image operations

    - Half toning, Dithering, addition,subtraction, division

    - Linear and non-linear mapping

    - Histogram and histogram equalization

  • 8/8/2019 Image Processing Rev02

    25/54

    Histogram equalization

  • 8/8/2019 Image Processing Rev02

    26/54

    Morphological operationsIntroduction

    Describes range of non-linear image

    processing techniques dealing with shape

    of image

    Removal of imperfections caused by

    noise, texture or inaccurate thresholding to

    binary images

  • 8/8/2019 Image Processing Rev02

    27/54

    Morphological operationsFundamental binary operations

    Basic concept:

    typically to probe an image with a small

    shape or template known as structuringelement.

    The structuring element is positioned at

    various positions in the image and compared

    with the corresponding neighborhood pixels.

  • 8/8/2019 Image Processing Rev02

    28/54

    Morphological operationsFundamental binary operations

    Structuring elements

    A matrix of known dimension and with pre-

    defined elements.

    Types of structuring elements:

    - Square shaped

    - Diamond shaped

    - Cross shaped etc.

    Advantage & disadvantages of structuring

    elements- for erosion / dilation.

  • 8/8/2019 Image Processing Rev02

    29/54

    Morphological operationsStructuring elements

    Examples:

  • 8/8/2019 Image Processing Rev02

    30/54

    Morphological operationsFundamental binary operations

    Fitting & hitting:

    Checking whether the element hits the

    image or fits the image.

    Hitting of an image:

    Fitting of an image:

  • 8/8/2019 Image Processing Rev02

    31/54

    Morphological operationsFundamental binary operations

    Erosion:

    Pixels are eroded from both the inner and outer

    boundaries of regions, so the erosion will enlarge

    the holes enclosed by a single region as well asmaking the gap between different regions larger.

    This is fitting of image.

    Erosion of an image f by a structuring element s

    is given by,f s

    g (x,y) = 1 if s fits f

    = 0 otherwise.

  • 8/8/2019 Image Processing Rev02

    32/54

    Morphological operationsErosion operations

    Example of erosion:

    Advantages:

    Removal of unwanted, small scale features.

    Disadvantage:

    Side-effect on image as reduction in size of features

  • 8/8/2019 Image Processing Rev02

    33/54

    Boundary detection:

    Eroded image lacks boundary pixels, hence we

    can subtract the eroded image from the original

    image to get the boundary.

    g = f - (f s)

    Morphological operationsApplications of erosion

  • 8/8/2019 Image Processing Rev02

    34/54

    Morphological operationsApplications of erosion

    Example: Boundary detection

  • 8/8/2019 Image Processing Rev02

    35/54

    Morphological operationsDilation operation

    Dilation:

    the structuring element hits the boundary regionand source image is enlarged, known as hitting

    to image.

    Dilation of an image f by a structuring element s is given by,

    f sg (x,y) = 1 if s hits f

    = 0 otherwise.

  • 8/8/2019 Image Processing Rev02

    36/54

    Morphological operationsDilation operation

    Dilation operation will shrink the holes

    enclosed by a single region and make the

    gaps between different regions smaller.

    To fill in any small intrusions into a regions

    boundaries.

    Opposite effect of erosion.

  • 8/8/2019 Image Processing Rev02

    37/54

    Morphological operationsApplications of erosion

    Disadvantage:

    Boundary finding is highly dependent on the ratio

    of structuring element to image resolution.

  • 8/8/2019 Image Processing Rev02

    38/54

    Morphological operationsApplication of Dilation

    Enlarging or enhancing the regions of

    interest (ROI)

    Smoothening of the boundary regions

    Limitations:

    Exhibits unnecessary alteration to thesharp edges

  • 8/8/2019 Image Processing Rev02

    39/54

    Morphological operationsDilation operations

    Example:

  • 8/8/2019 Image Processing Rev02

    40/54

    Morphological operationsCompound operations

    Combinations of erosion, dilation & various

    other operations

    - Inversion- opening of an image

    - Closing of an image

  • 8/8/2019 Image Processing Rev02

    41/54

  • 8/8/2019 Image Processing Rev02

    42/54

    Review of 3rd seminar

    Structuring elements & its types

    Erosion

    Applications of erosion Dilation

    Applications of dilation

    Introduction of Opening & closing of image

  • 8/8/2019 Image Processing Rev02

    43/54

  • 8/8/2019 Image Processing Rev02

    44/54

    Morphological filtering

    Filtering is removal of noise andunnecessary information from image.

    Example: a biscuit inspection system.

    Objective is to measure / monitor size &shape.

    The noise is the image capturing elementnoise or the biscuit crumbs.

  • 8/8/2019 Image Processing Rev02

    45/54

    Morphological filtering

    Example:

  • 8/8/2019 Image Processing Rev02

    46/54

    Segmentation

    Partitioning of the image into distinct regions

    Applications as Image analysis & interpretation- Industrial inspection

    - tracking of objects

    - detection and measurement of objects

    Low level Image processing

    High level Image processing

    Segmentation

  • 8/8/2019 Image Processing Rev02

    47/54

    Segmentation

    Classification:

    - Non-contextual: these techniques ignore

    the relationships between the two featuresof an image

    - Contextual: exploit the relationships

    between the two features in an image

  • 8/8/2019 Image Processing Rev02

    48/54

    SegmentationNon-contextual techniques

    Regions are treated as independentimages

    Thresholding: Classification of pixels in

    two distinct categories. The strength of an edge-typically grey

    level is detected by assigning value 0 if

    the gradient falls below the threshold or anon-zero (usually 1) is assigned.

  • 8/8/2019 Image Processing Rev02

    49/54

    Non-contextual techniquesThresholding

    Classification of pixels into two categories.

    0 f(x,y) < T

    g(x,y) =

    1 , f(x,y) T.

    For the brighter feature.

    This shows that this technique is featuredependent and cannot be used for automaticdetection.

    Example, a robot camera to view its cards in hand.

  • 8/8/2019 Image Processing Rev02

    50/54

    Example:

    Non-contextual techniquesThresholding

  • 8/8/2019 Image Processing Rev02

    51/54

    Thresholding by a pair:

    0 f(x,y) < T1g(x,y) = 1 T1 f(x,y) T2

    0 f(x,y) > T2.

    Non-contextual techniquesThresholding

  • 8/8/2019 Image Processing Rev02

    52/54

    Thresholding groups together according to

    their global attribute, such as grey level.

    This can be more successful as it takes into

    account that pixels belonging to a single

    object are close to one another.

    It can be based on concept of similarity or

    concept of discontinuity.

    Contextual techniques

  • 8/8/2019 Image Processing Rev02

    53/54

    This is a central concept of both edge and

    region based approaches.

    Types: 4-neighbourhood8-neighbourhood

    Contextual techniquesPixel connectivity

  • 8/8/2019 Image Processing Rev02

    54/54

    Convolution