et_03_15

Upload: ram-kapur

Post on 14-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 ET_03_15

    1/10

    Contents

    Que. 1

    Que. 2

    Que.3aQue.3b

    Que.4

    Que.5

    Que. 6

    all all

    % NAme:Neha Patne

    % Roll No.: 15

    % Email Id : [email protected]

    % Sem: VIIth sem

    % Section: A

    % Lab03: Image Enhancement Using Gray level Transformations

    Que. 1

    %Q.1) Write a program to perform Image negative transformation on image

    %lab03a.tif.

    A=imread('lab03a.tif'

    imshow(A),title( 'Original Image'

    subplot(1,2,2),

    title('Processed image using Image negative transformation'

  • 7/29/2019 ET_03_15

    2/10

    Que. 2

    %Q.2) Write a program to perform Log transformation on image

    %lab03b.tif.

    B=imread('lab03b.tif'

    imshow(B,[]),title( 'Original Image'

    title('Processed Image using Log transformation'

  • 7/29/2019 ET_03_15

    3/10

    Que.3a

    %Write a program to perform Power Log transformation on image

    %lab03c.tif.

    C=imread('lab03c.tif'

    %here gamma is 0.5

    %here gamma is 1.5

    imshow(C,[]),title( 'Original Image'

    imshow(Claw1,[]),title( 'Processed Image with gamma 0.5'

    title('Processed Image with gamma 1.5'

  • 7/29/2019 ET_03_15

    4/10

    Que.3b

    %Write a program to perform Power Log transformation on image

    %lab03d.tif.

    E=imread('lab03d.tif'

    imshow(E,[]),title( 'Original Image'

    imshow(Elaw1,[]),title( 'Processed Image with gamma 0.5'

    title('Processed Image with gamma 1.5'

  • 7/29/2019 ET_03_15

    5/10

    Que.4

    %Write a program to perform Gray level slicing with and without background

    %on the image lab03e.tif.

    % part (a)

    D=imread('lab03e.tif'

    for i=1:1:r

    for j=1:1:c

    if ((D(i,j)=200)) % A=130, B=200

    % assign Lower level

    else

    % assign Higher level

    end

    end

    end

    % part(b)

    for i=1:1:r for j=1:1:c

    if ((D(i,j)=200)) % A=130, B=200

    % assign original gray level as it is

    else

    % assign Higher level

    end

    end

  • 7/29/2019 ET_03_15

    6/10

    end

    imshow(D),title( 'Original Image'

    imshow(p,[]),title( 'Gray level slicing without background '

    title('Gray level slicing with background '

    Que.5

    %Write a program capable of generating all the biplanes of an image and

    %able to reconstruct the image using 4 higher order bitplanes.

    %Display all the bit planes in a figure window and display the original

    %image and reconstructed image in another figure window.

    P=imread('lab03f.tif'

    for k=1:1:8

    subplot(4,2,k)

    imshow(c,[])

    title(sprintf( '%d bit plane'

    end

  • 7/29/2019 ET_03_15

    7/10

    % obtaining original image by first 4 bit plane

    for k=5:1:8

    end

    figure,subplot(1,2,1)

    imshow(P,[])

    title( 'original image' )

    subplot(1,2,2)

    imshow(d,[])

    title( 'image obtained by higher 4 bit plane' )

  • 7/29/2019 ET_03_15

    8/10

    Que. 6

    %Write a findbitplane function to return any of the 8 bit plane images of the

    p=imread('lab03g.tif'

    for k=1:1:8

    subplot(4,2,k)

    imshow(l,[])

    title(sprintf( '%d bit plane'

    end

    % obtaining original image by first 4 bit plane

    for k=5:1:8

    end

    figure,subplot(1,2,1)

    imshow(p,[])

    title('original image' )

    subplot(1,2,2)

    imshow(d,[])

    title('image obtained by higher 4 bit plane' )

  • 7/29/2019 ET_03_15

    9/10

  • 7/29/2019 ET_03_15

    10/10

    Published with MATLAB 7.0.4