0% found this document useful (0 votes)
28 views9 pages

Index: S No. Date Teacher's Remarks

The document contains 8 programs for digital image enhancement techniques: 1) image enhancement, 2) brightness and sharpness adjustment, 3) contrast manipulation, 4) image negation, 5) gray level slicing without preserving background, 6) log transformation, 7) power law transformation, and 8) histogram equalization. For each technique, the document provides the MATLAB code to apply the enhancement on an input image and display the original and processed images for comparison.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views9 pages

Index: S No. Date Teacher's Remarks

The document contains 8 programs for digital image enhancement techniques: 1) image enhancement, 2) brightness and sharpness adjustment, 3) contrast manipulation, 4) image negation, 5) gray level slicing without preserving background, 6) log transformation, 7) power law transformation, and 8) histogram equalization. For each technique, the document provides the MATLAB code to apply the enhancement on an input image and display the original and processed images for comparison.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

Index

S No. Contents Date Teacher’s Remarks

1. Program for image enhancement

2. Program for brightness sharpness

3. Program for contrast manipulation

4. Program for image negation

5. Program for gray level slicing


without preserving background
6. Program for log transformation

7. Program for power law


transformation
8. Program for histogram equalization
Image Enhancement

a=imread(‘1.jpg’);

b=double(a)+50;

imshow(a),title(‘original image’)

figure;imshow(uint8(b)),title(‘enhanced image’)
Brightness Sharpness

a=imread(‘1.jpg’);

b=double(a)-70;

imshow(a),title(‘original image’)

figure;imshow(uint8(b)),title(‘enhanced image’)
Contrast manipulation

a=imread(‘1.jpg’);

b=rgb2gray(a);

c=b*0.5;

d=b*20;

imshow(a),title(‘original’)

figure;image(c),title(‘increment in contrast’)

figure;image(d),title(‘decrement incontrast’)
Image Negation

a=imread(‘1.jpg’);

[m,n]=size(a)

t=input(‘enter the threshold parameter:’);

for i=1:m,

for j=1:n,

if a[i,j]<t

b[i,j]=0;

else

b[i,j]=255;

end

end

subplot(2,2,1);

imshow(a),title(original)

susblot(2,2,2);

imshow(b),title(‘threshold image’)

title(sprint(‘threshold value is %g’,t));


Gray level slicing without preserving background

x=imread(1.jpg’);

x=imread(x,[256,256]);

y=double(x);

[m,n]=size(y);

L=double(255);

a=double(round(L/1.25));

b=double(round(2kL/2));

for i=1:m,

for j=1:n,

if(y(i,j)>=a&y(i,j)<=b)

z(i,j)=L;

else

z(i,j)=0;

end

end

end

imshow(uint8(y));

figure;imshow(uintt8(z));
Log transformation

a=imread(‘1.jpg’);

L=255;

c=L/log 10 (1+L);

d=c*log 10 (1+double(a));

imshow(a),title(‘original image’)

figure;imshow(uint8(d)),file(‘log transformation’)
Power law transformation

a=imread(‘1.jpg’);

b=rgb2gray(a);

gamma=1.1;

d=double(a)^gamma;

figure;imshow(uint8(d)),title(‘power law’)
Histogram Equilasation

a=imread(‘1.jpg’);

b=histeq(a);

subplot(2,2,1);

imshow(a),title(‘original image’)

subplot(2,2,2);

imshow(b),title(‘after histogram equalisation’)

subplot(2,2,3);

imshow(a),title(‘original histogram’)

subplot(2,2,2);

imshow(b),title(‘after histogram equalisation’)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy